[evolution/account-mgmt: 22/25] Add 'book-config-local' module.



commit 340d3a5d53cfb61754f84ddcc3675bd66e261315
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Dec 19 23:51:59 2010 -0500

    Add 'book-config-local' module.
    
    Registers the "On This Computer" backend in EBookSourceConfig widgets.
    
    Replaces the 'addressbook-file' plugin.

 configure.ac                                       |    4 +-
 modules/Makefile.am                                |    1 +
 modules/book-config-local/Makefile.am              |   27 ++++++++
 .../evolution-book-config-local.c                  |   71 ++++++++++++++++++++
 plugins/addressbook-file/Makefile.am               |   26 -------
 plugins/addressbook-file/addressbook-file.c        |   63 -----------------
 .../org-gnome-addressbook-file.eplug.xml           |   22 ------
 po/POTFILES.in                                     |    1 -
 8 files changed, 101 insertions(+), 114 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 441e6ce..a3ffa81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1478,7 +1478,7 @@ AC_ARG_ENABLE([plugins],
 	[enable_plugins="$enableval"],[enable_plugins=all])
 
 dnl Add any new plugins here
-plugins_base_always="calendar-file calendar-http itip-formatter default-source addressbook-file mark-all-read groupwise-features publish-calendar caldav imap-features google-account-setup webdav-account-setup"
+plugins_base_always="calendar-file calendar-http itip-formatter default-source mark-all-read groupwise-features publish-calendar caldav imap-features google-account-setup webdav-account-setup"
 
 plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN"
 dist_plugins_base="$plugins_base_always calendar-weather sa-junk-plugin bogo-junk-plugin"
@@ -1818,6 +1818,7 @@ modules/Makefile
 modules/addressbook/Makefile
 modules/calendar/Makefile
 modules/mail/Makefile
+modules/book-config-local/Makefile
 modules/composer-autosave/Makefile
 modules/connman/Makefile
 modules/mailto-handler/Makefile
@@ -1831,7 +1832,6 @@ modules/source-loader/Makefile
 modules/startup-wizard/Makefile
 modules/windows-sens/Makefile
 plugins/Makefile
-plugins/addressbook-file/Makefile
 plugins/attachment-reminder/Makefile
 plugins/audio-inline/Makefile
 plugins/backup-restore/Makefile
diff --git a/modules/Makefile.am b/modules/Makefile.am
index 836d61c..9949d2d 100644
--- a/modules/Makefile.am
+++ b/modules/Makefile.am
@@ -22,6 +22,7 @@ SUBDIRS = \
 	addressbook \
 	calendar \
 	mail \
+	book-config-local \
 	composer-autosave \
 	mailto-handler \
 	offline-alert \
diff --git a/modules/book-config-local/Makefile.am b/modules/book-config-local/Makefile.am
new file mode 100644
index 0000000..1ee4218
--- /dev/null
+++ b/modules/book-config-local/Makefile.am
@@ -0,0 +1,27 @@
+module_LTLIBRARIES = libevolution-module-book-config-local.la
+
+libevolution_module_book_config_local_la_CPPFLAGS =		\
+	$(AM_CPPFLAGS)						\
+	-I$(top_srcdir)						\
+	-I$(top_srcdir)/widgets					\
+	-DG_LOG_DOMAIN=\"evolution-book-config-local\"		\
+	$(EVOLUTION_ADDRESSBOOK_CFLAGS)				\
+	$(GNOME_PLATFORM_CFLAGS)
+
+libevolution_module_book_config_local_la_SOURCES =		\
+	evolution-book-config-local.c
+
+libevolution_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_ADDRESSBOOK_LIBS)				\
+	$(GNOME_PLATFORM_LIBS)
+
+libevolution_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 0000000..d2c43db
--- /dev/null
+++ b/modules/book-config-local/evolution-book-config-local.c
@@ -0,0 +1,71 @@
+/*
+ * 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 <e-util/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->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)
+{
+}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index cbdd10d..4858052 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -283,7 +283,6 @@ modules/plugin-python/example/org-gnome-hello-python-ui.xml
 modules/plugin-python/example/org-gnome-hello-python.eplug.xml
 modules/source-loader/evolution-source-loader.error.xml
 modules/startup-wizard/evolution-startup-wizard.c
-plugins/addressbook-file/org-gnome-addressbook-file.eplug.xml
 plugins/attachment-reminder/apps-evolution-attachment-reminder.schemas.in
 plugins/attachment-reminder/attachment-reminder.c
 plugins/attachment-reminder/org-gnome-attachment-reminder.error.xml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]