aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcuts-view-model.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-06-29 10:04:43 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-06-29 10:04:43 +0800
commit9b087b24979298812a2b303c87a8573321af0941 (patch)
tree29d69911611839039c2b078314f42549555cd4ed /shell/e-shortcuts-view-model.c
parentfe0275e362f06bad6389fcb77bdcffbf00d523df (diff)
downloadgsoc2013-evolution-9b087b24979298812a2b303c87a8573321af0941.tar.gz
gsoc2013-evolution-9b087b24979298812a2b303c87a8573321af0941.tar.zst
gsoc2013-evolution-9b087b24979298812a2b303c87a8573321af0941.zip
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
Diffstat (limited to 'shell/e-shortcuts-view-model.c')
-rw-r--r--shell/e-shortcuts-view-model.c16
1 files changed, 10 insertions, 6 deletions
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 <glib.h>
#include <gtk/gtksignal.h>
+#include <libgnome/gnome-i18n.h>
+
#include <gal/util/e-util.h>
@@ -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);
}