Re: Bug#994710: bullseye-pu: package nautilus/3.38.2-1+deb11u1

Simon McVittie <[email protected]>
Newsgroups gmane.linux.debian.devel.gtk-gnome
Message-ID <[email protected]>
On Mon, 20 Sep 2021 at 11:08:49 +0100, Simon McVittie wrote:
> It seems #994710 didn't make it to the list because the diff was too big.
> Here's another try, removing the translation updates from the diff.

... now with diff. Sorry, not enough coffee yet this morning...
nautilus_3.38.2-1+deb11u1_filtered.diff (text/x-diff, 23.1 KB)
Diff filtered to exclude .pc, debian/patches/ content, po/ content.
diffstat filtered to exclude .pc only.

 debian/changelog                                                                                   |   14 
 debian/control                                                                                     |    2 
 debian/control.in                                                                                  |    2 
 debian/gbp.conf                                                                                    |    4 
 debian/patches/series                                                                              |   18 
 debian/watch                                                                                       |    2 
 nautilus-3.38.2-1+deb11u1/debian/patches/Update-Bengali-India-translation.patch                    |only
 nautilus-3.38.2-1+deb11u1/debian/patches/Update-Catalan-translation.patch                          |only
 nautilus-3.38.2-1+deb11u1/debian/patches/Update-Karbi-translation.patch                            |only
 nautilus-3.38.2-1+deb11u1/debian/patches/Update-Norwegian-Bokm-l-translation.patch                 |only
 nautilus-3.38.2-1+deb11u1/debian/patches/Update-Turkish-translation-1.patch                        |only
 nautilus-3.38.2-1+deb11u1/debian/patches/Update-Turkish-translation.patch                          |only
 nautilus-3.38.2-1+deb11u1/debian/patches/Update-Vietnamese-translation.patch                       |only
 nautilus-3.38.2-1+deb11u1/debian/patches/mime-action-Fix-reinstated-regression.patch               |only
 nautilus-3.38.2-1+deb11u1/debian/patches/mime-actions-Add-all-portal-opened-files-to-recents.patch |only
 nautilus-3.38.2-1+deb11u1/debian/patches/mime-actions-Check-flatpak-info-only-once.patch           |only
 nautilus-3.38.2-1+deb11u1/debian/patches/mime-actions-Don-t-leak-error.patch                       |only
 nautilus-3.38.2-1+deb11u1/debian/patches/mime-actions-Drop-dead-code-path.patch                    |only
 nautilus-3.38.2-1+deb11u1/debian/patches/mime-actions-Open-files-as-groups-if-not-sandboxed.patch  |only
 nautilus-3.38.2-1+deb11u1/debian/patches/mime-actions-Revert-unintended-string-freeze-break.patch  |only
 nautilus-3.38.2-1+deb11u1/debian/patches/toolbar-Don-t-leak-menu-models.patch                      |only
 nautilus-3.38.2-1+deb11u1/debian/patches/window-Don-t-save-state-when-tiled.patch                  |only
 nautilus-3.38.2-1+deb11u1/debian/patches/window-slot-Don-t-leak-menus-on-destruction.patch         |only
 po/bn_IN.po                                                                                        |10181 +++++-----
 po/ca.po                                                                                           |    4 
 po/mjw.po                                                                                          | 1897 -
 po/nb.po                                                                                           | 2020 +
 po/tr.po                                                                                           |  140 
 po/vi.po                                                                                           | 2008 +
 src/nautilus-mime-actions.c                                                                        |  268 
 src/nautilus-toolbar.c                                                                             |   10 
 src/nautilus-window-slot.c                                                                         |    3 
 src/nautilus-window.c                                                                              |   15 
 33 files changed, 9438 insertions(+), 7150 deletions(-)

diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/debian/changelog nautilus-3.38.2-1+deb11u1/debian/changelog
--- nautilus-3.38.2-1/debian/changelog	2020-12-07 14:54:18.000000000 +0000
+++ nautilus-3.38.2-1+deb11u1/debian/changelog	2021-09-19 17:45:00.000000000 +0100
@@ -1,3 +1,17 @@
+nautilus (3.38.2-1+deb11u1) bullseye; urgency=medium
+
+  * Update from upstream gnome-3-38 branch
+    - Don't save window size and position when tiled.
+      Tiling is more like a special case of maximization than an
+      ordinary floating window position.
+    - Fix some memory leaks
+    - Translation updates: bn_IN, ca, mjw, nb, tr, vi
+  * Backport patches from GNOME 40 to avoid opening multiple selected
+    files in multiple application instances (Closes: #993137)
+  * d/gbp.conf, d/control.in, d/watch: Target 3.38.x for bullseye
+
+ -- Simon McVittie <[email protected]>  Sun, 19 Sep 2021 17:45:00 +0100
+
 nautilus (3.38.2-1) unstable; urgency=medium
 
   * New upstream release
diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/debian/control nautilus-3.38.2-1+deb11u1/debian/control
--- nautilus-3.38.2-1/debian/control	2020-12-07 14:54:18.000000000 +0000
+++ nautilus-3.38.2-1+deb11u1/debian/control	2021-09-19 17:45:00.000000000 +0100
@@ -39,7 +39,7 @@
 Rules-Requires-Root: no
 Homepage: https://wiki.gnome.org/action/show/Apps/Nautilus
 Vcs-Browser: https://salsa.debian.org/gnome-team/nautilus
-Vcs-Git: https://salsa.debian.org/gnome-team/nautilus.git
+Vcs-Git: https://salsa.debian.org/gnome-team/nautilus.git -b debian/bullseye
 Standards-Version: 4.5.0
 
 Package: nautilus
diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/debian/control.in nautilus-3.38.2-1+deb11u1/debian/control.in
--- nautilus-3.38.2-1/debian/control.in	2020-12-07 14:54:18.000000000 +0000
+++ nautilus-3.38.2-1+deb11u1/debian/control.in	2021-09-19 17:45:00.000000000 +0100
@@ -35,7 +35,7 @@
 Rules-Requires-Root: no
 Homepage: https://wiki.gnome.org/action/show/Apps/Nautilus
 Vcs-Browser: https://salsa.debian.org/gnome-team/nautilus
-Vcs-Git: https://salsa.debian.org/gnome-team/nautilus.git
+Vcs-Git: https://salsa.debian.org/gnome-team/nautilus.git -b debian/bullseye
 Standards-Version: 4.5.0
 
 Package: nautilus
diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/debian/gbp.conf nautilus-3.38.2-1+deb11u1/debian/gbp.conf
--- nautilus-3.38.2-1/debian/gbp.conf	2020-12-07 14:54:18.000000000 +0000
+++ nautilus-3.38.2-1+deb11u1/debian/gbp.conf	2021-09-19 17:45:00.000000000 +0100
@@ -1,7 +1,7 @@
 [DEFAULT]
 pristine-tar = True
-debian-branch = debian/master
-upstream-branch = upstream/latest
+debian-branch = debian/bullseye
+upstream-branch = upstream/3.38.x
 upstream-vcs-tag = %(version)s
 
 [buildpackage]
diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/debian/patches/series nautilus-3.38.2-1+deb11u1/debian/patches/series
--- nautilus-3.38.2-1/debian/patches/series	2020-12-07 14:54:18.000000000 +0000
+++ nautilus-3.38.2-1+deb11u1/debian/patches/series	2021-09-19 17:45:00.000000000 +0100
@@ -1,3 +1,19 @@
+Update-Karbi-translation.patch
+Update-Vietnamese-translation.patch
+Update-Norwegian-Bokm-l-translation.patch
+Update-Bengali-India-translation.patch
+Update-Catalan-translation.patch
+window-Don-t-save-state-when-tiled.patch
+window-slot-Don-t-leak-menus-on-destruction.patch
+toolbar-Don-t-leak-menu-models.patch
+Update-Turkish-translation.patch
+Update-Turkish-translation-1.patch
+mime-actions-Open-files-as-groups-if-not-sandboxed.patch
+mime-actions-Check-flatpak-info-only-once.patch
+mime-actions-Drop-dead-code-path.patch
+mime-actions-Add-all-portal-opened-files-to-recents.patch
+mime-actions-Don-t-leak-error.patch
+mime-action-Fix-reinstated-regression.patch
+mime-actions-Revert-unintended-string-freeze-break.patch
 multiarch_fallback.patch
 revert_tracker_update.patch
-
diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/debian/watch nautilus-3.38.2-1+deb11u1/debian/watch
--- nautilus-3.38.2-1/debian/watch	2020-12-07 14:54:18.000000000 +0000
+++ nautilus-3.38.2-1+deb11u1/debian/watch	2021-09-19 17:45:00.000000000 +0100
@@ -1,3 +1,3 @@
 version=4
-https://download.gnome.org/sources/@PACKAGE@/([\d\.]+[02468])/ \
+https://download.gnome.org/sources/@PACKAGE@/3.38/ \
 	@PACKAGE@@ANY_VERSION@@ARCHIVE_EXT@
diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/src/nautilus-mime-actions.c nautilus-3.38.2-1+deb11u1/src/nautilus-mime-actions.c
--- nautilus-3.38.2-1/src/nautilus-mime-actions.c	2020-11-20 14:04:26.827528000 +0000
+++ nautilus-3.38.2-1+deb11u1/src/nautilus-mime-actions.c	2021-09-20 10:57:10.000000000 +0100
@@ -63,6 +63,12 @@
 
 typedef struct
 {
+    GAppInfo *application;
+    GList *uris;
+} ApplicationLaunchParameters;
+
+typedef struct
+{
     NautilusWindowSlot *slot;
     gpointer window;
     GtkWindow *parent_window;
@@ -84,8 +90,7 @@
 {
     ActivateParameters *activation_params;
     GQueue *uris;
-    GQueue *unhandled_uris;
-} ApplicationLaunchParameters;
+} ApplicationLaunchAsyncParameters;
 
 /* Microsoft mime types at https://blogs.msdn.microsoft.com/vsofficedeveloper/2008/05/08/office-2007-file-format-mime-types-for-http-content-streaming-2/ */
 struct
@@ -244,6 +249,20 @@
                                gpointer callback_data);
 static void activation_mount_not_mounted (ActivateParameters *parameters);
 
+static gboolean
+is_sandboxed (void)
+{
+    static gboolean ret;
+
+    static gsize init = 0;
+    if (g_once_init_enter (&init))
+    {
+        ret = g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
+        g_once_init_leave (&init, 1);
+    }
+
+    return ret;
+}
 
 static void
 launch_location_free (LaunchLocation *location)
@@ -345,19 +364,27 @@
 }
 
 static ApplicationLaunchParameters *
-application_launch_parameters_new (ActivateParameters *activation_params,
-                                   GQueue             *uris)
+application_launch_parameters_new (GAppInfo *application,
+                                   GList    *uris)
 {
     ApplicationLaunchParameters *result;
 
     result = g_new0 (ApplicationLaunchParameters, 1);
-    result->activation_params = activation_params;
-    result->uris = uris;
-    result->unhandled_uris = g_queue_new ();
+    result->application = g_object_ref (application);
+    result->uris = g_list_copy_deep (uris, (GCopyFunc) g_strdup, NULL);
 
     return result;
 }
 
+static void
+application_launch_parameters_free (ApplicationLaunchParameters *parameters)
+{
+    g_object_unref (parameters->application);
+    g_list_free_full (parameters->uris, g_free);
+
+    g_free (parameters);
+}
+
 static gboolean
 nautilus_mime_actions_check_if_required_attributes_ready (NautilusFile *file)
 {
@@ -792,6 +819,114 @@
     return (activation_action == ACTIVATION_ACTION_OPEN_IN_APPLICATION);
 }
 
+
+static unsigned int
+mime_application_hash (GAppInfo *app)
+{
+    const char *id;
+
+    id = g_app_info_get_id (app);
+
+    if (id == NULL)
+    {
+        return GPOINTER_TO_UINT (app);
+    }
+
+    return g_str_hash (id);
+}
+
+static void
+list_to_parameters_foreach (GAppInfo  *application,
+                            GList     *uris,
+                            GList    **ret)
+{
+    ApplicationLaunchParameters *parameters;
+
+    uris = g_list_reverse (uris);
+
+    parameters = application_launch_parameters_new
+                     (application, uris);
+    *ret = g_list_prepend (*ret, parameters);
+}
+
+
+/**
+ * make_activation_parameters
+ *
+ * Construct a list of ApplicationLaunchParameters from a list of NautilusFiles,
+ * where files that have the same default application are put into the same
+ * launch parameter, and others are put into the unhandled_files list.
+ *
+ * @files: Files to use for construction.
+ * @unhandled_files: Files without any default application will be put here.
+ *
+ * Return value: Newly allocated list of ApplicationLaunchParameters.
+ **/
+static GList *
+make_activation_parameters (GList  *uris,
+                            GList **unhandled_uris)
+{
+    GList *ret, *l, *app_uris;
+    NautilusFile *file;
+    GAppInfo *app, *old_app;
+    GHashTable *app_table;
+    char *uri;
+
+    ret = NULL;
+    *unhandled_uris = NULL;
+
+    app_table = g_hash_table_new_full
+                    ((GHashFunc) mime_application_hash,
+                    (GEqualFunc) g_app_info_equal,
+                    (GDestroyNotify) g_object_unref,
+                    (GDestroyNotify) g_list_free);
+
+    for (l = uris; l != NULL; l = l->next)
+    {
+        uri = l->data;
+        file = nautilus_file_get_by_uri (uri);
+
+        app = nautilus_mime_get_default_application_for_file (file);
+        if (app != NULL)
+        {
+            app_uris = NULL;
+
+            if (g_hash_table_lookup_extended (app_table, app,
+                                              (gpointer *) &old_app,
+                                              (gpointer *) &app_uris))
+            {
+                g_hash_table_steal (app_table, old_app);
+
+                app_uris = g_list_prepend (app_uris, uri);
+
+                g_object_unref (app);
+                app = old_app;
+            }
+            else
+            {
+                app_uris = g_list_prepend (NULL, uri);
+            }
+
+            g_hash_table_insert (app_table, app, app_uris);
+        }
+        else
+        {
+            *unhandled_uris = g_list_prepend (*unhandled_uris, uri);
+        }
+        nautilus_file_unref (file);
+    }
+
+    g_hash_table_foreach (app_table,
+                          (GHFunc) list_to_parameters_foreach,
+                          &ret);
+
+    g_hash_table_destroy (app_table);
+
+    *unhandled_uris = g_list_reverse (*unhandled_uris);
+
+    return g_list_reverse (ret);
+}
+
 static gboolean
 file_was_cancelled (NautilusFile *file)
 {
@@ -844,9 +979,8 @@
 }
 
 static void
-application_launch_parameters_free (ApplicationLaunchParameters *parameters)
+application_launch_async_parameters_free (ApplicationLaunchAsyncParameters *parameters)
 {
-    g_queue_free (parameters->unhandled_uris);
     g_queue_free (parameters->uris);
     activation_parameters_free (parameters->activation_params);
 
@@ -1370,25 +1504,23 @@
 }
 
 static void
-on_launch_default_for_uri (GObject      *source_object,
-                           GAsyncResult *res,
-                           gpointer      user_data)
+launch_default_for_uris_callback (GObject      *source_object,
+                                  GAsyncResult *res,
+                                  gpointer      user_data)
 {
-    ApplicationLaunchParameters *params;
+    ApplicationLaunchAsyncParameters *params;
     ActivateParameters *activation_params;
     char *uri;
-    gboolean sandboxed;
-    GError *error = NULL;
+    g_autoptr (GError) error = NULL;
 
     params = user_data;
     activation_params = params->activation_params;
     uri = g_queue_pop_head (params->uris);
-    sandboxed = g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
 
     nautilus_launch_default_for_uri_finish (res, &error);
-    if (!sandboxed && error != NULL && error->code != G_IO_ERROR_CANCELLED)
+    if (error == NULL)
     {
-        g_queue_push_tail (params->unhandled_uris, uri);
+        gtk_recent_manager_add_item (gtk_recent_manager_get_default (), uri);
     }
 
     if (!g_queue_is_empty (params->uris))
@@ -1396,17 +1528,12 @@
         nautilus_launch_default_for_uri_async (g_queue_peek_head (params->uris),
                                                activation_params->parent_window,
                                                activation_params->cancellable,
-                                               on_launch_default_for_uri,
+                                               launch_default_for_uris_callback,
                                                params);
     }
     else
     {
-        while ((uri = g_queue_pop_head (params->unhandled_uris)) != NULL)
-        {
-            application_unhandled_uri (activation_params, uri);
-        }
-
-        application_launch_parameters_free (params);
+        application_launch_async_parameters_free (params);
     }
 }
 
@@ -1415,9 +1542,16 @@
 {
     NautilusFile *file;
     NautilusWindowOpenFlags flags;
+    g_autoptr (GList) open_in_app_parameters = NULL;
+    g_autoptr (GList) unhandled_open_in_app_uris = NULL;
+    ApplicationLaunchParameters *one_parameters;
     int count;
     g_autofree char *old_working_dir = NULL;
     GdkScreen *screen;
+    gint num_apps;
+    gint num_unhandled;
+    gint num_files;
+    gboolean open_files;
     g_autoptr (GQueue) launch_files = NULL;
     g_autoptr (GQueue) launch_in_terminal_files = NULL;
     g_autoptr (GQueue) open_in_app_uris = NULL;
@@ -1612,26 +1746,88 @@
         }
     }
 
-    if (g_queue_is_empty (open_in_app_uris))
-    {
-        activation_parameters_free (parameters);
-    }
-    else
+    if (!g_queue_is_empty (open_in_app_uris) && is_sandboxed ())
     {
         const char *uri;
-        ApplicationLaunchParameters *params;
+        ApplicationLaunchAsyncParameters *async_params;
 
         uri = g_queue_peek_head (open_in_app_uris);
-        params = application_launch_parameters_new (parameters,
-                                                    g_queue_copy (open_in_app_uris));
 
-        gtk_recent_manager_add_item (gtk_recent_manager_get_default (), uri);
+        async_params = g_new0 (ApplicationLaunchAsyncParameters, 1);
+        async_params->activation_params = parameters;
+        async_params->uris = g_steal_pointer (&open_in_app_uris);
+
         nautilus_launch_default_for_uri_async (uri,
                                                parameters->parent_window,
                                                parameters->cancellable,
-                                               on_launch_default_for_uri,
-                                               params);
+                                               launch_default_for_uris_callback,
+                                               async_params);
+        return;
+    }
+
+    if (open_in_app_uris != NULL)
+    {
+        open_in_app_parameters = make_activation_parameters (g_queue_peek_head_link (open_in_app_uris),
+                                                             &unhandled_open_in_app_uris);
     }
+
+    num_apps = g_list_length (open_in_app_parameters);
+    num_unhandled = g_list_length (unhandled_open_in_app_uris);
+    num_files = g_queue_get_length (open_in_app_uris);
+    open_files = TRUE;
+
+    if (!g_queue_is_empty (open_in_app_uris) &&
+        (!parameters->user_confirmation ||
+         num_files + num_unhandled > SILENT_OPEN_LIMIT) &&
+        num_apps > 1)
+    {
+        GtkDialog *dialog;
+        char *prompt;
+        g_autofree char *detail = NULL;
+        int response;
+
+        pause_activation_timed_cancel (parameters);
+
+        prompt = _("Are you sure you want to open all files?");
+        /* TODO: Replace 'window' with 'application' after string freeze. */
+        detail = g_strdup_printf (ngettext ("This will open %d separate window.",
+                                            "This will open %d separate windows.", num_apps), num_apps);
+        dialog = eel_show_yes_no_dialog (prompt, detail,
+                                         _("_OK"), _("_Cancel"),
+                                         parameters->parent_window);
+        response = gtk_dialog_run (dialog);
+        gtk_widget_destroy (GTK_WIDGET (dialog));
+
+        unpause_activation_timed_cancel (parameters);
+
+        if (response != GTK_RESPONSE_YES)
+        {
+            open_files = FALSE;
+        }
+    }
+
+    if (open_files)
+    {
+        for (l = open_in_app_parameters; l != NULL; l = l->next)
+        {
+            one_parameters = l->data;
+
+            nautilus_launch_application_by_uri (one_parameters->application,
+                                                one_parameters->uris,
+                                                parameters->parent_window);
+            application_launch_parameters_free (one_parameters);
+        }
+
+        for (l = unhandled_open_in_app_uris; l != NULL; l = l->next)
+        {
+            char *uri = l->data;
+
+            /* this does not block */
+            application_unhandled_uri (parameters, uri);
+        }
+    }
+
+    activation_parameters_free (parameters);
 }
 
 static void
diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/src/nautilus-toolbar.c nautilus-3.38.2-1+deb11u1/src/nautilus-toolbar.c
--- nautilus-3.38.2-1/src/nautilus-toolbar.c	2020-11-20 14:04:26.835528100 +0000
+++ nautilus-3.38.2-1+deb11u1/src/nautilus-toolbar.c	2021-09-20 10:57:10.000000000 +0100
@@ -1297,8 +1297,11 @@
                                             GParamSpec         *param,
                                             NautilusWindowSlot *slot)
 {
+    g_autoptr (GMenuModel) menu = NULL;
+
+    menu = nautilus_window_slot_get_extensions_background_menu (slot);
     nautilus_path_bar_set_extensions_background_menu (NAUTILUS_PATH_BAR (self->path_bar),
-                                                      nautilus_window_slot_get_extensions_background_menu (slot));
+                                                      menu);
 }
 
 static void
@@ -1306,8 +1309,11 @@
                                 GParamSpec         *param,
                                 NautilusWindowSlot *slot)
 {
+    g_autoptr (GMenuModel) menu = NULL;
+
+    menu = nautilus_window_slot_get_templates_menu (slot);
     nautilus_path_bar_set_templates_menu (NAUTILUS_PATH_BAR (self->path_bar),
-                                          nautilus_window_slot_get_templates_menu (slot));
+                                          menu);
 }
 
 static void
diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/src/nautilus-window.c nautilus-3.38.2-1+deb11u1/src/nautilus-window.c
--- nautilus-3.38.2-1/src/nautilus-window.c	2020-11-20 14:04:26.838528200 +0000
+++ nautilus-3.38.2-1+deb11u1/src/nautilus-window.c	2021-09-20 10:57:10.000000000 +0100
@@ -2401,12 +2401,23 @@
         gint width;
         gint height;
         GVariant *initial_size;
+        GdkWindowState window_state;
 
         gtk_window_get_size (GTK_WINDOW (window), &width, &height);
 
         initial_size = g_variant_new_parsed ("(%i, %i)", width, height);
-        is_maximized = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (window)))
-                       & GDK_WINDOW_STATE_MAXIMIZED;
+
+        window_state = gdk_window_get_state (gtk_widget_get_window (GTK_WIDGET (window)));
+
+        /* Don't save the window state for tiled windows. This is a special case,
+         * where the geometry only makes sense in combination with other tiled
+         * windows, that we can't possibly restore. */
+        if (window_state & GDK_WINDOW_STATE_TILED)
+        {
+            return;
+        }
+
+        is_maximized = window_state & GDK_WINDOW_STATE_MAXIMIZED;
 
         if (!is_maximized)
         {
diff -ru '--exclude=.pc' '--exclude=*.patch' '--exclude=*.po' nautilus-3.38.2-1/src/nautilus-window-slot.c nautilus-3.38.2-1+deb11u1/src/nautilus-window-slot.c
--- nautilus-3.38.2-1/src/nautilus-window-slot.c	2020-11-20 14:04:26.837528200 +0000
+++ nautilus-3.38.2-1+deb11u1/src/nautilus-window-slot.c	2021-09-20 10:57:10.000000000 +0100
@@ -3118,6 +3118,9 @@
     g_clear_pointer (&priv->extensions_background_menu_binding, g_binding_unbind);
     g_clear_pointer (&priv->templates_menu_binding, g_binding_unbind);
 
+    g_clear_object (&priv->templates_menu);
+    g_clear_object (&priv->extensions_background_menu);
+
     if (priv->content_view)
     {
         gtk_widget_destroy (GTK_WIDGET (priv->content_view));
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.