aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcuts.h
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-07-03 21:29:12 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-07-03 21:29:12 +0800
commit8a9d50f560ee0d5d26c77b5868af2baa0ab0bb2f (patch)
tree86991d4bdc17ad440989fab1e5053ef3ce20660f /shell/e-shortcuts.h
parented82a3aba83e08a76c216925e4dd99e3b22c83ab (diff)
downloadgsoc2013-evolution-8a9d50f560ee0d5d26c77b5868af2baa0ab0bb2f.tar
gsoc2013-evolution-8a9d50f560ee0d5d26c77b5868af2baa0ab0bb2f.tar.gz
gsoc2013-evolution-8a9d50f560ee0d5d26c77b5868af2baa0ab0bb2f.tar.bz2
gsoc2013-evolution-8a9d50f560ee0d5d26c77b5868af2baa0ab0bb2f.tar.lz
gsoc2013-evolution-8a9d50f560ee0d5d26c77b5868af2baa0ab0bb2f.tar.xz
gsoc2013-evolution-8a9d50f560ee0d5d26c77b5868af2baa0ab0bb2f.tar.zst
gsoc2013-evolution-8a9d50f560ee0d5d26c77b5868af2baa0ab0bb2f.zip
[The following makes the shell able to create the `shortcuts.xml'
file by itself when the file is not present or corrupted. Fixes #3668, failure to handle malformed shortcuts.xml file.] * e-shell.c (e_shell_construct): If the `e_shortcuts_new()' returns an object with no shortcuts in it, fill it in with `e_shortcuts_add_default_group()'. * e-shortcuts.c: New member `num_groups' in EShortcutsPrivate. (init): Init to zero. (e_shortcuts_add_group): Increment. (e_shortcuts_remove_group): Decrement. (e_shortcuts_get_num_groups): New. (e_shortcuts_add_default_group): New function to set up the default shortcuts. (e_shortcuts_new): Return an empty EShortcuts object if loading the file files, instead of returning NULL. svn path=/trunk/; revision=10744
Diffstat (limited to 'shell/e-shortcuts.h')
-rw-r--r--shell/e-shortcuts.h34
1 files changed, 19 insertions, 15 deletions
diff --git a/shell/e-shortcuts.h b/shell/e-shortcuts.h
index 2a9836e2a0..aea29de23d 100644
--- a/shell/e-shortcuts.h
+++ b/shell/e-shortcuts.h
@@ -82,6 +82,8 @@ EShortcuts *e_shortcuts_new (EStorageSet *storage_s
EFolderTypeRegistry *folder_type_registry,
const char *file_name);
+int e_shortcuts_get_num_groups (EShortcuts *shortcuts);
+
GSList *e_shortcuts_get_group_titles (EShortcuts *shortcuts);
const char *e_shortcuts_get_group_title (EShortcuts *shortcuts,
int group_num);
@@ -100,21 +102,23 @@ gboolean e_shortcuts_load (EShortcuts *shortcuts
gboolean e_shortcuts_save (EShortcuts *shortcuts,
const char *path);
-void e_shortcuts_remove_shortcut (EShortcuts *shortcuts,
- int group_num,
- int num);
-void e_shortcuts_add_shortcut (EShortcuts *shortcuts,
- int group_num,
- int num,
- const char *uri,
- const char *name,
- const char *type);
-void e_shortcuts_update_shortcut (EShortcuts *shortcuts,
- int group_num,
- int num,
- const char *uri,
- const char *name,
- const char *type);
+void e_shortcuts_add_default_group (EShortcuts *shortcuts);
+
+void e_shortcuts_remove_shortcut (EShortcuts *shortcuts,
+ int group_num,
+ int num);
+void e_shortcuts_add_shortcut (EShortcuts *shortcuts,
+ int group_num,
+ int num,
+ const char *uri,
+ const char *name,
+ const char *type);
+void e_shortcuts_update_shortcut (EShortcuts *shortcuts,
+ int group_num,
+ int num,
+ const char *uri,
+ const char *name,
+ const char *type);
void e_shortcuts_remove_group (EShortcuts *shortcuts,
int group_num);