aboutsummaryrefslogtreecommitdiffstats
path: root/embed/downloader-view.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2008-02-18 07:23:36 +0800
committerXan Lopez <xan@src.gnome.org>2008-02-18 07:23:36 +0800
commitf0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a (patch)
treecd6ef67c3cb63ac81206f2a22175c3b8dd64e565 /embed/downloader-view.c
parent2f3e9b5994ebec0a15f6c3ba691732b38a4fbe22 (diff)
downloadgsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.gz
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.bz2
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.lz
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.xz
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.tar.zst
gsoc2013-epiphany-f0f2a211a474b2b5fccdaa5a15a5e3fb27866f3a.zip
Use G_DEFINE_TYPE* where possible in embed/* (#517090)
svn path=/trunk/; revision=7964
Diffstat (limited to 'embed/downloader-view.c')
-rw-r--r--embed/downloader-view.c34
1 files changed, 2 insertions, 32 deletions
diff --git a/embed/downloader-view.c b/embed/downloader-view.c
index b0292fe0b..e85073cbb 100644
--- a/embed/downloader-view.c
+++ b/embed/downloader-view.c
@@ -143,43 +143,13 @@ static void
show_notification_window (DownloaderView *dv);
#endif
-static GObjectClass *parent_class = NULL;
-
-GType
-downloader_view_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (DownloaderViewClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) downloader_view_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (DownloaderView),
- 0, /* n_preallocs */
- (GInstanceInitFunc) downloader_view_init
- };
-
- type = g_type_register_static (EPHY_TYPE_DIALOG,
- "DownloaderView",
- &our_info, 0);
- }
-
- return type;
-}
+G_DEFINE_TYPE (DownloaderView, downloader_view, EPHY_TYPE_DIALOG)
static void
downloader_view_class_init (DownloaderViewClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
object_class->finalize = downloader_view_finalize;
g_type_class_add_private (object_class, sizeof(DownloaderViewPrivate));
@@ -329,7 +299,7 @@ downloader_view_finalize (GObject *object)
g_hash_table_destroy (dv->priv->downloads_hash);
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (downloader_view_parent_class)->finalize (object);
#ifdef HAVE_LIBNOTIFY
if (notify_is_initted ())