aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcuts.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-09-25 05:01:04 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-09-25 05:01:04 +0800
commitefa2ba8ab068f38e435a995d05cd99dbd1eb6fd4 (patch)
tree4f5cd8559808bfb7408e483fcd78fbadf26d8792 /shell/e-shortcuts.c
parentab7d63ce8e057eaa31a1777af0837cd1005e7f44 (diff)
downloadgsoc2013-evolution-efa2ba8ab068f38e435a995d05cd99dbd1eb6fd4.tar
gsoc2013-evolution-efa2ba8ab068f38e435a995d05cd99dbd1eb6fd4.tar.gz
gsoc2013-evolution-efa2ba8ab068f38e435a995d05cd99dbd1eb6fd4.tar.bz2
gsoc2013-evolution-efa2ba8ab068f38e435a995d05cd99dbd1eb6fd4.tar.lz
gsoc2013-evolution-efa2ba8ab068f38e435a995d05cd99dbd1eb6fd4.tar.xz
gsoc2013-evolution-efa2ba8ab068f38e435a995d05cd99dbd1eb6fd4.tar.zst
gsoc2013-evolution-efa2ba8ab068f38e435a995d05cd99dbd1eb6fd4.zip
Placate compiler.
* e-shell-view-menu.c (launch_pilot_settings): Placate compiler. * e-shell-folder-commands.c (xfer_result_callback): When FOLDER_COMMAND_MOVE, update the shortcuts by using e_shortcuts_update_shortcuts_for_changed_uri(). * e-shortcuts.c (e_shortcuts_update_shortcuts_for_changed_uri): New. svn path=/trunk/; revision=18206
Diffstat (limited to 'shell/e-shortcuts.c')
-rw-r--r--shell/e-shortcuts.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c
index 8ad70eba0f..a1ccf6a8e9 100644
--- a/shell/e-shortcuts.c
+++ b/shell/e-shortcuts.c
@@ -1237,4 +1237,39 @@ e_shortcuts_get_group_uses_small_icons (EShortcuts *shortcuts,
}
+void
+e_shortcuts_update_shortcuts_for_changed_uri (EShortcuts *shortcuts,
+ const char *old_uri,
+ const char *new_uri)
+{
+ EShortcutsPrivate *priv;
+ GSList *p;
+
+ g_return_if_fail (E_IS_SHORTCUTS (shortcuts));
+ g_return_if_fail (old_uri != NULL);
+ g_return_if_fail (new_uri != NULL);
+
+ priv = shortcuts->priv;
+
+ for (p = priv->groups; p != NULL; p = p->next) {
+ ShortcutGroup *group;
+ GSList *q;
+
+ group = (ShortcutGroup *) p->data;
+ for (q = group->shortcuts; q != NULL; q = q->next) {
+ EShortcutItem *item;
+
+ item = (EShortcutItem *) q->data;
+
+ if (strcmp (item->uri, old_uri) == 0) {
+ g_free (item->uri);
+ item->uri = g_strdup (new_uri);
+
+ make_dirty (shortcuts);
+ }
+ }
+ }
+}
+
+
E_MAKE_TYPE (e_shortcuts, "EShortcuts", EShortcuts, class_init, init, PARENT_TYPE)