aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcuts-view.c
diff options
context:
space:
mode:
authorJason Leach <jleach@ximian.com>2001-07-31 03:24:22 +0800
committerJacob Leach <jleach@src.gnome.org>2001-07-31 03:24:22 +0800
commitc7fa1e7eb5c25c1e4235fd717130cbf41e06240c (patch)
tree654d31db933eea3417831d7b8db41c3bcee9a008 /shell/e-shortcuts-view.c
parent116e504828b7383a447579142e06ca0f161864df (diff)
downloadgsoc2013-evolution-c7fa1e7eb5c25c1e4235fd717130cbf41e06240c.tar.gz
gsoc2013-evolution-c7fa1e7eb5c25c1e4235fd717130cbf41e06240c.tar.zst
gsoc2013-evolution-c7fa1e7eb5c25c1e4235fd717130cbf41e06240c.zip
Remember the current group so after renaming a group it doesn't flip to
2001-07-30 Jason Leach <jleach@ximian.com> * e-shortcuts-view.c (rename_group_cb): Remember the current group so after renaming a group it doesn't flip to the next group. Bug #3857. * e-shortcuts.c (e_shortcuts_rename_group): Comparing two separately allocated strings, use strcmp() instead of !=. svn path=/trunk/; revision=11483
Diffstat (limited to 'shell/e-shortcuts-view.c')
-rw-r--r--shell/e-shortcuts-view.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c
index dc45bcd949..6cae3293ab 100644
--- a/shell/e-shortcuts-view.c
+++ b/shell/e-shortcuts-view.c
@@ -285,11 +285,14 @@ rename_group_cb (GtkWidget *widget,
{
RightClickMenuData *menu_data;
EShortcuts *shortcuts;
+ EShortcutsView *shortcuts_view;
const char *old_name;
const char *new_name;
+ int group;
menu_data = (RightClickMenuData *) data;
- shortcuts = menu_data->shortcuts_view->priv->shortcuts;
+ shortcuts_view = menu_data->shortcuts_view;
+ shortcuts = shortcuts_view->priv->shortcuts;
old_name = e_shortcuts_get_group_title (shortcuts, menu_data->group_num);
@@ -301,7 +304,10 @@ rename_group_cb (GtkWidget *widget,
if (new_name == NULL)
return;
+ /* Remember the group and flip back to it */
+ group = e_group_bar_get_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view)));
e_shortcuts_rename_group (shortcuts, menu_data->group_num, new_name);
+ e_group_bar_set_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view)), group, FALSE);
}
static GnomeUIInfo icon_size_radio_group_uiinfo[] = {