Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 05 Feb 2023 22:55:09 UTC Commit: 8bba18ce5cd53e3cf656026cefe6494caa7d8f6c https://github.com/geany/geany-plugins/commit/8bba18ce5cd53e3cf656026cefe649...
Log Message: ----------- webhelper: Fix flip-panes action
Modified Paths: -------------- webhelper/src/gwh-browser.c
Modified: webhelper/src/gwh-browser.c 14 lines changed, 5 insertions(+), 9 deletions(-) =================================================================== @@ -238,9 +238,6 @@ on_settings_wm_windows_type_notify (GObject *object,
/* web inspector events handling */
-#define INSPECTOR_DETACHED(self) \ - (webkit_web_inspector_is_attached ((self)->priv->inspector)) - #define INSPECTOR_VISIBLE(self) \ (webkit_web_inspector_get_web_view ((self)->priv->inspector) != NULL)
@@ -560,16 +557,15 @@ on_web_view_context_menu (WebKitWebView *view, webkit_context_menu_append (context_menu, webkit_context_menu_item_new_separator ()); action = g_simple_action_new ("flip-panes", NULL); - g_signal_connect_swapped (action, "activate", - G_CALLBACK (on_item_flip_orientation_activate), - view); + g_signal_connect (action, "activate", + G_CALLBACK (on_item_flip_orientation_activate), + self); item = webkit_context_menu_item_new_from_gaction (G_ACTION (action), _("_Flip panes orientation"), NULL); webkit_context_menu_append (context_menu, item); - if (! INSPECTOR_VISIBLE (self) || INSPECTOR_DETACHED (self)) { - g_simple_action_set_enabled (action, FALSE); - } + g_simple_action_set_enabled (action, (INSPECTOR_VISIBLE (self) && + webkit_web_inspector_is_attached (self->priv->inspector)));
g_signal_emit (self, signals[POPULATE_POPUP], 0, context_menu);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org