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

commit: add icons to context menu of text area for commit message

Changeset 6940a2616287

Parent 1a3f6d76a5dc

by Yuki KODAMA

Changes to one file · Browse files at 6940a2616287 Showing diff from parent 1a3f6d76a5dc Diff from another changeset...

 
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
 
 
 
 
 
 
 
1199
1200
1201
 
1184
1185
1186
 
 
 
 
 
 
 
 
 
 
 
 
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
@@ -1184,18 +1184,13 @@
  self.commit_clicked(None)     def msg_add_to_popup(self, textview, menu): - menu_items = (('----', None), - (_('Paste _Filenames'), self.msg_paste_fnames), - (_('App_ly Format'), self.msg_word_wrap), - (_('C_onfigure Format'), self.msg_config)) - for label, handler in menu_items: - if label == '----': - menuitem = gtk.SeparatorMenuItem() - else: - menuitem = gtk.MenuItem(label) - if handler: - menuitem.connect('activate', handler) - menu.append(menuitem) + def add(label, handler, icon): + item = gtklib.create_menuitem(label, handler, icon) + menu.append(item) + menu.append(gtk.SeparatorMenuItem()) + add(_('Paste _Filenames'), self.msg_paste_fnames, gtk.STOCK_PASTE) + add(_('App_ly Format'), self.msg_word_wrap, gtk.STOCK_APPLY) + add(_('C_onfigure Format...'), self.msg_config, gtk.STOCK_PREFERENCES)   menu.show_all()     def get_lengths(self, noexcept=True):