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

thgmq: popup context menu on mouse release

Changeset c422af6ecf00

Parent 3ea398f47314

by Yuki KODAMA

Changes to one file · Browse files at c422af6ecf00 Showing diff from parent 3ea398f47314 Diff from another changeset...

 
154
155
156
 
157
158
159
 
775
776
777
778
779
780
 
 
 
 
 
 
 
 
 
781
782
783
 
154
155
156
157
158
159
160
 
776
777
778
 
 
 
779
780
781
782
783
784
785
786
787
788
789
790
@@ -154,6 +154,7 @@
  self.list.set_tooltip_column(MQ_ESCAPED)   self.list.connect('cursor-changed', self.list_sel_changed)   self.list.connect('button-press-event', self.list_pressed) + self.list.connect('button-release-event', self.list_released)   self.list.connect('row-activated', self.list_row_activated)   self.list.connect('size-allocate', self.list_size_allocated)   @@ -775,9 +776,15 @@
  selection = list.get_selection()   selection.unselect_all()   gtklib.idle_add_single_call(unselect) - elif event.button == 3: - if pathinfo: - self.show_patch_cmenu(self.list, pathinfo[0]) + + def list_released(self, list, event): + if event.button != 3: + return + + x, y = int(event.x), int(event.y) + pathinfo = list.get_path_at_pos(x, y) + if pathinfo: + self.show_patch_cmenu(list, pathinfo[0])     def list_sel_changed(self, list):   path, focus = list.get_cursor()