diff options
author | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2015-08-17 08:33:42 -0300 |
---|---|---|
committer | Georges Basile Stavracas Neto <georges.stavracas@gmail.com> | 2015-08-20 17:32:49 -0300 |
commit | 9806d70e8ffa5786b7a41705c8b640ac2b3b6ac9 (patch) | |
tree | 84971975753ac7e0eec70aa99245832ab75c40fc /src/nautilus-trash-bar.c | |
parent | acf2f76b00fbac08bf348244688ca15b9bcddf73 (diff) | |
download | nautilus-9806d70e8ffa5786b7a41705c8b640ac2b3b6ac9.tar.gz |
view: add interface
Nautilus is in the proccess of receiving a places view,
based on GtkFileChooser's one.
To be able to handle that, an abstraction layer is needed
between NautilusFilesView and NautilusWindowSlot, so we factor
out the common data between views.
Add the NautilusView interface, and make NautilusFilesView a
NautilusView implementation. Because of the new way we handle
search on the view side, the search logic is rewritten to match
the new expected behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=753871
Diffstat (limited to 'src/nautilus-trash-bar.c')
-rw-r--r-- | src/nautilus-trash-bar.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/nautilus-trash-bar.c b/src/nautilus-trash-bar.c index 0508198e9..d7c62f52e 100644 --- a/src/nautilus-trash-bar.c +++ b/src/nautilus-trash-bar.c @@ -57,13 +57,17 @@ static void selection_changed_cb (NautilusFilesView *view, NautilusTrashBar *bar) { + GList *selection; int count; - count = nautilus_files_view_get_selection_count (view); + selection = nautilus_view_get_selection (NAUTILUS_VIEW (view)); + count = g_list_length (selection); gtk_info_bar_set_response_sensitive (GTK_INFO_BAR (bar), TRASH_BAR_RESPONSE_RESTORE, (count > 0)); + + nautilus_file_list_free (selection); } static void @@ -166,7 +170,7 @@ trash_bar_response_cb (GtkInfoBar *infobar, nautilus_file_operations_empty_trash (window); break; case TRASH_BAR_RESPONSE_RESTORE: - files = nautilus_files_view_get_selection (bar->priv->view); + files = nautilus_view_get_selection (NAUTILUS_VIEW (bar->priv->view)); nautilus_restore_files_from_trash (files, GTK_WINDOW (window)); nautilus_file_list_free (files); break; |