diff options
author | JP Rosevear <jpr@ximian.com> | 2004-04-28 10:02:36 +0800 |
---|---|---|
committer | JP Rosevear <jpr@src.gnome.org> | 2004-04-28 10:02:36 +0800 |
commit | 8aeb46417a17826f24eb2c128c30d905f507e1d6 (patch) | |
tree | a7ab5fd1d40b1804bc5a3c484840cca82f9b2c44 /shell | |
parent | 7b7c2d9828f1907b709a4cc9566777efbf2fa487 (diff) | |
download | gsoc2013-evolution-8aeb46417a17826f24eb2c128c30d905f507e1d6.tar.gz gsoc2013-evolution-8aeb46417a17826f24eb2c128c30d905f507e1d6.tar.zst gsoc2013-evolution-8aeb46417a17826f24eb2c128c30d905f507e1d6.zip |
init the view to NULL
2004-04-27 JP Rosevear <jpr@ximian.com>
* e-shell-window.c (sidebar_button_selected_callback): init the
view to NULL
svn path=/trunk/; revision=25649
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 10 | ||||
-rw-r--r-- | shell/e-shell-window.c | 13 |
2 files changed, 22 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index e74c46d17e..7ea06f5314 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,13 @@ +2004-04-27 JP Rosevear <jpr@ximian.com> + + * e-shell-window.c (sidebar_button_selected_callback): init the + view to NULL + +2004-04-27 William Jon McCann <mccann@jhu.edu> + + * e-shell-window.c (switch_view): set window title and icon when changing + component view. + 2004-04-23 JP Rosevear <jpr@ximian.com> * e-shell-window.c (e_shell_window_show_settings): if there is a diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index d61ef54822..86dbecd5eb 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -280,6 +280,10 @@ switch_view (EShellWindow *window, ComponentView *component_view) { EShellWindowPrivate *priv = window->priv; GConfClient *gconf_client = gconf_client_get_default (); + EComponentRegistry *registry = e_shell_peek_component_registry (window->priv->shell); + EComponentInfo *info = e_component_registry_peek_info (registry, + component_view->component_id); + char *title; if (component_view->sidebar_widget == NULL) { init_view (window, component_view); @@ -294,6 +298,13 @@ switch_view (EShellWindow *window, ComponentView *component_view) gtk_notebook_set_current_page (GTK_NOTEBOOK (priv->statusbar_notebook), component_view->notebook_page_num); } + title = g_strdup_printf ("Evolution - %s", info->button_label); + gtk_window_set_title (GTK_WINDOW (window), title); + g_free (title); + + if (info->button_icon) + gtk_window_set_icon (GTK_WINDOW (window), info->button_icon); + gconf_client_set_string (gconf_client, "/apps/evolution/shell/view_defaults/component_id", (component_view->component_alias != NULL ? component_view->component_alias @@ -372,7 +383,7 @@ sidebar_button_selected_callback (ESidebar *sidebar, EShellWindow *window) { EShellWindowPrivate *priv = window->priv; - ComponentView *component_view; + ComponentView *component_view = NULL; GSList *p; for (p = priv->component_views; p != NULL; p = p->next) { |