diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2003-05-08 03:38:18 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2003-05-08 03:38:18 +0800 |
commit | 4ff45b412762c74917d4de50ae61337c141b67f1 (patch) | |
tree | 419658618f22e6e3be00c393c2793d72e8ea4edf /shell | |
parent | 3e8897cfb3793f9f07f0a910995cb731472bb682 (diff) | |
download | gsoc2013-evolution-4ff45b412762c74917d4de50ae61337c141b67f1.tar gsoc2013-evolution-4ff45b412762c74917d4de50ae61337c141b67f1.tar.gz gsoc2013-evolution-4ff45b412762c74917d4de50ae61337c141b67f1.tar.bz2 gsoc2013-evolution-4ff45b412762c74917d4de50ae61337c141b67f1.tar.lz gsoc2013-evolution-4ff45b412762c74917d4de50ae61337c141b67f1.tar.xz gsoc2013-evolution-4ff45b412762c74917d4de50ae61337c141b67f1.tar.zst gsoc2013-evolution-4ff45b412762c74917d4de50ae61337c141b67f1.zip |
(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
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-shell-folder-commands.c | 15 |
2 files changed, 15 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 3825e36396..fcef24e00a 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2003-05-07 Ettore Perazzoli <ettore@ximian.com> + + * e-shell-folder-commands.c (e_shell_command_add_to_shortcut_bar): + Do use the supplied folder_path to determine the unread count, if + not NULL. [#42465] + 2003-05-07 JP Rosevear <jpr@ximian.com> * e-shell-folder-commands.c (delete_dialog): don't pass 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, |