aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-list-editor
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-06-24 19:31:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-25 08:31:42 +0800
commitf960fd2dff5358f0e13eba7041d35855bf48c22e (patch)
tree92859c8ba093fa15a3bd7b888332d6e61a704a51 /addressbook/gui/contact-list-editor
parent88db20f3e9ff38296c031671de963ae665fd8143 (diff)
downloadgsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.gz
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.bz2
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.lz
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.xz
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.tar.zst
gsoc2013-evolution-f960fd2dff5358f0e13eba7041d35855bf48c22e.zip
Reduce usage of g_type_class_peek_parent().
G_DEFINE_TYPE macros define a static "parent_class" variable.
Diffstat (limited to 'addressbook/gui/contact-list-editor')
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c8
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.c8
2 files changed, 5 insertions, 11 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index 4bb92a351d..e3cb38ec96 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -137,8 +137,6 @@ struct _EContactListEditorPrivate {
guint in_async_call : 1;
};
-static gpointer parent_class;
-
G_DEFINE_TYPE (EContactListEditor, e_contact_list_editor, EAB_TYPE_EDITOR)
static EContactListEditor *
@@ -1347,7 +1345,7 @@ contact_list_editor_dispose (GObject *object)
}
/* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (e_contact_list_editor_parent_class)->dispose (object);
}
static void
@@ -1364,7 +1362,8 @@ contact_list_editor_constructed (GObject *object)
editor = E_CONTACT_LIST_EDITOR (object);
/* Chain up to parent's constructed() method. */
- G_OBJECT_CLASS (parent_class)->constructed (object);
+ G_OBJECT_CLASS (e_contact_list_editor_parent_class)->
+ constructed (object);
shell = eab_editor_get_shell (EAB_EDITOR (editor));
registry = e_shell_get_registry (shell);
@@ -1576,7 +1575,6 @@ e_contact_list_editor_class_init (EContactListEditorClass *class)
GObjectClass *object_class;
EABEditorClass *editor_class;
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EContactListEditorPrivate));
object_class = G_OBJECT_CLASS (class);
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c
index bba9681bf9..55cc70bec7 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c
@@ -33,8 +33,6 @@
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_CONTACT_LIST_MODEL, EContactListModelPrivate))
-static gpointer parent_class;
-
G_DEFINE_TYPE (EContactListModel, e_contact_list_model, GTK_TYPE_TREE_STORE);
struct _EContactListModelPrivate {
@@ -71,8 +69,8 @@ contact_list_model_constructor (GType type,
types[0] = E_TYPE_DESTINATION;
/* Chain up to parent's constructor() method. */
- object = G_OBJECT_CLASS (parent_class)->constructor (
- type, n_construct_properties, construct_properties);
+ object = G_OBJECT_CLASS (e_contact_list_model_parent_class)->
+ constructor (type, n_construct_properties, construct_properties);
gtk_tree_store_set_column_types (
GTK_TREE_STORE (object), G_N_ELEMENTS (types), types);
@@ -105,8 +103,6 @@ e_contact_list_model_class_init (EContactListModelClass *class)
g_type_class_add_private (class, sizeof (EContactListModelPrivate));
- parent_class = g_type_class_peek_parent (class);
-
object_class = G_OBJECT_CLASS (class);
object_class->constructor = contact_list_model_constructor;
object_class->dispose = contact_list_model_dispose;