Fixed trasher alert dialog issue, moved import lines

This commit is contained in:
2022-12-04 20:47:32 -06:00
parent 22b22958de
commit b488c989b2
10 changed files with 25 additions and 14 deletions

View File

@@ -101,14 +101,14 @@ class Plugin(PluginBase):
state = self._fm_state
uris = state.selected_files
response = None
state.warning_alert.format_secondary_text(f"Do you really want to delete the {len(uris)} file(s)?")
state.message_dialog.format_secondary_text(f"Do you really want to delete the {len(uris)} file(s)?")
for uri in uris:
file = Gio.File.new_for_path(uri)
if not response:
response = state.warning_alert.run()
state.warning_alert.hide()
response = state.message_dialog.run()
state.message_dialog.hide()
if response == Gtk.ResponseType.YES:
type = file.query_file_type(flags=Gio.FileQueryInfoFlags.NONE)