[gimp] Connect to widget signals in init() instead of constructor()
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] Connect to widget signals in init() instead of constructor()
- Date: Sat, 18 Jul 2009 17:35:16 +0000 (UTC)
commit 84fd35d83232584256381850f5d65537a9b66094
Author: Michael Natterer <mitch gimp org>
Date: Sat Jul 18 19:34:42 2009 +0200
Connect to widget signals in init() instead of constructor()
app/widgets/gimptagpopup.c | 27 ++++++++++++++-------------
1 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/app/widgets/gimptagpopup.c b/app/widgets/gimptagpopup.c
index 4a110d3..2b7e4c6 100644
--- a/app/widgets/gimptagpopup.c
+++ b/app/widgets/gimptagpopup.c
@@ -179,6 +179,20 @@ gimp_tag_popup_init (GimpTagPopup *popup)
GDK_POINTER_MOTION_MASK);
gtk_container_add (GTK_CONTAINER (popup->alignment), popup->tag_area);
gtk_widget_show (popup->tag_area);
+
+ g_signal_connect (popup->alignment, "expose-event",
+ G_CALLBACK (gimp_tag_popup_border_expose),
+ popup);
+ g_signal_connect (popup, "event",
+ G_CALLBACK (gimp_tag_popup_border_event),
+ NULL);
+ g_signal_connect (popup->tag_area, "expose-event",
+ G_CALLBACK (gimp_tag_popup_list_expose),
+ popup);
+ g_signal_connect (popup->tag_area, "event",
+ G_CALLBACK (gimp_tag_popup_list_event),
+ popup);
+
}
static GObject *
@@ -350,19 +364,6 @@ gimp_tag_popup_constructor (GType type,
gtk_window_move (GTK_WINDOW (popup), popup_rect.x, popup_rect.y);
gtk_window_resize (GTK_WINDOW (popup), popup_rect.width, popup_rect.height);
- g_signal_connect (popup->alignment, "expose-event",
- G_CALLBACK (gimp_tag_popup_border_expose),
- popup);
- g_signal_connect (popup, "event",
- G_CALLBACK (gimp_tag_popup_border_event),
- NULL);
- g_signal_connect (popup->tag_area, "expose-event",
- G_CALLBACK (gimp_tag_popup_list_expose),
- popup);
- g_signal_connect (popup->tag_area, "event",
- G_CALLBACK (gimp_tag_popup_list_event),
- popup);
-
return object;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]