[gnome-software] Simplify search



commit 440cadb63070ec7eb11cfb8436f04b31dea09e66
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 31 18:51:58 2013 -0400

    Simplify search
    
    With the search entry now being only in the overview, we are
    always going back to the overview when exiting search, so
    no need to keep a search_back_id.

 src/gs-shell.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index a164f3a..c089ae4 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -50,7 +50,6 @@ struct GsShellPrivate
        GsShellCategory         *shell_category;
        GtkBuilder              *builder;
        GsShellMode              tab_back_id;
-       GsShellMode              search_back_id;
 };
 
 G_DEFINE_TYPE (GsShell, gs_shell, G_TYPE_OBJECT)
@@ -183,9 +182,8 @@ gs_shell_search_activated_cb (GtkEntry *entry, GsShell *shell)
                 return;
 
         if (gs_shell_get_mode (shell) == GS_SHELL_MODE_SEARCH) {
-                gs_shell_search_refresh (shell->priv->shell_search, text);
+                gs_shell_search_refresh (priv->shell_search, text);
         } else {
-                priv->search_back_id = priv->mode;
                 gs_shell_set_mode (shell, GS_SHELL_MODE_SEARCH);
         }
 }
@@ -297,7 +295,7 @@ text_changed_handler (GObject *entry, GParamSpec *pspec, GsShell *shell)
 
         text = gtk_entry_get_text (GTK_ENTRY (entry));
         if (text[0] == '\0')
-                gs_shell_set_mode (shell, shell->priv->search_back_id);
+                gs_shell_set_mode (shell, GS_SHELL_MODE_OVERVIEW);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]