aboutsummaryrefslogtreecommitdiffstats
path: root/modules/book-config-local
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-12-20 12:51:59 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-03 11:00:41 +0800
commit305b51db24b2ea740f67e068313e721c1b55f937 (patch)
treebc182ddbe62c17670455dc9ffd6594bfa7352144 /modules/book-config-local
parentcd3759369b675e754dbed5ba19894cdd87a63a88 (diff)
downloadgsoc2013-evolution-305b51db24b2ea740f67e068313e721c1b55f937.tar
gsoc2013-evolution-305b51db24b2ea740f67e068313e721c1b55f937.tar.gz
gsoc2013-evolution-305b51db24b2ea740f67e068313e721c1b55f937.tar.bz2
gsoc2013-evolution-305b51db24b2ea740f67e068313e721c1b55f937.tar.lz
gsoc2013-evolution-305b51db24b2ea740f67e068313e721c1b55f937.tar.xz
gsoc2013-evolution-305b51db24b2ea740f67e068313e721c1b55f937.tar.zst
gsoc2013-evolution-305b51db24b2ea740f67e068313e721c1b55f937.zip
Add 'book-config-local' module.
Registers the "On This Computer" backend in EBookSourceConfig widgets. Replaces the 'addressbook-file' plugin.
Diffstat (limited to 'modules/book-config-local')
-rw-r--r--modules/book-config-local/Makefile.am27
-rw-r--r--modules/book-config-local/evolution-book-config-local.c73
2 files changed, 100 insertions, 0 deletions
diff --git a/modules/book-config-local/Makefile.am b/modules/book-config-local/Makefile.am
new file mode 100644
index 0000000000..234b4825ad
--- /dev/null
+++ b/modules/book-config-local/Makefile.am
@@ -0,0 +1,27 @@
+module_LTLIBRARIES = module-book-config-local.la
+
+module_book_config_local_la_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/widgets \
+ -DG_LOG_DOMAIN=\"evolution-book-config-local\" \
+ $(EVOLUTION_DATA_SERVER_CFLAGS) \
+ $(GNOME_PLATFORM_CFLAGS)
+
+module_book_config_local_la_SOURCES = \
+ evolution-book-config-local.c
+
+module_book_config_local_la_LIBADD = \
+ $(top_builddir)/e-util/libeutil.la \
+ $(top_builddir)/widgets/misc/libemiscwidgets.la \
+ $(top_builddir)/addressbook/printing/libecontactprint.la \
+ $(top_builddir)/addressbook/gui/merging/libeabbookmerging.la \
+ $(top_builddir)/addressbook/gui/widgets/libeabwidgets.la \
+ $(top_builddir)/addressbook/util/libeabutil.la \
+ $(EVOLUTION_DATA_SERVER_LIBS) \
+ $(GNOME_PLATFORM_LIBS)
+
+module_book_config_local_la_LDFLAGS = \
+ -module -avoid-version $(NO_UNDEFINED)
+
+-include $(top_srcdir)/git.mk
diff --git a/modules/book-config-local/evolution-book-config-local.c b/modules/book-config-local/evolution-book-config-local.c
new file mode 100644
index 0000000000..0f7bb2c78d
--- /dev/null
+++ b/modules/book-config-local/evolution-book-config-local.c
@@ -0,0 +1,73 @@
+/*
+ * evolution-book-config-local.c
+ *
+ * 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/>
+ *
+ */
+
+#include <config.h>
+#include <glib/gi18n-lib.h>
+
+#include <libebackend/e-extension.h>
+
+#include <misc/e-source-config-backend.h>
+#include <addressbook/gui/widgets/e-book-source-config.h>
+
+typedef ESourceConfigBackend EBookConfigLocal;
+typedef ESourceConfigBackendClass EBookConfigLocalClass;
+
+/* Module Entry Points */
+void e_module_load (GTypeModule *type_module);
+void e_module_unload (GTypeModule *type_module);
+
+/* Forward Declarations */
+GType e_book_config_local_get_type (void);
+
+G_DEFINE_DYNAMIC_TYPE (
+ EBookConfigLocal,
+ e_book_config_local,
+ E_TYPE_SOURCE_CONFIG_BACKEND)
+
+static void
+e_book_config_local_class_init (ESourceConfigBackendClass *class)
+{
+ EExtensionClass *extension_class;
+
+ extension_class = E_EXTENSION_CLASS (class);
+ extension_class->extensible_type = E_TYPE_BOOK_SOURCE_CONFIG;
+
+ class->parent_uid = "local-stub";
+ class->backend_name = "local";
+}
+
+static void
+e_book_config_local_class_finalize (ESourceConfigBackendClass *class)
+{
+}
+
+static void
+e_book_config_local_init (ESourceConfigBackend *backend)
+{
+}
+
+G_MODULE_EXPORT void
+e_module_load (GTypeModule *type_module)
+{
+ e_book_config_local_register_type (type_module);
+}
+
+G_MODULE_EXPORT void
+e_module_unload (GTypeModule *type_module)
+{
+}