~elementary-apps/pantheon-files/trunk

« back to all changes in this revision

Viewing changes to plugins/pantheon-files-trash/plugin.vala

  • Committer: Fabio Zaramella
  • Date: 2015-02-21 15:29:24 UTC
  • mto: This revision was merged to the branch mainline in revision 1892.
  • Revision ID: ffabio.96.x@gmail.com-20150221152924-he8qdc734m68ttzk
implement [Restore All] in trash toolbar

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
            if (!infobars.has_key (slot)) {
53
53
                var infobar = new Gtk.InfoBar ();
54
54
                (infobar.get_content_area () as Gtk.Box).add (new Gtk.Label (_("These items may be restored or deleted from the trash.")));
55
 
                infobar.add_button (_("Restore All Files"), 0);
 
55
                infobar.add_button (_("Restore All"), 0);
56
56
                infobar.add_button (_("Empty the Trash"), 1);
57
57
                infobar.response.connect ((self, response) => {
58
58
                    switch (response) {
59
59
                        case 0:
60
 
                            
 
60
                            slot.set_all_selected (true);
 
61
                            unowned GLib.List<unowned GOF.File> selection = slot.get_selected_files ();
 
62
                            Marlin.restore_files_from_trash (selection, window);
61
63
                            break;
62
64
                        case 1:
63
65
                            Marlin.FileOperations.empty_trash (self);