From be8ee5393471a83b24aed4de1669afd723cb3168 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 9 Jun 2009 23:15:20 -0400 Subject: Use key files for tracking widget states. Each EShellView now maintains a GKeyFile for recording disposable widget state such as tree view path expansion, scroll bar positions, combo box selections, etc. The EShellView records changes to the key file to ~/.evolution//config/state, and automatically restores the GKeyFile at startup. Currently only the mailer uses the key file, but it's intended to serve all shell views. It replaces the use of Camel "cmeta" files, as well as "et-expanded-*" and "folder-tree-expand-state.xml" files. Also, the mailer's folder tree model now includes a column for tracking which sidebar folders are expanded. Folder tree widgets appearing in dialog windows can copy the sidebar's expanded state using em_folder_tree_clone_expanded(). --- calendar/module/e-cal-shell-view-actions.c | 8 +++++++- calendar/module/e-memo-shell-view-actions.c | 8 +++++++- calendar/module/e-task-shell-view-actions.c | 8 +++++++- 3 files changed, 21 insertions(+), 3 deletions(-) (limited to 'calendar/module') diff --git a/calendar/module/e-cal-shell-view-actions.c b/calendar/module/e-cal-shell-view-actions.c index 5f5380d919..02b7af609e 100644 --- a/calendar/module/e-cal-shell-view-actions.c +++ b/calendar/module/e-cal-shell-view-actions.c @@ -599,7 +599,13 @@ action_search_filter_cb (GtkRadioAction *action, GtkRadioAction *current, ECalShellView *cal_shell_view) { - e_cal_shell_view_execute_search (cal_shell_view); + EShellView *shell_view; + EShellWindow *shell_window; + + shell_view = E_SHELL_VIEW (cal_shell_view); + shell_window = e_shell_view_get_shell_window (shell_view); + + gtk_action_activate (ACTION (SEARCH_EXECUTE)); } static GtkActionEntry calendar_entries[] = { diff --git a/calendar/module/e-memo-shell-view-actions.c b/calendar/module/e-memo-shell-view-actions.c index 855a7b18b4..1736606abe 100644 --- a/calendar/module/e-memo-shell-view-actions.c +++ b/calendar/module/e-memo-shell-view-actions.c @@ -548,7 +548,13 @@ action_search_filter_cb (GtkRadioAction *action, GtkRadioAction *current, EMemoShellView *memo_shell_view) { - e_memo_shell_view_execute_search (memo_shell_view); + EShellView *shell_view; + EShellWindow *shell_window; + + shell_view = E_SHELL_VIEW (memo_shell_view); + shell_window = e_shell_view_get_shell_window (shell_view); + + gtk_action_activate (ACTION (SEARCH_EXECUTE)); } static GtkActionEntry memo_entries[] = { diff --git a/calendar/module/e-task-shell-view-actions.c b/calendar/module/e-task-shell-view-actions.c index 8431b64624..4deed9fdf0 100644 --- a/calendar/module/e-task-shell-view-actions.c +++ b/calendar/module/e-task-shell-view-actions.c @@ -62,7 +62,13 @@ action_search_filter_cb (GtkRadioAction *action, GtkRadioAction *current, ETaskShellView *task_shell_view) { - e_task_shell_view_execute_search (task_shell_view); + EShellView *shell_view; + EShellWindow *shell_window; + + shell_view = E_SHELL_VIEW (task_shell_view); + shell_window = e_shell_view_get_shell_window (shell_view); + + gtk_action_activate (ACTION (SEARCH_EXECUTE)); } static void -- cgit v1.2.3