diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-06-09 12:28:07 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-06-09 18:36:56 +0800 |
commit | df17adc5aa4ff6af69686d0957e1ab6dfa58732d (patch) | |
tree | f681bbb06fc307633e2f751780a582dd625093c5 /mail | |
parent | 2f4139e59919afdab0bcf2ca9ca91d168515b43f (diff) | |
download | gsoc2013-evolution-df17adc5aa4ff6af69686d0957e1ab6dfa58732d.tar.gz 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 'mail')
-rw-r--r-- | mail/e-mail-shell-view-actions.c | 34 | ||||
-rw-r--r-- | mail/e-mail-shell-view-private.h | 3 |
2 files changed, 26 insertions, 11 deletions
diff --git a/mail/e-mail-shell-view-actions.c b/mail/e-mail-shell-view-actions.c index 3d0b76d176..6e4e7fdc8c 100644 --- a/mail/e-mail-shell-view-actions.c +++ b/mail/e-mail-shell-view-actions.c @@ -613,6 +613,29 @@ action_mail_preview_cb (GtkToggleAction *action, } static void +action_mail_search_cb (GtkRadioAction *action, + GtkRadioAction *current, + EMailShellView *mail_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 (mail_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_mail_show_hidden_cb (GtkAction *action, EMailShellView *mail_shell_view) { @@ -1360,14 +1383,7 @@ static GtkRadioActionEntry mail_scope_entries[] = { N_("Current Folder"), NULL, NULL, /* XXX Add a tooltip! */ - MAIL_SCOPE_CURRENT_FOLDER }, - - { "mail-scope-current-message", - NULL, - N_("Current Message"), - NULL, - NULL, /* XXX Add a tooltip! */ - MAIL_SCOPE_CURRENT_MESSAGE } + MAIL_SCOPE_CURRENT_FOLDER } }; void @@ -1409,7 +1425,7 @@ e_mail_shell_view_actions_init (EMailShellView *mail_shell_view) action_group, mail_search_entries, G_N_ELEMENTS (mail_search_entries), MAIL_SEARCH_SUBJECT_OR_SENDER_CONTAINS, - NULL, NULL); + G_CALLBACK (action_mail_search_cb), mail_shell_view); gtk_action_group_add_radio_actions ( action_group, mail_scope_entries, G_N_ELEMENTS (mail_scope_entries), diff --git a/mail/e-mail-shell-view-private.h b/mail/e-mail-shell-view-private.h index 4b27c4c541..13c76c7cfe 100644 --- a/mail/e-mail-shell-view-private.h +++ b/mail/e-mail-shell-view-private.h @@ -113,8 +113,7 @@ enum { enum { MAIL_SCOPE_CURRENT_FOLDER, MAIL_SCOPE_CURRENT_ACCOUNT, - MAIL_SCOPE_ALL_ACCOUNTS, - MAIL_SCOPE_CURRENT_MESSAGE + MAIL_SCOPE_ALL_ACCOUNTS }; struct _EMailShellViewPrivate { |