From 4ff45b412762c74917d4de50ae61337c141b67f1 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 7 May 2003 19:38:18 +0000 Subject: (e_shell_command_add_to_shortcut_bar): Do use the supplied folder_path to determine the unread count, if not NULL. [#42465] svn path=/trunk/; revision=21124 --- shell/e-shell-folder-commands.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'shell/e-shell-folder-commands.c') diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c index 5d8a644ff5..6317b8da96 100644 --- a/shell/e-shell-folder-commands.c +++ b/shell/e-shell-folder-commands.c @@ -621,8 +621,9 @@ e_shell_command_add_to_shortcut_bar (EShell *shell, EShortcuts *shortcuts; EStorageSet *storage_set; EFolder *folder; - int group_num; char *uri; + const char *path; + int group_num; int unread_count; g_return_if_fail (shell != NULL); @@ -634,15 +635,17 @@ e_shell_command_add_to_shortcut_bar (EShell *shell, shortcuts = e_shell_get_shortcuts (shell); group_num = e_shell_view_get_current_shortcuts_group_num (shell_view); - if (folder_path == NULL) + if (folder_path == NULL) { uri = g_strdup (e_shell_view_get_current_uri (shell_view)); - else + path = e_shell_view_get_current_path (shell_view); + } else { uri = g_strconcat (E_SHELL_URI_PREFIX, folder_path, NULL); + path = folder_path; + } - unread_count = get_folder_unread (shell, e_shell_view_get_current_path (shell_view)); - + unread_count = get_folder_unread (shell, path); storage_set = e_shell_get_storage_set (shell); - folder = e_storage_set_get_folder (storage_set, e_shell_view_get_current_path (shell_view)); + folder = e_storage_set_get_folder (storage_set, path); e_shortcuts_add_shortcut (shortcuts, group_num, -1, uri, NULL, unread_count, -- cgit v1.2.3