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>
We query the file info for display name and icon synchronously. If it becomes a problem,
we'll make it async, more in line with NautilusBookmark.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
This syncs the code up to commit 4b6abf644b from Nautilus.
This only refers to nautilus-places-sidebar.[ch].
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
We use the normal gtk_style_context_set_state() machinery to set a
prelighted state. Hopefully even symbolic icons will be rendered
prelighted properly.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
We need to ask the caller to pop up error messages for us, so it can do
it with its own conventions: pick the right transient window, use a status
bar rather than a dialog, etc.
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>
Don't try to decide if the URIs are acceptable / not duplicates; the
idea is to let the user bookmark whatever he pleases.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
This signal just carries a boolean initiated_unmount argument, which
is meant to say True when the unmount/eject starts, and False when
the operation finishes.
We may want to rename all of this to unmount_started / stopped, etc.
I don't know if the caller needs to know about the mount_op in question,
or if it can be inferred from what the caller knows to be the current
shown location on the GtkPlacesSidebar.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Now we just need to see if we need to replace calls to
nautilus_window_set_initiated_unmount() with a signal.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
There are still some missing pieces to get the bookmark's icon,
and *maybe* to cull the list of bookmarks based on some criteria.
Signed-off-by: Federico Mena Quintero <federico@gnome.org>
Instead of directly calling the Nautilus machinery to open locations
in tabs or windows, we emit a signal which the caller must handle.
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>