Branch: refs/heads/master
Author: Colomban Wendling <ban(a)herbesfolles.org>
Committer: Colomban Wendling <ban(a)herbesfolles.org>
Date: Sat, 13 Apr 2024 23:58:17 UTC
Commit: 3bc2cf5efb0e6d71dccc88105658656e70282a61
https://github.com/geany/geany/commit/3bc2cf5efb0e6d71dccc88105658656e70282…
Log Message:
-----------
Fix search entry after editing the toolbar
According to b0b0ebb469a6b7eb74d321e6f5d7fe6f0bfcf6ba we guard against
proxying the widget more than once for some Windows reasons, but this
breaks the case where the same GeanyEntryAction has to re-create a
fresh proxy, like when moving the item around.
So, move the guard value to the proxied widget, not the action.
Fixes #3831.
Modified Paths:
--------------
src/geanyentryaction.c
Modified: src/geanyentryaction.c
6 lines changed, 2 insertions(+), 4 deletions(-)
===================================================================
@@ -42,7 +42,6 @@ struct _GeanyEntryActionPrivate
{
GtkWidget *entry;
gboolean numeric;
- gboolean connected;
};
enum
@@ -112,7 +111,7 @@ static void geany_entry_action_connect_proxy(GtkAction *action, GtkWidget *widge
GeanyEntryActionPrivate *priv = GEANY_ENTRY_ACTION_GET_PRIVATE(action);
/* make sure not to connect handlers twice */
- if (! priv->connected)
+ if (! g_object_get_data(G_OBJECT(widget), "gea-connected"))
{
if (priv->numeric)
g_signal_connect(priv->entry, "insert-text",
@@ -122,7 +121,7 @@ static void geany_entry_action_connect_proxy(GtkAction *action, GtkWidget *widge
g_signal_connect(priv->entry, "activate-backward",
G_CALLBACK(delegate_entry_activate_backward_cb), action);
- priv->connected = TRUE;
+ g_object_set_data(G_OBJECT(widget), "gea-connected", action /* anything non-NULL */);
}
GTK_ACTION_CLASS(geany_entry_action_parent_class)->connect_proxy(action, widget);
@@ -176,7 +175,6 @@ static void geany_entry_action_init(GeanyEntryAction *action)
priv = action->priv;
priv->entry = NULL;
priv->numeric = FALSE;
- priv->connected = FALSE;
}
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).