Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc1, 0.4rc2, and 0.4rc3

hggtk/datamine: avoid potential traceback when adding context menu

Changeset 23a2c2603fdb

Parent 0b643e3bb131

by TK Soh

Changes to one file · Browse files at 23a2c2603fdb Showing diff from parent 0b643e3bb131 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​datamine.py Stacked
 
357
358
359
360
 
 
 
 
 
361
362
363
364
365
366
 
357
358
359
 
360
361
362
363
364
365
 
 
366
367
368
@@ -357,10 +357,12 @@
  lb.show()   col.set_widget(lb)   wgt = lb.get_parent() - while wgt and type(wgt) != gtk.Button: + while wgt: + if type(wgt) == gtk.Button: + wgt.connect("button-press-event", + self._tree_header_button_press, menu) + break   wgt = wgt.get_parent() - wgt.connect("button-press-event", self._tree_header_button_press, - menu)     def _tree_header_button_press(self, widget, event, menu):   if event.button == 3: