From d671e29102193b74bf977ac068a2adea2fc12a6c Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 28 Aug 2001 00:18:34 +0000 Subject: Studlycapsize all the IDs that are not. Likewise. Updated accordingly. * Evolution-ShellComponent.idl: Studlycapsize all the IDs that are not. * Evolution-common.idl: Likewise. * evolution-activity-client.c: Updated accordingly. * evolution-shell-component.c: Likewise. * evolution-storage.c: Likewise. * e-activity-handler.c: Likewise. * e-component-registry.c: Likewise. * e-corba-storage.c: Likewise. * e-shell-user-creatable-items-handlers.c: Likewise. * e-local-storage.c (remove_folder): Remove unused variable. * e-shell-view.c (update_for_current_uri): Assign zero to `unread_count', not NULL. * e-shell-importer.c (import_druid_finish): Remove unused variable. * e-shell-user-creatable-items-handler.c: #include "e-corba-utils.h". * e-shell-startup-wizard.c: #include "e-shell-startup-wizard.h". * e-shell-startup-wizard.h: #include * e-summary-weather.c (weather_make_html): Make local variable `icon_name' const. Remove unused variable `uri'. * e-summary.h: Reformatted in GTK+ style. (e_summary_remove_online_connection): Added prototype. * e-summary-preferences.c (fill_mail_shown_clist): Constify local variable `name'. * e-summary-mail.c: #include "e-util/e-path.h". Updated to match the new studlyCapsification in shell/Evolution*.idl. * mail-local.c: Match the studlyCapsification of shell/Evolution*.idl. * mail-config-druid.h: Change type of `event_source' from `Bonobo_EventSource *' to `Bonobo_EventSource'. * mail-accounts.c (mail_delete): Remove unused local variable `label'. * folder-info.c (do_get_info): `#if 0' unused variables. * gui/component/addressbook-component.c: Get rid of a warning by initializing the closing NULL element in folder_types correctly. * gui/component/select-names/e-select-names.c: Updated to match the studlyCapsification of attributes in shell/Evolution*.idl. svn path=/trunk/; revision=12495 --- shell/e-shell-view.c | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) (limited to 'shell/e-shell-view.c') diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c index 5f89f6a9a3..9048c3a147 100644 --- a/shell/e-shell-view.c +++ b/shell/e-shell-view.c @@ -72,6 +72,7 @@ static BonoboWindowClass *parent_class = NULL; struct _View { char *uri; GtkWidget *control; + EFolder *folder; }; typedef struct _View View; @@ -1446,10 +1447,12 @@ update_for_current_uri (EShellView *shell_view) EShellViewPrivate *priv; EFolder *folder; const char *path; - const char *title; const char *type; + const char *folder_name; + char *title; char *utf8_window_title; char *gtk_window_title; + int unread_count; priv = shell_view->priv; @@ -1462,8 +1465,9 @@ update_for_current_uri (EShellView *shell_view) path = get_storage_set_path_from_uri (priv->uri); - title = NULL; + folder_name = NULL; type = NULL; + unread_count = 0; if (path == NULL) { folder = NULL; @@ -1471,19 +1475,29 @@ update_for_current_uri (EShellView *shell_view) folder = e_storage_set_get_folder (e_shell_get_storage_set (priv->shell), path); if (folder != NULL) { - title = e_folder_get_name (folder); + folder_name = e_folder_get_name (folder); type = e_folder_get_type_string (folder); + unread_count = e_folder_get_unread_count (folder); } else if (path != NULL) { EStorage *storage; storage = e_storage_set_get_storage (e_shell_get_storage_set (priv->shell), path + 1); + unread_count = 0; + if (storage != NULL) { - title = e_storage_get_display_name (storage); + folder_name = e_storage_get_display_name (storage); type = e_storage_get_toplevel_node_type (storage); } } } + if (unread_count > 0) + title = g_strdup_printf (_("%s (%d)"), folder_name, unread_count); + else if (folder_name == NULL) + title = g_strdup (_("(None)")); + else + title = g_strdup (folder_name); + if (SUB_VERSION[0] == '\0') utf8_window_title = g_strdup_printf (_("%s - Evolution %s"), title, VERSION); else @@ -1491,12 +1505,14 @@ update_for_current_uri (EShellView *shell_view) gtk_window_title = e_utf8_to_gtk_string (GTK_WIDGET (shell_view), utf8_window_title); gtk_window_set_title (GTK_WINDOW (shell_view), gtk_window_title); - g_free (gtk_window_title); - g_free (utf8_window_title); update_folder_title_bar (shell_view, title, type); update_window_icon (shell_view, type); + g_free (gtk_window_title); + g_free (utf8_window_title); + g_free (title); + gtk_signal_handler_block_by_func (GTK_OBJECT (priv->storage_set_view), GTK_SIGNAL_FUNC (folder_selected_cb), shell_view); -- cgit v1.2.3