From 538b8a736343c38907a2e8dbea3ba496c0d24ee7 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 8 May 2009 16:50:40 -0400 Subject: Adapt memos to EShellBackend changes. --- addressbook/gui/component/e-book-shell-backend.c | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'addressbook') diff --git a/addressbook/gui/component/e-book-shell-backend.c b/addressbook/gui/component/e-book-shell-backend.c index c8b3810b3e..d3bf07cd92 100644 --- a/addressbook/gui/component/e-book-shell-backend.c +++ b/addressbook/gui/component/e-book-shell-backend.c @@ -62,6 +62,11 @@ struct _EBookShellBackendPrivate { ESourceList *source_list; }; +enum { + PROP_0, + PROP_SOURCE_LIST +}; + /* Module Entry Points */ void e_module_load (GTypeModule *type_module); void e_module_unload (GTypeModule *type_module); @@ -414,6 +419,24 @@ book_shell_backend_window_created_cb (EShellBackend *shell_backend, source_entries, G_N_ELEMENTS (source_entries)); } +static void +book_shell_backend_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_backend_get_source_list ( + E_BOOK_SHELL_BACKEND (object))); + return; + } + + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); +} + static void book_shell_backend_dispose (GObject *object) { @@ -487,6 +510,7 @@ book_shell_backend_class_init (EBookShellBackendClass *class) g_type_class_add_private (class, sizeof (EBookShellBackendPrivate)); object_class = G_OBJECT_CLASS (class); + object_class->get_property = book_shell_backend_get_property; object_class->dispose = book_shell_backend_dispose; object_class->constructed = book_shell_backend_constructed; @@ -500,6 +524,16 @@ book_shell_backend_class_init (EBookShellBackendClass *class) shell_backend_class->is_busy = book_shell_backend_is_busy; shell_backend_class->shutdown = book_shell_backend_shutdown; shell_backend_class->migrate = e_book_shell_backend_migrate; + + 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 -- cgit v1.2.3