diff options
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) { |