spinner: Remove priv pointer

This commit is contained in:
Timm Bäder 2017-09-30 20:06:30 +02:00
parent 29a6c66aec
commit b5c3c51124
2 changed files with 3 additions and 10 deletions

View File

@ -71,6 +71,7 @@ struct _GtkSpinnerPrivate
{ {
guint active : 1; guint active : 1;
}; };
typedef struct _GtkSpinnerPrivate GtkSpinnerPrivate;
G_DEFINE_TYPE_WITH_PRIVATE (GtkSpinner, gtk_spinner, GTK_TYPE_WIDGET) G_DEFINE_TYPE_WITH_PRIVATE (GtkSpinner, gtk_spinner, GTK_TYPE_WIDGET)
@ -123,7 +124,7 @@ static void
gtk_spinner_set_active (GtkSpinner *spinner, gtk_spinner_set_active (GtkSpinner *spinner,
gboolean active) gboolean active)
{ {
GtkSpinnerPrivate *priv = spinner->priv; GtkSpinnerPrivate *priv = gtk_spinner_get_instance_private (spinner);
active = !!active; active = !!active;
@ -148,9 +149,7 @@ gtk_spinner_get_property (GObject *object,
GValue *value, GValue *value,
GParamSpec *pspec) GParamSpec *pspec)
{ {
GtkSpinnerPrivate *priv; GtkSpinnerPrivate *priv = gtk_spinner_get_instance_private (GTK_SPINNER (object));
priv = GTK_SPINNER (object)->priv;
switch (param_id) switch (param_id)
{ {
@ -213,8 +212,6 @@ gtk_spinner_class_init (GtkSpinnerClass *klass)
static void static void
gtk_spinner_init (GtkSpinner *spinner) gtk_spinner_init (GtkSpinner *spinner)
{ {
spinner->priv = gtk_spinner_get_instance_private (spinner);
gtk_widget_set_has_window (GTK_WIDGET (spinner), FALSE); gtk_widget_set_has_window (GTK_WIDGET (spinner), FALSE);
} }

View File

@ -40,14 +40,10 @@ G_BEGIN_DECLS
typedef struct _GtkSpinner GtkSpinner; typedef struct _GtkSpinner GtkSpinner;
typedef struct _GtkSpinnerClass GtkSpinnerClass; typedef struct _GtkSpinnerClass GtkSpinnerClass;
typedef struct _GtkSpinnerPrivate GtkSpinnerPrivate;
struct _GtkSpinner struct _GtkSpinner
{ {
GtkWidget parent; GtkWidget parent;
/*< private >*/
GtkSpinnerPrivate *priv;
}; };
struct _GtkSpinnerClass struct _GtkSpinnerClass