aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-task-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-12-19 07:23:48 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-12-19 11:38:00 +0800
commit4cbbdedf522a6ac10df93a128bbf25f67173d66e (patch)
treefab7bf95e0927e4fa98c58a659e310afff7153ee /modules/calendar/e-task-shell-view.c
parenta1efb837566cdac798cd8777dd34e06e9782cf61 (diff)
downloadgsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.gz
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.bz2
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.lz
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.xz
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.tar.zst
gsoc2013-evolution-4cbbdedf522a6ac10df93a128bbf25f67173d66e.zip
Refactor the EShell search API.
Move the search interface to a new widget: EShellSearchbar The current search rule is now stored in EShellView, and the search context in EShellViewClass similar to GalViewCollection (since it's class-specific, not instance-specific). Also add a couple new signals to EShellView: "clear-search" and "custom-search" ("custom" refers to an advanced search or a saved search -- something more complex than a quick search). Still working out a few kinks. The search entry is clearly trying to be too many things. We need a different way of indicating that you're looking at search results. Perhaps a search results banner similar to Nautilus.
Diffstat (limited to 'modules/calendar/e-task-shell-view.c')
-rw-r--r--modules/calendar/e-task-shell-view.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/calendar/e-task-shell-view.c b/modules/calendar/e-task-shell-view.c
index 9558eb77c0..a481356690 100644
--- a/modules/calendar/e-task-shell-view.c
+++ b/modules/calendar/e-task-shell-view.c
@@ -96,6 +96,8 @@ task_shell_view_execute_search (EShellView *shell_view)
ETaskShellContent *task_shell_content;
EShellWindow *shell_window;
EShellContent *shell_content;
+ EShellSearchbar *searchbar;
+ EActionComboBox *combo_box;
GtkRadioAction *action;
ECalComponentPreview *task_preview;
ECalendarTable *task_table;
@@ -107,13 +109,17 @@ task_shell_view_execute_search (EShellView *shell_view)
gchar *temp;
gint value;
- shell_content = e_shell_view_get_shell_content (shell_view);
shell_window = e_shell_view_get_shell_window (shell_view);
+ shell_content = e_shell_view_get_shell_content (shell_view);
+
+ task_shell_content = E_TASK_SHELL_CONTENT (shell_content);
+ searchbar = e_task_shell_content_get_searchbar (task_shell_content);
+
action = GTK_RADIO_ACTION (ACTION (TASK_SEARCH_ANY_FIELD_CONTAINS));
value = gtk_radio_action_get_current_value (action);
if (value == TASK_SEARCH_ADVANCED) {
- query = e_shell_content_get_search_rule_as_string (shell_content);
+ query = e_shell_view_get_search_query (shell_view);
if (!query)
query = g_strdup ("");
@@ -122,7 +128,7 @@ task_shell_view_execute_search (EShellView *shell_view)
const gchar *text;
GString *string;
- text = e_shell_content_get_search_text (shell_content);
+ text = e_shell_searchbar_get_search_text (searchbar);
if (text == NULL || *text == '\0') {
text = "";
@@ -155,7 +161,8 @@ task_shell_view_execute_search (EShellView *shell_view)
}
/* Apply selected filter. */
- value = e_shell_content_get_filter_value (shell_content);
+ combo_box = e_shell_searchbar_get_filter_combo_box (searchbar);
+ value = e_action_combo_box_get_current_value (combo_box);
switch (value) {
case TASK_FILTER_ANY_CATEGORY:
break;