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 lets us handle the 'Open in new tab' and 'Open in new window' menu items
on our own, and allows callers to have less code to deal with each mode.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
This lets us remove two entry points, gtk_places_sidebar_set_show_trash(),
and gtk_places_sidebar_set_trash_is_full().
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
The file chooser will not accept dropping URIs in a shortcut item. However, Nautilus will,
to perform normal DnD for files.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
To be consistent with the ::location-selected signal, which emits a GFile, we now also use a GFile
instead of a string URI in the inbound API.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
We add a method to say whether the trash is full/empty (to use the appropriate icon),
and a signal that the sidebar can use to request that the trash be emptied when
the user selects 'Empty trash' from the context menu.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Currently they default to false. This also fixes warnings with uninitialized widgets
in bookmarks_check_popup_sensitivity().
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
It sucks to have this as an app-settable option. Maybe we should
make this a standard GSetting thing and be done with it.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
The file chooser will leave these off by default; file managers
like Nautilus will turn them on.
These control whether the places sidebar shows 'open in new tab' and similar
items in its context menu.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Nautilus lets you open things in the same tab, in a new tab, or in
a new window. We will expose these semantics through an enum, as
part of an 'open' signal.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>