#1152512 libgtk-3-bin: Ctrl+V does not work in Gtk.FileChooser

Package:
libgtk-3-bin
Source:
libgtk-3-bin
Description:
programs for the GTK graphical user interface library
Submitter:
Cliff Kilby
Date:
2026-10-30 04:33:02 UTC
Severity:
normal
#1152512#5
Date:
2026-10-30 04:29:56 UTC
From:
To:
Dear Maintainer,

I wanted to open a file in Geany (uses GTK)
Ctrl+O Ctrl+V shows an error "Operation not supported"
LibreOffice (also using GTK) has the same error.
As a workaround, Thunar accepts the paste, and opens the .txt file in Geany
per default handler, but only after manually focusing on the Location bar.
Attempting to paste a path directly into Thunar without manually focusing
on the Location bar also results in an error "There is nothing on the
clipboard to paste".

This functionality seems to have been intended to work, as
https://github.com/GNOME/gtk/releases/tag/3.24.49 has
gtkfilechooserwidget.c@8342
  /**
   * GtkFileChooserWidget::location-popup-on-paste:
   * @widget: the object which received the signal
   *
   * The ::location-popup-on-paste signal is a [keybinding
signal][GtkBindingSignal]
   * which gets emitted when the user asks for it.
   *
   * This is used to make the file chooser show a "Location" prompt when
the user
   * pastes into a #GtkFileChooserWidget.
   *
   * The default binding for this signal is `Control + V`.
   */
  signals[LOCATION_POPUP_ON_PASTE] =
    g_signal_new_class_handler (I_("location-popup-on-paste"),
                                G_OBJECT_CLASS_TYPE (class),
                                G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION,
                                G_CALLBACK
(location_popup_on_paste_handler),
                                NULL, NULL,
                                NULL,
                                G_TYPE_NONE, 0);

This would not be a problem, if the GTK SETTINGS_KEY_LOCATION_MODE was not
broken.
In https://github.com/GNOME/gtk/releases/tag/3.12.2 there is:
gtkfilechooserwidget.c@3251
  location_mode = g_settings_get_enum (settings,
SETTINGS_KEY_LOCATION_MODE);
gtkfilechooserwidget.c@3260
  location_mode_set (impl, location_mode, TRUE);

By https://github.com/GNOME/gtk/releases/tag/3.13.1
gtkfilechooserwidget.c no longer has a g_settings_get_enum for
SETTINGS_KEY_LOCATION_MODE, but is still saving the setting
gtkfilechooserwidget.c@3058
  g_settings_set_enum (settings, SETTINGS_KEY_LOCATION_MODE,
priv->location_mode);

This leads me to believe that between 3.12.2 which was released, and 3.13.1
which was not upstream broke this, because
https://github.com/GNOME/gtk/releases/tag/3.24.49 is still setting the
SETTINGS_KEY_LOCATION_MODE even though nothing has read it in 10 years.
gtkfilechooserwidget.c@3940
  g_settings_set_enum (settings, SETTINGS_KEY_LOCATION_MODE,
priv->location_mode);

Acceptable solutions:
Ctrl+v with a file path in a Gtk.FileChooser opens the path.
Restore 3.12 settings management for gtkfilechooserwidget.c which upstream
broke and never fixed.

Present workarounds:
Open through Thunar, after manually focusing the Location bar.
Open in app with Gtk.FileChooser using Ctrl+O Ctrl+L Ctrl+V