From c7fa1e7eb5c25c1e4235fd717130cbf41e06240c Mon Sep 17 00:00:00 2001 From: Jason Leach Date: Mon, 30 Jul 2001 19:24:22 +0000 Subject: Remember the current group so after renaming a group it doesn't flip to 2001-07-30 Jason Leach * 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 --- shell/e-shortcuts-view.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'shell/e-shortcuts-view.c') 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[] = { -- cgit