[gnome-control-center] panel-list: Fix back button after search



commit 24a5bad48dd449d9ea3a37ee78e4b6cfdc96e3e7
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Mon Nov 19 00:07:12 2018 -0200

    panel-list: Fix back button after search
    
    This is a fallout from commit b02bc2a935f. It was missing
    the check for search.

 shell/cc-panel-list.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/shell/cc-panel-list.c b/shell/cc-panel-list.c
index 8b9b98199..17899d44e 100644
--- a/shell/cc-panel-list.c
+++ b/shell/cc-panel-list.c
@@ -966,13 +966,16 @@ cc_panel_list_go_previous (CcPanelList *self)
    *   Main → Details or Devices → Widget
    *
    * to
+   *
    *   Main → Details or Devices
    *
+   * A similar situation may happen with search.
+   *
    * To avoid a loop (Details or Devices → Widget → Details or Devices → ...),
    * make sure to go back to the main view when the current view is details or
    * devices.
    */
-  if (previous_view == CC_PANEL_LIST_WIDGET)
+  if (previous_view == CC_PANEL_LIST_WIDGET || previous_view == CC_PANEL_LIST_SEARCH)
     previous_view = CC_PANEL_LIST_MAIN;
 
   switch_to_view (self, previous_view);


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