Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Thu, 16 Feb 2023 21:56:06 UTC Commit: aa946dbb001a6882a57185028631a4916dabd5e5 https://github.com/geany/geany-plugins/commit/aa946dbb001a6882a57185028631a4...
Log Message: ----------- webhelper: Fix leaking GActions
GActions are not GInitiallyUnowned, so we have to manually unref them.
Modified Paths: -------------- webhelper/src/gwh-browser.c webhelper/src/gwh-plugin.c
Modified: webhelper/src/gwh-browser.c 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -417,6 +417,7 @@ on_web_view_context_menu (WebKitWebView *view, item = webkit_context_menu_item_new_from_gaction (G_ACTION (action), _("Zoom _In"), NULL); webkit_context_menu_append (submenu, item); + g_object_unref (action);
/* zoom out */ action = g_simple_action_new ("zoom-out", NULL); @@ -425,6 +426,7 @@ on_web_view_context_menu (WebKitWebView *view, item = webkit_context_menu_item_new_from_gaction (G_ACTION (action), _("Zoom _Out"), NULL); webkit_context_menu_append (submenu, item); + g_object_unref (action);
/* zoom 1:1 */ webkit_context_menu_append (submenu, @@ -435,6 +437,7 @@ on_web_view_context_menu (WebKitWebView *view, item = webkit_context_menu_item_new_from_gaction (G_ACTION (action), _("_Reset Zoom"), NULL); webkit_context_menu_append (submenu, item); + g_object_unref (action);
/* full content zoom */ webkit_context_menu_append (submenu, @@ -454,6 +457,7 @@ on_web_view_context_menu (WebKitWebView *view, webkit_context_menu_append (submenu, item); g_signal_connect (action, "activate", G_CALLBACK (on_item_full_content_zoom_activate), self); + g_object_unref (action);
g_signal_emit (self, signals[POPULATE_POPUP], 0, context_menu);
Modified: webhelper/src/gwh-plugin.c 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -273,6 +273,7 @@ on_browser_populate_popup (GwhBrowser *browser, webkit_context_menu_append (menu, item); g_signal_connect (action, "activate", G_CALLBACK (on_item_auto_reload_toggled), NULL); + g_object_unref (action); }
static void
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org