Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hggtk: ctrl-enter as new 'accept' keypress

Only hooked up to commit tool initially. Will be added
to prompt dialogs later. Removing Ctrl-O accelerator.

Fixes #111

Changeset 173e792cea5c

Parent 728ff8a06847

by Steve Borho

Changes to 3 files · Browse files at 173e792cea5c Showing diff from parent 728ff8a06847 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​commit.py Stacked
 
195
196
197
198
199
200
 
201
202
203
 
242
243
244
245
246
247
248
249
250
251
252
 
 
253
254
255
 
195
196
197
 
198
199
200
201
202
203
 
242
243
244
 
 
 
 
 
 
245
246
247
248
249
250
251
@@ -195,9 +195,9 @@
  status_body = GStatus.get_body(self)     vbox = gtk.VBox() -   mbox = gtk.HBox()   + self.connect('thg-accept', self.thgaccept)   self.branchbutton = gtk.Button()   self.branchbutton.connect('clicked', self.branch_clicked)   mbox.pack_start(self.branchbutton, False, False, 2) @@ -242,14 +242,10 @@
  self._vpaned.add1(vbox)   self._vpaned.add2(status_body)   self._vpaned.set_position(self._setting_vpos) - - # make ctrl-o trigger commit button - accel_group = gtk.AccelGroup() - self.add_accel_group(accel_group) - self._commit_button.add_accelerator("clicked", accel_group, ord("o"), - gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE)   return self._vpaned   + def thgaccept(self, window): + self._commit_clicked(None)     def get_menu_info(self):   """Returns menu info in this order: merge, addrem, unknown,
Change 1 of 1 Show Entire File hggtk/​hgtk.py Stacked
 
28
29
30
31
 
32
33
34
 
28
29
30
 
31
32
33
34
@@ -28,7 +28,7 @@
 for sig in ('copy-clipboard', 'thg-diff'):   gobject.signal_new(sig, gtk.TreeView,   gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ()) -for sig in ('thg-exit', 'thg-close', 'thg-refresh'): +for sig in ('thg-exit', 'thg-close', 'thg-refresh', 'thg-accept'):   gobject.signal_new(sig, gtk.Window,   gobject.SIGNAL_ACTION, gobject.TYPE_NONE, ())  
Change 1 of 1 Show Entire File hggtk/​shlib.py Stacked
 
146
147
148
 
 
 
149
150
151
 
146
147
148
149
150
151
152
153
154
@@ -146,6 +146,9 @@
  key, modifier = gtk.accelerator_parse('F5')   window.add_accelerator('thg-refresh', accelgroup, key, modifier,   gtk.ACCEL_VISIBLE) + key, modifier = gtk.accelerator_parse('<Control>Return') + window.add_accelerator('thg-accept', accelgroup, key, modifier, + gtk.ACCEL_VISIBLE)     # connect ctrl-w and ctrl-q to every window   window.connect('thg-close', thgclose)