aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window-actions.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-11-19 22:40:50 +0800
committerMilan Crha <mcrha@redhat.com>2009-11-19 22:40:50 +0800
commitaa813bd7cadffa0110ddeeecd2b8df9d367db6e1 (patch)
tree8580dce61f4952b17225fa5262339432db092e4c /shell/e-shell-window-actions.c
parent72861cffee5a3f9a5434fe0a94c7ec60beec1cc2 (diff)
downloadgsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.tar
gsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.tar.gz
gsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.tar.bz2
gsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.tar.lz
gsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.tar.xz
gsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.tar.zst
gsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.zip
Bug #579599 - Let the Advanced Search work again
Diffstat (limited to 'shell/e-shell-window-actions.c')
-rw-r--r--shell/e-shell-window-actions.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/shell/e-shell-window-actions.c b/shell/e-shell-window-actions.c
index 1ba9a194da..058e45699b 100644
--- a/shell/e-shell-window-actions.c
+++ b/shell/e-shell-window-actions.c
@@ -1044,6 +1044,7 @@ action_search_clear_cb (GtkAction *action,
{
EShellView *shell_view;
EShellContent *shell_content;
+ GtkRadioAction *search_action;
const gchar *view_name;
view_name = e_shell_window_get_active_view (shell_window);
@@ -1053,6 +1054,11 @@ action_search_clear_cb (GtkAction *action,
e_shell_content_set_search_rule (shell_content, NULL);
e_shell_content_set_search_text (shell_content, NULL);
+ /* change from Advanced Search to the first one, so filling a text will do something */
+ search_action = e_shell_content_get_search_radio_action (shell_content);
+ if (search_action && gtk_radio_action_get_current_value (search_action) == -1)
+ gtk_radio_action_set_current_value (search_action, 0);
+
e_shell_view_execute_search (shell_view);
e_shell_window_update_search_menu (shell_window);
@@ -1118,11 +1124,20 @@ static void
action_search_quick_cb (GtkAction *action,
EShellWindow *shell_window)
{
+ EShellContent *shell_content;
EShellView *shell_view;
+ GtkRadioAction *radio_action;
const gchar *view_name;
view_name = e_shell_window_get_active_view (shell_window);
shell_view = e_shell_window_get_shell_view (shell_window, view_name);
+ shell_content = e_shell_view_get_shell_content (shell_view);
+
+ radio_action = e_shell_content_get_search_radio_action (shell_content);
+ if (radio_action && gtk_radio_action_get_current_value (radio_action) == -1) {
+ /* change Advanced Search to a default search type automatically */
+ gtk_radio_action_set_current_value (radio_action, 0);
+ }
e_shell_view_execute_search (shell_view);
}