From 5e3c6d9dcf6f1edfa470a2b5677a92f72deef2dc Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Thu, 23 May 2002 20:51:27 +0000 Subject: Set the view type from the original group, thus preserving the * e-shortcuts-view.c (rename_group_cb): Set the view type from the original group, thus preserving the small-icon/large-icon state. Fixes #6732. svn path=/trunk/; revision=16991 --- shell/ChangeLog | 6 ++++++ shell/e-shortcuts-view.c | 10 +++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/shell/ChangeLog b/shell/ChangeLog index 05c313ee72..e51a624f25 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2002-05-23 Ettore Perazzoli + + * e-shortcuts-view.c (rename_group_cb): Set the view type from the + original group, thus preserving the small-icon/large-icon state. + Fixes #6732. + 2002-05-23 Ettore Perazzoli * main.c (show_development_warning): Add a toggle to avoid diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c index 3d7fc27656..fea3182dd9 100644 --- a/shell/e-shortcuts-view.c +++ b/shell/e-shortcuts-view.c @@ -195,6 +195,7 @@ rename_group_cb (GtkWidget *widget, RightClickMenuData *menu_data; EShortcuts *shortcuts; EShortcutsView *shortcuts_view; + EIconBarViewType original_view_type; const char *old_name; char *new_name; int group; @@ -213,11 +214,18 @@ rename_group_cb (GtkWidget *widget, if (new_name == NULL) return; - /* Remember the group and flip back to it */ + /* Remember the group and flip back to it. FIXME: This is a workaround + to an actual ShortcutBar bug. */ + group = e_group_bar_get_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view))); + original_view_type = e_shortcut_bar_get_view_type (E_SHORTCUT_BAR (menu_data->shortcuts_view), + group); e_shortcuts_rename_group (shortcuts, menu_data->group_num, new_name); + g_free (new_name); e_group_bar_set_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view)), group, FALSE); + e_shortcut_bar_set_view_type (E_SHORTCUT_BAR (menu_data->shortcuts_view), + group, original_view_type); } static GnomeUIInfo icon_size_radio_group_uiinfo[] = { -- cgit