aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2008-04-22 23:13:23 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-04-22 23:13:23 +0800
commit3050e6d36dfe605418dc67e50903395f1cb051bd (patch)
tree4274c9e44fa5a80c23a0c375448b3186b9b140fb /mail
parent24b0c3d20d4ce21e9072d58e8bb70e10f82e3f46 (diff)
downloadgsoc2013-evolution-3050e6d36dfe605418dc67e50903395f1cb051bd.tar
gsoc2013-evolution-3050e6d36dfe605418dc67e50903395f1cb051bd.tar.gz
gsoc2013-evolution-3050e6d36dfe605418dc67e50903395f1cb051bd.tar.bz2
gsoc2013-evolution-3050e6d36dfe605418dc67e50903395f1cb051bd.tar.lz
gsoc2013-evolution-3050e6d36dfe605418dc67e50903395f1cb051bd.tar.xz
gsoc2013-evolution-3050e6d36dfe605418dc67e50903395f1cb051bd.tar.zst
gsoc2013-evolution-3050e6d36dfe605418dc67e50903395f1cb051bd.zip
** Fixes bug #494171
2008-04-22 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #494171 * mail/mail-send-recv.c (build_dialog): Make the "Send & Receive Mail" window dimensions persistent. * mail/evolution-mail.schemas.in: Add keys for storing "Send & Receive Mail" window dimensions: /apps/evolution/mail/send_recv_height /apps/evolution/mail/send_recv_maximized /apps/evolution/mail/send_recv_width Note the "maximized" key is required by GConfBridge but is not actually used since the window cannot be maximized. svn path=/trunk/; revision=35400
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog15
-rw-r--r--mail/evolution-mail.schemas.in49
-rw-r--r--mail/mail-send-recv.c9
3 files changed, 72 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 19d902e9ee..553559546a 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,20 @@
2008-04-22 Matthew Barnes <mbarnes@redhat.com>
+ ** Fixes bug #494171
+
+ * mail-send-recv.c (build_dialog):
+ Make the "Send & Receive Mail" window dimensions persistent.
+
+ * evolution-mail.schemas.in:
+ Add keys for storing "Send & Receive Mail" window dimensions:
+ /apps/evolution/mail/send_recv_height
+ /apps/evolution/mail/send_recv_maximized
+ /apps/evolution/mail/send_recv_width
+ Note the "maximized" key is required by GConfBridge but is not
+ actually used since the window cannot be maximized.
+
+2008-04-22 Matthew Barnes <mbarnes@redhat.com>
+
* em-composer-prefs.c:
gconf-bridge.h moved to e-util.
diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in
index 8259f67c64..7e3234f76c 100644
--- a/mail/evolution-mail.schemas.in
+++ b/mail/evolution-mail.schemas.in
@@ -1268,5 +1268,54 @@
</locale>
</schema>
+ <!-- Widget States -->
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/send_recv_height</key>
+ <applyto>/apps/evolution/mail/send_recv_height</applyto>
+ <owner>evolution-mail</owner>
+ <type>int</type>
+ <default>200</default>
+ <locale name="C">
+ <short>"Send and Receive Mail" window height</short>
+ <long>
+ Initial height of the "Send and Receive Mail" window.
+ The value updates as the user resizes the window vertically.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/send_recv_maximized</key>
+ <applyto>/apps/evolution/mail/send_recv_maximized</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <locale name="C">
+ <short>"Send and Receive Mail" window maximize state</short>
+ <long>
+ Initial maximize state of the "Send and Receive Mail" window.
+ The value updates when the user maximizes or unmaximizes the
+ window. Note, this particular value is not used by Evolution
+ since the "Send and Receive Mail" window cannot be maximized.
+ This key exists only as an implementation detail.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/send_recv_width</key>
+ <applyto>/apps/evolution/mail/send_recv_width</applyto>
+ <owner>evolution-mail</owner>
+ <type>int</type>
+ <default>600</default>
+ <locale name="C">
+ <short>"Send and Receive Mail" window width</short>
+ <long>
+ Initial width of the "Send and Receive Mail" window.
+ The value updates as the user resizes the window horizontally.
+ </long>
+ </locale>
+ </schema>
+
</schemalist>
</gconfschemafile>
diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c
index 3b922c549b..199a85baa7 100644
--- a/mail/mail-send-recv.c
+++ b/mail/mail-send-recv.c
@@ -59,6 +59,7 @@
#include "mail-folder-cache.h"
#include "em-event.h"
#include <e-util/e-icon-factory.h>
+#include <e-util/gconf-bridge.h>
#define d(x)
@@ -68,6 +69,9 @@
/* pseudo-uri to key the send task on */
#define SEND_URI_KEY "send-task:"
+/* Prefix for window size GConf keys */
+#define GCONF_KEY_PREFIX "/apps/evolution/mail/send_recv"
+
/* send/receive email */
/* ********************************************************************** */
@@ -393,6 +397,10 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
gd = (GtkDialog *)(send_recv_dialog = gtk_dialog_new_with_buttons(_("Send & Receive Mail"), NULL, GTK_DIALOG_NO_SEPARATOR, NULL));
gtk_window_set_modal ((GtkWindow *) gd, FALSE);
+ gconf_bridge_bind_window_size (
+ gconf_bridge_get (), GCONF_KEY_PREFIX,
+ GTK_WINDOW (send_recv_dialog));
+
gtk_widget_ensure_style ((GtkWidget *)gd);
gtk_container_set_border_width ((GtkContainer *)gd->vbox, 0);
gtk_container_set_border_width ((GtkContainer *)gd->action_area, 6);
@@ -442,7 +450,6 @@ build_dialog (EAccountList *accounts, CamelFolder *outbox, const char *destinati
GTK_SCROLLED_WINDOW (scrolled_window), table);
gtk_box_pack_start (
GTK_BOX (gd->vbox), scrolled_window, TRUE, TRUE, 0);
- gtk_widget_set_size_request (gd->vbox, 600, 200);
gtk_widget_show (scrolled_window);
/* must bet setup after send_recv_dialog as it may re-trigger send-recv button */