aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-12-03 07:45:47 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-12-03 07:45:47 +0800
commitccd5cdcf82c299aba622da4f5f87347aea93d99c (patch)
treeb6dfde2d567e5cfb2d3043c1ffba16f88e8f88b7 /shell
parente0097e7f47f7bdd546b3d705d2dcf0893d29e3a2 (diff)
downloadgsoc2013-evolution-ccd5cdcf82c299aba622da4f5f87347aea93d99c.tar
gsoc2013-evolution-ccd5cdcf82c299aba622da4f5f87347aea93d99c.tar.gz
gsoc2013-evolution-ccd5cdcf82c299aba622da4f5f87347aea93d99c.tar.bz2
gsoc2013-evolution-ccd5cdcf82c299aba622da4f5f87347aea93d99c.tar.lz
gsoc2013-evolution-ccd5cdcf82c299aba622da4f5f87347aea93d99c.tar.xz
gsoc2013-evolution-ccd5cdcf82c299aba622da4f5f87347aea93d99c.tar.zst
gsoc2013-evolution-ccd5cdcf82c299aba622da4f5f87347aea93d99c.zip
(e_shell_window_save_defaults): Implement.
(e_shell_window_new): Set the width/height from the GConf keys. svn path=/trunk/; revision=23591
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog5
-rw-r--r--shell/e-shell-window.c19
2 files changed, 20 insertions, 4 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index f6f0869fb9..dc01ccf000 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,8 @@
+2003-12-02 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-shell-window.c (e_shell_window_save_defaults): Implement.
+ (e_shell_window_new): Set the width/height from the GConf keys.
+
2003-12-02 Rodney Dawes <dobey@ximian.com>
* Makefile.am: Version the schemas
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index fb123561a7..a427d28bbe 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -674,12 +674,14 @@ e_shell_window_new (EShell *shell,
{
EShellWindow *window = g_object_new (e_shell_window_get_type (), NULL);
EShellWindowPrivate *priv = window->priv;
+ GConfClient *gconf_client = gconf_client_get_default ();
BonoboUIContainer *ui_container;
if (bonobo_window_construct (BONOBO_WINDOW (window),
bonobo_ui_container_new (),
"evolution", "Ximian Evolution") == NULL) {
g_object_unref (window);
+ g_object_unref (gconf_client);
return NULL;
}
@@ -712,10 +714,8 @@ e_shell_window_new (EShell *shell,
if (component_id != NULL) {
e_shell_window_switch_to_component (window, component_id);
} else {
- GConfClient *gconf_client;
char *default_component_id;
- gconf_client = gconf_client_get_default ();
default_component_id = gconf_client_get_string (gconf_client,
"/apps/evolution/shell/view_defaults/component_id",
NULL);
@@ -729,8 +729,13 @@ e_shell_window_new (EShell *shell,
}
}
+ gtk_window_set_default_size (GTK_WINDOW (window),
+ gconf_client_get_int (gconf_client, "/apps/evolution/shell/view_defaults/width", NULL),
+ gconf_client_get_int (gconf_client, "/apps/evolution/shell/view_defaults/height", NULL));
+
e_user_creatable_items_handler_attach_menus (e_shell_peek_user_creatable_items_handler (shell), window);
+ g_object_unref (gconf_client);
return GTK_WIDGET (window);
}
@@ -798,8 +803,14 @@ e_shell_window_peek_bonobo_ui_component (EShellWindow *window)
void
e_shell_window_save_defaults (EShellWindow *window)
{
- /* FIXME */
- g_warning ("e_shell_window_save_defaults() unimplemented");
+ GConfClient *client = gconf_client_get_default ();
+
+ gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/width",
+ GTK_WIDGET (window)->allocation.width, NULL);
+ gconf_client_set_int (client, "/apps/evolution/shell/view_defaults/height",
+ GTK_WIDGET (window)->allocation.height, NULL);
+
+ g_object_unref (client);
}
void