Author: colossus
Date: 2006-07-14 13:15:41 +0000 (Fri, 14 Jul 2006)
New Revision: 22445

Modified:
   xarchiver/trunk/src/add_dialog.c
   xarchiver/trunk/src/bzip2.c
   xarchiver/trunk/src/callbacks.c
   xarchiver/trunk/src/callbacks.h
   xarchiver/trunk/src/extract_dialog.c
   xarchiver/trunk/src/interface.c
   xarchiver/trunk/src/iso.c
   xarchiver/trunk/src/main.c
   xarchiver/trunk/src/rpm.c
Log:
Modified the message dialogs so to show an additional message.


Modified: xarchiver/trunk/src/add_dialog.c
===================================================================
--- xarchiver/trunk/src/add_dialog.c    2006-07-14 12:26:56 UTC (rev 22444)
+++ xarchiver/trunk/src/add_dialog.c    2006-07-14 13:15:41 UTC (rev 22445)
@@ -494,7 +494,7 @@
                        case GTK_RESPONSE_OK:
                        if 
(gtk_tree_model_get_iter_first(GTK_TREE_MODEL(add_dialog->file_liststore), 
&iter) == FALSE)
                        {
-                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("You haven't 
selected any files to add!") );
+                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't add 
files to the archive:"), _("You haven't selected any files to add!") );
                                break;
                        }                       
                        if ( add_dialog->add_password != NULL && 
gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(add_dialog->add_password)) )
@@ -502,7 +502,7 @@
                                temp_password  = g_strdup (gtk_entry_get_text ( 
GTK_ENTRY (add_dialog->add_password_entry) ));
                                if (strlen(temp_password) == 0)
                                {
-                                       response = ShowGtkMessageDialog 
(GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, 
_("Please enter the password!") );
+                                       response = ShowGtkMessageDialog 
(GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, 
_("You missed the password!"),_("Please enter it!") );
                                        g_free (temp_password);
                                        break;
                                }

Modified: xarchiver/trunk/src/bzip2.c
===================================================================
--- xarchiver/trunk/src/bzip2.c 2006-07-14 12:26:56 UTC (rev 22444)
+++ xarchiver/trunk/src/bzip2.c 2006-07-14 13:15:41 UTC (rev 22445)
@@ -108,7 +108,7 @@
                                g_free ( new_path );
                                if ( stream == NULL )
                                {
-                                       response = ShowGtkMessageDialog 
(GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,g_strerror(errno));
+                                       response = ShowGtkMessageDialog 
(GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't open 
the file:"),g_strerror(errno));
                     done = FALSE;
                     break;                                     
                                }
@@ -121,7 +121,7 @@
                                g_io_add_watch (ioc, 
G_IO_IN|G_IO_PRI|G_IO_ERR|G_IO_HUP|G_IO_NVAL, ExtractToDifferentLocation, 
stream);
                        }
                        else
-                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("Please 
select where to extract files!") );
+                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("You missed 
the extraction path!"),("Please select it.") );
                        break;
        }
        }
@@ -150,7 +150,7 @@
        stream = fdopen ( fd , "w" );
        if ( stream == NULL)
        {
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,g_strerror(errno)
 );
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't write 
to /tmp:"),g_strerror(errno) );
                g_free (tmp);
                return NULL;
        }
@@ -196,7 +196,7 @@
       }
       else if (error != NULL)
       {
-        response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, error->message);
+        response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("An error 
occurred:"),error->message);
         g_error_free (error);
         return FALSE;
       }
@@ -247,7 +247,7 @@
                if ( WEXITSTATUS (status) )
                {
                        gtk_window_set_title ( GTK_WINDOW (MainWindow) , 
"Xarchiver " VERSION );
-                       response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while decompressing the archive.\nDo you want to open the error 
messages window?") );
+                       response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while decompressing the archive!"),("Do you want to open the 
error messages window?") );
                        if (response == GTK_RESPONSE_YES)
                                ShowShellOutput (NULL);
                        unlink ( tmp );
@@ -305,7 +305,7 @@
                if ( WEXITSTATUS (status) )
                {
                        gtk_window_set_title ( GTK_WINDOW (MainWindow) , 
"Xarchiver " VERSION );
-                       response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO, add ? 
_("An error occurred while adding to the tar archive.\nDo you want to open the 
error messages window?") : _("An error occurred while deleting from the tar 
archive.\nDo you want to open the error messages window?") );
+                       response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO, add ? 
_("An error occurred while adding to the tar archive!") : _("An error occurred 
while deleting from the tar archive!"),_("Do you want to open the error 
messages window?") );
                        if (response == GTK_RESPONSE_YES)
                                ShowShellOutput (NULL);
             unlink ( tmp );
@@ -332,7 +332,7 @@
                {
                        gtk_window_set_title ( GTK_WINDOW (MainWindow) , 
"Xarchiver " VERSION );
                        response = ShowGtkMessageDialog (GTK_WINDOW
-                       
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while recompressing the tar archive.\nDo you want to open the 
error messages window?") );
+                       
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while recompressing the tar archive!"),_("Do you want to open 
the error messages window?") );
                        if (response == GTK_RESPONSE_YES)
                                ShowShellOutput (NULL);
                        unlink ( tmp );
@@ -346,7 +346,7 @@
        stream = fopen ( archive->path , "w" ) ;
        if ( stream == NULL)
        {
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,g_strerror(errno)
 );
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't 
recompress the archive:"),g_strerror(errno) );
                unlink ( tmp );
                g_free (tmp);
                return;
@@ -393,7 +393,7 @@
     stream = fopen ( archive->path , "w" );
        if ( stream == NULL )
        {
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,g_strerror(errno));
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't 
decompress the archive:"),g_strerror(errno));
         done = FALSE;
         return;                                        
        }

Modified: xarchiver/trunk/src/callbacks.c
===================================================================
--- xarchiver/trunk/src/callbacks.c     2006-07-14 12:26:56 UTC (rev 22444)
+++ xarchiver/trunk/src/callbacks.c     2006-07-14 13:15:41 UTC (rev 22445)
@@ -109,7 +109,7 @@
                if (archive->status == XA_ARCHIVESTATUS_EXTRACT)
                {
                        gchar *msg = g_strconcat (_("Please check 
\""),extract_path,_("\" since some files could have been already 
extracted."),NULL);
-            response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_INFO,        GTK_BUTTONS_OK,msg );
+            response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_INFO,        GTK_BUTTONS_OK,"",msg );
             g_free (msg);
                }
                else if (archive->status == XA_ARCHIVESTATUS_OPEN)
@@ -129,7 +129,7 @@
                        gtk_tooltips_disable ( pad_tooltip );
                        gtk_widget_hide ( pad_image );
                        gtk_window_set_title ( GTK_WINDOW (MainWindow) , 
"Xarchiver " VERSION );
-                       response = ShowGtkMessageDialog (GTK_WINDOW     
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while accessing the archive.\nDo you want to open the error 
messages window?") );
+                       response = ShowGtkMessageDialog (GTK_WINDOW     
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while accessing the archive."),_("Do you want to open the error 
messages window?") );
                        if (response == GTK_RESPONSE_YES)
                                ShowShellOutput (NULL);
                        /* In case the user supplies a wrong password we reset 
it so he can try again */
@@ -215,12 +215,13 @@
                gchar  *msg;
 
                utf8_path = g_filename_to_utf8 (path, -1, NULL, NULL, NULL);
-               msg = g_strdup_printf (_("The archive \"%s\" already exists. Do 
you want to overwrite it?"), utf8_path);
+               msg = g_strdup_printf (_("The archive \"%s\" already exists!"), 
utf8_path);
                response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),
                                                GTK_DIALOG_MODAL,
                                                GTK_MESSAGE_QUESTION,
                                                GTK_BUTTONS_YES_NO,
-                                               msg
+                                               msg,
+                                               _("Do you want to overwrite 
it?")
                                                );
                g_free (utf8_path);
                g_free (msg);           
@@ -266,10 +267,11 @@
        gtk_window_set_title ( GTK_WINDOW (MainWindow) , archive->path );
 }
 
-int ShowGtkMessageDialog ( GtkWindow *window, int mode,int type,int button, 
const gchar *message)
+int ShowGtkMessageDialog ( GtkWindow *window, int mode,int type,int button, 
const gchar *message1,const gchar *message2)
 {
-       dialog = gtk_message_dialog_new (window, mode, type, button,message);
+       dialog = gtk_message_dialog_new (window, mode, type, button,message1);
        gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
+       gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), 
message2);
        response = gtk_dialog_run (GTK_DIALOG (dialog) );
        gtk_widget_destroy (GTK_WIDGET (dialog) );
        return response;
@@ -303,12 +305,17 @@
                return;
     if ( archive->type == -1 )
     {
+               gchar *utf8_path,*msg;
+               utf8_path = g_filename_to_utf8 (path, -1, NULL, NULL, NULL);
+               msg = g_strdup_printf (_("Can't open file \"%s\":"), utf8_path);
         gtk_window_set_title ( GTK_WINDOW (MainWindow) , "Xarchiver " VERSION 
);
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,
-               _("The format of this archive is not recognized !") );
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,msg,
+               _("Archive format is not recognized!"));
                xa_set_button_state ( 1,1,0,0,0);
                gtk_widget_set_sensitive ( check_menu , FALSE );
                gtk_widget_set_sensitive ( properties , FALSE );
+               g_free (utf8_path);
+               g_free (msg);
         return;
        }
     EmptyTextBuffer();
@@ -324,7 +331,7 @@
     if ( ext != NULL )
         if ( ! g_list_find ( ArchiveType , ext ) )
         {
-            response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,_("Sorry, this 
archive format is not supported since the proper archiver is not installed!") );
+            response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,_("Sorry, this 
archive format is not supported:"),_("the proper archiver is not installed!") );
             return;
         }
 
@@ -474,7 +481,7 @@
        x = gtk_tree_selection_count_selected_rows (selection);
        numbers = g_strdup_printf ( "%d", x );
        gchar *msg = g_strconcat (_("You are about to delete "),numbers,x > 1 ? 
_(" files") : _(" file") , _(" from the archive.\nAre you really sure to do 
this?"),NULL);
-       response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,msg );
+       response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,"",msg );
        g_free (msg);
        g_free (numbers);
        if ( response == GTK_RESPONSE_NO)
@@ -833,9 +840,9 @@
        
        if (dummy_ptr == NULL)
        {
-               gchar *msg = g_strdup_printf (_("Can't open archive %s:\n%s") , 
filename , g_strerror (errno) );
+               gchar *msg = g_strdup_printf (_("Can't open archive %s") , 
filename );
                response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow) , 
GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,
-               msg);
+               msg,g_strerror (errno));
                g_free (msg);
                return -2;
         }
@@ -1028,7 +1035,7 @@
 {
        if (archive->status == XA_ARCHIVESTATUS_ADD)
        {
-               response = ShowGtkMessageDialog (GTK_WINDOW     
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("Doing 
so will probably corrupt your archive.\nDo you really want to cancel?") );
+               response = ShowGtkMessageDialog (GTK_WINDOW     
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("Doing 
so will probably corrupt your archive!"),_("Do you really want to cancel?") );
                if (response == GTK_RESPONSE_NO)
                        return;
        }
@@ -1036,7 +1043,7 @@
     Update_StatusBar (_("Waiting for the process to abort..."));
     if ( kill ( archive->child_pid , SIGABRT ) < 0 )
     {
-        response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, 
g_strerror(errno));
+        response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("An error 
occurred while trying to kill the process:"),g_strerror(errno));
            return;
     }
     /* This in case the user cancels the opening of a password protected 
archive */
@@ -1109,7 +1116,7 @@
        else if ( strstr ( dir , "d" ) || strstr ( dir , "D" ) ) is_dir = TRUE;
        if (is_dir)
        {
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,_("Please 
select a file, not a directory!") );
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,"",_("Please 
select a file, not a directory!") );
                g_free ( dir );
                return;
        }
@@ -1169,7 +1176,7 @@
                if ( WEXITSTATUS ( status ) )
                {
                gtk_window_set_title ( GTK_WINDOW (MainWindow) , "Xarchiver " 
VERSION );
-                       response = ShowGtkMessageDialog 
(GTK_WINDOW(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An
 error occurred while extracting the file to be viewed.\nDo you want to open 
the error messages window?") );
+                       response = ShowGtkMessageDialog 
(GTK_WINDOW(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An
 error occurred while extracting the file to be viewed!"),("Do you want to open 
the error messages window?") );
                        if (response == GTK_RESPONSE_YES)
                                ShowShellOutput (NULL);
                        unlink ( (char*)data );
@@ -1209,11 +1216,8 @@
        }
        else
        {
-               gchar *msg = NULL;
-               msg = g_strconcat (_("An error occurred while extracting the 
file to be viewed: "), error->message, NULL);
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,msg);
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,"An error 
occurred while extracting the file to be viewed!",error->message);
                g_error_free (error);
-               g_free (msg);
                return NULL;
        }
        unlink ( filename );
@@ -1774,7 +1778,7 @@
        array = gtk_selection_data_get_uris ( data );
        if (array == NULL)
        {
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Sorry, I 
could not perform the operation!") );
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,"",_("Sorry, I 
could not perform the operation!") );
                gtk_drag_finish (context, FALSE, FALSE, time);
                return;
        }
@@ -1798,7 +1802,7 @@
                xa_new_archive ( NULL , NULL );
        if ( (archive->type == XARCHIVETYPE_BZIP2 || archive->type == 
XARCHIVETYPE_GZIP) && ! one_file)
        {
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Bzip2 or gzip 
cannot compress more than one file, please choose another archive format!") );
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Bzip2 or gzip 
cannot compress more than one file!"),("Please choose another archive format!") 
);
                gtk_window_set_title ( GTK_WINDOW (MainWindow) , "Xarchiver " 
VERSION );
                Update_StatusBar ( _("Operation failed."));
                return;

Modified: xarchiver/trunk/src/callbacks.h
===================================================================
--- xarchiver/trunk/src/callbacks.h     2006-07-14 12:26:56 UTC (rev 22444)
+++ xarchiver/trunk/src/callbacks.h     2006-07-14 13:15:41 UTC (rev 22445)
@@ -94,7 +94,7 @@
 void drag_data_get (GtkWidget *widget, GdkDragContext *dc, GtkSelectionData 
*selection_data, guint info, guint t, gpointer data);
 
 GSList *Add_File_Dialog ( gchar *mode );
-int ShowGtkMessageDialog ( GtkWindow *window, int mode,int type,int button, 
const gchar *message);
+int ShowGtkMessageDialog ( GtkWindow *window, int mode,int type,int button, 
const gchar *message1,const gchar *message2);
 int CountCharacter ( gchar *string , int chr );
 int is_escaped_char(char c);
 int DetectArchiveType ( gchar *filename );

Modified: xarchiver/trunk/src/extract_dialog.c
===================================================================
--- xarchiver/trunk/src/extract_dialog.c        2006-07-14 12:26:56 UTC (rev 
22444)
+++ xarchiver/trunk/src/extract_dialog.c        2006-07-14 13:15:41 UTC (rev 
22445)
@@ -329,7 +329,7 @@
 
                        if ( strlen ( extract_path ) == 0 )
                        {
-                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("Please 
select where to extract the files !") );
+                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("You missed 
where to extract the files!"),_("Please enter the extraction path.") );
                                break;
                        }
                        if (archive->has_passwd)
@@ -337,7 +337,7 @@
 
                        if (archive->has_passwd && strlen( archive->passwd ) == 
0 )
                        {
-                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("Please enter 
the password!") );
+                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("You missed 
the password!"),_("Please enter it.") );
                                break;
                        }
                        if (g_file_test (destination_path , G_FILE_TEST_EXISTS) 
== FALSE )
@@ -345,8 +345,8 @@
                                int result = mkdir (destination_path , S_IRUSR 
| S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXGRP);
                                if (result == -1)
                                {
-                                       gchar *msg = g_strconcat (_("Can't 
create directory "),"\"",destination_path,"\"",": ",g_strerror(errno),NULL);
-                                       response = ShowGtkMessageDialog 
(GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, msg 
);
+                                       gchar *msg = g_strconcat (_("Can't 
create directory "),"\"",destination_path,"\":",NULL);
+                                       response = ShowGtkMessageDialog 
(GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, 
msg, g_strerror(errno ) );
                                        g_free (msg);
                                        break;
                                }
@@ -357,8 +357,8 @@
                                gchar  *msg;
 
                 utf8_path = g_filename_to_utf8 (destination_path, -1, NULL, 
NULL, NULL);
-                msg = g_strdup_printf (_("You don't have the right permissions 
to extract archives in the folder \"%s\""), utf8_path);
-                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, msg );
+                msg = g_strdup_printf (_("You don't have the right permissions 
to extract the files to the folder \"%s\"."), utf8_path);
+                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("Can't 
perform extraction!"),msg );
                 g_free (utf8_path);
                                g_free (msg);
                                g_free (destination_path);

Modified: xarchiver/trunk/src/interface.c
===================================================================
--- xarchiver/trunk/src/interface.c     2006-07-14 12:26:56 UTC (rev 22444)
+++ xarchiver/trunk/src/interface.c     2006-07-14 13:15:41 UTC (rev 22445)
@@ -438,7 +438,7 @@
                        password = g_strdup (gtk_entry_get_text ( GTK_ENTRY 
(password_entry) ));
                        if (strlen(password) == 0)
                        {
-                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("Please enter 
the password!") );
+                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("You missed 
the password!"),_("Please enter it!") );
                                break;
                        }
                        done = TRUE;

Modified: xarchiver/trunk/src/iso.c
===================================================================
--- xarchiver/trunk/src/iso.c   2006-07-14 12:26:56 UTC (rev 22444)
+++ xarchiver/trunk/src/iso.c   2006-07-14 13:15:41 UTC (rev 22445)
@@ -519,7 +519,7 @@
        }
        if ((fdest = fopen (filename, "w")) == NULL)
        {
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,g_strerror(errno)
 );
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't write 
file:"),g_strerror(errno) );
                g_free (filename);
         return FALSE;
        }

Modified: xarchiver/trunk/src/main.c
===================================================================
--- xarchiver/trunk/src/main.c  2006-07-14 12:26:56 UTC (rev 22444)
+++ xarchiver/trunk/src/main.c  2006-07-14 13:15:41 UTC (rev 22445)
@@ -91,7 +91,7 @@
                        {
                                if (archive->has_passwd)
                                {
-                                       response = ShowGtkMessageDialog 
(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("This option can't be 
used with password protected archives.\n") );
+                                       response = ShowGtkMessageDialog 
(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't perform this 
action!"),_("This option can't be used with password protected archives.\n") );
                                }
                                else
                                {
@@ -367,7 +367,7 @@
                &exit_status,
                &error) )
        {
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, error->message);
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK, _("Can't run 
the command!"),error->message);
                g_error_free (error);
                g_strfreev ( argv );
         return FALSE;
@@ -375,7 +375,7 @@
     if ( WIFEXITED (exit_status) )
        {
            if ( WEXITSTATUS (exit_status) )
-                       response = ShowGtkMessageDialog 
(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,std_err );
+                       response = ShowGtkMessageDialog 
(NULL,GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("An error 
occurred!"),std_err );
        }
        g_strfreev ( argv );
     return TRUE;

Modified: xarchiver/trunk/src/rpm.c
===================================================================
--- xarchiver/trunk/src/rpm.c   2006-07-14 12:26:56 UTC (rev 22444)
+++ xarchiver/trunk/src/rpm.c   2006-07-14 13:15:41 UTC (rev 22445)
@@ -40,9 +40,9 @@
     stream = fopen ( archive->path , "r" );
        if (stream == NULL)
     {
-        gchar *msg = g_strdup_printf (_("Can't open archive %s:\n%s") , 
archive->path , g_strerror (errno) ); 
+        gchar *msg = g_strdup_printf (_("Can't open RPM file %s:") , 
archive->path); 
                response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow) , 
GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,
-               msg);
+               msg,g_strerror (errno));
                g_free (msg);
                return;
     }
@@ -56,13 +56,13 @@
     if (fseek ( stream, 104 , SEEK_CUR ) )
     {
         fclose (stream);
-        response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,g_strerror(errno));
+        response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't fseek 
to position 104:"),g_strerror(errno));
         return;
     }
     if ( fread ( bytes, 1, 8, stream ) == 0 )
        {
                fclose ( stream );
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,g_strerror(errno));
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't read 
data from file:"),g_strerror(errno));
                return;
     }
     il = 256 * ( 256 * ( 256 * bytes[0] + bytes[1]) + bytes[2] ) + bytes[3];
@@ -72,13 +72,13 @@
     if (fseek ( stream, offset  , SEEK_SET ) )
     {
         fclose (stream);
-        response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,g_strerror(errno));
+        response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't fseek 
in file:"),g_strerror(errno));
         return;
     }
     if ( fread ( bytes, 1, 8, stream ) == 0 )
        {
                fclose ( stream );
-               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,g_strerror(errno));
+               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't read 
data from file:"),g_strerror(errno));
                return;
     }
     il = 256 * ( 256 * ( 256 * bytes[0] + bytes[1]) + bytes[2] ) + bytes[3];
@@ -117,7 +117,7 @@
             Update_StatusBar ( _("Operation failed."));
             gtk_widget_hide ( viewport2 );
                gtk_window_set_title ( GTK_WINDOW (MainWindow) , "Xarchiver " 
VERSION );
-                   response = ShowGtkMessageDialog (GTK_WINDOW                 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while extracting the cpio archive\nfrom the rpm one. Do you want 
to open the error messages window?") );
+                   response = ShowGtkMessageDialog (GTK_WINDOW                 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("Error 
while extracting the cpio archive from the rpm one."),("Do you want to open the 
error messages window?") );
             if (response == GTK_RESPONSE_YES)
                                ShowShellOutput (NULL);
             unlink ( cpio_tmp );
@@ -145,7 +145,7 @@
             Update_StatusBar ( _("Operation failed."));
             gtk_widget_hide ( viewport2 );
                gtk_window_set_title ( GTK_WINDOW (MainWindow) , "Xarchiver " 
VERSION );
-                   response = ShowGtkMessageDialog (GTK_WINDOW                 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while decompressing the cpio archive.\nDo you want to open the 
error messages window?") );
+                   response = ShowGtkMessageDialog (GTK_WINDOW                 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_QUESTION,GTK_BUTTONS_YES_NO,_("An 
error occurred while decompressing the cpio archive."),_("Do you want to open 
the error messages window?") );
                        if (response == GTK_RESPONSE_YES)
                                ShowShellOutput (NULL);
                        unlink ( cpio_tmp );
@@ -200,7 +200,7 @@
                        status = g_io_channel_write_chars ( ioc , buffer , 
bytes_read , &bytes_written , &error );
                        if (status == G_IO_STATUS_ERROR) 
                        {
-                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,error->message);
+                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("An error 
occurred:"),error->message);
                                g_error_free (error);
                                CloseChannels ( ioc_cpio );
                                CloseChannels ( ioc );
@@ -211,14 +211,6 @@
                                status = g_io_channel_write_chars ( ioc , 
buffer + bytes_written , bytes_read - bytes_written , &bytes_written , &error );
                        g_print 
("*Written:%d\tStatus:%d\n",bytes_written,status);
                        */
-                       if (status == G_IO_STATUS_ERROR) 
-                       {
-                               response = ShowGtkMessageDialog (GTK_WINDOW 
(MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,error->message);
-                               g_error_free (error);
-                               CloseChannels ( ioc_cpio );
-                               CloseChannels ( ioc );
-                               return FALSE; 
-                       }
                        g_io_channel_flush ( ioc , NULL );
                        return TRUE;
                }

_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to