aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-06-24 16:14:51 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-06-24 16:14:51 +0800
commit8317d34210847481717b2bb4345df70c97376d73 (patch)
tree4c32f00ff8c1dc69b8ceba38f9ecd2a38b837721 /shell/e-shell-window.c
parented34d79a98aa6ed0e89a6b3da14ee5b1267f81b3 (diff)
downloadgsoc2013-evolution-8317d34210847481717b2bb4345df70c97376d73.tar.gz
gsoc2013-evolution-8317d34210847481717b2bb4345df70c97376d73.tar.zst
gsoc2013-evolution-8317d34210847481717b2bb4345df70c97376d73.zip
** See bug #57367.
2004-06-24 Not Zed <NotZed@Ximian.com> ** See bug #57367. * e-shell-window.c (e_shell_window_new): fix gconf client leak and clean up some logic. * e-shell.c (e_shell_construct): dont activate the components individually, component registry does that implictly. * e-component-registry.c (init): dont call query_components here. (query_components): setup a run-once guard. before adding a component info to the list, make sure we can activate it. (component_info_new): take the interface as a construct argument now. (e_component_registry_peek_list): perform the component list query if we haven't already. (e_component_registry_peek_info): same. (e_component_registry_activate): just always return the reffed component, it isn't added unless it was already activated. svn path=/trunk/; revision=26490
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r--shell/e-shell-window.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index 3b7ed348bc..1d9c4f5202 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -751,6 +751,7 @@ e_shell_window_new (EShell *shell,
EShellWindowPrivate *priv = window->priv;
GConfClient *gconf_client = gconf_client_get_default ();
BonoboUIContainer *ui_container;
+ char *default_component_id = NULL;
if (bonobo_window_construct (BONOBO_WINDOW (window),
bonobo_ui_container_new (),
@@ -786,24 +787,19 @@ e_shell_window_new (EShell *shell,
gtk_window_set_default_size (GTK_WINDOW (window), 640, 480);
- if (component_id != NULL) {
- e_shell_window_switch_to_component (window, component_id);
- } else {
- char *default_component_id;
-
- default_component_id = gconf_client_get_string (gconf_client,
- "/apps/evolution/shell/view_defaults/component_id",
- NULL);
- g_object_unref (gconf_client);
-
- if (default_component_id == NULL) {
- e_shell_window_switch_to_component (window, "mail");
- } else {
- e_shell_window_switch_to_component (window, default_component_id);
- g_free (default_component_id);
- }
+ if (component_id == NULL) {
+ component_id = default_component_id =
+ gconf_client_get_string (gconf_client,
+ "/apps/evolution/shell/view_defaults/component_id",
+ NULL);
+ if (component_id == NULL)
+ component_id = "mail";
}
+ e_shell_window_switch_to_component (window, component_id);
+ g_free(default_component_id);
+ g_object_unref (gconf_client);
+
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));