diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2006-05-02 23:56:43 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-05-02 23:56:43 +0000 |
commit | f26aad1916445d25c99878138dfc384de67a2060 (patch) | |
tree | b72263ecb326e82a49f1e8d1871ec4288b8aa299 /gtk/gtkicontheme.c | |
parent | 33cddd12d78abb2efe6facba9c859017f8df9819 (diff) | |
download | gtk+-f26aad1916445d25c99878138dfc384de67a2060.tar.gz |
Boilerplate reduction
Diffstat (limited to 'gtk/gtkicontheme.c')
-rw-r--r-- | gtk/gtkicontheme.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c index 0fad206840..1af2fd1bd5 100644 --- a/gtk/gtkicontheme.c +++ b/gtk/gtkicontheme.c @@ -186,8 +186,6 @@ typedef struct GtkIconCache *cache; } IconThemeDirMtime; -static void gtk_icon_theme_class_init (GtkIconThemeClass *klass); -static void gtk_icon_theme_init (GtkIconTheme *icon_theme); static void gtk_icon_theme_finalize (GObject *object); static void theme_dir_destroy (IconThemeDir *dir); @@ -228,8 +226,6 @@ static BuiltinIcon *find_builtin_icon (const gchar *icon_name, gint *min_difference_p, gboolean *has_larger_p); -static GObjectClass *parent_class = NULL; - static guint signal_changed = 0; static GHashTable *icon_theme_builtin_icons; @@ -238,32 +234,7 @@ static GHashTable *icon_theme_builtin_icons; GtkIconCache *_builtin_cache = NULL; static GList *builtin_dirs = NULL; - -GType -gtk_icon_theme_get_type (void) -{ - static GType type = 0; - - if (type == 0) - { - static const GTypeInfo info = - { - sizeof (GtkIconThemeClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) gtk_icon_theme_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (GtkIconTheme), - 0, /* n_preallocs */ - (GInstanceInitFunc) gtk_icon_theme_init, - }; - - type = g_type_register_static (G_TYPE_OBJECT, I_("GtkIconTheme"), &info, 0); - } - - return type; -} +G_DEFINE_TYPE (GtkIconTheme, gtk_icon_theme, G_TYPE_OBJECT); /** * gtk_icon_theme_new: @@ -353,8 +324,6 @@ gtk_icon_theme_class_init (GtkIconThemeClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - gobject_class->finalize = gtk_icon_theme_finalize; /** @@ -702,7 +671,7 @@ gtk_icon_theme_finalize (GObject *object) blow_themes (icon_theme); - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (gtk_icon_theme_parent_class)->finalize (object); } /** |