aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-11-28 02:40:01 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-11-28 08:03:45 +0800
commitf6f46ce7fc8950d10eb53e057117a146de5faddc (patch)
tree1399d1436a3991b979f3b0773e2cdcec41840383 /mail
parent15da8fa99012875735ffa3a1eb54670b6d42bea4 (diff)
downloadgsoc2013-evolution-f6f46ce7fc8950d10eb53e057117a146de5faddc.tar
gsoc2013-evolution-f6f46ce7fc8950d10eb53e057117a146de5faddc.tar.gz
gsoc2013-evolution-f6f46ce7fc8950d10eb53e057117a146de5faddc.tar.bz2
gsoc2013-evolution-f6f46ce7fc8950d10eb53e057117a146de5faddc.tar.lz
gsoc2013-evolution-f6f46ce7fc8950d10eb53e057117a146de5faddc.tar.xz
gsoc2013-evolution-f6f46ce7fc8950d10eb53e057117a146de5faddc.tar.zst
gsoc2013-evolution-f6f46ce7fc8950d10eb53e057117a146de5faddc.zip
Use e_restore_window() and "org.gnome.evolution.window".
Apply it to all windows with persistent size and/or position.
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-browser.c14
-rw-r--r--mail/em-filter-editor.c13
-rw-r--r--mail/em-subscription-editor.c10
-rw-r--r--mail/em-vfolder-editor.c13
-rw-r--r--mail/mail-send-recv.c16
5 files changed, 30 insertions, 36 deletions
diff --git a/mail/e-mail-browser.c b/mail/e-mail-browser.c
index ec0e9251e0..d7eb4ab574 100644
--- a/mail/e-mail-browser.c
+++ b/mail/e-mail-browser.c
@@ -30,7 +30,6 @@
#include "e-util/e-util.h"
#include "e-util/e-plugin-ui.h"
-#include "e-util/gconf-bridge.h"
#include "shell/e-shell.h"
#include "shell/e-shell-utils.h"
#include "shell/e-shell-settings.h"
@@ -931,17 +930,16 @@ e_mail_browser_reader_init (EMailReaderInterface *interface)
static void
e_mail_browser_init (EMailBrowser *browser)
{
- GConfBridge *bridge;
- const gchar *prefix;
-
browser->priv = E_MAIL_BROWSER_GET_PRIVATE (browser);
browser->priv->formatter = em_format_html_display_new ();
- bridge = gconf_bridge_get ();
- prefix = "/apps/evolution/mail/mail_browser";
- gconf_bridge_bind_window_size (bridge, prefix, GTK_WINDOW (browser));
-
gtk_window_set_title (GTK_WINDOW (browser), _("Evolution"));
+ gtk_window_set_default_size (GTK_WINDOW (browser), 600, 400);
+
+ e_restore_window (
+ GTK_WINDOW (browser),
+ "/org/gnome/evolution/mail/browser-window/",
+ E_RESTORE_WINDOW_SIZE);
}
GtkWidget *
diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c
index 06bb8d33c9..0785d08163 100644
--- a/mail/em-filter-editor.c
+++ b/mail/em-filter-editor.c
@@ -30,7 +30,6 @@
#include "e-util/e-util.h"
#include "e-util/e-util-private.h"
-#include "e-util/gconf-bridge.h"
#include "em-filter-editor.h"
#include "em-filter-rule.h"
@@ -67,14 +66,12 @@ em_filter_editor_class_init (EMFilterEditorClass *class)
static void
em_filter_editor_init (EMFilterEditor *filter_editor)
{
- GConfBridge *bridge;
- const gchar *key_prefix;
+ gtk_window_set_default_size (GTK_WINDOW (filter_editor), 400, 650);
- bridge = gconf_bridge_get ();
- key_prefix = "/apps/evolution/mail/filter_editor";
-
- gconf_bridge_bind_window_size (
- bridge, key_prefix, GTK_WINDOW (filter_editor));
+ e_restore_window (
+ GTK_WINDOW (filter_editor),
+ "/org/gnome/evolution/mail/filter-window/",
+ E_RESTORE_WINDOW_SIZE);
}
/**
diff --git a/mail/em-subscription-editor.c b/mail/em-subscription-editor.c
index 1d201f5d40..01e74fee8f 100644
--- a/mail/em-subscription-editor.c
+++ b/mail/em-subscription-editor.c
@@ -32,7 +32,6 @@
#include <e-util/e-util.h>
#include <e-util/e-account-utils.h>
#include <e-util/e-util-private.h>
-#include <e-util/gconf-bridge.h>
#include "em-folder-utils.h"
@@ -1615,11 +1614,12 @@ em_subscription_editor_init (EMSubscriptionEditor *editor)
gtk_container_set_border_width (GTK_CONTAINER (editor), 5);
gtk_window_set_title (GTK_WINDOW (editor), _("Folder Subscriptions"));
+ gtk_window_set_default_size (GTK_WINDOW (editor), 600, 400);
- gconf_bridge_bind_window_size (
- gconf_bridge_get (),
- "/apps/evolution/mail/subscription_editor",
- GTK_WINDOW (editor));
+ e_restore_window (
+ GTK_WINDOW (editor),
+ "/org/gnome/evolution/mail/subscription-window/",
+ E_RESTORE_WINDOW_SIZE);
gtk_dialog_add_button (
GTK_DIALOG (editor),
diff --git a/mail/em-vfolder-editor.c b/mail/em-vfolder-editor.c
index 7da89fb59b..2cf7ed5eb1 100644
--- a/mail/em-vfolder-editor.c
+++ b/mail/em-vfolder-editor.c
@@ -32,7 +32,6 @@
#include "e-util/e-util.h"
#include "e-util/e-util-private.h"
-#include "e-util/gconf-bridge.h"
#include "em-vfolder-editor.h"
#include "em-vfolder-rule.h"
@@ -73,14 +72,12 @@ em_vfolder_editor_class_init (EMVFolderEditorClass *class)
static void
em_vfolder_editor_init (EMVFolderEditor *vfolder_editor)
{
- GConfBridge *bridge;
- const gchar *key_prefix;
+ gtk_window_set_default_size (GTK_WINDOW (vfolder_editor), 400, 650);
- bridge = gconf_bridge_get ();
- key_prefix = "/apps/evolution/mail/vfolder_editor";
-
- gconf_bridge_bind_window_size (
- bridge, key_prefix, GTK_WINDOW (vfolder_editor));
+ e_restore_window (
+ GTK_WINDOW (vfolder_editor),
+ "/org/gnome/evolution/mail/vfolder-window",
+ E_RESTORE_WINDOW_SIZE);
}
/**
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 167b4fd872..69089f97e8 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -33,7 +33,7 @@
#include "shell/e-shell.h"
#include "e-util/e-account-utils.h"
-#include "e-util/gconf-bridge.h"
+#include "e-util/e-util.h"
#include "e-mail-folder-utils.h"
#include "e-mail-local.h"
@@ -452,12 +452,16 @@ build_dialog (GtkWindow *parent,
send_recv_dialog = gtk_dialog_new_with_buttons (
_("Send & Receive Mail"), parent, 0, NULL);
+
gd = GTK_DIALOG (send_recv_dialog);
- gtk_window_set_modal ((GtkWindow *) gd, FALSE);
+ gtk_window_set_modal (GTK_WINDOW (send_recv_dialog), FALSE);
+ gtk_window_set_icon_name (GTK_WINDOW (gd), "mail-send-receive");
+ gtk_window_set_default_size (GTK_WINDOW (gd), 600, 200);
- gconf_bridge_bind_window_size (
- gconf_bridge_get (), GCONF_KEY_PREFIX,
- GTK_WINDOW (send_recv_dialog));
+ e_restore_window (
+ GTK_WINDOW (gd),
+ "/org/gnome/evolution/mail/send-recv-window/",
+ E_RESTORE_WINDOW_SIZE);
gtk_widget_ensure_style ((GtkWidget *) gd);
@@ -475,8 +479,6 @@ build_dialog (GtkWindow *parent,
gtk_widget_show (cancel_button);
gtk_dialog_add_action_widget (gd, cancel_button, GTK_RESPONSE_CANCEL);
- gtk_window_set_icon_name (GTK_WINDOW (gd), "mail-send-receive");
-
num_sources = 0;
iter = e_list_get_iterator ((EList *) accounts);