From 9b087b24979298812a2b303c87a8573321af0941 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 29 Jun 2001 02:04:43 +0000 Subject: Fix #3382, shortcut bar crashes when checking mail, and all the different incarnations involving updates to an shortcut bar having shortcuts to non-existent folders. Also, this fixes #1643, shortcuts not visible until you enable an IMAP account, and #2436, i.e. misbehavior of shortcut groups when IMAP or invalid shortcuts are involved. svn path=/trunk/; revision=10583 --- shell/e-shortcuts-view-model.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'shell/e-shortcuts-view-model.c') diff --git a/shell/e-shortcuts-view-model.c b/shell/e-shortcuts-view-model.c index 9f11cb0aad..69b417de9a 100644 --- a/shell/e-shortcuts-view-model.c +++ b/shell/e-shortcuts-view-model.c @@ -32,6 +32,8 @@ #include #include +#include + #include @@ -93,16 +95,18 @@ load_group_into_model (EShortcutsViewModel *shortcuts_view_model, uri = (const char *) p->data; path = get_storage_set_path_from_uri (uri); - if (path != NULL) + + if (path == NULL) { + name = _("Unknown link"); + } else { folder = e_storage_set_get_folder (storage_set, path); - if (path == NULL || folder == NULL) { - /* FIXME */ - g_warning ("Invalid link while loading shortcut bar view -- %s", uri); - continue; + if (folder != NULL) + name = e_folder_get_name (folder); + else + name = g_basename (path); } - name = e_folder_get_name (folder); e_shortcut_model_add_item (E_SHORTCUT_MODEL (shortcuts_view_model), group_num, -1, uri, name); } -- cgit v1.2.3