aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
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
parent19b29348068e367efc105732e9707cdb4132b4ee (diff)
downloadgsoc2013-evolution-caa862135195b828d2e8355436fdd6eb0ec2443e.tar.gz
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')
-rw-r--r--addressbook/gui/component/Makefile.am1
-rw-r--r--addressbook/gui/component/e-book-shell-module.c187
-rw-r--r--addressbook/gui/component/e-book-shell-module.h71
-rw-r--r--addressbook/gui/component/e-book-shell-sidebar.c13
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.c5
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.c12
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.h14
-rw-r--r--addressbook/gui/component/e-book-shell-view.c66
-rw-r--r--addressbook/gui/component/e-book-shell-view.h6
9 files changed, 239 insertions, 136 deletions
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
index 7aea84963b..1efdb341f3 100644
--- a/addressbook/gui/component/Makefile.am
+++ b/addressbook/gui/component/Makefile.am
@@ -32,6 +32,7 @@ libevolution_module_contacts_la_SOURCES = \
e-book-shell-content.c \
e-book-shell-content.h \
e-book-shell-module.c \
+ e-book-shell-module.h \
e-book-shell-module-migrate.c \
e-book-shell-module-migrate.h \
e-book-shell-sidebar.c \
diff --git a/addressbook/gui/component/e-book-shell-module.c b/addressbook/gui/component/e-book-shell-module.c
index 80bbc8318e..03b2496dba 100644
--- a/addressbook/gui/component/e-book-shell-module.c
+++ b/addressbook/gui/component/e-book-shell-module.c
@@ -19,6 +19,8 @@
*
*/
+#include "e-book-shell-module.h"
+
#include <config.h>
#include <string.h>
@@ -26,11 +28,9 @@
#include <libebook/e-book.h>
#include <libedataserver/e-url.h>
#include <libedataserver/e-source.h>
-#include <libedataserver/e-source-list.h>
#include <libedataserver/e-source-group.h>
#include "shell/e-shell.h"
-#include "shell/e-shell-module.h"
#include "shell/e-shell-window.h"
#include "e-util/e-import.h"
@@ -51,16 +51,23 @@
#include "smime/gui/certificate-manager.h"
#endif
-#define MODULE_NAME "addressbook"
-#define MODULE_ALIASES "contacts"
-#define MODULE_SCHEMES ""
-#define MODULE_SORT_ORDER 300
+#define E_BOOK_SHELL_MODULE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_BOOK_SHELL_MODULE, EBookShellModulePrivate))
#define LDAP_BASE_URI "ldap://"
#define PERSONAL_RELATIVE_URI "system"
-/* Module Entry Point */
-void e_shell_module_init (GTypeModule *type_module);
+struct _EBookShellModulePrivate {
+ ESourceList *source_list;
+};
+
+/* Module Entry Points */
+void e_shell_load (GTypeModule *type_module);
+void e_shell_unload (GTypeModule *type_module);
+
+GType e_book_shell_module_type = 0;
+static gpointer parent_class;
static void
book_module_ensure_sources (EShellModule *shell_module)
@@ -68,7 +75,7 @@ book_module_ensure_sources (EShellModule *shell_module)
/* XXX This is basically the same algorithm across all modules.
* Maybe we could somehow integrate this into EShellModule? */
- ESourceList *source_list;
+ EBookShellModulePrivate *priv;
ESourceGroup *on_this_computer;
ESourceGroup *on_ldap_servers;
ESource *personal;
@@ -82,28 +89,19 @@ book_module_ensure_sources (EShellModule *shell_module)
on_ldap_servers = NULL;
personal = NULL;
- if (!e_book_get_addressbooks (&source_list, NULL)) {
+ priv = E_BOOK_SHELL_MODULE_GET_PRIVATE (shell_module);
+
+ if (!e_book_get_addressbooks (&priv->source_list, NULL)) {
g_warning ("Could not get addressbook sources from GConf!");
return;
}
- /* Share the source list with all address book views. This
- * is accessible via e_book_shell_view_get_source_list().
- * Note: EShellModule takes ownership of the reference.
- *
- * XXX I haven't yet decided if I want to add a proper
- * EShellModule API for this. The mail module would
- * not use it. */
- g_object_set_data_full (
- G_OBJECT (shell_module), "source-list",
- source_list, (GDestroyNotify) g_object_unref);
-
data_dir = e_shell_module_get_data_dir (shell_module);
filename = g_build_filename (data_dir, "local", NULL);
base_uri = g_filename_to_uri (filename, NULL, NULL);
g_free (filename);
- groups = e_source_list_peek_groups (source_list);
+ groups = e_source_list_peek_groups (priv->source_list);
for (iter = groups; iter != NULL; iter = iter->next) {
ESourceGroup *source_group = iter->data;
const gchar *group_base_uri;
@@ -160,14 +158,14 @@ book_module_ensure_sources (EShellModule *shell_module)
* but that happens in an idle loop and too late
* to prevent the user from seeing a "Cannot
* Open ... because of invalid URI" error. */
- e_source_list_sync (source_list, NULL);
+ e_source_list_sync (priv->source_list, NULL);
}
} else {
ESourceGroup *source_group;
source_group = e_source_group_new (name, base_uri);
- e_source_list_add_group (source_list, source_group, -1);
+ e_source_list_add_group (priv->source_list, source_group, -1);
g_object_unref (source_group);
}
@@ -192,7 +190,7 @@ book_module_ensure_sources (EShellModule *shell_module)
ESourceGroup *source_group;
source_group = e_source_group_new (name, LDAP_BASE_URI);
- e_source_list_add_group (source_list, source_group, -1);
+ e_source_list_add_group (priv->source_list, source_group, -1);
g_object_unref (source_group);
} else {
/* Force the group name to the current locale. */
@@ -330,19 +328,6 @@ static GtkActionEntry source_entries[] = {
};
static gboolean
-book_module_is_busy (EShellModule *shell_module)
-{
- return !eab_editor_request_close_all ();
-}
-
-static gboolean
-book_module_shutdown (EShellModule *shell_module)
-{
- /* FIXME */
- return TRUE;
-}
-
-static gboolean
book_module_handle_uri_cb (EShellModule *shell_module,
const gchar *uri)
{
@@ -428,33 +413,31 @@ book_module_window_created_cb (EShellModule *shell_module,
source_entries, G_N_ELEMENTS (source_entries));
}
-static EShellModuleInfo module_info = {
+static void
+book_shell_module_dispose (GObject *object)
+{
+ EBookShellModulePrivate *priv;
- MODULE_NAME,
- MODULE_ALIASES,
- MODULE_SCHEMES,
- MODULE_SORT_ORDER,
+ priv = E_BOOK_SHELL_MODULE_GET_PRIVATE (object);
- /* Methods */
- /* start */ NULL,
- book_module_is_busy,
- book_module_shutdown,
- e_book_shell_module_migrate
-};
+ if (priv->source_list != NULL) {
+ g_object_unref (priv->source_list);
+ priv->source_list = NULL;
+ }
-void
-e_shell_module_init (GTypeModule *type_module)
+ /* Chain up to parent's dispose() method. */
+ G_OBJECT_CLASS (parent_class)->dispose (object);
+}
+
+static void
+book_shell_module_constructed (GObject *object)
{
EShell *shell;
EShellModule *shell_module;
- shell_module = E_SHELL_MODULE (type_module);
+ shell_module = E_SHELL_MODULE (object);
shell = e_shell_module_get_shell (shell_module);
- e_shell_module_set_info (
- shell_module, &module_info,
- e_book_shell_view_get_type (type_module));
-
/* XXX Why is this here? Address books aren't the only
* things that use S/MIME. Maybe put it in EShell? */
#ifdef ENABLE_SMIME
@@ -477,3 +460,95 @@ e_shell_module_init (GTypeModule *type_module)
autocompletion_config_init (shell);
}
+
+static gboolean
+book_shell_module_is_busy (EShellModule *shell_module)
+{
+ return !eab_editor_request_close_all ();
+}
+
+static gboolean
+book_shell_module_shutdown (EShellModule *shell_module)
+{
+ /* FIXME */
+ return TRUE;
+}
+
+static void
+book_shell_module_class_init (EBookShellModuleClass *class)
+{
+ GObjectClass *object_class;
+ EShellModuleClass *shell_module_class;
+
+ parent_class = g_type_class_peek_parent (class);
+ g_type_class_add_private (class, sizeof (EBookShellModulePrivate));
+
+ object_class = G_OBJECT_CLASS (class);
+ object_class->dispose = book_shell_module_dispose;
+ object_class->constructed = book_shell_module_constructed;
+
+ shell_module_class = E_SHELL_MODULE_CLASS (class);
+ shell_module_class->name = "addressbook";
+ shell_module_class->aliases = "contacts";
+ shell_module_class->schemes = "";
+ shell_module_class->sort_order = 300;
+ shell_module_class->view_type = E_TYPE_BOOK_SHELL_VIEW;
+ shell_module_class->start = NULL;
+ shell_module_class->is_busy = book_shell_module_is_busy;
+ shell_module_class->shutdown = book_shell_module_shutdown;
+ shell_module_class->migrate = e_book_shell_module_migrate;
+}
+
+static void
+book_shell_module_init (EBookShellModule *book_shell_module)
+{
+ book_shell_module->priv =
+ E_BOOK_SHELL_MODULE_GET_PRIVATE (book_shell_module);
+}
+
+GType
+e_book_shell_module_get_type (GTypeModule *type_module)
+{
+ if (e_book_shell_module_type == 0) {
+ const GTypeInfo type_info = {
+ sizeof (EBookShellModuleClass),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+ (GClassInitFunc) book_shell_module_class_init,
+ (GClassFinalizeFunc) NULL,
+ NULL, /* class_data */
+ sizeof (EBookShellModule),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) book_shell_module_init,
+ NULL /* value_table */
+ };
+
+ e_book_shell_module_type =
+ g_type_module_register_type (
+ type_module, E_TYPE_SHELL_MODULE,
+ "EBookShellModule", &type_info, 0);
+ }
+
+ return e_book_shell_module_type;
+}
+
+ESourceList *
+e_book_shell_module_get_source_list (EBookShellModule *book_shell_module)
+{
+ g_return_val_if_fail (
+ E_IS_BOOK_SHELL_MODULE (book_shell_module), NULL);
+
+ return book_shell_module->priv->source_list;
+}
+
+void
+e_module_load (GTypeModule *type_module)
+{
+ e_book_shell_view_get_type (type_module);
+ e_book_shell_module_get_type (type_module);
+}
+
+void
+e_module_unload (GTypeModule *type_module)
+{
+}
diff --git a/addressbook/gui/component/e-book-shell-module.h b/addressbook/gui/component/e-book-shell-module.h
new file mode 100644
index 0000000000..4a0088a557
--- /dev/null
+++ b/addressbook/gui/component/e-book-shell-module.h
@@ -0,0 +1,71 @@
+/*
+ * e-book-shell-module.h
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) version 3.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with the program; if not, see <http://www.gnu.org/licenses/>
+ *
+ *
+ * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
+ *
+ */
+
+#ifndef E_BOOK_SHELL_MODULE_H
+#define E_BOOK_SHELL_MODULE_H
+
+#include <shell/e-shell-module.h>
+#include <libedataserver/e-source-list.h>
+
+/* Standard GObject macros */
+#define E_TYPE_BOOK_SHELL_MODULE \
+ (e_book_shell_module_type)
+#define E_BOOK_SHELL_MODULE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST \
+ ((obj), E_TYPE_BOOK_SHELL_MODULE, EBookShellModule))
+#define E_BOOK_SHELL_MODULE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_CAST \
+ ((cls), E_TYPE_BOOK_SHELL_MODULE, EBookShellModuleClass))
+#define E_IS_BOOK_SHELL_MODULE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE \
+ ((obj), E_TYPE_BOOK_SHELL_MODULE))
+#define E_IS_BOOK_SHELL_MODULE_CLASS(cls) \
+ (G_TYPE_CHECK_CLASS_TYPE \
+ ((cls), E_TYPE_BOOK_SHELL_MODULE))
+#define E_BOOK_SHELL_MODULE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS \
+ ((obj), E_TYPE_BOOK_SHELL_MODULE, EBookShellModuleClass))
+
+G_BEGIN_DECLS
+
+extern GType e_book_shell_module_type;
+
+typedef struct _EBookShellModule EBookShellModule;
+typedef struct _EBookShellModuleClass EBookShellModuleClass;
+typedef struct _EBookShellModulePrivate EBookShellModulePrivate;
+
+struct _EBookShellModule {
+ EShellModule parent;
+ EBookShellModulePrivate *priv;
+};
+
+struct _EBookShellModuleClass {
+ EShellModuleClass parent_class;
+};
+
+GType e_book_shell_module_get_type
+ (GTypeModule *type_module);
+ESourceList * e_book_shell_module_get_source_list
+ (EBookShellModule *book_shell_module);
+
+G_END_DECLS
+
+#endif /* E_BOOK_SHELL_MODULE_H */
diff --git a/addressbook/gui/component/e-book-shell-sidebar.c b/addressbook/gui/component/e-book-shell-sidebar.c
index fd9cdbe925..d7e121e110 100644
--- a/addressbook/gui/component/e-book-shell-sidebar.c
+++ b/addressbook/gui/component/e-book-shell-sidebar.c
@@ -24,8 +24,9 @@
#include <string.h>
#include <glib/gi18n.h>
-#include <e-book-shell-view.h>
-#include <e-addressbook-selector.h>
+#include "e-book-shell-view.h"
+#include "e-book-shell-module.h"
+#include "e-addressbook-selector.h"
#define E_BOOK_SHELL_SIDEBAR_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -80,8 +81,9 @@ book_shell_sidebar_constructed (GObject *object)
{
EBookShellSidebarPrivate *priv;
EShellView *shell_view;
+ EShellModule *shell_module;
EShellSidebar *shell_sidebar;
- EBookShellView *book_shell_view;
+ EBookShellModule *book_shell_module;
ESourceList *source_list;
GtkContainer *container;
GtkWidget *widget;
@@ -93,8 +95,9 @@ book_shell_sidebar_constructed (GObject *object)
shell_sidebar = E_SHELL_SIDEBAR (object);
shell_view = e_shell_sidebar_get_shell_view (shell_sidebar);
- book_shell_view = E_BOOK_SHELL_VIEW (shell_view);
- source_list = e_book_shell_view_get_source_list (book_shell_view);
+ shell_module = e_shell_view_get_shell_module (shell_view);
+ book_shell_module = E_BOOK_SHELL_MODULE (shell_module);
+ source_list = e_book_shell_module_get_source_list (book_shell_module);
container = GTK_CONTAINER (shell_sidebar);
diff --git a/addressbook/gui/component/e-book-shell-view-actions.c b/addressbook/gui/component/e-book-shell-view-actions.c
index ed88b54855..4241c1f73e 100644
--- a/addressbook/gui/component/e-book-shell-view-actions.c
+++ b/addressbook/gui/component/e-book-shell-view-actions.c
@@ -47,6 +47,7 @@ action_address_book_delete_cb (GtkAction *action,
{
EShellView *shell_view;
EShellWindow *shell_window;
+ EBookShellModule *book_shell_module;
EBookShellSidebar *book_shell_sidebar;
ESource *source;
ESourceSelector *selector;
@@ -59,6 +60,9 @@ action_address_book_delete_cb (GtkAction *action,
shell_view = E_SHELL_VIEW (book_shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
+ book_shell_module = book_shell_view->priv->book_shell_module;
+ source_list = e_book_shell_module_get_source_list (book_shell_module);
+
book_shell_sidebar = book_shell_view->priv->book_shell_sidebar;
selector = e_book_shell_sidebar_get_selector (book_shell_sidebar);
source = e_source_selector_peek_primary_selection (selector);
@@ -93,7 +97,6 @@ action_address_book_delete_cb (GtkAction *action,
source_group = e_source_peek_group (source);
e_source_group_remove_source (source_group, source);
- source_list = book_shell_view->priv->source_list;
e_source_list_sync (source_list, NULL);
g_object_unref (book);
diff --git a/addressbook/gui/component/e-book-shell-view-private.c b/addressbook/gui/component/e-book-shell-view-private.c
index 33fe07291d..1fe372a05b 100644
--- a/addressbook/gui/component/e-book-shell-view-private.c
+++ b/addressbook/gui/component/e-book-shell-view-private.c
@@ -400,15 +400,10 @@ e_book_shell_view_private_init (EBookShellView *book_shell_view,
EShellViewClass *shell_view_class)
{
EBookShellViewPrivate *priv = book_shell_view->priv;
- ESourceList *source_list;
GHashTable *uid_to_view;
GHashTable *uid_to_editor;
GObject *object;
- object = G_OBJECT (shell_view_class->type_module);
- source_list = g_object_get_data (object, "source-list");
- g_return_if_fail (E_IS_SOURCE_LIST (source_list));
-
uid_to_view = g_hash_table_new_full (
g_str_hash, g_str_equal,
(GDestroyNotify) g_free,
@@ -419,7 +414,6 @@ e_book_shell_view_private_init (EBookShellView *book_shell_view,
(GDestroyNotify) g_free,
(GDestroyNotify) g_free);
- priv->source_list = g_object_ref (source_list);
priv->uid_to_view = uid_to_view;
priv->uid_to_editor = uid_to_editor;
@@ -437,11 +431,13 @@ e_book_shell_view_private_constructed (EBookShellView *book_shell_view)
EBookShellViewPrivate *priv = book_shell_view->priv;
EShellContent *shell_content;
EShellSidebar *shell_sidebar;
+ EShellModule *shell_module;
EShellView *shell_view;
EShellWindow *shell_window;
ESourceSelector *selector;
shell_view = E_SHELL_VIEW (book_shell_view);
+ shell_module = e_shell_view_get_shell_module (shell_view);
shell_content = e_shell_view_get_shell_content (shell_view);
shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
@@ -450,6 +446,7 @@ e_book_shell_view_private_constructed (EBookShellView *book_shell_view)
e_shell_window_add_action_group (shell_window, "contacts-filter");
/* Cache these to avoid lots of awkward casting. */
+ priv->book_shell_module = g_object_ref (shell_module);
priv->book_shell_content = g_object_ref (shell_content);
priv->book_shell_sidebar = g_object_ref (shell_sidebar);
@@ -490,8 +487,7 @@ e_book_shell_view_private_dispose (EBookShellView *book_shell_view)
{
EBookShellViewPrivate *priv = book_shell_view->priv;
- DISPOSE (priv->source_list);
-
+ DISPOSE (priv->book_shell_module);
DISPOSE (priv->book_shell_content);
DISPOSE (priv->book_shell_sidebar);
diff --git a/addressbook/gui/component/e-book-shell-view-private.h b/addressbook/gui/component/e-book-shell-view-private.h
index 6f0d0af147..9be603e6d4 100644
--- a/addressbook/gui/component/e-book-shell-view-private.h
+++ b/addressbook/gui/component/e-book-shell-view-private.h
@@ -43,9 +43,10 @@
#include "addressbook/gui/widgets/e-addressbook-view.h"
#include "addressbook/gui/widgets/e-addressbook-selector.h"
-#include <e-book-shell-content.h>
-#include <e-book-shell-sidebar.h>
-#include <e-book-shell-view-actions.h>
+#include "e-book-shell-module.h"
+#include "e-book-shell-content.h"
+#include "e-book-shell-sidebar.h"
+#include "e-book-shell-view-actions.h"
#define E_BOOK_SHELL_VIEW_GET_PRIVATE(obj) \
(G_TYPE_INSTANCE_GET_PRIVATE \
@@ -92,13 +93,8 @@ enum {
struct _EBookShellViewPrivate {
- /*** Module Data ***/
-
- ESourceList *source_list;
-
- /*** Other Stuff ***/
-
/* These are just for convenience. */
+ EBookShellModule *book_shell_module;
EBookShellContent *book_shell_content;
EBookShellSidebar *book_shell_sidebar;
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;
-}
diff --git a/addressbook/gui/component/e-book-shell-view.h b/addressbook/gui/component/e-book-shell-view.h
index 2b3f02c759..c0b5a44c38 100644
--- a/addressbook/gui/component/e-book-shell-view.h
+++ b/addressbook/gui/component/e-book-shell-view.h
@@ -23,7 +23,6 @@
#define E_BOOK_SHELL_VIEW_H
#include <e-shell-view.h>
-#include <libedataserver/e-source-list.h>
/* Standard GObject macros */
#define E_TYPE_BOOK_SHELL_VIEW \
@@ -61,10 +60,7 @@ struct _EBookShellViewClass {
EShellViewClass parent_class;
};
-GType e_book_shell_view_get_type
- (GTypeModule *type_module);
-ESourceList * e_book_shell_view_get_source_list
- (EBookShellView *book_shell_view);
+GType e_book_shell_view_get_type (GTypeModule *type_module);
G_END_DECLS