[gtk+/wip/gbsneto/other-locations] fix local-only property



commit ed929b1066ac17b3e0cec436870811642293155d
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Wed Jul 15 09:49:01 2015 -0300

    fix local-only property

 gtk/gtkplacesview.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index 87b59d6..3f6d4e3 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -607,9 +607,10 @@ update_search_widgets (GtkPlacesView *view)
   g_list_free (children);
 
   gtk_widget_set_visible (priv->drives_box, visible_drives != 0);
-  gtk_widget_set_visible (priv->network_grid, visible_networks != 0);
+  gtk_widget_set_visible (priv->network_grid, !priv->local_only && visible_networks != 0 );
 
-  if (visible_drives == 0 && visible_networks == 0)
+  if ((priv->local_only && visible_drives == 0) ||
+      (!priv->local_only && visible_drives == 0 && visible_networks == 0))
     gtk_stack_set_visible_child_name (GTK_STACK (priv->stack), "search");
   else
     gtk_stack_set_visible_child_name (GTK_STACK (priv->stack), "lists");
@@ -644,7 +645,9 @@ insert_row (GtkPlacesView *view,
                     row);
 
   gtk_container_add (GTK_CONTAINER (list), row);
-  gtk_widget_show (container);
+
+  if (!priv->local_only || (priv->local_only && !is_network))
+    gtk_widget_show (container);
 }
 
 static void


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