aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-11-29 21:16:55 +0800
committerMilan Crha <mcrha@redhat.com>2011-11-29 21:16:55 +0800
commitf2b9a4b609b13d51ec1925e7c297e87e17026e33 (patch)
tree8ad0454f8ec9cbead4e0ca4de92bcc8652f02e93
parentb16c24615186a2a46a052d57f3e494b54d1d3300 (diff)
downloadgsoc2013-evolution-f2b9a4b609b13d51ec1925e7c297e87e17026e33.tar
gsoc2013-evolution-f2b9a4b609b13d51ec1925e7c297e87e17026e33.tar.gz
gsoc2013-evolution-f2b9a4b609b13d51ec1925e7c297e87e17026e33.tar.bz2
gsoc2013-evolution-f2b9a4b609b13d51ec1925e7c297e87e17026e33.tar.lz
gsoc2013-evolution-f2b9a4b609b13d51ec1925e7c297e87e17026e33.tar.xz
gsoc2013-evolution-f2b9a4b609b13d51ec1925e7c297e87e17026e33.tar.zst
gsoc2013-evolution-f2b9a4b609b13d51ec1925e7c297e87e17026e33.zip
Bug #665103 - Blank composer/mail/network preferences windows
-rw-r--r--e-util/e-config.c1
-rw-r--r--mail/em-config.c22
-rw-r--r--mail/em-config.h8
-rw-r--r--modules/mail/e-mail-config-hook.c1
-rw-r--r--modules/mail/em-composer-prefs.c7
-rw-r--r--modules/mail/em-mailer-prefs.c4
-rw-r--r--modules/mail/em-network-prefs.c4
7 files changed, 40 insertions, 7 deletions
diff --git a/e-util/e-config.c b/e-util/e-config.c
index 06117c2a9f..269e258aac 100644
--- a/e-util/e-config.c
+++ b/e-util/e-config.c
@@ -1134,7 +1134,6 @@ e_config_create_widget (EConfig *emp)
GPtrArray *items = g_ptr_array_new ();
GList *link;
GSList *l;
- /*char *domain = NULL;*/
gint i;
g_return_val_if_fail (emp->target != NULL, NULL);
diff --git a/mail/em-config.c b/mail/em-config.c
index ca8e117d7e..1e025323f4 100644
--- a/mail/em-config.c
+++ b/mail/em-config.c
@@ -33,9 +33,6 @@
#include "em-utils.h"
#include "em-composer-utils.h"
-#include <gconf/gconf.h>
-#include <gconf/gconf-client.h>
-
#include <e-util/e-util.h>
G_DEFINE_TYPE (EMConfig, em_config, E_TYPE_CONFIG)
@@ -52,6 +49,9 @@ em_config_set_target (EConfig *ep,
case EM_CONFIG_TARGET_FOLDER: {
/*EMConfigTargetFolder *s = (EMConfigTargetFolder *)t;*/
break; }
+ case EM_CONFIG_TARGET_PREFS: {
+ /*EMConfigTargetPrefs *s = (EMConfigTargetPrefs *)t;*/
+ break; }
case EM_CONFIG_TARGET_SETTINGS: {
EMConfigTargetSettings *s = (EMConfigTargetSettings *) t;
@@ -75,6 +75,8 @@ em_config_target_free (EConfig *ep,
switch (t->type) {
case EM_CONFIG_TARGET_FOLDER:
break;
+ case EM_CONFIG_TARGET_PREFS:
+ break;
case EM_CONFIG_TARGET_SETTINGS: {
EMConfigTargetSettings *s = (EMConfigTargetSettings *) t;
@@ -90,6 +92,9 @@ em_config_target_free (EConfig *ep,
g_object_unref (s->folder);
break; }
+ case EM_CONFIG_TARGET_PREFS: {
+ /* EMConfigTargetPrefs *s = (EMConfigTargetPrefs *) t; */
+ break; }
case EM_CONFIG_TARGET_SETTINGS: {
EMConfigTargetSettings *s = (EMConfigTargetSettings *) t;
@@ -146,6 +151,17 @@ em_config_target_new_folder (EMConfig *emp,
return t;
}
+EMConfigTargetPrefs *
+em_config_target_new_prefs (EMConfig *emp)
+{
+ EMConfigTargetPrefs *t;
+
+ t = e_config_target_new (
+ &emp->config, EM_CONFIG_TARGET_PREFS, sizeof (*t));
+
+ return t;
+}
+
EMConfigTargetSettings *
em_config_target_new_settings (EMConfig *emp,
const gchar *email_address,
diff --git a/mail/em-config.h b/mail/em-config.h
index 7c23495677..a16100e815 100644
--- a/mail/em-config.h
+++ b/mail/em-config.h
@@ -57,10 +57,12 @@ typedef struct _EMConfigPrivate EMConfigPrivate;
/* Types of popup tagets */
enum _em_config_target_t {
EM_CONFIG_TARGET_FOLDER,
+ EM_CONFIG_TARGET_PREFS,
EM_CONFIG_TARGET_SETTINGS
};
typedef struct _EMConfigTargetFolder EMConfigTargetFolder;
+typedef struct _EMConfigTargetPrefs EMConfigTargetPrefs;
typedef struct _EMConfigTargetSettings EMConfigTargetSettings;
struct _EMConfigTargetFolder {
@@ -69,6 +71,10 @@ struct _EMConfigTargetFolder {
CamelFolder *folder;
};
+struct _EMConfigTargetPrefs {
+ EConfigTarget target;
+};
+
struct _EMConfigTargetSettings {
EConfigTarget target;
@@ -98,6 +104,8 @@ EMConfig * em_config_new (gint type,
EMConfigTargetFolder *
em_config_target_new_folder (EMConfig *emp,
CamelFolder *folder);
+EMConfigTargetPrefs *
+ em_config_target_new_prefs (EMConfig *emp);
EMConfigTargetSettings *
em_config_target_new_settings (EMConfig *emp,
const gchar *email_address,
diff --git a/modules/mail/e-mail-config-hook.c b/modules/mail/e-mail-config-hook.c
index 14acc60aca..cc9734647b 100644
--- a/modules/mail/e-mail-config-hook.c
+++ b/modules/mail/e-mail-config-hook.c
@@ -34,6 +34,7 @@ static const EConfigHookTargetMask no_masks[] = {
static const EConfigHookTargetMap targets[] = {
{ "folder", EM_CONFIG_TARGET_FOLDER, no_masks },
+ { "prefs", EM_CONFIG_TARGET_PREFS, no_masks },
{ "settings", EM_CONFIG_TARGET_SETTINGS, no_masks },
{ NULL }
};
diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c
index a0091e353a..0dcd1116bb 100644
--- a/modules/mail/em-composer-prefs.c
+++ b/modules/mail/em-composer-prefs.c
@@ -326,8 +326,8 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
GtkListStore *store;
GtkTreeSelection *selection;
GtkCellRenderer *renderer;
- GConfClient *client;
EMConfig *ec;
+ EMConfigTargetPrefs *target;
GSList *l;
gint i;
@@ -345,6 +345,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
* @Id: org.gnome.evolution.mail.composerPrefs
* @Type: E_CONFIG_BOOK
* @Class: org.gnome.evolution.mail.config:1.0
+ * @Target: EMConfigTargetPrefs
*
* The mail composer preferences settings page.
*/
@@ -586,10 +587,10 @@ em_composer_prefs_construct (EMComposerPrefs *prefs,
NULL);
/* get our toplevel widget */
- client = gconf_client_get_default ();
+ target = em_config_target_new_prefs (ec);
+ e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
toplevel = e_config_create_widget ((EConfig *) ec);
gtk_container_add (GTK_CONTAINER (prefs), toplevel);
- g_object_unref (client);
}
GtkWidget *
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index a629d393a8..af570e5c88 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -712,6 +712,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
gboolean locked;
gint val, i;
EMConfig *ec;
+ EMConfigTargetPrefs *target;
GSList *l;
shell_settings = e_shell_get_shell_settings (shell);
@@ -728,6 +729,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
* @Id: org.gnome.evolution.mail.prefs
* @Type: E_CONFIG_BOOK
* @Class: org.gnome.evolution.mail.config:1.0
+ * @Target: EMConfigTargetPrefs
*
* The main mail preferences page.
*/
@@ -1113,6 +1115,8 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs,
G_CALLBACK (jh_remove_cb), prefs);
/* get our toplevel widget */
+ target = em_config_target_new_prefs (ec);
+ e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
toplevel = e_config_create_widget ((EConfig *) ec);
gtk_container_add (GTK_CONTAINER (prefs), toplevel);
}
diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c
index 38e34f7ea5..793925055a 100644
--- a/modules/mail/em-network-prefs.c
+++ b/modules/mail/em-network-prefs.c
@@ -318,6 +318,7 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
GSList *l, *ignore;
gchar *buf;
EMConfig *ec;
+ EMConfigTargetPrefs *target;
gboolean locked;
gint i, val, port;
@@ -335,6 +336,7 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
* @Id: org.gnome.evolution.mail.networkPrefs
* @Type: E_CONFIG_BOOK
* @Class: org.gnome.evolution.mail.config:1.0
+ * @Target: EMConfigTargetPrefs
*
* The network preferences settings page.
*/
@@ -520,6 +522,8 @@ em_network_prefs_construct (EMNetworkPrefs *prefs)
}
/* get our toplevel widget */
+ target = em_config_target_new_prefs (ec);
+ e_config_set_target ((EConfig *) ec, (EConfigTarget *) target);
toplevel = e_config_create_widget ((EConfig *) ec);
gtk_container_add (GTK_CONTAINER (prefs), toplevel);
}