From 3fe9876bc7a1e13cf15287dd78ded6f3def401e8 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Tue, 3 Jul 2001 19:40:31 +0000 Subject: [Fix a problem with not being able to save a newly created `shortcuts.xml' file, and another bug that caused the default group to be added at every start-up, even there were groups already.] * e-shortcuts.c (e_shortcuts_new): If loading the shortcuts fails, set the file_name. (load_shortcuts): Update `num_groups'. svn path=/trunk/; revision=10763 --- shell/ChangeLog | 11 +++++++++++ shell/e-shortcuts.c | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 0163614a4c..b26d24c9c8 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,14 @@ +2001-07-03 Ettore Perazzoli + + [Fix a problem with not being able to save a newly created + `shortcuts.xml' file, and another bug that caused the default + group to be added at every start-up, even there were groups + already.] + + * e-shortcuts.c (e_shortcuts_new): If loading the shortcuts fails, + set the file_name. + (load_shortcuts): Update `num_groups'. + 2001-07-03 Iain Holmes * importer/Makefile.am: Add bonobo-conf stuff diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c index 8c708254c8..2942cdd75f 100644 --- a/shell/e-shortcuts.c +++ b/shell/e-shortcuts.c @@ -339,9 +339,11 @@ load_shortcuts (EShortcuts *shortcuts, if (type != NULL) xmlFree (type); } + shortcut_group->shortcuts = g_slist_reverse (shortcut_group->shortcuts); priv->groups = g_slist_prepend (priv->groups, shortcut_group); + priv->num_groups ++; } priv->groups = g_slist_reverse (priv->groups); @@ -735,7 +737,8 @@ e_shortcuts_new (EStorageSet *storage_set, new = gtk_type_new (e_shortcuts_get_type ()); e_shortcuts_construct (new, storage_set, folder_type_registry); - e_shortcuts_load (new, file_name); + if (! e_shortcuts_load (new, file_name)) + new->priv->file_name = g_strdup (file_name); return new; } -- cgit v1.2.3