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

stable commit: improve UI layout of Branch dialog

* remove dialog separator
* use layout table
* move up the description (and changed the font weight)
* disable dialog resizing

Changeset c200d7336096

Parent 87eb53dfb6c7

by Yuki KODAMA

Changes to one file · Browse files at c200d7336096 Showing diff from parent 87eb53dfb6c7 Diff from another changeset...

 
28
29
30
31
32
 
 
 
33
34
35
 
 
 
 
36
37
38
 
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
 
81
82
83
 
84
85
86
 
28
29
30
 
 
31
32
33
34
35
 
36
37
38
39
40
41
42
 
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
 
85
86
87
88
89
90
91
@@ -28,11 +28,15 @@
 class BranchOperationDialog(gtk.Dialog):   def __init__(self, branch, close, mergebranches):   gtk.Dialog.__init__(self, parent=None, flags=gtk.DIALOG_MODAL, - buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OK, gtk.RESPONSE_OK)) + buttons=(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, + gtk.STOCK_OK, gtk.RESPONSE_OK), + title=_('Branch Operations'))   gtklib.set_tortoise_icon(self, 'branch.ico')   gtklib.set_tortoise_keys(self) - self.set_title(_('Branch Operations')) + self.set_resizable(False) + self.set_has_separator(False) + self.connect('response', self.response) +   self.newbranch = None   self.closebranch = False   @@ -48,30 +52,30 @@
  self.show_all()   return   - self.connect('response', self.response) - lbl = gtk.Label(_('Changes take effect on next commit')) + # create widgets   nochanges = gtk.RadioButton(None, _('No branch changes'))   self.newbranchradio = gtk.RadioButton(nochanges,   _('Open a new named branch')) + self.newbranchradio.set_active(True) + self.newbranchradio.connect('toggled', self.nbtoggle) + self.branchentry = gtk.Entry() + self.branchentry.connect('activate', self.activated)   self.closebranchradio = gtk.RadioButton(nochanges,   _('Close current named branch')) - self.branchentry = gtk.Entry() - self.branchentry.connect('activate', self.activated)   - hbox = gtk.HBox() - hbox.pack_start(self.newbranchradio, False, False, 2) - hbox.pack_start(self.branchentry, True, True, 2) - self.vbox.pack_start(hbox, True, True, 2) - hbox = gtk.HBox() - hbox.pack_start(self.closebranchradio, True, True, 2) - self.vbox.pack_start(hbox, True, True, 2) - hbox = gtk.HBox() - hbox.pack_start(nochanges, True, True, 2) - self.vbox.pack_start(hbox, True, True, 2) - self.vbox.pack_start(lbl, True, True, 10) - self.newbranchradio.connect('toggled', self.nbtoggle) + # layout table + table = gtklib.LayoutTable() + self.vbox.pack_start(table, True, True, 2)   - self.newbranchradio.set_active(True) + lbl = gtk.Label() + lbl.set_markup(gtklib.markup(_('Changes take effect on next commit'), + weight='bold')) + table.add_row(lbl, padding=False, ypad=6) + table.add_row(self.newbranchradio, self.branchentry) + table.add_row(self.closebranchradio) + table.add_row(nochanges) + + # prepare to show   if branch:   self.newbranch = branch   self.branchentry.set_text(branch) @@ -81,6 +85,7 @@
  self.closebranchradio.set_active(True)   else:   nochanges.set_active(True) +   self.show_all()     def nbtoggle(self, radio):