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
This commit is contained in:
		@ -1132,6 +1132,7 @@ update_places (GtkPlacesView *view)
 | 
				
			|||||||
  populate_servers (view);
 | 
					  populate_servers (view);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /* fetch networks and add them asynchronously */
 | 
					  /* fetch networks and add them asynchronously */
 | 
				
			||||||
 | 
					  if (!gtk_places_view_get_local_only (view))
 | 
				
			||||||
    fetch_networks (view);
 | 
					    fetch_networks (view);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  update_view_mode (view);
 | 
					  update_view_mode (view);
 | 
				
			||||||
@ -2479,7 +2480,7 @@ gtk_places_view_set_local_only (GtkPlacesView *view,
 | 
				
			|||||||
      priv->local_only = local_only;
 | 
					      priv->local_only = local_only;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      gtk_widget_set_visible (priv->actionbar, !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);
 | 
					      update_view_mode (view);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user