rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / desktop / gnome2 / gnome-connection-manager / patches / 02-mc-doubleclick.patch
blob366cb28e07bce284d1a0e3c744b6bed91363efd4
1 Temporary solution for https://github.com/kuthulux/gnome-connection-manager/issues/64
2 proposed in PR https://github.com/kuthulux/gnome-connection-manager/pull/72 against
3 GCM release 1.2.1 (plus HEAD commits up to 2021-04-20), to process double-clicks
4 in Midnight Commander running in GCM terminals better (not perfectly though).
6 This may get merged or solved differently in future iterations of GCM upstream,
7 then this patch file can be removed.
9 --- gcm-1.2.1-d2f66e3-orig/gnome_connection_manager.py 2021-04-20 16:18:58.000000000 +0200
10 +++ gcm-1.2.1-current/gnome_connection_manager.py 2021-12-23 18:08:19.018024484 +0000
11 @@ -2033,10 +1968,14 @@
12 def on_double_click(self, widget, event, *args):
13 if event.type in [Gdk.EventType._2BUTTON_PRESS, Gdk.EventType._3BUTTON_PRESS] and event.button == 1:
14 if isinstance(widget, Gtk.Notebook):
15 - pos = event.x + widget.get_allocation().x
16 + posX = event.x + widget.get_allocation().x
17 + posY = event.y + widget.get_allocation().y
18 size = widget.get_tab_label(widget.get_nth_page(widget.get_n_pages()-1)).get_allocation()
19 - if pos <= size.x + size.width + 8 or event.x >= widget.get_allocation().width - widget.style_get_property("scroll-arrow-hlength"):
21 + # HACK with (posY > size.height) below as a way to detect we click the label area and not the terminal pane with MC running, see https://github.com/kuthulux/gnome-connection-manager/issues/64 :
22 + if posX <= size.x + size.width + 8 or event.x >= widget.get_allocation().width - widget.style_get_property("scroll-arrow-hlength") or posY > size.height:
23 return True
24 + # else fall through to addTab()
25 if isinstance(widget, Gtk.Toolbar) and widget.get_drop_index(event.x,event.y) < widget.get_n_items():
26 return True
27 self.addTab(widget if isinstance(widget, Gtk.Notebook) else self.nbConsole, 'local')