Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

gtklib: refactoring: rename method of SlimToolbar

Changeset 8961982c295d

Parent 00c3b466f8ff

by Yuki KODAMA

Changes to 4 files · Browse files at 8961982c295d Showing diff from parent 00c3b466f8ff Diff from another changeset...

 
599
600
601
602
603
 
 
604
605
606
607
608
 
609
610
611
 
599
600
601
 
 
602
603
604
605
606
607
 
608
609
610
611
@@ -599,13 +599,13 @@
    ### public methods ###   - def append_stock(self, stock_id, tooltip=None, toggle=False, group=None): - icon = gtk.image_new_from_stock(stock_id, gtk.ICON_SIZE_MENU) + def append_button(self, icon, tooltip=None, toggle=False, group=None): + img = gtk.image_new_from_stock(icon, gtk.ICON_SIZE_MENU)   if toggle:   button = gtk.ToggleButton()   else:   button = gtk.Button() - button.set_image(icon) + button.set_image(img)   button.set_relief(gtk.RELIEF_NONE)   button.set_focus_on_click(False)   if self.tooltips and tooltip:
 
269
270
271
272
 
273
274
275
 
269
270
271
 
272
273
274
275
@@ -269,7 +269,7 @@
  self.pack_start(progbox)     def add_button(stock_id, tooltip, handler, toggle=False): - btn = progbox.append_stock(stock_id, tooltip, toggle) + btn = progbox.append_button(stock_id, tooltip, toggle)   btn.connect('clicked', handler)   return btn  
 
1044
1045
1046
1047
 
1048
1049
1050
 
1051
1052
1053
 
1054
1055
1056
1057
 
1058
1059
 
1060
1061
1062
 
1063
1064
 
1065
1066
 
1067
1068
1069
 
1070
1071
1072
 
1116
1117
1118
1119
 
1120
1121
1122
 
1044
1045
1046
 
1047
1048
1049
 
1050
1051
1052
 
1053
1054
1055
1056
 
1057
1058
 
1059
1060
1061
 
1062
1063
 
1064
1065
 
1066
1067
1068
 
1069
1070
1071
1072
 
1116
1117
1118
 
1119
1120
1121
1122
@@ -1044,29 +1044,29 @@
  self.syncbox = gtklib.SlimToolbar(self.tooltips)   syncbox = self.syncbox   - refresh = syncbox.append_stock(gtk.STOCK_REFRESH, + refresh = syncbox.append_button(gtk.STOCK_REFRESH,   _('Reload revision history'))   syncbox.append_separator() - apply = syncbox.append_stock(gtk.STOCK_APPLY, + apply = syncbox.append_button(gtk.STOCK_APPLY,   _('Accept changes from Bundle preview'),   group='bundle') - reject = syncbox.append_stock(gtk.STOCK_DIALOG_ERROR, + reject = syncbox.append_button(gtk.STOCK_DIALOG_ERROR,   _('Reject changes from Bundle preview'),   group='bundle')   syncbox.append_separator(group='bundle') - incoming = syncbox.append_stock(gtk.STOCK_GO_DOWN, + incoming = syncbox.append_button(gtk.STOCK_GO_DOWN,   _('Download and view incoming changesets')) - pull = syncbox.append_stock(gtk.STOCK_GOTO_BOTTOM, + pull = syncbox.append_button(gtk.STOCK_GOTO_BOTTOM,   _('Pull incoming changesets'))   syncbox.append_separator() - outgoing = syncbox.append_stock(gtk.STOCK_GO_UP, + outgoing = syncbox.append_button(gtk.STOCK_GO_UP,   _('Determine and mark outgoing changesets')) - push = syncbox.append_stock(gtk.STOCK_GOTO_TOP, + push = syncbox.append_button(gtk.STOCK_GOTO_TOP,   _('Push outgoing changesets')) - email = syncbox.append_stock(gtk.STOCK_GOTO_LAST, + email = syncbox.append_button(gtk.STOCK_GOTO_LAST,   _('Email outgoing changesets'))   syncbox.append_separator(group='stop') - stop = syncbox.append_stock(gtk.STOCK_STOP, + stop = syncbox.append_button(gtk.STOCK_STOP,   _('Stop current transaction'), group='stop')     syncbox.set_visible('stop', False) @@ -1116,7 +1116,7 @@
  self.update_postpull(ppull)     ## add conf button - conf = syncbox.append_stock(gtk.STOCK_PREFERENCES, + conf = syncbox.append_button(gtk.STOCK_PREFERENCES,   _('Configure aliases and after pull behavior'))     ## connect syncbar buttons
 
92
93
94
95
 
96
97
98
99
100
 
101
102
103
104
105
106
 
107
108
109
110
111
 
112
113
114
 
92
93
94
 
95
96
97
98
99
 
100
101
102
103
104
105
 
106
107
108
109
110
 
111
112
113
114
@@ -92,23 +92,23 @@
    ## buttons   self.btn = {} - popallbtn = tbar.append_stock(gtk.STOCK_GOTO_FIRST, + popallbtn = tbar.append_button(gtk.STOCK_GOTO_FIRST,   _('Unapply all patches'))   popallbtn.connect('clicked', self.popall_clicked)   self.btn['popall'] = popallbtn   - popbtn = tbar.append_stock(gtk.STOCK_GO_BACK, + popbtn = tbar.append_button(gtk.STOCK_GO_BACK,   _('Unapply last patch'))   popbtn.connect('clicked', self.pop_clicked)   self.btn['pop'] = popbtn     pushbtn = gtk.ToolButton(gtk.STOCK_GO_FORWARD) - pushbtn = tbar.append_stock(gtk.STOCK_GO_FORWARD, + pushbtn = tbar.append_button(gtk.STOCK_GO_FORWARD,   _('Apply next patch'))   pushbtn.connect('clicked', self.push_clicked)   self.btn['push'] = pushbtn   - pushallbtn = tbar.append_stock(gtk.STOCK_GOTO_LAST, + pushallbtn = tbar.append_button(gtk.STOCK_GOTO_LAST,   _('Apply all patches'))   pushallbtn.connect('clicked', self.pushall_clicked)   self.btn['pushall'] = pushallbtn