aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/e-book-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-07 19:21:57 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-07 19:21:57 +0800
commitcaa862135195b828d2e8355436fdd6eb0ec2443e (patch)
tree40198708ccf89ca4246c7da11a718fa5cc39de52 /addressbook/gui/component/e-book-shell-view.c
parent19b29348068e367efc105732e9707cdb4132b4ee (diff)
downloadgsoc2013-evolution-caa862135195b828d2e8355436fdd6eb0ec2443e.tar
gsoc2013-evolution-caa862135195b828d2e8355436fdd6eb0ec2443e.tar.gz
gsoc2013-evolution-caa862135195b828d2e8355436fdd6eb0ec2443e.tar.bz2
gsoc2013-evolution-caa862135195b828d2e8355436fdd6eb0ec2443e.tar.lz
gsoc2013-evolution-caa862135195b828d2e8355436fdd6eb0ec2443e.tar.xz
gsoc2013-evolution-caa862135195b828d2e8355436fdd6eb0ec2443e.tar.zst
gsoc2013-evolution-caa862135195b828d2e8355436fdd6eb0ec2443e.zip
Convert EShellModule to EShellBackend
Split the GTypeModule loader out of EShellModule as EModule, and rename EShellModule to EShellBackend. Backends (formerly modules) should now subclass EShellBackend. This commit converts EShell but breaks all the shell backends.
Diffstat (limited to 'addressbook/gui/component/e-book-shell-view.c')
-rw-r--r--addressbook/gui/component/e-book-shell-view.c66
1 files changed, 14 insertions, 52 deletions
diff --git a/addressbook/gui/component/e-book-shell-view.c b/addressbook/gui/component/e-book-shell-view.c
index 6244384390..9a6736b178 100644
--- a/addressbook/gui/component/e-book-shell-view.c
+++ b/addressbook/gui/component/e-book-shell-view.c
@@ -21,11 +21,6 @@
#include "e-book-shell-view-private.h"
-enum {
- PROP_0,
- PROP_SOURCE_LIST
-};
-
GType e_book_shell_view_type = 0;
static gpointer parent_class;
@@ -80,23 +75,6 @@ book_shell_view_source_list_changed_cb (EBookShellView *book_shell_view,
}
static void
-book_shell_view_get_property (GObject *object,
- guint property_id,
- GValue *value,
- GParamSpec *pspec)
-{
- switch (property_id) {
- case PROP_SOURCE_LIST:
- g_value_set_object (
- value, e_book_shell_view_get_source_list (
- E_BOOK_SHELL_VIEW (object)));
- return;
- }
-
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
-}
-
-static void
book_shell_view_dispose (GObject *object)
{
EBookShellView *book_shell_view;
@@ -124,12 +102,22 @@ static void
book_shell_view_constructed (GObject *object)
{
EBookShellView *book_shell_view;
+ EBookShellModule *book_shell_module;
+ ESourceList *source_list;
/* Chain up to parent's constructed() method. */
G_OBJECT_CLASS (parent_class)->constructed (object);
book_shell_view = E_BOOK_SHELL_VIEW (object);
e_book_shell_view_private_constructed (book_shell_view);
+
+ book_shell_module = book_shell_view->priv->book_shell_module;
+ source_list = e_book_shell_module_get_source_list (book_shell_module);
+
+ g_signal_connect_swapped (
+ source_list, "changed",
+ G_CALLBACK (book_shell_view_source_list_changed_cb),
+ book_shell_view);
}
static void
@@ -267,8 +255,7 @@ book_shell_view_update_actions (EShellView *shell_view)
}
static void
-book_shell_view_class_init (EBookShellViewClass *class,
- GTypeModule *type_module)
+book_shell_view_class_init (EBookShellViewClass *class)
{
GObjectClass *object_class;
EShellViewClass *shell_view_class;
@@ -277,7 +264,6 @@ book_shell_view_class_init (EBookShellViewClass *class,
g_type_class_add_private (class, sizeof (EBookShellViewPrivate));
object_class = G_OBJECT_CLASS (class);
- object_class->get_property = book_shell_view_get_property;
object_class->dispose = book_shell_view_dispose;
object_class->finalize = book_shell_view_finalize;
object_class->constructed = book_shell_view_constructed;
@@ -289,20 +275,9 @@ book_shell_view_class_init (EBookShellViewClass *class,
shell_view_class->ui_manager_id = "org.gnome.evolution.contacts";
shell_view_class->search_options = "/contact-search-options";
shell_view_class->search_rules = "addresstypes.xml";
- shell_view_class->type_module = type_module;
shell_view_class->new_shell_content = e_book_shell_content_new;
shell_view_class->new_shell_sidebar = e_book_shell_sidebar_new;
shell_view_class->update_actions = book_shell_view_update_actions;
-
- g_object_class_install_property (
- object_class,
- PROP_SOURCE_LIST,
- g_param_spec_object (
- "source-list",
- _("Source List"),
- _("The registry of address books"),
- E_TYPE_SOURCE_LIST,
- G_PARAM_READABLE));
}
static void
@@ -313,11 +288,6 @@ book_shell_view_init (EBookShellView *book_shell_view,
E_BOOK_SHELL_VIEW_GET_PRIVATE (book_shell_view);
e_book_shell_view_private_init (book_shell_view, shell_view_class);
-
- g_signal_connect_swapped (
- book_shell_view->priv->source_list, "changed",
- G_CALLBACK (book_shell_view_source_list_changed_cb),
- book_shell_view);
}
GType
@@ -330,11 +300,11 @@ e_book_shell_view_get_type (GTypeModule *type_module)
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) book_shell_view_class_init,
(GClassFinalizeFunc) NULL,
- type_module,
+ NULL, /* class_data */
sizeof (EBookShellView),
- 0, /* n_preallocs */
+ 0, /* n_preallocs */
(GInstanceInitFunc) book_shell_view_init,
- NULL /* value_table */
+ NULL /* value_table */
};
e_book_shell_view_type =
@@ -345,11 +315,3 @@ e_book_shell_view_get_type (GTypeModule *type_module)
return e_book_shell_view_type;
}
-
-ESourceList *
-e_book_shell_view_get_source_list (EBookShellView *book_shell_view)
-{
- g_return_val_if_fail (E_IS_BOOK_SHELL_VIEW (book_shell_view), NULL);
-
- return book_shell_view->priv->source_list;
-}