aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-memo-shell-view-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 /modules/calendar/e-memo-shell-view-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 'modules/calendar/e-memo-shell-view-actions.c')
-rw-r--r--modules/calendar/e-memo-shell-view-actions.c40
1 files changed, 15 insertions, 25 deletions
diff --git a/modules/calendar/e-memo-shell-view-actions.c b/modules/calendar/e-memo-shell-view-actions.c
index 80ebca237d..57420cd963 100644
--- a/modules/calendar/e-memo-shell-view-actions.c
+++ b/modules/calendar/e-memo-shell-view-actions.c
@@ -526,29 +526,6 @@ action_memo_save_as_cb (GtkAction *action,
}
static void
-action_memo_search_cb (GtkRadioAction *action,
- GtkRadioAction *current,
- EMemoShellView *memo_shell_view)
-{
- EShellView *shell_view;
- EShellContent *shell_content;
- const gchar *search_hint;
-
- /* XXX Figure out a way to handle this in EShellContent
- * instead of every shell view having to handle it.
- * The problem is EShellContent does not know what
- * the search option actions are for this view. It
- * would have to dig up the popup menu and retrieve
- * the action for each menu item. Seems messy. */
-
- shell_view = E_SHELL_VIEW (memo_shell_view);
- shell_content = e_shell_view_get_shell_content (shell_view);
-
- search_hint = gtk_action_get_label (GTK_ACTION (current));
- e_shell_content_set_search_hint (shell_content, search_hint);
-}
-
-static void
action_memo_view_cb (GtkRadioAction *action,
GtkRadioAction *current,
EMemoShellView *memo_shell_view)
@@ -800,6 +777,13 @@ static GtkRadioActionEntry memo_filter_entries[] = {
static GtkRadioActionEntry memo_search_entries[] = {
+ { "memo-search-advanced-hidden",
+ NULL,
+ N_("Advanced search"),
+ NULL,
+ NULL,
+ MEMO_SEARCH_ADVANCED },
+
{ "memo-search-any-field-contains",
NULL,
N_("Any field contains"),
@@ -880,6 +864,7 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
GtkActionGroup *action_group;
GConfBridge *bridge;
GtkAction *action;
+ GtkRadioAction *radio_action;
GObject *object;
const gchar *key;
@@ -907,8 +892,13 @@ e_memo_shell_view_actions_init (EMemoShellView *memo_shell_view)
gtk_action_group_add_radio_actions (
action_group, memo_search_entries,
G_N_ELEMENTS (memo_search_entries),
- MEMO_SEARCH_SUMMARY_CONTAINS,
- G_CALLBACK (action_memo_search_cb), memo_shell_view);
+ -1, NULL, NULL);
+
+ /* Advanced Search action */
+ radio_action = GTK_RADIO_ACTION (ACTION (MEMO_SEARCH_ADVANCED_HIDDEN));
+ e_shell_content_set_search_radio_action (e_shell_view_get_shell_content (shell_view), radio_action);
+ gtk_action_set_visible (GTK_ACTION (radio_action), FALSE);
+ gtk_radio_action_set_current_value (radio_action, MEMO_SEARCH_SUMMARY_CONTAINS);
/* Lockdown Printing Actions */
action_group = ACTION_GROUP (LOCKDOWN_PRINTING);