[gtk+/refactor: 96/106] gtkseparatortoolitem: unseal private pointer
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor: 96/106] gtkseparatortoolitem: unseal private pointer
- Date: Tue, 13 Jul 2010 17:38:05 +0000 (UTC)
commit 098b8047ddc21a2cb15a88e1fdda7f633db2bb7b
Author: Javier Jardón <jjardon gnome org>
Date: Mon Jul 12 20:26:22 2010 +0200
gtkseparatortoolitem: unseal private pointer
gtk/gtkseparatortoolitem.c | 21 ++++++++++-----------
gtk/gtkseparatortoolitem.h | 2 +-
2 files changed, 11 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkseparatortoolitem.c b/gtk/gtkseparatortoolitem.c
index db53893..54f72df 100644
--- a/gtk/gtkseparatortoolitem.c
+++ b/gtk/gtkseparatortoolitem.c
@@ -47,6 +47,11 @@
#define MENU_ID "gtk-separator-tool-item-menu-id"
+struct _GtkSeparatorToolItemPrivate
+{
+ guint draw : 1;
+};
+
enum {
PROP_0,
PROP_DRAW
@@ -70,14 +75,6 @@ static void gtk_separator_tool_item_add (GtkContainer
static gint get_space_size (GtkToolItem *tool_item);
-
-#define GTK_SEPARATOR_TOOL_ITEM_GET_PRIVATE(obj)(G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_SEPARATOR_TOOL_ITEM, GtkSeparatorToolItemPrivate))
-
-struct _GtkSeparatorToolItemPrivate
-{
- guint draw : 1;
-};
-
G_DEFINE_TYPE (GtkSeparatorToolItem, gtk_separator_tool_item, GTK_TYPE_TOOL_ITEM)
static gint
@@ -131,7 +128,9 @@ gtk_separator_tool_item_class_init (GtkSeparatorToolItemClass *class)
static void
gtk_separator_tool_item_init (GtkSeparatorToolItem *separator_item)
{
- separator_item->priv = GTK_SEPARATOR_TOOL_ITEM_GET_PRIVATE (separator_item);
+ separator_item->priv = G_TYPE_INSTANCE_GET_PRIVATE (separator_item,
+ GTK_TYPE_SEPARATOR_TOOL_ITEM,
+ GtkSeparatorToolItemPrivate);
separator_item->priv->draw = TRUE;
}
@@ -216,8 +215,8 @@ gtk_separator_tool_item_expose (GtkWidget *widget,
GdkEventExpose *event)
{
GtkToolbar *toolbar = NULL;
- GtkSeparatorToolItemPrivate *priv =
- GTK_SEPARATOR_TOOL_ITEM_GET_PRIVATE (widget);
+ GtkSeparatorToolItem *separator = GTK_SEPARATOR_TOOL_ITEM (widget);
+ GtkSeparatorToolItemPrivate *priv = separator->priv;
if (priv->draw)
{
diff --git a/gtk/gtkseparatortoolitem.h b/gtk/gtkseparatortoolitem.h
index 1547742..b027a2f 100644
--- a/gtk/gtkseparatortoolitem.h
+++ b/gtk/gtkseparatortoolitem.h
@@ -46,7 +46,7 @@ struct _GtkSeparatorToolItem
GtkToolItem parent;
/*< private >*/
- GtkSeparatorToolItemPrivate *GSEAL (priv);
+ GtkSeparatorToolItemPrivate *priv;
};
struct _GtkSeparatorToolItemClass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]