aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-08-09 23:18:42 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-09-14 20:08:46 +0800
commit77d14c71c1c4acd82287be23d49e894044af74b5 (patch)
treef75ca2908f08b501413cdc6f9ed03a3d8e00a1c4 /addressbook
parent51ef38a2cc59e8cdff400780818abac87313e477 (diff)
downloadgsoc2013-evolution-77d14c71c1c4acd82287be23d49e894044af74b5.tar
gsoc2013-evolution-77d14c71c1c4acd82287be23d49e894044af74b5.tar.gz
gsoc2013-evolution-77d14c71c1c4acd82287be23d49e894044af74b5.tar.bz2
gsoc2013-evolution-77d14c71c1c4acd82287be23d49e894044af74b5.tar.lz
gsoc2013-evolution-77d14c71c1c4acd82287be23d49e894044af74b5.tar.xz
gsoc2013-evolution-77d14c71c1c4acd82287be23d49e894044af74b5.tar.zst
gsoc2013-evolution-77d14c71c1c4acd82287be23d49e894044af74b5.zip
Bug #655492 - Move 'Automatic contacts' tab to 'Contacts' part
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/gui/widgets/eab-config.c24
-rw-r--r--addressbook/gui/widgets/eab-config.h14
2 files changed, 37 insertions, 1 deletions
diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c
index dbbb8cefc2..5cb8d25e81 100644
--- a/addressbook/gui/widgets/eab-config.c
+++ b/addressbook/gui/widgets/eab-config.c
@@ -54,6 +54,8 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
p->source_changed_id = 0;
}
break; }
+ case EAB_CONFIG_TARGET_PREFS:
+ break;
}
}
@@ -64,6 +66,12 @@ ecp_target_free (EConfig *ec, EConfigTarget *t)
if (s->source)
g_object_unref (s->source);
break; }
+ case EAB_CONFIG_TARGET_PREFS: {
+ EABConfigTargetPrefs *s = (EABConfigTargetPrefs *) t;
+
+ if (s->gconf)
+ g_object_unref (s->gconf);
+ break; }
}
((EConfigClass *) ecp_parent_class)->target_free (ec, t);
@@ -91,6 +99,8 @@ ecp_set_target (EConfig *ec, EConfigTarget *t)
s->source, "changed",
G_CALLBACK (ecp_source_changed), ec);
break; }
+ case EAB_CONFIG_TARGET_PREFS:
+ break;
}
}
}
@@ -145,3 +155,17 @@ eab_config_target_new_source (EABConfig *ecp, struct _ESource *source)
return t;
}
+
+EABConfigTargetPrefs *
+eab_config_target_new_prefs (EABConfig *ecp, GConfClient *gconf)
+{
+ EABConfigTargetPrefs *t = e_config_target_new (
+ &ecp->config, EAB_CONFIG_TARGET_PREFS, sizeof (*t));
+
+ if (gconf)
+ t->gconf = g_object_ref (gconf);
+ else
+ t->gconf = NULL;
+
+ return t;
+}
diff --git a/addressbook/gui/widgets/eab-config.h b/addressbook/gui/widgets/eab-config.h
index 5aa822ea62..7cf79244e2 100644
--- a/addressbook/gui/widgets/eab-config.h
+++ b/addressbook/gui/widgets/eab-config.h
@@ -24,6 +24,7 @@
#ifndef __EAB_CONFIG_H__
#define __EAB_CONFIG_H__
+#include <gconf/gconf-client.h>
#include "e-util/e-config.h"
#define EAB_TYPE_CONFIG (eab_config_get_type ())
@@ -46,7 +47,8 @@ struct _EABConfigClass {
};
enum _eab_config_target_t {
- EAB_CONFIG_TARGET_SOURCE
+ EAB_CONFIG_TARGET_SOURCE,
+ EAB_CONFIG_TARGET_PREFS
};
typedef struct _EABConfigTargetSource EABConfigTargetSource;
@@ -57,12 +59,22 @@ struct _EABConfigTargetSource {
struct _ESource *source;
};
+typedef struct _EABConfigTargetPrefs EABConfigTargetPrefs;
+
+struct _EABConfigTargetPrefs {
+ EConfigTarget target;
+
+ /* preferences are global from gconf */
+ GConfClient *gconf;
+};
+
typedef struct _EConfigItem EABConfigItem;
GType eab_config_get_type (void);
EABConfig *eab_config_new (gint type, const gchar *menuid);
EABConfigTargetSource *eab_config_target_new_source (EABConfig *ecp, struct _ESource *source);
+EABConfigTargetPrefs *eab_config_target_new_prefs (EABConfig *ecp, GConfClient *gconf);
G_END_DECLS