aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmark-properties.c
diff options
context:
space:
mode:
authorXan Lopez <xan@src.gnome.org>2008-02-13 07:07:11 +0800
committerXan Lopez <xan@src.gnome.org>2008-02-13 07:07:11 +0800
commitdf50ed8d9cb314b1f9cefbfeee0c6717430f579c (patch)
tree88682e6816ac205b83dcdf912b9eeb514b548dc8 /src/bookmarks/ephy-bookmark-properties.c
parente8202438b62f78e58e8c95c65214b1ea1678c1f0 (diff)
downloadgsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar
gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.gz
gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.bz2
gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.lz
gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.xz
gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.tar.zst
gsoc2013-epiphany-df50ed8d9cb314b1f9cefbfeee0c6717430f579c.zip
Use G_DEFINE_TYPE* macros in src/bookmarks/ when possible. (#516138)
svn path=/trunk/; revision=7932
Diffstat (limited to 'src/bookmarks/ephy-bookmark-properties.c')
-rw-r--r--src/bookmarks/ephy-bookmark-properties.c37
1 files changed, 4 insertions, 33 deletions
diff --git a/src/bookmarks/ephy-bookmark-properties.c b/src/bookmarks/ephy-bookmark-properties.c
index 3dc7e1bb6..dd61e0d93 100644
--- a/src/bookmarks/ephy-bookmark-properties.c
+++ b/src/bookmarks/ephy-bookmark-properties.c
@@ -80,7 +80,7 @@ enum
PROP_CREATING
};
-static GObjectClass *parent_class;
+G_DEFINE_TYPE (EphyBookmarkProperties, ephy_bookmark_properties, GTK_TYPE_DIALOG)
static gboolean
update_warning (EphyBookmarkProperties *properties)
@@ -506,8 +506,9 @@ ephy_bookmark_properties_constructor (GType type,
const char *tmp;
char *text;
- object = parent_class->constructor (type, n_construct_properties,
- construct_params);
+ object = G_OBJECT_CLASS (ephy_bookmark_properties_parent_class)->constructor (type,
+ n_construct_properties,
+ construct_params);
widget = GTK_WIDGET (object);
window = GTK_WINDOW (object);
@@ -731,8 +732,6 @@ ephy_bookmark_properties_class_init (EphyBookmarkPropertiesClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
- parent_class = g_type_class_peek_parent (klass);
-
object_class->constructor = ephy_bookmark_properties_constructor;
object_class->set_property = ephy_bookmark_properties_set_property;
object_class->get_property = ephy_bookmark_properties_get_property;
@@ -765,34 +764,6 @@ ephy_bookmark_properties_class_init (EphyBookmarkPropertiesClass *klass)
/* public API */
-GType
-ephy_bookmark_properties_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0))
- {
- const GTypeInfo our_info =
- {
- sizeof (EphyBookmarkPropertiesClass),
- NULL,
- NULL,
- (GClassInitFunc) ephy_bookmark_properties_class_init,
- NULL,
- NULL,
- sizeof (EphyBookmarkProperties),
- 0,
- (GInstanceInitFunc) ephy_bookmark_properties_init
- };
-
- type = g_type_register_static (GTK_TYPE_DIALOG,
- "EphyBookmarkProperties",
- &our_info, 0);
- }
-
- return type;
-}
-
GtkWidget *
ephy_bookmark_properties_new (EphyBookmarks *bookmarks,
EphyNode *bookmark,