Make the set_location()/get_location() API consistent

We used to have set_current_location() and get_selected_location(), with confusing
semantics.  Now they are symmetric, with the exception that if set_location() is
called with a location that is not shown in the sidebar, then it will both clear
the selection in the list and make get_selection() return NULL.

Signed-off-by: Federico Mena Quintero <federico@gnome.org>
This commit is contained in:
Federico Mena Quintero
2013-01-10 18:12:15 -06:00
parent 0b4183234b
commit da2e081786
3 changed files with 69 additions and 145 deletions

View File

@ -57,9 +57,9 @@ GtkWidget *gtk_places_sidebar_new (void);
void gtk_places_sidebar_set_open_flags (GtkPlacesSidebar *sidebar, GtkPlacesOpenFlags flags);
void gtk_places_sidebar_set_current_location (GtkPlacesSidebar *sidebar, GFile *location);
void gtk_places_sidebar_set_location (GtkPlacesSidebar *sidebar, GFile *location);
GFile *gtk_places_sidebar_get_selected_location (GtkPlacesSidebar *sidebar);
GFile *gtk_places_sidebar_get_location (GtkPlacesSidebar *sidebar);
void gtk_places_sidebar_set_show_desktop (GtkPlacesSidebar *sidebar, gboolean show_desktop);