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

datamine: make ctrl-w close current tab, then window

had to connect thg-close to our own function before gdialog calls
the shlib routing to register the window close routine. In our
routine, if a tab is close we stop the window close event.

Changeset e13a7bb4d975

Parent 4c9d3c72252b

by Steve Borho

Changes to one file · Browse files at e13a7bb4d975 Showing diff from parent 4c9d3c72252b Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​datamine.py Stacked
 
67
68
69
 
70
71
72
 
377
378
379
 
 
 
 
 
 
380
381
382
 
67
68
69
70
71
72
73
 
378
379
380
381
382
383
384
385
386
387
388
389
@@ -67,6 +67,7 @@
    def load_settings(self, settings):   GDialog.load_settings(self, settings) + self.connect('thg-close', self._close_current_page)   self.tabwidth = gettabwidth(self.ui)   # settings['datamine']   @@ -377,6 +378,12 @@
  self.curpath = fromutf(model[paths][self.COL_PATH])   self.stbar.set_status_text(toutf(model[paths][self.COL_TOOLTIP]))   + def _close_current_page(self, window): + num = self.notebook.get_current_page() + if num != -1 and self.notebook.get_n_pages(): + self.notebook.remove_page(num) + self.emit_stop_by_name('thg-close') +   def _stop_current_search(self, button, widget):   num = self.notebook.get_current_page()   frame = self.notebook.get_nth_page(num)