aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-08-28 02:37:51 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-08-28 02:37:51 +0800
commit545045a58e8b9440261945afd86d10c7956d231e (patch)
treefdb5d9e40b7b19d2444cac814b3f591aec91401c
parent3e580fc5320854262b3038936e18858394feac36 (diff)
downloadgsoc2013-evolution-545045a58e8b9440261945afd86d10c7956d231e.tar
gsoc2013-evolution-545045a58e8b9440261945afd86d10c7956d231e.tar.gz
gsoc2013-evolution-545045a58e8b9440261945afd86d10c7956d231e.tar.bz2
gsoc2013-evolution-545045a58e8b9440261945afd86d10c7956d231e.tar.lz
gsoc2013-evolution-545045a58e8b9440261945afd86d10c7956d231e.tar.xz
gsoc2013-evolution-545045a58e8b9440261945afd86d10c7956d231e.tar.zst
gsoc2013-evolution-545045a58e8b9440261945afd86d10c7956d231e.zip
(get_shortcut_info): Make sure
*custom_icon_name_return is at least set to NULL on return [it used to leave it uninitialized if the URI was not prefixed with E_SHELL_URI_PREFIX]. Also use e_shell_parse_uri() to parse the URI so we handle the default shortcuts properly, too. svn path=/trunk/; revision=17879
-rw-r--r--shell/ChangeLog8
-rw-r--r--shell/e-shortcuts-view.c15
2 files changed, 18 insertions, 5 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 7c506271b7..f483196b28 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,11 @@
+2002-08-27 Ettore Perazzoli <ettore@ximian.com>
+
+ * e-shortcuts-view.c (get_shortcut_info): Make sure
+ *custom_icon_name_return is at least set to NULL on return [it
+ used to leave it uninitialized if the URI was not prefixed with
+ E_SHELL_URI_PREFIX]. Also use e_shell_parse_uri() to parse the
+ URI so we handle the default shortcuts properly, too.
+
2002-08-19 Dan Winship <danw@ximian.com>
* e-shell-shared-folder-picker-dialog.c (show_dialog): Get the
diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c
index 50641c2f2f..c11af21b9e 100644
--- a/shell/e-shortcuts-view.c
+++ b/shell/e-shortcuts-view.c
@@ -520,7 +520,7 @@ item_selected (EShortcutBar *shortcut_bar,
static void
get_shortcut_info (EShortcutsView *shortcuts_view,
- const char *item_url,
+ const char *item_uri,
int *unread_count_return,
const char **type_return,
const char **custom_icon_name_return)
@@ -528,18 +528,21 @@ get_shortcut_info (EShortcutsView *shortcuts_view,
EShortcutsViewPrivate *priv;
EStorageSet *storage_set;
EFolder *folder;
- const char *path;
+ EShell *shell;
+ char *path;
priv = shortcuts_view->priv;
- if (strncmp (item_url, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) != 0) {
+ shell = e_shortcuts_get_shell (priv->shortcuts);
+
+ if (! e_shell_parse_uri (shell, item_uri, &path, NULL)) {
*unread_count_return = 0;
*type_return = NULL;
+ *custom_icon_name_return = NULL;
return;
}
- path = strchr (item_url, E_PATH_SEPARATOR);
- storage_set = e_shell_get_storage_set (e_shortcuts_get_shell (priv->shortcuts));
+ storage_set = e_shell_get_storage_set (shell);
folder = e_storage_set_get_folder (storage_set, path);
if (folder != NULL) {
@@ -551,6 +554,8 @@ get_shortcut_info (EShortcutsView *shortcuts_view,
*type_return = NULL;
*custom_icon_name_return = NULL;
}
+
+ g_free (path);
}
static void