[gtk+] gtkplacesview: don't fetch networks if local only



commit 150bb6245c30c8d452f4f06b27fdf7222c0e0dad
Author: Carlos Soriano <csoriano gnome org>
Date:   Sat Aug 29 21:16:34 2015 +0200

    gtkplacesview: don't fetch networks if local only
    
    We were fetching networks even on local only mode.
    Avoid to do extra work if not necessary.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754150

 gtk/gtkplacesview.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkplacesview.c b/gtk/gtkplacesview.c
index a508fce..60ac284 100644
--- a/gtk/gtkplacesview.c
+++ b/gtk/gtkplacesview.c
@@ -1132,7 +1132,8 @@ update_places (GtkPlacesView *view)
   populate_servers (view);
 
   /* fetch networks and add them asynchronously */
-  fetch_networks (view);
+  if (!gtk_places_view_get_local_only (view))
+    fetch_networks (view);
 
   update_view_mode (view);
 }
@@ -2479,7 +2480,7 @@ gtk_places_view_set_local_only (GtkPlacesView *view,
       priv->local_only = local_only;
 
       gtk_widget_set_visible (priv->actionbar, !local_only);
-      gtk_list_box_invalidate_filter (GTK_LIST_BOX (priv->listbox));
+      update_places (view);
 
       update_view_mode (view);
 


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