aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-21 07:31:11 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-21 09:56:16 +0800
commit8a71509ee441e48215df9a9c3018214fe9a592ce (patch)
tree2c053d9d1c8a7d6bd61c81a6f609c48fb8428197 /modules/addressbook
parent8e2902eefc466c662bd7bef0533de05db0897c49 (diff)
downloadgsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.gz
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.bz2
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.lz
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.xz
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.tar.zst
gsoc2013-evolution-8a71509ee441e48215df9a9c3018214fe9a592ce.zip
Add a "settings" module.
Collect all the "config" extensions from the "addressbook", "calendar", and "mail" modules into one place. These extensions typically just bind GObject properties of extensible classes to app-specific GSettings keys.
Diffstat (limited to 'modules/addressbook')
-rw-r--r--modules/addressbook/Makefile.am2
-rw-r--r--modules/addressbook/e-book-config-name-selector-entry.c120
-rw-r--r--modules/addressbook/e-book-config-name-selector-entry.h66
-rw-r--r--modules/addressbook/evolution-module-addressbook.c2
4 files changed, 0 insertions, 190 deletions
diff --git a/modules/addressbook/Makefile.am b/modules/addressbook/Makefile.am
index 759f195e05..2accc37bef 100644
--- a/modules/addressbook/Makefile.am
+++ b/modules/addressbook/Makefile.am
@@ -30,8 +30,6 @@ module_addressbook_la_SOURCES = \
eab-composer-util.h \
e-book-config-hook.c \
e-book-config-hook.h \
- e-book-config-name-selector-entry.c \
- e-book-config-name-selector-entry.h \
e-book-shell-backend.c \
e-book-shell-backend.h \
e-book-shell-content.c \
diff --git a/modules/addressbook/e-book-config-name-selector-entry.c b/modules/addressbook/e-book-config-name-selector-entry.c
deleted file mode 100644
index acc38a773a..0000000000
--- a/modules/addressbook/e-book-config-name-selector-entry.c
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * e-book-config-name-selector-entry.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/>
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "e-book-config-name-selector-entry.h"
-
-#include <e-util/e-util.h>
-
-#define E_BOOK_CONFIG_NAME_SELECTOR_ENTRY_GET_PRIVATE(obj) \
- (G_TYPE_INSTANCE_GET_PRIVATE \
- ((obj), E_TYPE_BOOK_CONFIG_NAME_SELECTOR_ENTRY, EBookConfigNameSelectorEntryPrivate))
-
-struct _EBookConfigNameSelectorEntryPrivate {
- GSettings *settings;
-};
-
-G_DEFINE_DYNAMIC_TYPE (
- EBookConfigNameSelectorEntry,
- e_book_config_name_selector_entry,
- E_TYPE_EXTENSION)
-
-static void
-book_config_name_selector_entry_dispose (GObject *object)
-{
- EBookConfigNameSelectorEntryPrivate *priv;
-
- priv = E_BOOK_CONFIG_NAME_SELECTOR_ENTRY_GET_PRIVATE (object);
-
- if (priv->settings != NULL) {
- g_object_unref (priv->settings);
- priv->settings = NULL;
- }
-
- /* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (e_book_config_name_selector_entry_parent_class)->
- dispose (object);
-}
-
-static void
-book_config_name_selector_entry_constructed (GObject *object)
-{
- EBookConfigNameSelectorEntry *extension;
- EExtensible *extensible;
-
- extension = E_BOOK_CONFIG_NAME_SELECTOR_ENTRY (object);
- extensible = e_extension_get_extensible (E_EXTENSION (extension));
-
- /* Chain up to parent's consturcted() method. */
- G_OBJECT_CLASS (e_book_config_name_selector_entry_parent_class)->
- constructed (object);
-
- g_settings_bind (
- extension->priv->settings, "completion-minimum-query-length",
- extensible, "minimum-query-length",
- G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY);
-
- g_settings_bind (
- extension->priv->settings, "completion-show-address",
- extensible, "show-address",
- G_SETTINGS_BIND_DEFAULT | G_SETTINGS_BIND_NO_SENSITIVITY);
-}
-
-static void
-e_book_config_name_selector_entry_class_init (EBookConfigNameSelectorEntryClass *class)
-{
- GObjectClass *object_class;
- EExtensionClass *extension_class;
-
- g_type_class_add_private (
- class, sizeof (EBookConfigNameSelectorEntryPrivate));
-
- object_class = G_OBJECT_CLASS (class);
- object_class->dispose = book_config_name_selector_entry_dispose;
- object_class->constructed = book_config_name_selector_entry_constructed;
-
- extension_class = E_EXTENSION_CLASS (class);
- extension_class->extensible_type = E_TYPE_NAME_SELECTOR_ENTRY;
-}
-
-static void
-e_book_config_name_selector_entry_class_finalize (EBookConfigNameSelectorEntryClass *class)
-{
-}
-
-static void
-e_book_config_name_selector_entry_init (EBookConfigNameSelectorEntry *extension)
-{
- extension->priv =
- E_BOOK_CONFIG_NAME_SELECTOR_ENTRY_GET_PRIVATE (extension);
- extension->priv->settings =
- g_settings_new ("org.gnome.evolution.addressbook");
-}
-
-void
-e_book_config_name_selector_entry_type_register (GTypeModule *type_module)
-{
- /* XXX G_DEFINE_DYNAMIC_TYPE declares a static type registration
- * function, so we have to wrap it with a public function in
- * order to register types from a separate compilation unit. */
- e_book_config_name_selector_entry_register_type (type_module);
-}
-
diff --git a/modules/addressbook/e-book-config-name-selector-entry.h b/modules/addressbook/e-book-config-name-selector-entry.h
deleted file mode 100644
index b326e57371..0000000000
--- a/modules/addressbook/e-book-config-name-selector-entry.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * e-book-config-name-selector-entry.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/>
- *
- */
-
-#ifndef E_BOOK_CONFIG_NAME_SELECTOR_ENTRY_H
-#define E_BOOK_CONFIG_NAME_SELECTOR_ENTRY_H
-
-#include <libebackend/libebackend.h>
-
-/* Standard GObject macros */
-#define E_TYPE_BOOK_CONFIG_NAME_SELECTOR_ENTRY \
- (e_book_config_name_selector_entry_get_type ())
-#define E_BOOK_CONFIG_NAME_SELECTOR_ENTRY(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST \
- ((obj), E_TYPE_BOOK_CONFIG_NAME_SELECTOR_ENTRY, EBookConfigNameSelectorEntry))
-#define E_BOOK_CONFIG_NAME_SELECTOR_ENTRY_CLASS(cls) \
- (G_TYPE_CHECK_CLASS_CAST \
- ((cls), E_TYPE_BOOK_CONFIG_NAME_SELECTOR_ENTRY, EBookConfigNameSelectorEntryClass))
-#define E_IS_BOOK_CONFIG_NAME_SELECTOR_ENTRY(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE \
- ((obj), E_TYPE_BOOK_CONFIG_NAME_SELECTOR_ENTRY))
-#define E_IS_BOOK_CONFIG_NAME_SELECTOR_ENTRY_CLASS(cls) \
- (G_TYPE_CHECK_CLASS_TYPE \
- ((cls), E_TYPE_BOOK_CONFIG_NAME_SELECTOR_ENTRY))
-#define E_BOOK_CONFIG_NAME_SELECTOR_ENTRY_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS \
- ((obj), E_TYPE_BOOK_CONFIG_NAME_SELECTOR_ENTRY, EBookConfigNameSelectorEntryClass))
-
-G_BEGIN_DECLS
-
-typedef struct _EBookConfigNameSelectorEntry EBookConfigNameSelectorEntry;
-typedef struct _EBookConfigNameSelectorEntryClass EBookConfigNameSelectorEntryClass;
-typedef struct _EBookConfigNameSelectorEntryPrivate EBookConfigNameSelectorEntryPrivate;
-
-struct _EBookConfigNameSelectorEntry {
- EExtension parent;
- EBookConfigNameSelectorEntryPrivate *priv;
-};
-
-struct _EBookConfigNameSelectorEntryClass {
- EExtensionClass parent_class;
-};
-
-GType e_book_config_name_selector_entry_get_type
- (void) G_GNUC_CONST;
-void e_book_config_name_selector_entry_type_register
- (GTypeModule *type_module);
-
-G_END_DECLS
-
-#endif /* E_BOOK_CONFIG_NAME_SELECTOR_ENTRY_H */
-
diff --git a/modules/addressbook/evolution-module-addressbook.c b/modules/addressbook/evolution-module-addressbook.c
index 950fdeebf9..1caf7ddf08 100644
--- a/modules/addressbook/evolution-module-addressbook.c
+++ b/modules/addressbook/evolution-module-addressbook.c
@@ -24,7 +24,6 @@
#endif
#include "e-book-config-hook.h"
-#include "e-book-config-name-selector-entry.h"
#include "e-book-shell-view.h"
#include "e-book-shell-backend.h"
@@ -41,7 +40,6 @@ e_module_load (GTypeModule *type_module)
/* Register dynamically loaded types. */
e_book_config_hook_register_type (type_module);
- e_book_config_name_selector_entry_type_register (type_module);
e_book_shell_view_register_type (type_module);
e_book_shell_backend_type_register (type_module);