[gnome-commander] When deleting a file or folder, let the progress window be optional
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] When deleting a file or folder, let the progress window be optional
- Date: Fri, 27 Aug 2021 18:14:07 +0000 (UTC)
commit 3aca17ea499e3e50dcb438e56d127bca0c69abe4
Author: Uwe Scholz <u scholz83 gmx de>
Date: Mon Aug 23 16:00:23 2021 +0200
When deleting a file or folder, let the progress window be optional
src/dialogs/gnome-cmd-delete-dialog.cc | 5 +++--
src/dialogs/gnome-cmd-delete-dialog.h | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-delete-dialog.cc b/src/dialogs/gnome-cmd-delete-dialog.cc
index e82792c4..17d91685 100644
--- a/src/dialogs/gnome-cmd-delete-dialog.cc
+++ b/src/dialogs/gnome-cmd-delete-dialog.cc
@@ -320,7 +320,7 @@ static gboolean update_delete_status_widgets (DeleteData *deleteData)
}
-void do_delete (DeleteData *deleteData)
+void do_delete (DeleteData *deleteData, gboolean showProgress = true)
{
g_return_if_fail(GNOME_CMD_IS_FILE(deleteData->gnomeCmdFiles->data));
@@ -347,7 +347,8 @@ void do_delete (DeleteData *deleteData)
deleteData->itemsTotal += num_files + num_dirs;
}
- create_delete_progress_win (deleteData);
+ if (showProgress)
+ create_delete_progress_win (deleteData);
deleteData->thread = g_thread_new (NULL, (GThreadFunc) perform_delete_operation, deleteData);
g_timeout_add (gnome_cmd_data.gui_update_rate, (GSourceFunc) update_delete_status_widgets, deleteData);
diff --git a/src/dialogs/gnome-cmd-delete-dialog.h b/src/dialogs/gnome-cmd-delete-dialog.h
index 217c6694..6c369e6f 100644
--- a/src/dialogs/gnome-cmd-delete-dialog.h
+++ b/src/dialogs/gnome-cmd-delete-dialog.h
@@ -42,6 +42,6 @@ struct DeleteData
guint64 itemsTotal{0}; // total number of items which should be deleted
};
-void do_delete (DeleteData *deleteData);
+void do_delete (DeleteData *deleteData, gboolean showProgress);
void gnome_cmd_delete_dialog_show (GList *files);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]