[file-roller: 41/123] added the FR_ACTION_UPDATING_FILES action
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller: 41/123] added the FR_ACTION_UPDATING_FILES action
- Date: Mon, 6 Aug 2012 13:44:19 +0000 (UTC)
commit ba86634fa6778f655bf2a9f09b72cbbfb20e681d
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Jul 21 09:04:43 2012 +0200
added the FR_ACTION_UPDATING_FILES action
to display a better message in the progress dialog
src/fr-archive.c | 3 ++-
src/fr-archive.h | 3 ++-
src/fr-window.c | 22 ++++++++++++++++------
3 files changed, 20 insertions(+), 8 deletions(-)
---
diff --git a/src/fr-archive.c b/src/fr-archive.c
index 996f1f9..c2b0356 100644
--- a/src/fr-archive.c
+++ b/src/fr-archive.c
@@ -62,7 +62,8 @@ char *action_names[] = { "NONE",
"CREATING_ARCHIVE",
"SAVING_REMOTE_ARCHIVE",
"RENAMING_FILES",
- "PASTING_FILES" };
+ "PASTING_FILES",
+ "UPDATING_FILES" };
G_DEFINE_TYPE (FrArchive, fr_archive, G_TYPE_OBJECT)
diff --git a/src/fr-archive.h b/src/fr-archive.h
index 7fd650c..635ddbb 100644
--- a/src/fr-archive.h
+++ b/src/fr-archive.h
@@ -45,7 +45,8 @@ typedef enum {
FR_ACTION_CREATING_ARCHIVE, /* creating a local archive */
FR_ACTION_SAVING_REMOTE_ARCHIVE, /* copying the archive to a remote location */
FR_ACTION_RENAMING_FILES, /* renaming files stored in the archive */
- FR_ACTION_PASTING_FILES /* pasting files from the clipboard into the archive */
+ FR_ACTION_PASTING_FILES, /* pasting files from the clipboard into the archive */
+ FR_ACTION_UPDATING_FILES /* updating the files modified with an external application */
} FrAction;
#ifdef DEBUG
diff --git a/src/fr-window.c b/src/fr-window.c
index 42d21af..9d45985 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -2365,10 +2365,16 @@ get_action_description (FrAction action,
message = g_strdup_printf (_("Saving \"%s\""), basename);
break;
case FR_ACTION_RENAMING_FILES:
- message = g_strdup_printf (_("Renaming the files"));
+ /* Translators: %s is a filename */
+ message = g_strdup_printf (_("Renaming the files in \"%s\""), basename);
break;
case FR_ACTION_PASTING_FILES:
- message = g_strdup_printf (_("Pasting the files from the clipboard"));
+ /* Translators: %s is a filename */
+ message = g_strdup_printf (_("Pasting the files from the clipboard into \"%s\""), basename);
+ break;
+ case FR_ACTION_UPDATING_FILES:
+ /* Translators: %s is a filename */
+ message = g_strdup_printf (_("Updating the files in \"%s\""), basename);
break;
case FR_ACTION_NONE:
break;
@@ -2964,6 +2970,10 @@ _handle_archive_operation_error (FrWindow *window,
msg = _("An error occurred while renaming the files.");
break;
+ case FR_ACTION_UPDATING_FILES:
+ msg = _("An error occurred while updating the files.");
+ break;
+
default:
msg = _("An error occurred.");
break;
@@ -3134,6 +3144,7 @@ _archive_operation_completed (FrWindow *window,
break;
case FR_ACTION_RENAMING_FILES:
+ case FR_ACTION_UPDATING_FILES:
close_progress_dialog (window, FALSE);
if (! operation_canceled)
fr_window_archive_reload (window);
@@ -8455,10 +8466,7 @@ update_files_ready_cb (GObject *source_object,
GError *error = NULL;
fr_archive_operation_finish (FR_ARCHIVE (source_object), result, &error);
-
- fr_window_stop_activity_mode (window);
- fr_window_pop_message (window);
- _handle_archive_operation_error (window, window->archive, FR_ACTION_ADDING_FILES, error, NULL, NULL);
+ _archive_operation_completed (window, FR_ACTION_UPDATING_FILES, error);
_g_error_free (error);
}
@@ -8487,6 +8495,8 @@ fr_window_update_files (FrWindow *window,
dir_list = g_list_prepend (dir_list, open_file->temp_dir);
}
+ _archive_operation_started (window, FR_ACTION_UPDATING_FILES);
+
fr_archive_update_open_files (window->archive,
file_list,
dir_list,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]