mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
only block/unblock completion->priv->insert_text_id if it is actually
2007-01-26 Michael Natterer <mitch@imendio.com> * gtk/gtkentrycompletion.c (gtk_entry_completion_insert_prefix): only block/unblock completion->priv->insert_text_id if it is actually connected. While this can't happen the way GtkEntry itself uses the completion, it's still public API and should not blindly call functions that will spit warnings (fix taken from maemo-gtk). svn path=/trunk/; revision=17215
This commit is contained in:
parent
788b391cef
commit
0c5f393ad6
@ -1,3 +1,12 @@
|
||||
2007-01-26 Michael Natterer <mitch@imendio.com>
|
||||
|
||||
* gtk/gtkentrycompletion.c (gtk_entry_completion_insert_prefix):
|
||||
only block/unblock completion->priv->insert_text_id if it is
|
||||
actually connected. While this can't happen the way GtkEntry
|
||||
itself uses the completion, it's still public API and should not
|
||||
blindly call functions that will spit warnings (fix taken from
|
||||
maemo-gtk).
|
||||
|
||||
2007-01-25 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gdk/gdkwindow.c: Reduce locking overhead by not repeatedly getting
|
||||
|
@ -1568,8 +1568,10 @@ gtk_entry_completion_insert_prefix (GtkEntryCompletion *completion)
|
||||
gboolean done;
|
||||
gchar *prefix;
|
||||
|
||||
g_signal_handler_block (completion->priv->entry,
|
||||
completion->priv->insert_text_id);
|
||||
if (completion->priv->insert_text_id > 0)
|
||||
g_signal_handler_block (completion->priv->entry,
|
||||
completion->priv->insert_text_id);
|
||||
|
||||
prefix = gtk_entry_completion_compute_prefix (completion);
|
||||
if (prefix)
|
||||
{
|
||||
@ -1577,8 +1579,10 @@ gtk_entry_completion_insert_prefix (GtkEntryCompletion *completion)
|
||||
0, prefix, &done);
|
||||
g_free (prefix);
|
||||
}
|
||||
g_signal_handler_unblock (completion->priv->entry,
|
||||
completion->priv->insert_text_id);
|
||||
|
||||
if (completion->priv->insert_text_id > 0)
|
||||
g_signal_handler_unblock (completion->priv->entry,
|
||||
completion->priv->insert_text_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user