From d523e1a2b16b17fd424de81fae03d961b9667762 Mon Sep 17 00:00:00 2001 From: Soeren Sandmann Date: Tue, 8 Jul 2003 20:28:24 +0000 Subject: remove strange #define fix cut'n'paste error use instance private data use Tue Jul 8 21:35:22 2003 Soeren Sandmann * gtk/gtktoggletoolbutton.h: remove strange #define * gtk/gtktoolbutton.h: fix cut'n'paste error * gtk/gtktoolbutton.c (gtk_tool_button_init): use instance private data * gtk/gtktoolitem.c (gtk_tool_item_class_init): use instance private data instead of g_new0() * gtk/gtktoggletoolbutton.c (gtk_toggle_tool_button_init): use instance private data --- ChangeLog | 11 +++++++++++ ChangeLog.pre-2-10 | 11 +++++++++++ ChangeLog.pre-2-4 | 11 +++++++++++ ChangeLog.pre-2-6 | 11 +++++++++++ ChangeLog.pre-2-8 | 11 +++++++++++ gtk/gtktoggletoolbutton.c | 4 +++- gtk/gtktoggletoolbutton.h | 3 +-- gtk/gtktoolbutton.c | 4 +++- gtk/gtktoolbutton.h | 2 +- gtk/gtktoolitem.c | 7 ------- 10 files changed, 63 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7598ae8261..aeb527412d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +Tue Jul 8 21:35:22 2003 Soeren Sandmann + + * gtk/gtktoggletoolbutton.h: remove strange #define + * gtk/gtktoolbutton.h: fix cut'n'paste error + * gtk/gtktoolbutton.c (gtk_tool_button_init): use instance + private data + * gtk/gtktoolitem.c (gtk_tool_item_class_init): use instance + private data instead of g_new0() + * gtk/gtktoggletoolbutton.c (gtk_toggle_tool_button_init): use + instance private data + Tue Jul 8 21:10:14 2003 Soeren Sandmann * gtk/gtkbutton.c (gtk_button_realize): remove GDK_EXPOSURE_MASK diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 7598ae8261..aeb527412d 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,14 @@ +Tue Jul 8 21:35:22 2003 Soeren Sandmann + + * gtk/gtktoggletoolbutton.h: remove strange #define + * gtk/gtktoolbutton.h: fix cut'n'paste error + * gtk/gtktoolbutton.c (gtk_tool_button_init): use instance + private data + * gtk/gtktoolitem.c (gtk_tool_item_class_init): use instance + private data instead of g_new0() + * gtk/gtktoggletoolbutton.c (gtk_toggle_tool_button_init): use + instance private data + Tue Jul 8 21:10:14 2003 Soeren Sandmann * gtk/gtkbutton.c (gtk_button_realize): remove GDK_EXPOSURE_MASK diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 7598ae8261..aeb527412d 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,14 @@ +Tue Jul 8 21:35:22 2003 Soeren Sandmann + + * gtk/gtktoggletoolbutton.h: remove strange #define + * gtk/gtktoolbutton.h: fix cut'n'paste error + * gtk/gtktoolbutton.c (gtk_tool_button_init): use instance + private data + * gtk/gtktoolitem.c (gtk_tool_item_class_init): use instance + private data instead of g_new0() + * gtk/gtktoggletoolbutton.c (gtk_toggle_tool_button_init): use + instance private data + Tue Jul 8 21:10:14 2003 Soeren Sandmann * gtk/gtkbutton.c (gtk_button_realize): remove GDK_EXPOSURE_MASK diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 7598ae8261..aeb527412d 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,14 @@ +Tue Jul 8 21:35:22 2003 Soeren Sandmann + + * gtk/gtktoggletoolbutton.h: remove strange #define + * gtk/gtktoolbutton.h: fix cut'n'paste error + * gtk/gtktoolbutton.c (gtk_tool_button_init): use instance + private data + * gtk/gtktoolitem.c (gtk_tool_item_class_init): use instance + private data instead of g_new0() + * gtk/gtktoggletoolbutton.c (gtk_toggle_tool_button_init): use + instance private data + Tue Jul 8 21:10:14 2003 Soeren Sandmann * gtk/gtkbutton.c (gtk_button_realize): remove GDK_EXPOSURE_MASK diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 7598ae8261..aeb527412d 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,14 @@ +Tue Jul 8 21:35:22 2003 Soeren Sandmann + + * gtk/gtktoggletoolbutton.h: remove strange #define + * gtk/gtktoolbutton.h: fix cut'n'paste error + * gtk/gtktoolbutton.c (gtk_tool_button_init): use instance + private data + * gtk/gtktoolitem.c (gtk_tool_item_class_init): use instance + private data instead of g_new0() + * gtk/gtktoggletoolbutton.c (gtk_toggle_tool_button_init): use + instance private data + Tue Jul 8 21:10:14 2003 Soeren Sandmann * gtk/gtkbutton.c (gtk_button_realize): remove GDK_EXPOSURE_MASK diff --git a/gtk/gtktoggletoolbutton.c b/gtk/gtktoggletoolbutton.c index 4e0395f156..1cdb0238b0 100644 --- a/gtk/gtktoggletoolbutton.c +++ b/gtk/gtktoggletoolbutton.c @@ -102,12 +102,14 @@ gtk_toggle_tool_button_class_init (GtkToggleToolButtonClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + + g_type_class_add_private (object_class, sizeof (GtkToggleToolButtonPrivate)); } static void gtk_toggle_tool_button_init (GtkToggleToolButton *button) { - button->priv = g_new0 (GtkToggleToolButtonPrivate, 1); + button->priv = GTK_TOGGLE_TOOL_BUTTON_GET_PRIVATE (button); g_signal_connect_object (_gtk_tool_button_get_button (GTK_TOOL_BUTTON (button)), "toggled", G_CALLBACK (button_toggled), button, 0); diff --git a/gtk/gtktoggletoolbutton.h b/gtk/gtktoggletoolbutton.h index fa76661953..225b833bc9 100644 --- a/gtk/gtktoggletoolbutton.h +++ b/gtk/gtktoggletoolbutton.h @@ -33,8 +33,7 @@ G_BEGIN_DECLS #define GTK_IS_TOGGLE_TOOL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOGGLE_TOOL_BUTTON)) #define GTK_IS_TOGGLE_TOOL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GTK_TYPE_TOGGLE_TOOL_BUTTON)) #define GTK_TOGGLE_TOOL_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_TOGGLE_TOOL_BUTTON, GtkToggleToolButtonClass)) -#define GTK_TOGGLE_TOOL_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TOOL_BUTTON, GtkToggleToolButtonPrivate)) -#define GTK_TOGGLE_TOOL_BUTTON_GET_PRIVATE(obj) ( +#define GTK_TOGGLE_TOOL_BUTTON_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TOGGLE_TOOL_BUTTON, GtkToggleToolButtonPrivate)) typedef struct _GtkToggleToolButton GtkToggleToolButton; typedef struct _GtkToggleToolButtonClass GtkToggleToolButtonClass; diff --git a/gtk/gtktoolbutton.c b/gtk/gtktoolbutton.c index 4491aeb888..27b57e1671 100644 --- a/gtk/gtktoolbutton.c +++ b/gtk/gtktoolbutton.c @@ -217,6 +217,8 @@ gtk_tool_button_class_init (GtkToolButtonClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + + g_type_class_add_private (object_class, sizeof (GtkToolButtonPrivate)); } static void @@ -225,7 +227,7 @@ gtk_tool_button_init (GtkToolButton *button, { GtkToolItem *toolitem = GTK_TOOL_ITEM (button); - button->priv = g_new0 (GtkToolButtonPrivate, 1); + button->priv = GTK_TOOL_BUTTON_GET_PRIVATE (button); gtk_tool_item_set_homogeneous (toolitem, TRUE); diff --git a/gtk/gtktoolbutton.h b/gtk/gtktoolbutton.h index e002e14a52..88e2ec5ef0 100644 --- a/gtk/gtktoolbutton.h +++ b/gtk/gtktoolbutton.h @@ -33,7 +33,7 @@ G_BEGIN_DECLS #define GTK_IS_TOOL_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOOL_BUTTON)) #define GTK_IS_TOOL_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GTK_TYPE_TOOL_BUTTON)) #define GTK_TOOL_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_TOOL_BUTTON, GtkToolButtonClass)) -#define GTK_TOOL_ITEM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TOOL_BUTTON, GtkToolButtonPrivate)) +#define GTK_TOOL_BUTTON_GET_PRIVATE(obj)(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_TOOL_BUTTON, GtkToolButtonPrivate)) typedef struct _GtkToolButton GtkToolButton; typedef struct _GtkToolButtonClass GtkToolButtonClass; diff --git a/gtk/gtktoolitem.c b/gtk/gtktoolitem.c index d2d0ff78d7..b52553dc1d 100644 --- a/gtk/gtktoolitem.c +++ b/gtk/gtktoolitem.c @@ -190,10 +190,7 @@ gtk_tool_item_class_init (GtkToolItemClass *klass) G_TYPE_STRING, G_TYPE_STRING); - /* FIXME: enable this when bug 116921 is fixed */ -#if 0 g_type_class_add_private (object_class, sizeof (GtkToolItemPrivate)); -#endif } static void @@ -201,11 +198,7 @@ gtk_tool_item_init (GtkToolItem *toolitem) { GTK_WIDGET_UNSET_FLAGS (toolitem, GTK_CAN_FOCUS); - /* FIXME: enable this when bug 116921 is fixed */ -#if 0 toolitem->priv = GTK_TOOL_ITEM_GET_PRIVATE (toolitem); -#endif - toolitem->priv = g_new0 (GtkToolItemPrivate, 1); toolitem->priv->visible_horizontal = TRUE; toolitem->priv->visible_vertical = TRUE; -- cgit v1.2.1