file-roller r2644 - in trunk: . src
- From: paobac svn gnome org
- To: svn-commits-list gnome org
- Subject: file-roller r2644 - in trunk: . src
- Date: Wed, 1 Apr 2009 22:58:15 +0000 (UTC)
Author: paobac
Date: Wed Apr 1 22:58:15 2009
New Revision: 2644
URL: http://svn.gnome.org/viewvc/file-roller?rev=2644&view=rev
Log:
2009-04-02 Paolo Bacchilega <paobac svn gnome org>
* src/fr-command-rar.c (fr_command_rar_handle_error):
A CRC error isn't always caused by a password request.
Fixes bug #574657 â support corrupted rar archives.
* src/gtk-utils.c (_gtk_error_dialog_new):
Expand the command line output if the secondary text is null.
* src/fr-window.c:
* src/dlg-extract.c:
* src/dlg-batch-add.c:
* src/actions.c:
Always use a c-formatted string as 5th argument of
_gtk_error_dialog_new().
Modified:
trunk/ChangeLog
trunk/src/actions.c
trunk/src/dlg-batch-add.c
trunk/src/dlg-extract.c
trunk/src/fr-command-rar.c
trunk/src/fr-window.c
trunk/src/gtk-utils.c
Modified: trunk/src/actions.c
==============================================================================
--- trunk/src/actions.c (original)
+++ trunk/src/actions.c Wed Apr 1 22:58:15 2009
@@ -156,6 +156,7 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL,
_("Could not create the archive"),
+ "%s",
_("You have to specify an archive name."));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
@@ -194,6 +195,7 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL,
_("Could not create the archive"),
+ "%s",
_("You don't have permission to create an archive in this folder"));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
@@ -229,6 +231,7 @@
GTK_DIALOG_MODAL,
NULL,
_("Could not create the archive"),
+ "%s",
_("Archive type not supported."));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
@@ -244,7 +247,8 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL,
_("Could not delete the old archive."),
- "%s", err->message);
+ "%s",
+ err->message);
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (GTK_WIDGET (dialog));
g_error_free (err);
Modified: trunk/src/dlg-batch-add.c
==============================================================================
--- trunk/src/dlg-batch-add.c (original)
+++ trunk/src/dlg-batch-add.c Wed Apr 1 22:58:15 2009
@@ -167,6 +167,7 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL,
_("Could not create the archive"),
+ "%s",
_("You have to specify an archive name."));
gtk_dialog_run (GTK_DIALOG (d));
gtk_widget_destroy (GTK_WIDGET (d));
@@ -211,6 +212,7 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL,
_("Could not create the archive"),
+ "%s",
_("You don't have the right permissions to create an archive in the destination folder."));
gtk_dialog_run (GTK_DIALOG (d));
gtk_widget_destroy (GTK_WIDGET (d));
@@ -301,6 +303,7 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL,
_("Could not create the archive"),
+ "%s",
_("You have to specify an archive name."));
gtk_dialog_run (GTK_DIALOG (d));
gtk_widget_destroy (GTK_WIDGET (d));
Modified: trunk/src/dlg-extract.c
==============================================================================
--- trunk/src/dlg-extract.c (original)
+++ trunk/src/dlg-extract.c Wed Apr 1 22:58:15 2009
@@ -123,19 +123,16 @@
if (! do_not_extract && ! ensure_dir_exists (extract_to_dir, 0755, &error)) {
GtkWidget *d;
- char *message;
-
- message = g_strdup_printf (_("Could not create the destination folder: %s."), error->message);
d = _gtk_error_dialog_new (GTK_WINDOW (window),
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL,
_("Extraction not performed"),
- "%s", message);
+ _("Could not create the destination folder: %s."),
+ error->message);
gtk_dialog_run (GTK_DIALOG (d));
gtk_widget_destroy (GTK_WIDGET (d));
- g_free (message);
g_error_free (error);
return FALSE;
Modified: trunk/src/fr-command-rar.c
==============================================================================
--- trunk/src/fr-command-rar.c (original)
+++ trunk/src/fr-command-rar.c Wed Apr 1 22:58:15 2009
@@ -646,9 +646,10 @@
if (error->type != FR_PROC_ERROR_COMMAND_ERROR)
return;
- if (error->status == 3)
+ /*if (error->status == 3)
error->type = FR_PROC_ERROR_ASK_PASSWORD;
- else if (error->status <= 1)
+ else */
+ if (error->status <= 1)
error->type = FR_PROC_ERROR_NONE;
for (scan = g_list_last (comm->process->err.raw); scan; scan = scan->prev) {
@@ -659,6 +660,10 @@
break;
}
+ if (strncmp (line, "Unexpected end of archive", 25) == 0) {
+ /* FIXME: handle this type of errors at a higher level when the freeze is over. */
+ }
+
if (strncmp (line, "Cannot find volume", 18) == 0) {
char *volume_filename;
Modified: trunk/src/fr-window.c
==============================================================================
--- trunk/src/fr-window.c (original)
+++ trunk/src/fr-window.c Wed Apr 1 22:58:15 2009
@@ -2232,7 +2232,8 @@
GTK_DIALOG_MODAL,
NULL,
message,
- "%s", error->message);
+ "%s",
+ error->message);
gtk_dialog_run (GTK_DIALOG (d));
gtk_widget_destroy (d);
@@ -2972,7 +2973,8 @@
0,
output,
msg,
- "%s", details);
+ ((details != NULL) ? "%s" : NULL),
+ details);
fr_window_show_error_dialog (window, dialog, dialog_parent);
return FALSE;
@@ -6147,6 +6149,7 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL,
message,
+ "%s",
_("Archive type not supported."));
gtk_dialog_run (GTK_DIALOG (d));
gtk_widget_destroy (d);
@@ -7332,7 +7335,8 @@
GTK_DIALOG_DESTROY_WITH_PARENT,
NULL,
(renaming_dir ? _("Could not rename the folder") : _("Could not rename the file")),
- "%s", reason);
+ "%s",
+ reason);
gtk_dialog_run (GTK_DIALOG (dlg));
gtk_widget_destroy (dlg);
Modified: trunk/src/gtk-utils.c
==============================================================================
--- trunk/src/gtk-utils.c (original)
+++ trunk/src/gtk-utils.c Wed Apr 1 22:58:15 2009
@@ -437,7 +437,8 @@
/* Expander */
expander = gtk_expander_new_with_mnemonic (_("Command _Line Output"));
-
+ gtk_expander_set_expanded (GTK_EXPANDER (expander), secondary_text == NULL);
+
/* Add text */
scrolled = gtk_scrolled_window_new (NULL, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]