Exemple #1
0
    def on_button_delete_clicked(self, obj):
        files = self._get_selected_files()
        for name in files:
            gfile = Gio.File.new_for_path(name)

            try:
                trash_or_confirm(gfile)
            except Exception as e:
                error_dialog(
                    _("Error deleting {}").format(
                        GLib.markup_escape_text(gfile.get_parse_name()), ),
                    str(e),
                )

        workdir = os.path.dirname(os.path.commonprefix(files))
        self.refresh_partial(workdir)
Exemple #2
0
    def action_delete(self, *args):
        files = self._get_selected_files()
        for name in files:
            gfile = Gio.File.new_for_path(name)

            try:
                trash_or_confirm(gfile)
            except Exception as e:
                error_dialog(
                    _("Error deleting {}").format(
                        GLib.markup_escape_text(gfile.get_parse_name()),
                    ),
                    str(e),
                )

        workdir = os.path.dirname(os.path.commonprefix(files))
        self.refresh_partial(workdir)