[Xfce-bugs] [Bug 13680] Copying address bar text: unintuitive behaviour

bugzilla-daemon at xfce.org bugzilla-daemon at xfce.org
Thu Apr 23 10:08:36 CEST 2020


https://bugzilla.xfce.org/show_bug.cgi?id=13680

--- Comment #19 from alexxcons <alexxcons at xfce.org> ---
(In reply to DarkTrick from comment #16)
> FYI: second patch misses GTK_IS_WINDOW, because get_toplevel() does not
> guarantee to return a window.

Please feel free to upload an updated patch. Please build it with "git
format-patch" if it is considered to be used (a diff is considered to be
incomplete)

(In reply to DarkTrick from comment #17)
> Will there be a patch for maintenance-versions of Thunar or will there only
> be one for the latest version?

For the 1.8.x branch and for master.  The one for master should rely on the WIP
branch .. e.g. https://github.com/alexxcons/thunar/tree/ReplaceGtkAction41


(In reply to DarkTrick from comment #18)

> Possible Implementation 1:
> ==========================
> The global onCopy/onCut/onPaste-Functions emit a `copy-clipboard` (and vv)
> signal to the currently focussed widget.
> 
> That way implementation of the copy function would be cleanly separated
> between widgets
> 
> Problem: there might be widgets, that don't support this signal. So we have
> "complex" special cases. 
> 
> Possible Implementation 2:
> ==========================
> The global onCopy/onCut/onPaste-Functions send a `Ctrl+C`-Shortcut (and vv)
> to the currently focussed widget.
> 
> Problem: I don't think this is actually possible

Possibly you can register multiple widgets for the same shortcut/accel, and
than decide if the concrete widget should be executed by checking its focus
state. Did you check what happens when you connect additional widgets to the
same accel path ?
Probably thats the method you need:
> gtk_accel_group_connect_by_path

Currently it is used from here:
https://gitlab.xfce.org/xfce/libxfce4ui/-/blob/master/libxfce4ui/xfce-gtk-extensions.c#L439

If that works, you should be able to create XfceGtkActionEntrys for the
relevant sub-widgets and call xfce_gtk_accel_group_append with them.

> Under investigation
> ===================
> Implementation in Nautilus & co

Good idea to check how others solve that !
In parallel it may help to ask others .. e.g post a question in a Gtk Forum, on
the Gtk IRC channel or on Stack Overflow,

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Xfce-bugs mailing list