From 999af1d1646843365a142dc79c45ab7fbca0b461 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 16 Apr 2010 22:57:59 +0200 Subject: [PATCH] Fix use of priv in GtkIconEntry code --- midori/gtkiconentry.c | 8 ++++---- midori/gtkiconentry.h | 7 +++++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/midori/gtkiconentry.c b/midori/gtkiconentry.c index ca0b50fa..583a09a4 100644 --- a/midori/gtkiconentry.c +++ b/midori/gtkiconentry.c @@ -82,13 +82,13 @@ typedef struct gboolean insensitive; } EntryIconInfo; -typedef struct _GtkIconEntryPrivate +struct _GtkIconEntryPrivate { gdouble fraction; EntryIconInfo icons[MAX_ICONS]; gulong icon_released_id; -} GtkIconEntryPrivate; +}; enum { @@ -663,7 +663,7 @@ gtk_icon_entry_map (GtkWidget *widget) GTK_WIDGET_CLASS (parent_class)->map (widget); - priv = widget->priv; + priv = GTK_ICON_ENTRY (widget)->priv; for (i = 0; i < MAX_ICONS; i++) { @@ -693,7 +693,7 @@ gtk_icon_entry_unmap (GtkWidget *widget) { int i; - priv = widget->priv; + priv = GTK_ICON_ENTRY (widget)->priv; for (i = 0; i < MAX_ICONS; i++) { diff --git a/midori/gtkiconentry.h b/midori/gtkiconentry.h index 0ca041a2..6c07ce35 100644 --- a/midori/gtkiconentry.h +++ b/midori/gtkiconentry.h @@ -62,12 +62,15 @@ typedef enum GTK_ICON_ENTRY_SECONDARY } GtkIconEntryPosition; -typedef struct _GtkIconEntry GtkIconEntry; -typedef struct _GtkIconEntryClass GtkIconEntryClass; +typedef struct _GtkIconEntry GtkIconEntry; +typedef struct _GtkIconEntryClass GtkIconEntryClass; +typedef struct _GtkIconEntryPrivate GtkIconEntryPrivate; struct _GtkIconEntry { GtkEntry parent_object; + + GtkIconEntryPrivate* priv; }; struct _GtkIconEntryClass