Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

hgignore: cleanup UI layout

Changeset 93d3c0356c52

Parent 2a2ac2c0c9f9

by Yuki KODAMA

Changes to one file · Browse files at 93d3c0356c52 Showing diff from parent 2a2ac2c0c9f9 Diff from another changeset...

 
40
41
42
43
44
45
46
47
48
49
50
51
 
 
 
 
 
 
 
 
52
53
54
55
56
57
 
 
58
59
60
61
62
63
64
65
66
67
 
 
 
68
69
70
71
72
 
 
73
74
75
76
77
78
79
 
80
81
82
83
84
85
86
 
87
88
89
 
155
156
157
158
 
159
160
161
 
40
41
42
 
 
 
 
 
 
 
 
 
43
44
45
46
47
48
49
50
51
 
52
 
 
 
53
54
55
 
 
 
 
 
 
 
 
 
56
57
58
59
 
60
 
 
61
62
63
64
65
66
67
68
 
69
70
71
 
72
73
74
75
76
77
78
79
 
145
146
147
 
148
149
150
151
@@ -40,50 +40,40 @@
  self.add(mainvbox)   mainvbox.set_border_width(2)   - ## hbox for glob entry - hbox = gtk.HBox() - mainvbox.pack_start(hbox, False, False) - lbl = gtk.Label(_('Glob:')) - hbox.pack_start(lbl, False, False, 4) - lbl.set_property('width-chars', 9) - lbl.set_alignment(1.0, 0.5) - glob_entry = gtk.Entry() - hbox.pack_start(glob_entry, True, True, 4) + ## layout table for top + table = gtklib.LayoutTable() + mainvbox.pack_start(table, False, False) + + ### hbox for glob entry + self.glob_entry = gtk.Entry() + self.glob_entry.set_text(hglib.toutf(fileglob)) + self.glob_entry.connect('activate', self.add_glob)   glob_button = gtk.Button(_('Add')) - hbox.pack_start(glob_button, False, False, 4)   glob_button.connect('clicked', self.add_glob) - glob_entry.connect('activate', self.add_glob) - glob_entry.set_text(hglib.toutf(fileglob)) - self.glob_entry = glob_entry + table.add_row(_('Glob:'), self.glob_entry, 0, + glob_button, expand=0)   - ## hbox for regexp entry - hbox = gtk.HBox() - mainvbox.pack_start(hbox, False, False) - lbl = gtk.Label(_('Regexp:')) - hbox.pack_start(lbl, False, False, 4) - lbl.set_property('width-chars', 9) - lbl.set_alignment(1.0, 0.5) - regexp_entry = gtk.Entry() - hbox.pack_start(regexp_entry, True, True, 4) + ### hbox for regexp entry + self.regexp_entry = gtk.Entry() + self.regexp_entry.connect('activate', self.add_regexp)   regexp_button = gtk.Button(_('Add')) - hbox.pack_start(regexp_button, False, False, 4)   regexp_button.connect('clicked', self.add_regexp) - regexp_entry.connect('activate', self.add_regexp) - self.regexp_entry = regexp_entry + table.add_row(_('Regexp:'), self.regexp_entry, 0, + regexp_button, expand=0)     ignorefiles = [repo.wjoin('.hgignore')]   for name, value in repo.ui.configitems('ui'):   if name == 'ignore' or name.startswith('ignore.'):   ignorefiles.append(os.path.expanduser(value))   - ## ignore file combo (if need) + ### ignore file combo if needs   if len(ignorefiles) > 1:   combo = gtk.combo_box_new_text() - mainvbox.pack_start(combo, False, False, 4)   for f in ignorefiles:   combo.append_text(hglib.toutf(f))   combo.set_active(0)   combo.connect('changed', self.file_selected) + table.add_row(_('Apply to:'), combo, padding=False)   self.ignorefile = ignorefiles[0]     ## hbox for filter & unknown list @@ -155,7 +145,7 @@
  unktree.get_selection().connect('changed', self.unknown_rowchanged)     # prepare to show - glob_entry.grab_focus() + self.glob_entry.grab_focus()   gobject.idle_add(self.refresh)     def file_selected(self, combo):