From: Christian Dywan Date: Tue, 23 Dec 2008 22:14:20 +0000 (+0100) Subject: Don't install icon signals if GtkEntry has them already X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b1d2f6e5f7a5e36e588c6baa2b2eaaf982bc3f0;p=midori Don't install icon signals if GtkEntry has them already --- diff --git a/midori/gtkiconentry.c b/midori/gtkiconentry.c index 6faa9845..428fb216 100644 --- a/midori/gtkiconentry.c +++ b/midori/gtkiconentry.c @@ -185,8 +185,9 @@ gtk_icon_entry_class_init (GtkIconEntryClass *klass) * * The ::icon-pressed signal is emitted when an icon is clicked. */ + if (!(signals[ICON_PRESSED] = g_signal_lookup ("icon-pressed", GTK_TYPE_ENTRY))) signals[ICON_PRESSED] = - g_signal_new ("icon_pressed", + g_signal_new ("icon-pressed", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkIconEntryClass, icon_pressed), @@ -205,8 +206,9 @@ gtk_icon_entry_class_init (GtkIconEntryClass *klass) * The ::icon-released signal is emitted on the button release from a * mouse click. */ + if (!(signals[ICON_RELEASED] = g_signal_lookup ("icon-released", GTK_TYPE_ENTRY))) signals[ICON_RELEASED] = - g_signal_new ("icon_released", + g_signal_new ("icon-released", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkIconEntryClass, icon_released),