diff options
author | Matthias Clasen <mclasen@redhat.com> | 2006-05-03 17:07:09 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2006-05-03 17:07:09 +0000 |
commit | e272345b5d41bfe7272f72cccc7073442db49b8d (patch) | |
tree | 9e291c6c4e43d40017560b130607f5d597e66e83 /gtk/gtkclipboard.c | |
parent | 7f399f19f975dbf667f9df205ca1af3807c80511 (diff) | |
download | gtk+-e272345b5d41bfe7272f72cccc7073442db49b8d.tar.gz |
More G_DEFINE_TYPE conversion.
2006-05-03 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkaccessible.c:
* gtk/gtkclipboard.c:
* gtk/gtkfilefilter.c:
* gtk/gtkimmodule.c:
* gtk/gtkmenubar.c: More G_DEFINE_TYPE conversion.
Diffstat (limited to 'gtk/gtkclipboard.c')
-rw-r--r-- | gtk/gtkclipboard.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/gtk/gtkclipboard.c b/gtk/gtkclipboard.c index 3e501294e7..ccda4c7035 100644 --- a/gtk/gtkclipboard.c +++ b/gtk/gtkclipboard.c @@ -149,23 +149,13 @@ static GQuark request_contents_key_id = 0; static const gchar clipboards_owned_key[] = "gtk-clipboards-owned"; static GQuark clipboards_owned_key_id = 0; -static GObjectClass *parent_class; static guint clipboard_signals[LAST_SIGNAL] = { 0 }; -GType -gtk_clipboard_get_type (void) +G_DEFINE_TYPE (GtkClipboard, gtk_clipboard, G_TYPE_OBJECT); + +static void +gtk_clipboard_init (GtkClipboard *object) { - static GType clipboard_type = 0; - - if (!clipboard_type) - clipboard_type = g_type_register_static_simple (G_TYPE_OBJECT, - I_("GtkClipboard"), - sizeof (GtkClipboardClass), - (GClassInitFunc)gtk_clipboard_class_init, - sizeof (GtkClipboard), - NULL, 0); - - return clipboard_type; } static void @@ -173,8 +163,6 @@ gtk_clipboard_class_init (GtkClipboardClass *class) { GObjectClass *gobject_class = G_OBJECT_CLASS (class); - parent_class = g_type_class_peek_parent (class); - gobject_class->finalize = gtk_clipboard_finalize; class->owner_change = gtk_clipboard_owner_change; @@ -226,7 +214,7 @@ gtk_clipboard_finalize (GObject *object) g_free (clipboard->storable_targets); - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (gtk_clipboard_parent_class)->finalize (object); } static void |