aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-06-09 12:28:07 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-09 18:36:56 +0800
commitdf17adc5aa4ff6af69686d0957e1ab6dfa58732d (patch)
treef681bbb06fc307633e2f751780a582dd625093c5 /addressbook/gui
parent2f4139e59919afdab0bcf2ca9ca91d168515b43f (diff)
downloadgsoc2013-evolution-df17adc5aa4ff6af69686d0957e1ab6dfa58732d.tar
gsoc2013-evolution-df17adc5aa4ff6af69686d0957e1ab6dfa58732d.tar.gz
gsoc2013-evolution-df17adc5aa4ff6af69686d0957e1ab6dfa58732d.tar.bz2
gsoc2013-evolution-df17adc5aa4ff6af69686d0957e1ab6dfa58732d.tar.lz
gsoc2013-evolution-df17adc5aa4ff6af69686d0957e1ab6dfa58732d.tar.xz
gsoc2013-evolution-df17adc5aa4ff6af69686d0957e1ab6dfa58732d.tar.zst
gsoc2013-evolution-df17adc5aa4ff6af69686d0957e1ab6dfa58732d.zip
Search bar improvements.
Split the search entry into a new widget to manage hints (EHintedEntry). Let the search entry expand to use available horizontal space.
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/addressbook/gui/component/e-book-shell-view-actions.c b/addressbook/gui/component/e-book-shell-view-actions.c
index 35d0e8f8c8..73766c7df3 100644
--- a/addressbook/gui/component/e-book-shell-view-actions.c
+++ b/addressbook/gui/component/e-book-shell-view-actions.c
@@ -451,6 +451,29 @@ action_contact_save_as_cb (GtkAction *action,
}
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)
{
@@ -865,7 +888,7 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
action_group, contact_search_entries,
G_N_ELEMENTS (contact_search_entries),
CONTACT_SEARCH_NAME_CONTAINS,
- NULL, NULL);
+ G_CALLBACK (action_contact_search_cb), book_shell_view);
/* Lockdown Printing Actions */
action_group = ACTION_GROUP (LOCKDOWN_PRINTING);