aboutsummaryrefslogtreecommitdiffstats
path: root/modules/addressbook/e-book-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/addressbook/e-book-shell-view-actions.c
parent72861cffee5a3f9a5434fe0a94c7ec60beec1cc2 (diff)
downloadgsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.tar.gz
gsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.tar.zst
gsoc2013-evolution-aa813bd7cadffa0110ddeeecd2b8df9d367db6e1.zip
Bug #579599 - Let the Advanced Search work again
Diffstat (limited to 'modules/addressbook/e-book-shell-view-actions.c')
-rw-r--r--modules/addressbook/e-book-shell-view-actions.c40
1 files changed, 15 insertions, 25 deletions
diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c
index 41b88efbc6..85db9d58e8 100644
--- a/modules/addressbook/e-book-shell-view-actions.c
+++ b/modules/addressbook/e-book-shell-view-actions.c
@@ -599,29 +599,6 @@ exit:
}
static void
-action_contact_search_cb (GtkRadioAction *action,
- GtkRadioAction *current,
- EBookShellView *book_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 (book_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_contact_select_all_cb (GtkAction *action,
EBookShellView *book_shell_view)
{
@@ -994,6 +971,13 @@ static GtkRadioActionEntry contact_filter_entries[] = {
static GtkRadioActionEntry contact_search_entries[] = {
+ { "contact-search-advanced-hidden",
+ NULL,
+ N_("Advanced search"),
+ NULL,
+ NULL,
+ CONTACT_SEARCH_ADVANCED },
+
{ "contact-search-any-field-contains",
NULL,
N_("Any field contains"),
@@ -1074,6 +1058,7 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
GtkActionGroup *action_group;
GConfBridge *bridge;
GtkAction *action;
+ GtkRadioAction *radio_action;
GObject *object;
const gchar *key;
@@ -1101,8 +1086,13 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
gtk_action_group_add_radio_actions (
action_group, contact_search_entries,
G_N_ELEMENTS (contact_search_entries),
- CONTACT_SEARCH_NAME_CONTAINS,
- G_CALLBACK (action_contact_search_cb), book_shell_view);
+ -1, NULL, NULL);
+
+ /* Advanced Search action */
+ radio_action = GTK_RADIO_ACTION (ACTION (CONTACT_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, CONTACT_SEARCH_NAME_CONTAINS);
/* Lockdown Printing Actions */
action_group = ACTION_GROUP (LOCKDOWN_PRINTING);