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

shlib: on ctrl-Q, destroy main and window with focus

destroy focused window first, in case it was modal

Changeset a9d9189f7b77

Parent c3101dcfa988

by Steve Borho

Changes to one file · Browse files at a9d9189f7b77 Showing diff from parent c3101dcfa988 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​shlib.py Stacked
 
133
134
135
136
137
138
139
140
 
154
155
156
 
 
 
 
 
157
158
159
 
 
160
 
161
162
163
 
133
134
135
 
 
136
137
138
 
152
153
154
155
156
157
158
159
160
161
 
162
163
164
165
166
167
168
@@ -133,8 +133,6 @@
   def set_tortoise_keys(window):   'Set default TortoiseHg keyboard accelerators' - from hgtk import thgexit -   accelgroup = gtk.AccelGroup()   window.add_accel_group(accelgroup)   key, modifier = gtk.accelerator_parse('<Control>w') @@ -154,10 +152,17 @@
  window.connect('thg-close', thgclose)   window.connect('thg-exit', thgexit)   +def thgexit(window): + if thgclose(window): + from hgtk import thgexit + thgexit(window) +  def thgclose(window):   if hasattr(window, 'should_live'): - if window.should_live(): return + if window.should_live(): + return False   window.destroy() + return True    def get_tortoise_icon(thgicon):   '''Find a tortoise icon, apply to PyGtk window'''