[gtk+/refactor: 30/106] gtkcombobox: unseal private pointer
- From: Javier Jardón <jjardon src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/refactor: 30/106] gtkcombobox: unseal private pointer
- Date: Tue, 13 Jul 2010 17:32:31 +0000 (UTC)
commit c06aff8264947261bedbbf0726437d2601c8dd18
Author: Javier Jardón <jjardon gnome org>
Date: Wed Jun 2 05:13:35 2010 +0200
gtkcombobox: unseal private pointer
gtk/gtkcombobox.c | 12 +++++++-----
gtk/gtkcombobox.h | 2 +-
2 files changed, 8 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index d7128a7..ca9c8f1 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -68,7 +68,6 @@ struct _ComboCellInfo
guint pack : 1;
};
-#define GTK_COMBO_BOX_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GTK_TYPE_COMBO_BOX, GtkComboBoxPrivate))
struct _GtkComboBoxPrivate
{
@@ -927,7 +926,12 @@ gtk_combo_box_cell_editable_init (GtkCellEditableIface *iface)
static void
gtk_combo_box_init (GtkComboBox *combo_box)
{
- GtkComboBoxPrivate *priv = GTK_COMBO_BOX_GET_PRIVATE (combo_box);
+ GtkComboBoxPrivate *priv;
+
+ combo_box->priv = G_TYPE_INSTANCE_GET_PRIVATE (combo_box,
+ GTK_TYPE_COMBO_BOX,
+ GtkComboBoxPrivate);
+ priv = combo_box->priv;
priv->cell_view = gtk_cell_view_new ();
gtk_widget_set_parent (priv->cell_view, GTK_WIDGET (combo_box));
@@ -952,8 +956,6 @@ gtk_combo_box_init (GtkComboBox *combo_box)
priv->focus_on_click = TRUE;
priv->button_sensitivity = GTK_SENSITIVITY_AUTO;
- combo_box->priv = priv;
-
gtk_combo_box_check_appearance (combo_box);
}
@@ -1033,7 +1035,7 @@ gtk_combo_box_get_property (GObject *object,
GParamSpec *pspec)
{
GtkComboBox *combo_box = GTK_COMBO_BOX (object);
- GtkComboBoxPrivate *priv = GTK_COMBO_BOX_GET_PRIVATE (combo_box);
+ GtkComboBoxPrivate *priv = combo_box->priv;
switch (prop_id)
{
diff --git a/gtk/gtkcombobox.h b/gtk/gtkcombobox.h
index f5141a7..84f5475 100644
--- a/gtk/gtkcombobox.h
+++ b/gtk/gtkcombobox.h
@@ -46,7 +46,7 @@ struct _GtkComboBox
GtkBin parent_instance;
/*< private >*/
- GtkComboBoxPrivate *GSEAL (priv);
+ GtkComboBoxPrivate *priv;
};
struct _GtkComboBoxClass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]