From 802247e7a62e1582c4e34896a4c8c45dd31fce49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Br=C3=BCckl?= Date: Sat, 13 Feb 2016 14:35:40 +0100 Subject: [PATCH] Remove trailing white space --- ChangeLog | 6 +++--- doc/xarchiver.css | 1 - doc/xarchiver.xsl | 1 - po/sq.po | 2 +- src/7zip.c | 7 +++---- src/add_dialog.c | 14 ++++++------- src/add_dialog.h | 1 - src/archive.c | 16 +++++++------- src/archive.h | 2 +- src/arj.c | 5 ++--- src/bzip2.c | 2 +- src/deb.c | 6 +++--- src/extract_dialog.c | 14 ++++++------- src/extract_dialog.h | 3 +-- src/gzip.c | 8 +++---- src/gzip.h | 2 +- src/interface.c | 36 +++++++++++++++---------------- src/lha.c | 6 +++--- src/main.c | 19 ++++++++--------- src/main.h | 1 - src/mime.c | 2 +- src/new_dialog.c | 6 +++--- src/new_dialog.h | 1 - src/open-with-dlg.c | 10 ++++----- src/pref_dialog.c | 40 +++++++++++++++++------------------ src/pref_dialog.h | 1 - src/rar.c | 34 +++++++++++++++--------------- src/rpm.c | 18 ++++++++-------- src/string_utils.c | 2 +- src/string_utils.h | 1 - src/support.c | 1 - src/support.h | 1 - src/tar.c | 38 ++++++++++++++++----------------- src/tar.h | 1 - src/utf8-fnmatch.c | 41 ++++++++++++++++++------------------ src/window.c | 50 ++++++++++++++++++++++---------------------- src/window.h | 1 - src/zip.c | 6 +++--- xarchiver.tap | 1 - 39 files changed, 195 insertions(+), 212 deletions(-) diff --git a/ChangeLog b/ChangeLog index d20ffa02..258ca12b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -76,7 +76,7 @@ Xarchiver changelog: - Extracting files in encrypted archives with DnD no more fails since the password it's now asked. - Better behaviour of the GUI while archive operations are in progress. - Fixed unsuccessful open of rpm archives when the cpio archive was compressed with bzip2.c. - - Changed View Window title as the filename of the ASCII file whose content the user wants to see. + - Changed View Window title as the filename of the ASCII file whose content the user wants to see. - Added ability to convert archives to self-extracting. - The archive properties dialog and the ISO info window can be closed by hitting ESC. - Fixed bug preventing to add files by drag and drop when no archive has been created. @@ -115,7 +115,7 @@ Xarchiver changelog: - Fixed some memory leaks but surely someone is left :) - Fixed bug causing filenames with spaces inside the archive not being viewed. - Fixed bug causing filenames with spaces in arj archives appear truncated in Xarchiver window. - - Fixed a bug preventing the file dialog to select more than one file when adding to arj archives. + - Fixed a bug preventing the file dialog to select more than one file when adding to arj archives. - Fixed progress bar not appearing when adding only one big file to an archive. - Fixed a bug causing Xarchiver to hang when opening empty zip archives. - Fixed a bug causing Xarchiver to exit when opening a not supported archive directly from the command line. @@ -137,7 +137,7 @@ Xarchiver changelog: - The size columns are treated as uint instead as string so that sorting by size is possible now. - The bottom window is now used for reporting messages to the user. - Added a progress bar that shows the archive's operation progress. - - Greatly improved the zip password detection; if an archive contains 10 files and only the last one is password + - Greatly improved the zip password detection; if an archive contains 10 files and only the last one is password protected Xarchiver will detect it (the same is true for arj). - When you open or create a password protected archive a small padlock is shown in the window bottom right. - Fixed an occasional crash when opening zip archives. diff --git a/doc/xarchiver.css b/doc/xarchiver.css index c299fdd8..9e8c1372 100644 --- a/doc/xarchiver.css +++ b/doc/xarchiver.css @@ -94,4 +94,3 @@ li border-style: solid; padding: 0.5em; } - diff --git a/doc/xarchiver.xsl b/doc/xarchiver.xsl index 41c7e147..b08b1317 100644 --- a/doc/xarchiver.xsl +++ b/doc/xarchiver.xsl @@ -9,4 +9,3 @@ - diff --git a/po/sq.po b/po/sq.po index 39126968..e792a83c 100644 --- a/po/sq.po +++ b/po/sq.po @@ -1,4 +1,4 @@ -# Albanian translation of xarchiver package. +# Albanian translation of xarchiver package. # Copyright (C) 2006 THE xarchiver'S COPYRIGHT HOLDER # This file is distributed under the same license as the xarchiver package. # Besnik Bleta , 2007. diff --git a/src/7zip.c b/src/7zip.c index 871cc8aa..7c1daf26 100644 --- a/src/7zip.c +++ b/src/7zip.c @@ -83,7 +83,7 @@ void xa_get_7zip_line_content (gchar *line, gpointer data) last_line = TRUE; return; } - + linesize = strlen(line); archive->nr_of_files++; @@ -94,11 +94,11 @@ void xa_get_7zip_line_content (gchar *line, gpointer data) /* Time */ line[19] = '\0'; item[3] = line + 11; - + /* Permissions */ line[25] = '\0'; item[2] = line + 20; - + /* Size */ for(a=26; a < linesize; ++a) if(line[a] >= '0' && line[a] <= '9') @@ -247,4 +247,3 @@ void xa_7zip_test (XArchive *archive) list = g_slist_append(list,command); xa_run_command (archive,list); } - diff --git a/src/add_dialog.c b/src/add_dialog.c index 47636cb5..4b78d21e 100644 --- a/src/add_dialog.c +++ b/src/add_dialog.c @@ -52,7 +52,7 @@ Add_dialog_data *xa_create_add_dialog() label1 = gtk_label_new (_("Selection")); gtk_notebook_set_tab_label (GTK_NOTEBOOK (add_dialog->notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (add_dialog->notebook1), 0), label1); - + add_dialog->filechooserwidget1 = gtk_file_chooser_widget_new (GTK_FILE_CHOOSER_ACTION_OPEN); gtk_box_pack_start (GTK_BOX (vbox1), add_dialog->filechooserwidget1, TRUE, TRUE,2); @@ -75,7 +75,7 @@ Add_dialog_data *xa_create_add_dialog() gtk_radio_button_set_group (GTK_RADIO_BUTTON (add_dialog->store_path), add_dialog->path_group); add_dialog->path_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (add_dialog->store_path)); gtk_button_set_focus_on_click (GTK_BUTTON (add_dialog->store_path), FALSE); - + add_dialog->no_store_path = gtk_radio_button_new_with_mnemonic (NULL, _("Do not store paths")); gtk_box_pack_start (GTK_BOX (hbox1), add_dialog->no_store_path, FALSE, FALSE, 0); gtk_radio_button_set_group (GTK_RADIO_BUTTON (add_dialog->no_store_path), add_dialog->path_group); @@ -89,7 +89,7 @@ Add_dialog_data *xa_create_add_dialog() label2 = gtk_label_new (_("Options")); gtk_notebook_set_tab_label (GTK_NOTEBOOK (add_dialog->notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (add_dialog->notebook1), 1), label2); - + hbox2 = gtk_hbox_new (TRUE, 10); gtk_box_pack_start (GTK_BOX (add_dialog->option_notebook_vbox), hbox2, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox2), 5); @@ -132,7 +132,7 @@ Add_dialog_data *xa_create_add_dialog() label7 = gtk_label_new (_("Actions: ")); gtk_frame_set_label_widget (GTK_FRAME (frame4), label7); - + hbox3 = gtk_hbox_new (TRUE, 10); gtk_box_pack_start (GTK_BOX (add_dialog->option_notebook_vbox), hbox3, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (hbox3), 5); @@ -171,7 +171,7 @@ Add_dialog_data *xa_create_add_dialog() label5 = gtk_label_new (_("Encryption: ")); gtk_frame_set_label_widget (GTK_FRAME (frame3), label5); - + dialog_action_area1 = GTK_DIALOG (add_dialog->dialog1)->action_area; gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END); @@ -235,7 +235,7 @@ void xa_set_add_dialog_options(Add_dialog_data *add_dialog,XArchive *archive) gtk_widget_set_sensitive(label3,flag); gtk_widget_set_sensitive(add_dialog->store_path,flag); gtk_widget_set_sensitive(add_dialog->no_store_path,flag); - + if (archive->type != XARCHIVETYPE_7ZIP) g_signal_connect (G_OBJECT (add_dialog->update),"toggled",G_CALLBACK (add_update_fresh_toggled_cb) , add_dialog); @@ -245,7 +245,7 @@ void xa_set_add_dialog_options(Add_dialog_data *add_dialog,XArchive *archive) if (archive->type == XARCHIVETYPE_RAR || archive->type == XARCHIVETYPE_RAR5 || archive->type == XARCHIVETYPE_7ZIP) flag = TRUE; gtk_widget_set_sensitive(add_dialog->solid_archive,flag); - + if (archive->type != XARCHIVETYPE_TAR && archive->type != XARCHIVETYPE_TAR_GZ && archive->type != XARCHIVETYPE_TAR_LZMA && archive->type != XARCHIVETYPE_TAR_XZ && archive->type != XARCHIVETYPE_TAR_BZ2 && archive->type != XARCHIVETYPE_TAR_LZOP) { flag = TRUE; diff --git a/src/add_dialog.h b/src/add_dialog.h index f3d472a6..f80ca307 100644 --- a/src/add_dialog.h +++ b/src/add_dialog.h @@ -62,4 +62,3 @@ void xa_select_files_to_add ( GtkButton* ,gpointer ); void xa_execute_add_commands (XArchive *archive,GSList *list,gchar *compression_string); void fix_adjustment_value (GtkAdjustment *,gpointer ); #endif - diff --git a/src/archive.c b/src/archive.c index 80f78a81..a558a3f6 100644 --- a/src/archive.c +++ b/src/archive.c @@ -106,7 +106,7 @@ void xa_spawn_async_process (XArchive *archive, gchar *command) ioc = g_io_channel_unix_new (archive->output_fd); g_io_channel_set_encoding (ioc,NULL,NULL); g_io_channel_set_flags (ioc,G_IO_FLAG_NONBLOCK,NULL); - + if (xa_main_window) g_io_add_watch (ioc, G_IO_IN|G_IO_PRI|G_IO_ERR|G_IO_HUP|G_IO_NVAL,xa_process_output,archive); else @@ -122,7 +122,7 @@ void xa_spawn_async_process (XArchive *archive, gchar *command) } /* TODO: workaround for bug #3235 - * + * * gchar *xa_split_command_line(XArchive *archive,GSList *list) { gchar *command = NULL; @@ -223,7 +223,7 @@ static gboolean xa_process_output (GIOChannel *ioc,GIOCondition cond,gpointer da xa_update_window_with_archive_entries (archive,NULL); gtk_tree_view_set_model (GTK_TREE_VIEW(archive->treeview),archive->model); g_object_unref (archive->model); - + if (archive->type == XARCHIVETYPE_ZIP || archive->type == XARCHIVETYPE_RAR || archive->type == XARCHIVETYPE_RAR5 || archive->type == XARCHIVETYPE_ARJ) gtk_widget_set_sensitive (comment_menu,TRUE); else @@ -295,7 +295,7 @@ void xa_clean_archive_structure (XArchive *archive) entry = archive->root_entry; xa_free_entry (archive,entry); - + if (archive->column_types != NULL) g_free(archive->column_types); @@ -305,7 +305,7 @@ void xa_clean_archive_structure (XArchive *archive) g_slist_free (archive->error_output); archive->error_output = NULL; } - + if (archive->path != NULL) g_free(archive->path); @@ -320,7 +320,7 @@ void xa_clean_archive_structure (XArchive *archive) if (archive->passwd != NULL) g_free (archive->passwd); - + if (archive->working_dir != NULL) g_free (archive->working_dir); @@ -617,7 +617,7 @@ gchar *xa_build_full_path_name_from_entry(XEntry *entry, XArchive *archive) { if (entry->is_dir) dummy = g_string_prepend_c(dummy,'/'); - + dummy = g_string_prepend(dummy,entry->filename); entry = entry->prev; } @@ -668,7 +668,7 @@ gboolean xa_detect_encrypted_archive (XArchive *archive) file = fopen (archive->path,"r"); fread (magic,1,4,file); - + fseek (file,6,SEEK_SET); if (archive->type == XARCHIVETYPE_ZIP) { diff --git a/src/archive.h b/src/archive.h index 402661ea..ca1399ad 100644 --- a/src/archive.h +++ b/src/archive.h @@ -142,7 +142,7 @@ struct _XArchive open_func open_archive; }; -#define XA_CLIPBOARD (gdk_atom_intern_static_string ("XARCHIVER_OWN_CLIPBOARD")) +#define XA_CLIPBOARD (gdk_atom_intern_static_string ("XARCHIVER_OWN_CLIPBOARD")) #define XA_INFO_LIST (gdk_atom_intern_static_string ("application/xarchiver-info-list")) typedef enum diff --git a/src/arj.c b/src/arj.c index fc7ea84d..b514f36b 100644 --- a/src/arj.c +++ b/src/arj.c @@ -67,7 +67,7 @@ void xa_get_arj_line_content (gchar *line, gpointer data) } if (arj_line == 4) { - arj_line = 1; + arj_line = 1; return; } @@ -265,5 +265,4 @@ void xa_arj_test (XArchive *archive) list = g_slist_append(list,command); xa_run_command (archive,list); - } - +} diff --git a/src/bzip2.c b/src/bzip2.c index c8a19d94..d530e138 100644 --- a/src/bzip2.c +++ b/src/bzip2.c @@ -103,7 +103,7 @@ void xa_open_bzip2_lzma (XArchive *archive) executable = "lzop "; len = 4; } /* else fail? */ - + GType types[]= {GDK_TYPE_PIXBUF,G_TYPE_STRING,G_TYPE_UINT64,G_TYPE_UINT64,G_TYPE_POINTER}; archive->column_types = g_malloc0(sizeof(types)); diff --git a/src/deb.c b/src/deb.c index 1b68fc4d..3b0c1fe3 100644 --- a/src/deb.c +++ b/src/deb.c @@ -63,7 +63,7 @@ void xa_get_ar_line_content (gchar *line, gpointer data) /* Permissions */ line[9] = '\0'; item[0] = line; - + /* Owner */ for(n=12; n < linesize; ++n) if(line[n] == ' ') @@ -71,7 +71,7 @@ void xa_get_ar_line_content (gchar *line, gpointer data) line[n] = '\0'; item[1] = line+10; - /* Size */ + /* Size */ for(++n; n < linesize; ++n) if(line[n] >= '0' && line[n] <= '9') break; @@ -86,7 +86,7 @@ void xa_get_ar_line_content (gchar *line, gpointer data) archive->dummy_size += g_ascii_strtoull(item[2],NULL,0); a = ++n; - /* Date Modified */ + /* Date Modified */ for(; n < linesize; ++n) { if(n == 38) diff --git a/src/extract_dialog.c b/src/extract_dialog.c index 0af76a3e..aa57e812 100644 --- a/src/extract_dialog.c +++ b/src/extract_dialog.c @@ -261,7 +261,7 @@ void xa_set_extract_dialog_options(Extract_dialog_data *dialog_data,gint selecte flag = FALSE; gtk_widget_set_sensitive(dialog_data->fresh,flag); gtk_widget_set_sensitive(dialog_data->update,flag); - + if (archive->extraction_path == NULL) { archive_dir = gtk_combo_box_get_active_text (GTK_COMBO_BOX(prefs_window->combo_prefered_extract_dir)); @@ -433,7 +433,7 @@ Multi_extract_data *xa_create_multi_extract_dialog() gtk_drag_dest_set (dialog_data->files_treeview,GTK_DEST_DEFAULT_ALL,drop_targets,1,GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_LINK | GDK_ACTION_ASK); g_signal_connect (G_OBJECT (dialog_data->files_treeview),"drag-data-received",G_CALLBACK (xa_multi_extract_dialog_drag_data_received),dialog_data); - + hbox2 = gtk_hbox_new (TRUE,5); gtk_box_pack_start (GTK_BOX (vbox1),hbox2,FALSE,TRUE,0); @@ -503,7 +503,7 @@ Multi_extract_data *xa_create_multi_extract_dialog() cancelbutton1 = gtk_button_new_from_stock ("gtk-cancel"); gtk_dialog_add_action_widget (GTK_DIALOG (dialog_data->multi_extract),cancelbutton1,GTK_RESPONSE_CANCEL); GTK_WIDGET_SET_FLAGS (cancelbutton1,GTK_CAN_DEFAULT); - + extract_button = gtk_button_new(); extract_image = xa_main_window_find_image("xarchiver-extract.png",GTK_ICON_SIZE_SMALL_TOOLBAR); extract_hbox = gtk_hbox_new(FALSE,4); @@ -578,7 +578,7 @@ void xa_add_files_liststore (gchar *file_path,Multi_extract_data *dialog) return; stat (file_path,&my_stat); - file_size = my_stat.st_size; + file_size = my_stat.st_size; file_utf8 = g_filename_display_name (file_path); path = xa_remove_level_from_path(file_utf8); _file_utf8 = xa_remove_path_from_archive_name(file_utf8); @@ -682,7 +682,7 @@ void xa_select_where_to_extract(SexyIconEntry *entry, SexyIconEntryPosition icon current_path = gtk_entry_get_text(GTK_ENTRY(entry)); if (strlen(current_path) > 0) - gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (file_selector),current_path); + gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (file_selector),current_path); response = gtk_dialog_run (GTK_DIALOG(file_selector)); if (response == GTK_RESPONSE_ACCEPT) @@ -730,12 +730,12 @@ void xa_parse_multi_extract_archive(Multi_extract_data *dialog) overwrite = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dialog->overwrite)); double fraction = 1.0 / dialog->nr; - + if (pb != NULL) gtk_widget_show_all(pb->progress_window); else pb = xa_create_progress_bar(FALSE,NULL); - + percent=fraction; do { diff --git a/src/extract_dialog.h b/src/extract_dialog.h index ba61666f..2bbb01af 100644 --- a/src/extract_dialog.h +++ b/src/extract_dialog.h @@ -45,7 +45,7 @@ GtkWidget *hbox1,*hbox2,*hbox3,*vbox1,*vbox2,*vbox3,*vbox5; GtkWidget *frame1,*frame2,*alignment1,*alignment2,*alignment3; GtkWidget *dialog_action_area1,*cancel_button,*okbutton1,*extract_button,*extract_image,*extract_hbox,*extract_label; GtkTooltips *option_tooltip; - + Extract_dialog_data *xa_create_extract_dialog(); void xa_activate_entry(GtkToggleButton *,gpointer ); void fresh_update_toggled_cb (GtkToggleButton *, Extract_dialog_data *); @@ -57,4 +57,3 @@ void xa_activate_remove_button (GtkTreeModel *, GtkTreePath *, GtkTreeIter *, Gt void xa_add_files_liststore (gchar *, Multi_extract_data *); void xa_parse_multi_extract_archive(Multi_extract_data *); #endif - diff --git a/src/gzip.c b/src/gzip.c index a170a3d3..480345cf 100644 --- a/src/gzip.c +++ b/src/gzip.c @@ -40,7 +40,7 @@ void xa_open_gzip (XArchive *archive) archive->extract = extract[archive->type]; command = g_strconcat (tar, " tzvf " , archive->escaped_path, NULL ); - archive->has_properties = archive->can_add = archive->can_extract = archive->has_test = TRUE; + archive->has_properties = archive->can_add = archive->can_extract = archive->has_test = TRUE; archive->has_sfx = FALSE; archive->dummy_size = 0; archive->nr_of_files = 0; @@ -77,7 +77,7 @@ void xa_open_gzip (XArchive *archive) char *names[]= {(_("Compressed")),(_("Size")),(_("Ratio"))}; xa_create_liststore (archive,names); - + command = g_strconcat ("gzip -l ",archive->escaped_path,NULL); xa_spawn_async_process (archive,command); g_free (command); @@ -124,10 +124,10 @@ void xa_get_gzip_line_content (gchar *line, gpointer data) line[n] = '\0'; item[2] = line + a; n++; - + line[linesize-1] = '\0'; filename = line+n; - + basename = g_path_get_basename(filename); if (basename == NULL) basename = g_strdup(filename); diff --git a/src/gzip.h b/src/gzip.h index 1b761170..8f7499a1 100644 --- a/src/gzip.h +++ b/src/gzip.h @@ -15,7 +15,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. */ - + #ifndef GZIP_H #define GZIP_H diff --git a/src/interface.c b/src/interface.c index 5c9c8bb3..76f00c1f 100644 --- a/src/interface.c +++ b/src/interface.c @@ -95,7 +95,7 @@ void xa_create_main_window (GtkWidget *xa_main_window,gboolean show_location,gbo tmp_image = gtk_image_new_from_stock ("gtk-copy",GTK_ICON_SIZE_MENU); gtk_widget_show (tmp_image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (listing),tmp_image); - + listing_submenu = gtk_menu_new(); gtk_widget_set_sensitive(listing,FALSE); gtk_widget_show (listing_submenu); @@ -106,14 +106,14 @@ void xa_create_main_window (GtkWidget *xa_main_window,gboolean show_location,gbo tmp_image = gtk_image_new_from_stock ("gtk-edit",GTK_ICON_SIZE_MENU); gtk_widget_show (tmp_image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (listing_text),tmp_image); - + listing_html = gtk_image_menu_item_new_with_mnemonic (_("_HTML file")); gtk_widget_show (listing_html); gtk_container_add (GTK_CONTAINER (listing_submenu),listing_html); tmp_image = xa_main_window_find_image ("xarchiver-html.png",GTK_ICON_SIZE_MENU); gtk_widget_show (tmp_image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (listing_html),tmp_image); - + save1 = gtk_image_menu_item_new_from_stock ("gtk-save-as",accel_group); gtk_widget_set_sensitive(save1,FALSE); gtk_widget_show (save1); @@ -495,7 +495,7 @@ void xa_create_main_window (GtkWidget *xa_main_window,gboolean show_location,gbo gtk_misc_set_alignment (GTK_MISC(total_label),0.0,0.5); gtk_widget_show (total_label); gtk_container_add (GTK_CONTAINER (total_frame),total_label); - + selected_frame = gtk_frame_new (NULL); gtk_box_pack_start (GTK_BOX (hbox_sb),selected_frame,TRUE,TRUE,0); gtk_frame_set_label_align (GTK_FRAME (selected_frame),0,0); @@ -505,7 +505,7 @@ void xa_create_main_window (GtkWidget *xa_main_window,gboolean show_location,gbo gtk_misc_set_alignment (GTK_MISC(selected_label),0.0,0.5); gtk_widget_show (selected_label); gtk_container_add (GTK_CONTAINER (selected_frame),selected_label); - + green_led = gtk_image_new_from_icon_name ("gtk-yes",GTK_ICON_SIZE_BUTTON); gtk_widget_show (green_led); gtk_box_pack_start (GTK_BOX (hbox_sb),green_led,FALSE,FALSE,0); @@ -626,7 +626,7 @@ void xa_page_has_changed (GtkNotebook *notebook,GtkNotebookPage *page,guint page gtk_widget_set_sensitive (delete_menu,FALSE); gtk_widget_set_sensitive (rename_menu,FALSE); } - else + else { gtk_widget_set_sensitive (delete_menu,TRUE); gtk_widget_set_sensitive (rename_menu,TRUE); @@ -771,7 +771,7 @@ gchar *xa_create_password_dialog(XArchive *archive) if (batch_mode) label_pwd_required = gtk_label_new (_("Password required for:")); else - label_pwd_required = gtk_label_new (_("Enter password for:")); + label_pwd_required = gtk_label_new (_("Enter password for:")); gtk_widget_show (label_pwd_required); gtk_box_pack_start (GTK_BOX (vbox2),label_pwd_required,FALSE,FALSE,0); @@ -784,7 +784,7 @@ gchar *xa_create_password_dialog(XArchive *archive) gtk_widget_show (label_filename); gtk_box_pack_start (GTK_BOX (vbox2),label_filename,FALSE,FALSE,12); gtk_misc_set_alignment (GTK_MISC (label_filename),0,0.5); - + hbox1 = gtk_hbox_new (FALSE,5); gtk_widget_show (hbox1); gtk_box_pack_start (GTK_BOX (vbox2),hbox1,TRUE,TRUE,0); @@ -1135,14 +1135,14 @@ GtkWidget *xa_create_archive_properties_window() (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0),0,0); gtk_misc_set_alignment (GTK_MISC (number_of_files_label),0.99,0.5); - + compression_label = gtk_label_new (""); set_label ( compression_label,_("Compression ratio:")); gtk_table_attach (GTK_TABLE (table1),compression_label,0,1,9,10, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0),0,0); gtk_misc_set_alignment (GTK_MISC (compression_label),0.99,0.5); - + /* */ compression_data = gtk_label_new(""); gtk_misc_set_alignment (GTK_MISC (compression_data),0,0.5); @@ -1444,7 +1444,7 @@ void xa_sidepane_drag_data_received (GtkWidget *widget,GdkDragContext *context,i archive[idx]->has_passwd = dummy_password; archive[idx]->full_path = full_path; archive[idx]->add_recurse = add_recurse; - + g_string_free(full_pathname,TRUE); if (list != NULL) { @@ -1474,7 +1474,7 @@ gboolean xa_sidepane_drag_motion (GtkWidget *widget,GdkDragContext *context,gint { GtkTreeModel *model; GtkTreePath *path; - + model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget)); gtk_tree_view_get_dest_row_at_pos (GTK_TREE_VIEW (widget),x,y,&path,NULL); if (path) @@ -1498,7 +1498,7 @@ Progress_bar_data *xa_create_progress_bar(gboolean flag,XArchive *archive) if (pb) return pb; - + pb = g_new0(Progress_bar_data,1); pb->progress_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(pb->progress_window), PACKAGE_NAME); @@ -1506,7 +1506,7 @@ Progress_bar_data *xa_create_progress_bar(gboolean flag,XArchive *archive) gtk_widget_set_size_request(pb->progress_window,400,-1); gtk_window_set_resizable(GTK_WINDOW (pb->progress_window),FALSE); gtk_container_set_border_width (GTK_CONTAINER (pb->progress_window),6); - gtk_window_set_transient_for (GTK_WINDOW (pb->progress_window),GTK_WINDOW (xa_main_window)); + gtk_window_set_transient_for (GTK_WINDOW (pb->progress_window),GTK_WINDOW (xa_main_window)); pixbuf = gtk_icon_theme_load_icon(icon_theme,"xarchiver",24,0,NULL); gtk_window_set_icon (GTK_WINDOW (pb->progress_window),pixbuf); @@ -1567,15 +1567,15 @@ Progress_bar_data *xa_create_progress_bar(gboolean flag,XArchive *archive) if (flag == TRUE) { gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(pb->progressbar1),0.033); - + italic_attr = pango_attr_list_new (); pango_attr_list_insert (italic_attr, pango_attr_style_new (PANGO_STYLE_ITALIC)); gtk_label_set_attributes (GTK_LABEL (pb->file_label),italic_attr); pango_attr_list_unref (italic_attr); gtk_label_set_ellipsize(GTK_LABEL(pb->file_label),PANGO_ELLIPSIZE_END); - + action_area = gtk_hbutton_box_new (); - gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area),GTK_BUTTONBOX_END); + gtk_button_box_set_layout (GTK_BUTTON_BOX (action_area),GTK_BUTTONBOX_END); gtk_box_pack_end (GTK_BOX (vbox2),action_area,FALSE, TRUE, 0); cancel_button = gtk_button_new_from_stock ("gtk-cancel"); @@ -1598,7 +1598,7 @@ void xa_increase_progress_bar(Progress_bar_data *pb,gchar *filename,double perce message = g_strdup_printf("%.0f%%",(percent*100)); gtk_progress_bar_set_text (GTK_PROGRESS_BAR(pb->progressbar1),message); g_free(message); - + basename = g_path_get_basename(filename); markup = g_markup_printf_escaped("%s", basename); g_free(basename); diff --git a/src/lha.c b/src/lha.c index 362b67a1..7c3e4f0a 100644 --- a/src/lha.c +++ b/src/lha.c @@ -47,7 +47,7 @@ void xa_open_lha (XArchive *archive) archive->column_types = g_malloc0(sizeof(types)); for (i = 0; i < 8; i++) archive->column_types[i] = types[i]; - + char *names[]= {(_("Points to")),(_("Permissions")),(_("UID/GID")),(_("Size")),(_("Ratio")),(_("Timestamp"))}; xa_create_liststore (archive,names); } @@ -117,8 +117,8 @@ void xa_get_lha_line_content (gchar *line, gpointer data) filename = line + 51; /* Symbolic link */ - gchar *temp = g_strrstr (filename,"->"); - if (temp) + gchar *temp = g_strrstr (filename,"->"); + if (temp) { gint len = strlen(filename) - strlen(temp); item[0] = (filename +=3) + len; diff --git a/src/main.c b/src/main.c index 67bb1492..acb16ba6 100644 --- a/src/main.c +++ b/src/main.c @@ -188,7 +188,7 @@ int main (int argc, char **argv) for (x = 1; x< argc; x++) if (! g_file_test(argv[x], G_FILE_TEST_IS_DIR)) xa_add_files_liststore(argv[x],multi_extract); - + xa_parse_multi_extract_archive(multi_extract); gtk_widget_destroy (multi_extract->multi_extract); g_free(multi_extract); @@ -328,7 +328,7 @@ void xa_set_available_archivers() open_archive[XARCHIVETYPE_ZIP] = &xa_open_zip; open_archive[XARCHIVETYPE_LHA] = &xa_open_lha; open_archive[XARCHIVETYPE_LZOP] = &xa_open_bzip2_lzma; - + delete[0] = 0; delete[XARCHIVETYPE_7ZIP] = &xa_7zip_delete; delete[XARCHIVETYPE_ARJ] = &xa_arj_delete; @@ -339,8 +339,8 @@ void xa_set_available_archivers() delete[XARCHIVETYPE_TAR] = delete[XARCHIVETYPE_TAR_BZ2] = delete[XARCHIVETYPE_TAR_GZ] = delete[XARCHIVETYPE_TAR_LZMA] = delete[XARCHIVETYPE_TAR_XZ] = delete[XARCHIVETYPE_TAR_LZOP] = &xa_tar_delete; delete[XARCHIVETYPE_ZIP] = &xa_zip_delete; delete[XARCHIVETYPE_LHA] = &xa_lha_delete; - - + + add[0] = 0; add[XARCHIVETYPE_7ZIP] = &xa_7zip_add; add[XARCHIVETYPE_ARJ] = &xa_arj_add; @@ -351,7 +351,7 @@ void xa_set_available_archivers() add[XARCHIVETYPE_TAR] = add[XARCHIVETYPE_TAR_BZ2] = add[XARCHIVETYPE_TAR_GZ] = add[XARCHIVETYPE_TAR_LZMA] = add[XARCHIVETYPE_TAR_XZ] = add[XARCHIVETYPE_TAR_LZOP] = &xa_tar_add; add[XARCHIVETYPE_ZIP] = &xa_zip_add; add[XARCHIVETYPE_LHA] = &xa_lha_add; - + extract[0] = 0; extract[XARCHIVETYPE_7ZIP] = &xa_7zip_extract; extract[XARCHIVETYPE_ARJ] = &xa_arj_extract; @@ -362,7 +362,7 @@ void xa_set_available_archivers() extract[XARCHIVETYPE_TAR] = extract[XARCHIVETYPE_TAR_BZ2] = extract[XARCHIVETYPE_TAR_GZ] = extract[XARCHIVETYPE_TAR_LZMA] = extract[XARCHIVETYPE_TAR_XZ] = extract[XARCHIVETYPE_TAR_LZOP] = &xa_tar_extract; extract[XARCHIVETYPE_ZIP] = &xa_zip_extract; extract[XARCHIVETYPE_LHA] = &xa_lha_extract; - + test[0] = 0; test[XARCHIVETYPE_7ZIP] = &xa_7zip_test; test[XARCHIVETYPE_ARJ] = &xa_arj_test; @@ -448,7 +448,7 @@ void xa_set_available_archivers() if (rar_version == 5) { ArchiveType = g_list_append(ArchiveType, "rar5"); - ArchiveSuffix = g_list_append(ArchiveSuffix, "*.rar5"); + ArchiveSuffix = g_list_append(ArchiveSuffix, "*.rar5"); } g_free (absolute_path); } @@ -465,7 +465,7 @@ void xa_set_available_archivers() if (rar_version == 5) { ArchiveType = g_list_append(ArchiveType, "rar5"); - ArchiveSuffix = g_list_append(ArchiveSuffix, "*.rar5"); + ArchiveSuffix = g_list_append(ArchiveSuffix, "*.rar5"); } g_free (absolute_path); } @@ -479,7 +479,7 @@ void xa_set_available_archivers() } absolute_path = g_find_program_in_path("gtar"); - + if (absolute_path == NULL) { tar = "tar"; @@ -584,4 +584,3 @@ XArchive *xa_init_structure_from_cmd_line (char *filename) archive->extract = extract[archive->type]; return (archive); } - diff --git a/src/main.h b/src/main.h index bb5641fa..26fad56b 100644 --- a/src/main.h +++ b/src/main.h @@ -35,4 +35,3 @@ int rar_version; XArchive *xa_init_structure_from_cmd_line (char *filename); #endif /* MAIN_H */ - diff --git a/src/mime.c b/src/mime.c index c884499a..f382aa16 100644 --- a/src/mime.c +++ b/src/mime.c @@ -67,7 +67,7 @@ const char *xa_get_stock_mime_icon(char *filename) else if (strncmp(mime,"application/x-font",18) == 0) return "font-x-generic"; - return icon_name; + return icon_name; } GdkPixbuf *xa_get_pixbuf_icon_from_cache(gchar *filename,gint size) diff --git a/src/new_dialog.c b/src/new_dialog.c index 81b097ab..803b13d6 100644 --- a/src/new_dialog.c +++ b/src/new_dialog.c @@ -45,8 +45,8 @@ XArchive *xa_new_archive_dialog (gchar *path, XArchive *archive_open[], gboolean gchar *basepath = NULL; gchar *current_dir = NULL; gint current_page, response, type = 0; - gchar *format; - + gchar *format; + unsigned short int x; xa_file_chooser = gtk_file_chooser_dialog_new ( _("Create a new archive"), @@ -292,7 +292,7 @@ XArchive *xa_new_archive_dialog (gchar *path, XArchive *archive_open[], gboolean archive->type = type; archive->format = format; archive->can_add = archive->has_properties = TRUE; - + gtk_widget_destroy (xa_file_chooser); archive->path = g_strdup (my_path); archive->escaped_path = xa_escape_bad_chars (archive->path , "$\'`\"\\!?* ()&|@#:;"); diff --git a/src/new_dialog.h b/src/new_dialog.h index 9091e4a1..5b1b9443 100644 --- a/src/new_dialog.h +++ b/src/new_dialog.h @@ -22,4 +22,3 @@ #include "archive.h" XArchive *xa_new_archive_dialog (gchar *path, XArchive *archive_open[], gboolean flag); #endif - diff --git a/src/open-with-dlg.c b/src/open-with-dlg.c index b422df75..c70fbc89 100644 --- a/src/open-with-dlg.c +++ b/src/open-with-dlg.c @@ -29,7 +29,7 @@ static void xa_open_with_dialog_row_selected(GtkTreeView *,GtkTreePath *,GtkTree static void xa_destroy_open_with_dialog(GtkWidget *,Open_with_data *); static void xa_open_with_dialog_execute_command(GtkWidget *,Open_with_data *); static void xa_open_with_dialog_custom_entry_activated(GtkEditable *,Open_with_data *); - + void xa_create_open_with_dialog(gchar *filename,gchar *filenames,int nr) { Open_with_data *data = NULL; @@ -41,7 +41,7 @@ void xa_create_open_with_dialog(gchar *filename,gchar *filenames,int nr) GdkPixbuf *pixbuf; gchar *text = NULL; gchar *title; - const gchar *icon_name = NULL; + const gchar *icon_name = NULL; const gchar* const *desktop_dirs; gint x = 0; @@ -77,7 +77,7 @@ void xa_create_open_with_dialog(gchar *filename,gchar *filenames,int nr) g_object_unref(pixbuf); gtk_box_pack_start (GTK_BOX (hbox1),mime_icon,FALSE,TRUE,0); gtk_misc_set_alignment (GTK_MISC (mime_icon),0,0); - + open_text = gtk_label_new(""); gtk_box_pack_start (GTK_BOX (hbox1),open_text,FALSE,FALSE,10); text = g_strdup_printf(_("Open %s with:"),filename); @@ -164,7 +164,7 @@ static void xa_destroy_open_with_dialog(GtkWidget *widget,Open_with_data *data) { g_free(data); } - + static void xa_read_desktop_directories(GtkListStore *liststore,const gchar *dirname) { DIR *dir; @@ -335,7 +335,7 @@ static void xa_open_with_dialog_row_selected(GtkTreeView *tree_view,GtkTreePath static void xa_open_with_dialog_execute_command(GtkWidget *widget, Open_with_data *data) { - const char *application; + const char *application; application = gtk_entry_get_text(GTK_ENTRY(data->custom_command_entry)); xa_launch_external_program((gchar*)application,data->file_list); diff --git a/src/pref_dialog.c b/src/pref_dialog.c index 74fdb598..a388bfa2 100644 --- a/src/pref_dialog.c +++ b/src/pref_dialog.c @@ -74,14 +74,14 @@ Prefs_dialog_data *xa_create_prefs_dialog() g_object_unref (icon_pixbuf); prefs_iconview = gtk_icon_view_new_with_model(GTK_TREE_MODEL(prefs_data->prefs_liststore)); - g_object_unref (prefs_data->prefs_liststore); + g_object_unref (prefs_data->prefs_liststore); gtk_icon_view_set_orientation (GTK_ICON_VIEW (prefs_iconview), GTK_ORIENTATION_VERTICAL); gtk_icon_view_set_columns (GTK_ICON_VIEW (prefs_iconview),1); gtk_icon_view_set_pixbuf_column (GTK_ICON_VIEW (prefs_iconview), 0); gtk_icon_view_set_text_column(GTK_ICON_VIEW (prefs_iconview),1); gtk_container_add (GTK_CONTAINER (scrolledwindow1), prefs_iconview); - + prefs_data->prefs_notebook = gtk_notebook_new (); g_object_set (G_OBJECT (prefs_data->prefs_notebook),"show-border", FALSE,"show-tabs", FALSE,"enable-popup",FALSE,NULL); gtk_box_pack_start (GTK_BOX (hbox1), prefs_data->prefs_notebook,TRUE,TRUE,0); @@ -116,7 +116,7 @@ Prefs_dialog_data *xa_create_prefs_dialog() prefs_data->confirm_deletion = gtk_check_button_new_with_mnemonic (_("Confirm deletion of files")); gtk_box_pack_start (GTK_BOX (vbox4), prefs_data->confirm_deletion, FALSE, FALSE, 0); gtk_button_set_focus_on_click (GTK_BUTTON (prefs_data->confirm_deletion), FALSE); - + prefs_data->check_sort_filename_column = gtk_check_button_new_with_mnemonic(_("Sort archive by filename")); gtk_box_pack_start (GTK_BOX (vbox4), prefs_data->check_sort_filename_column, FALSE, FALSE, 0); gtk_button_set_focus_on_click (GTK_BUTTON (prefs_data->check_sort_filename_column), FALSE); @@ -147,7 +147,7 @@ Prefs_dialog_data *xa_create_prefs_dialog() gtk_table_attach (GTK_TABLE (table1), prefs_data->combo_icon_size, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_SHRINK), 0, 0); - + prefs_data->check_show_comment = gtk_check_button_new_with_mnemonic (_("Show archive comment")); gtk_tooltips_set_tip(tooltips, prefs_data->check_show_comment, _("If checked the archive comment is shown after the archive is loaded"), NULL); gtk_table_attach (GTK_TABLE (table1), prefs_data->check_show_comment, 0, 2, 1, 2, @@ -208,7 +208,7 @@ Prefs_dialog_data *xa_create_prefs_dialog() gtk_table_attach (GTK_TABLE (table2), prefs_data->combo_prefered_editor, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_SHRINK), 0, 0); - + label8 = gtk_label_new (_("Open image files with:")); gtk_table_attach (GTK_TABLE (table2), label8, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), @@ -252,7 +252,7 @@ Prefs_dialog_data *xa_create_prefs_dialog() gtk_table_attach (GTK_TABLE (table2), prefs_data->check_save_geometry, 0, 2, 5, 6, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); - + prefs_data->allow_sub_dir = gtk_check_button_new_with_mnemonic (_("Allow subdirs with drag and drop")); gtk_table_attach (GTK_TABLE (table2), prefs_data->allow_sub_dir, 0, 2, 6, 7, (GtkAttachOptions) (GTK_FILL), @@ -305,7 +305,7 @@ void xa_prefs_dialog_set_default_options(Prefs_dialog_data *prefs_data) gtk_combo_box_set_active (GTK_COMBO_BOX(prefs_data->combo_prefered_format),0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->confirm_deletion),TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->store_output),FALSE); - + gtk_combo_box_set_active (GTK_COMBO_BOX(prefs_data->combo_icon_size),0); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->show_location_bar),TRUE); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->show_sidebar),TRUE); @@ -332,7 +332,7 @@ void xa_prefs_save_options(Prefs_dialog_data *prefs_data, const char *filename) gchar *value= NULL; gsize len; GKeyFile *xa_key_file = g_key_file_new(); - + g_key_file_set_integer (xa_key_file,PACKAGE,"preferred_format",gtk_combo_box_get_active (GTK_COMBO_BOX(prefs_data->combo_prefered_format))); g_key_file_set_boolean (xa_key_file,PACKAGE,"confirm_deletion",gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (prefs_data->confirm_deletion))); g_key_file_set_boolean (xa_key_file,PACKAGE,"sort_filename_content",gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (prefs_data->check_sort_filename_column))); @@ -342,7 +342,7 @@ void xa_prefs_save_options(Prefs_dialog_data *prefs_data, const char *filename) g_key_file_set_boolean (xa_key_file,PACKAGE,"show_archive_comment",gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (prefs_data->check_show_comment))); g_key_file_set_boolean (xa_key_file,PACKAGE,"show_sidebar",gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (prefs_data->show_sidebar))); g_key_file_set_boolean (xa_key_file,PACKAGE,"show_location_bar",gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (prefs_data->show_location_bar))); - + if (!xdg_open) { value = gtk_combo_box_get_active_text (GTK_COMBO_BOX(prefs_data->combo_prefered_web_browser)); @@ -426,7 +426,7 @@ void xa_prefs_load_options(Prefs_dialog_data *prefs_data) config_dir = g_strconcat (g_get_home_dir(),"/.config",NULL); if (g_file_test(config_dir, G_FILE_TEST_EXISTS) == FALSE) g_mkdir_with_parents(config_dir,0600); - + xarchiver_config_dir = g_strconcat(config_dir, "/", PACKAGE, NULL); g_free (config_dir); if (g_file_test(xarchiver_config_dir, G_FILE_TEST_EXISTS) == FALSE) @@ -434,7 +434,7 @@ void xa_prefs_load_options(Prefs_dialog_data *prefs_data) config_file = g_strconcat(xarchiver_config_dir, "/", PACKAGE, "rc", NULL); g_free (xarchiver_config_dir); - + if ( ! g_key_file_load_from_file(xa_key_file,config_file,G_KEY_FILE_KEEP_COMMENTS,NULL) ) { /* Write the config file with the default options */ @@ -504,8 +504,8 @@ void xa_prefs_load_options(Prefs_dialog_data *prefs_data) error = NULL; } else - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->check_save_geometry),TRUE); + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->check_save_geometry),TRUE); prefs_data->geometry[0] = coords[0]; prefs_data->geometry[1] = coords[1]; prefs_data->geometry[2] = coords[2]; @@ -520,8 +520,8 @@ void xa_prefs_load_options(Prefs_dialog_data *prefs_data) error = NULL; } else - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->check_save_geometry),TRUE); + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->check_save_geometry),TRUE); prefs_data->extract_dialog[0] = extract_coords[0]; prefs_data->extract_dialog[1] = extract_coords[1]; } @@ -533,8 +533,8 @@ void xa_prefs_load_options(Prefs_dialog_data *prefs_data) error = NULL; } else - { - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->check_save_geometry),TRUE); + { + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (prefs_data->check_save_geometry),TRUE); prefs_data->add_coords[0] = add_coords[0]; prefs_data->add_coords[1] = add_coords[1]; } @@ -590,7 +590,7 @@ gchar *xa_prefs_choose_program(gboolean flag) filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (dialog)); gtk_widget_destroy (dialog); - + return filename; } @@ -602,7 +602,7 @@ void xa_apply_prefs_option(Prefs_dialog_data *prefs_data) gtk_widget_show_all (toolbar2); else gtk_widget_hide (toolbar2); - + if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(prefs_data->show_sidebar))) gtk_widget_show(scrolledwindow2); else @@ -620,5 +620,5 @@ void xa_apply_prefs_option(Prefs_dialog_data *prefs_data) g_object_set(G_OBJECT(archive[idx]->renderer), "stock-size", (3 - gtk_combo_box_get_active(GTK_COMBO_BOX(prefs_data->combo_icon_size))), NULL); gtk_widget_queue_draw(GTK_WIDGET(archive[idx]->treeview)); } - + } diff --git a/src/pref_dialog.h b/src/pref_dialog.h index 49dd083d..0578f76b 100644 --- a/src/pref_dialog.h +++ b/src/pref_dialog.h @@ -44,4 +44,3 @@ void xa_prefs_combo_changed (GtkComboBox *,gpointer ); void xa_apply_prefs_option(Prefs_dialog_data *); gchar *xa_prefs_choose_program(gboolean ); #endif - diff --git a/src/rar.c b/src/rar.c index e06551a1..6b02c06d 100644 --- a/src/rar.c +++ b/src/rar.c @@ -52,13 +52,13 @@ void xa_open_rar (XArchive *archive) archive->has_sfx = archive->has_properties = archive->can_extract = archive->has_test = TRUE; archive->dummy_size = 0; archive->nr_of_files = 0; - + if (archive->type == XARCHIVETYPE_RAR5) archive->format = "RAR5"; else archive->format = "RAR"; - + if (rar_version == 5) { archive->nc = 8; @@ -70,7 +70,7 @@ void xa_open_rar (XArchive *archive) archive->column_types = g_malloc0(sizeof(types5)); for (i = 0; i < archive->nc+2; i++) archive->column_types[i] = types5[i]; - + xa_create_liststore (archive, names5); } else @@ -84,7 +84,7 @@ void xa_open_rar (XArchive *archive) archive->column_types = g_malloc0(sizeof(types4)); for (i = 0; i < archive->nc+2; i++) archive->column_types[i] = types4[i]; - + xa_create_liststore (archive, names4); } } @@ -174,7 +174,7 @@ void xa_get_rar_line_content (gchar *line, gpointer data) archive->dummy_size += g_ascii_strtoull(item[i],NULL,0); i++; n++; - + /* Compressed */ for(; n < linesize && line[n] == ' '; n++); a = n; @@ -280,7 +280,7 @@ void xa_rar_delete (XArchive *archive,GSList *names) } g_slist_foreach(names,(GFunc)g_free,NULL); g_slist_free(names); - + command = g_strconcat ("rar d ",archive->escaped_path," ",files->str,NULL); g_string_free(files,TRUE); list = g_slist_append(list,command); @@ -312,7 +312,7 @@ gboolean xa_rar_extract(XArchive *archive,GSList *files) } g_slist_foreach(_files,(GFunc)g_free,NULL); g_slist_free(_files); - + if (archive->passwd != NULL) command = g_strconcat (rar," ",archive->full_path ? "x " : "e ", archive->freshen ? "-f " : "" , archive->update ? "-u " : "", @@ -441,7 +441,7 @@ void xa_get_rar5_line_content (gchar *line, gpointer data) archive->dummy_size += g_ascii_strtoull(item[i],NULL,0); i++; n++; - + /* Compressed */ for(; n < linesize && line[n] == ' '; n++); a = n; @@ -477,7 +477,7 @@ void xa_get_rar5_line_content (gchar *line, gpointer data) item[i] = line + a; i+=2; n++; - + /* CRC */ for(; n < linesize && line[n] == ' '; n++); a = n; @@ -489,12 +489,12 @@ void xa_get_rar5_line_content (gchar *line, gpointer data) line[linesize - 1] = '\0'; offset = (strlen(item[3]) == 10 ? 66 : 64); // date is YYYY-MM-DD since v5.30 filename = g_strdup(line+offset); // and was just DD-MM-YY before - + /* Strip trailing whitespace */ end = filename + strlen(filename) - 1; while(end >= filename && *end == ' ') end--; *(end + 1) = '\0'; - + /* Work around for rar which doesn't * output / with directories */ if (dir) @@ -515,11 +515,11 @@ void xa_rar_add (XArchive *archive,GString *files,gchar *compression_string) { GSList *list = NULL; gchar *command, *rar_version = NULL; - + if (archive->location_entry_path != NULL) archive->working_dir = g_strdup(archive->tmp); - + if (archive->type == XARCHIVETYPE_RAR5) rar_version = "5"; else @@ -527,7 +527,7 @@ void xa_rar_add (XArchive *archive,GString *files,gchar *compression_string) if (compression_string == NULL) compression_string = "3"; - + if (archive->passwd != NULL) command = g_strconcat ( "rar a -ma", rar_version, " ", archive->update ? "-u " : "", @@ -563,13 +563,13 @@ int xa_rar_checkversion (gchar *absolute_path) gchar *output = NULL; rar_version = 4; // Default version - + //command = g_strconcat (absolute_path, "" , NULL); g_spawn_command_line_sync (absolute_path, &output, NULL, NULL, NULL); - + if (g_ascii_strncasecmp ("\nRAR 5", output, 6) == 0 || g_ascii_strncasecmp ("\nUNRAR 5", output, 8) == 0) rar_version = 5; - + g_free(output); //g_free(command); return rar_version; diff --git a/src/rpm.c b/src/rpm.c index f3482e15..327588e0 100644 --- a/src/rpm.c +++ b/src/rpm.c @@ -117,7 +117,7 @@ void xa_get_cpio_line_content (gchar *line, gpointer data) item[6] = line + a; n++; - /* Size */ + /* Size */ for(; n < linesize && line[n] == ' '; ++n); a = n; @@ -126,7 +126,7 @@ void xa_get_cpio_line_content (gchar *line, gpointer data) item[1] = line + a; archive->dummy_size += g_ascii_strtoull(item[1],NULL,0); n++; - + /* Date */ line[54] = '\0'; item[3] = line + n; @@ -136,8 +136,8 @@ void xa_get_cpio_line_content (gchar *line, gpointer data) filename = line + n; /* Symbolic link */ - gchar *temp = g_strrstr (filename,"->"); - if (temp) + gchar *temp = g_strrstr (filename,"->"); + if (temp) { a = 3; gint len = strlen(filename) - strlen(temp); @@ -154,13 +154,13 @@ void xa_get_cpio_line_content (gchar *line, gpointer data) * not output / with directories */ if(line[linesize-2] != '/') - filename = g_strconcat(line + n, "/", NULL); + filename = g_strconcat(line + n, "/", NULL); else - filename = g_strdup(line + n); + filename = g_strdup(line + n); } else - filename = g_strdup(line + n); - + filename = g_strdup(line + n); + entry = xa_set_archive_entries_for_each_row (archive,filename,item); g_free (filename); } @@ -182,7 +182,7 @@ gboolean xa_rpm_extract(XArchive *archive,GSList *files) } g_slist_foreach(files,(GFunc)g_free,NULL); g_slist_free(files); - + chdir (archive->extraction_path); command = g_strconcat ( "sh -c \"cpio -id" , names->str," < ",archive->tmp,"/file.cpio\"",NULL); diff --git a/src/string_utils.c b/src/string_utils.c index 3f52409a..52ab4d37 100644 --- a/src/string_utils.c +++ b/src/string_utils.c @@ -330,7 +330,7 @@ void xa_recurse_local_directory(gchar *path,GSList **list,gboolean recurse,gint *list = g_slist_prepend(*list,basename); return; } - } + } while ((dirlist = readdir(dir))) { diff --git a/src/string_utils.h b/src/string_utils.h index af2f692d..947608a9 100644 --- a/src/string_utils.h +++ b/src/string_utils.h @@ -52,4 +52,3 @@ GSList *xa_slist_copy(GSList *); void xa_recurse_local_directory(gchar *,GSList **,gboolean,gint); gchar *xa_strip_current_working_dir_from_path(gchar *,gchar *); #endif - diff --git a/src/support.c b/src/support.c index b43c330c..267386d3 100644 --- a/src/support.c +++ b/src/support.c @@ -44,4 +44,3 @@ GtkWidget *xa_main_window_find_image(gchar *filename, GtkIconSize size) return file_image; } - diff --git a/src/support.h b/src/support.h index bf849228..16bad7f6 100644 --- a/src/support.h +++ b/src/support.h @@ -52,4 +52,3 @@ GtkWidget *xa_main_window_find_image(gchar *filename, GtkIconSize size); #endif - diff --git a/src/tar.c b/src/tar.c index f8fbc642..a62c2c10 100644 --- a/src/tar.c +++ b/src/tar.c @@ -71,7 +71,7 @@ void xa_get_tar_line_content (gchar *line, gpointer data) /* Permissions */ line[10] = '\0'; item[1] = line; - + /* Owner */ for(n=13; n < linesize; ++n) if(line[n] == ' ') @@ -79,7 +79,7 @@ void xa_get_tar_line_content (gchar *line, gpointer data) line[n] = '\0'; item[2] = line+11; - /* Size */ + /* Size */ for(++n; n < linesize; ++n) if(line[n] >= '0' && line[n] <= '9') break; @@ -94,7 +94,7 @@ void xa_get_tar_line_content (gchar *line, gpointer data) archive->dummy_size += g_ascii_strtoull(item[3],NULL,0); a = ++n; - /* Date */ + /* Date */ for(; n < linesize; n++) if(line[n] == ' ') break; @@ -114,10 +114,10 @@ void xa_get_tar_line_content (gchar *line, gpointer data) line[linesize-1] = '\0'; filename = line + n; - + /* Symbolic link */ - gchar *temp = g_strrstr (filename,"->"); - if (temp) + gchar *temp = g_strrstr (filename,"->"); + if (temp) { gint len = strlen(filename) - strlen(temp); item[0] = (filename +=3) + len; @@ -131,9 +131,9 @@ void xa_get_tar_line_content (gchar *line, gpointer data) dir = TRUE; /* Work around for gtar, which does not output / with directories */ if(line[linesize-2] != '/') - filename = g_strconcat(line + n, "/", NULL); + filename = g_strconcat(line + n, "/", NULL); else - filename = g_strdup(line + n); + filename = g_strdup(line + n); } else filename = g_strdup(line + n); @@ -233,7 +233,7 @@ void xa_tar_add (XArchive *archive,GString *files,gchar *compression_string) "-cvvzf ",archive->escaped_path, files->str , NULL ); break; - + case XARCHIVETYPE_TAR_LZMA: if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) ) xa_add_delete_bzip2_gzip_lzma_compressed_tar (files,archive,1); @@ -244,7 +244,7 @@ void xa_tar_add (XArchive *archive,GString *files,gchar *compression_string) "--use-compress-program=lzma -cvvf ",archive->escaped_path, files->str , NULL ); break; - + case XARCHIVETYPE_TAR_XZ: if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) ) xa_add_delete_bzip2_gzip_lzma_compressed_tar (files,archive,1); @@ -255,7 +255,7 @@ void xa_tar_add (XArchive *archive,GString *files,gchar *compression_string) "--use-compress-program=xz -cvvf ",archive->escaped_path, files->str , NULL ); break; - + case XARCHIVETYPE_TAR_LZOP: if ( g_file_test ( archive->escaped_path , G_FILE_TEST_EXISTS ) ) xa_add_delete_bzip2_gzip_lzma_compressed_tar (files,archive,1); @@ -282,13 +282,13 @@ void xa_tar_add (XArchive *archive,GString *files,gchar *compression_string) case XARCHIVETYPE_LZOP: command = g_strconcat("sh -c \"lzop -c ",files->str,"> ",archive->escaped_path,"\"",NULL); break; - + case XARCHIVETYPE_XZ: if (compression_string == NULL) compression_string = "5"; command = g_strconcat("sh -c \"xz"," -",compression_string," -c ",files->str,"> ",archive->escaped_path,"\"",NULL); break; - + default: command = NULL; } @@ -416,7 +416,7 @@ gboolean xa_tar_extract(XArchive *archive,GSList *files) command = NULL; } break; - + case XARCHIVETYPE_TAR_XZ: if (archive->full_path || multi_extract) { @@ -435,7 +435,7 @@ gboolean xa_tar_extract(XArchive *archive,GSList *files) command = NULL; } break; - + case XARCHIVETYPE_LZMA: case XARCHIVETYPE_LZOP: case XARCHIVETYPE_BZIP2: @@ -466,7 +466,7 @@ void xa_add_delete_bzip2_gzip_lzma_compressed_tar (GString *files,XArchive *arch gchar *command,*executable = NULL,*filename = NULL; gboolean result; GSList *list = NULL; - + switch (archive->type) { case XARCHIVETYPE_TAR_BZ2: @@ -489,7 +489,7 @@ void xa_add_delete_bzip2_gzip_lzma_compressed_tar (GString *files,XArchive *arch executable = "lzop -f "; filename = "dummy.lzo"; break; - + default: break; } @@ -559,7 +559,7 @@ gboolean xa_extract_tar_without_directories (gchar *string,XArchive *archive,gch g_slist_free(files); files_to_extract = names->str; } - + command = g_strconcat (string, archive->escaped_path, #ifdef __FreeBSD__ archive->overwrite ? " " : " -k", @@ -624,7 +624,7 @@ void xa_tar_test(XArchive *archive) case XARCHIVETYPE_TAR_LZOP: command = g_strconcat (tar, " --use-compress-program=lzop -tvf ",archive->path, NULL); break; - + case XARCHIVETYPE_TAR_XZ: command = g_strconcat (tar, " --use-compress-program=xz -tvf ",archive->path, NULL); break; diff --git a/src/tar.h b/src/tar.h index a17da107..2442cdc1 100644 --- a/src/tar.h +++ b/src/tar.h @@ -38,4 +38,3 @@ gboolean is_tar_compressed (gint ); void xa_add_delete_bzip2_gzip_lzma_compressed_tar (GString *,XArchive *,gboolean ); gboolean xa_extract_tar_without_directories ( gchar *, XArchive *,gchar *); #endif - diff --git a/src/utf8-fnmatch.c b/src/utf8-fnmatch.c index 67eb9677..c42813f6 100644 --- a/src/utf8-fnmatch.c +++ b/src/utf8-fnmatch.c @@ -140,7 +140,7 @@ g_utf8_rangematch (const char *pattern, if (c2 == EOS) return (RANGE_ERROR); - if (flags & FNM_CASEFOLD) + if (flags & FNM_CASEFOLD) c2 = g_unichar_tolower (c2); if (c <= test && test <= c2) @@ -153,7 +153,7 @@ g_utf8_rangematch (const char *pattern, pattern = g_utf8_next_char (pattern); } while (c != ']'); - + *new_pattern = (char *) pattern; return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH); @@ -161,8 +161,8 @@ g_utf8_rangematch (const char *pattern, int -g_utf8_fnmatch (const char *pattern, - const char *string, +g_utf8_fnmatch (const char *pattern, + const char *string, int flags) { const char *stringstart; @@ -178,7 +178,7 @@ g_utf8_fnmatch (const char *pattern, switch (c) { case EOS: - if ((flags & FNM_LEADING_DIR) && g_utf8_get_char (string) == '/') + if ((flags & FNM_LEADING_DIR) && g_utf8_get_char (string) == '/') return 0; return (g_utf8_get_char (string) == EOS ? 0 : FNM_NOMATCH); @@ -190,8 +190,8 @@ g_utf8_fnmatch (const char *pattern, return FNM_NOMATCH; string_1 = g_utf8_prev_char (string); - if ((g_utf8_get_char (string) == '.') - && (flags & FNM_PERIOD) + if ((g_utf8_get_char (string) == '.') + && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && g_utf8_get_char (string_1) == '/'))) return FNM_NOMATCH; @@ -207,8 +207,8 @@ g_utf8_fnmatch (const char *pattern, } string_1 = g_utf8_prev_char (string); - if ((g_utf8_get_char (string) == '.') - && (flags & FNM_PERIOD) + if ((g_utf8_get_char (string) == '.') + && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && g_utf8_get_char (string_1) == '/'))) return FNM_NOMATCH; @@ -216,7 +216,7 @@ g_utf8_fnmatch (const char *pattern, /* Optimize for pattern with * at end or before /. */ if (c == EOS) { if (flags & FNM_PATHNAME) - return ((flags & FNM_LEADING_DIR) + return ((flags & FNM_LEADING_DIR) || (g_utf8_strchr (string, -1, '/') == NULL) ? 0 : FNM_NOMATCH); else return 0; @@ -245,8 +245,8 @@ g_utf8_fnmatch (const char *pattern, return FNM_NOMATCH; string_1 = g_utf8_prev_char (string); - if ((g_utf8_get_char (string) == '.') - && (flags & FNM_PERIOD) + if ((g_utf8_get_char (string) == '.') + && (flags & FNM_PERIOD) && (string == stringstart || ((flags & FNM_PATHNAME) && g_utf8_get_char (string_1) == '/'))) return FNM_NOMATCH; @@ -306,11 +306,11 @@ verbose (const gchar *format, ...) { gchar *msg; va_list args; - + va_start (args, format); msg = g_strdup_vprintf (format, args); va_end (args); - + if (noisy) g_print (msg); g_free (msg); @@ -323,15 +323,15 @@ test_match (gchar *pattern, gboolean match) { verbose ("matching \"%s\" against \"%s\" \t", string, pattern); - + if ((g_utf8_fnmatch (pattern, string, FNM_CASEFOLD) == 0) != match) { g_print ("failed \t(unexpected %s)\n", (match ? "mismatch" : "match")); return FALSE; } - + verbose ("passed (%s)\n", match ? "match" : "nomatch"); - + return TRUE; } @@ -350,11 +350,11 @@ int main (int argc, gchar **argv) { gint passed = 0; gint failed = 0; gint i; - + for (i = 1; i < argc; i++) if (strcmp ("--noisy", argv[i]) == 0) noisy = TRUE; - + TEST_MATCH("*x", "x", TRUE); TEST_MATCH("*x", "xx", TRUE); TEST_MATCH("*x", "yyyx", TRUE); @@ -389,9 +389,8 @@ int main (int argc, gchar **argv) { TEST_MATCH("A*.o", "B.o", FALSE); verbose ("\n%u tests passed, %u failed\n", passed, failed); - + return failed; } #endif - diff --git a/src/window.c b/src/window.c index abf4d68c..eb258777 100644 --- a/src/window.c +++ b/src/window.c @@ -52,13 +52,13 @@ void xa_watch_child (GPid pid,gint status,XArchive *archive) { if (xa_main_window == NULL) goto error; - if ((WEXITSTATUS (status) == 1 && archive->type == XARCHIVETYPE_ZIP) || + if ((WEXITSTATUS (status) == 1 && archive->type == XARCHIVETYPE_ZIP) || (WEXITSTATUS (status) == 6 && archive->type == XARCHIVETYPE_ARJ) || (WEXITSTATUS (status) == 1 && is_tar_compressed(archive->type))) goto there; if ( ! gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(prefs_window->store_output))) { - response = xa_show_message_dialog(GTK_WINDOW(xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("An error occurred!"),_("Please check the 'Store archiver output' option to see it.")); + response = xa_show_message_dialog(GTK_WINDOW(xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("An error occurred!"),_("Please check the 'Store archiver output' option to see it.")); return; } if (xa_main_window) @@ -134,7 +134,7 @@ void xa_show_cmd_line_output(GtkMenuItem *menuitem,XArchive *_archive) GtkTextBuffer *textbuffer; GtkTextIter iter; gint current_page,idx = -1; - + if (_archive == NULL) { current_page = gtk_notebook_get_current_page(notebook); @@ -173,7 +173,7 @@ void xa_show_cmd_line_output(GtkMenuItem *menuitem,XArchive *_archive) vbox = gtk_vbox_new (FALSE,6); gtk_container_set_border_width (GTK_CONTAINER (vbox),5); - + if (_archive->create_image) { _archive->create_image = FALSE; @@ -317,7 +317,7 @@ void xa_open_archive (GtkMenuItem *menuitem,gpointer data) response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,msg,_("Archive format is not recognized!")); else response = xa_show_message_dialog (GTK_WINDOW (xa_main_window),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,msg,g_strerror(errno)); - + g_free (utf8_path); g_free (msg); g_free (path); @@ -329,7 +329,7 @@ void xa_open_archive (GtkMenuItem *menuitem,gpointer data) if (type == XARCHIVETYPE_RAR) ext = "rar"; else if (type == XARCHIVETYPE_RAR5) - ext = "rar5"; + ext = "rar5"; else if (type == XARCHIVETYPE_7ZIP) ext = "7z"; else if (type == XARCHIVETYPE_ARJ) @@ -460,7 +460,7 @@ void xa_list_archive (GtkMenuItem *menuitem,gpointer data) g_free (current_open_directory); current_open_directory = gtk_file_chooser_get_current_folder(GTK_FILE_CHOOSER(save)); - + if (response == GTK_RESPONSE_ACCEPT) filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER(save)); gtk_widget_destroy (save); @@ -471,7 +471,7 @@ void xa_list_archive (GtkMenuItem *menuitem,gpointer data) g_free(filename); if (bp) { - g_fprintf(stream, "%s\n", archive[idx]->escaped_path); + g_fprintf(stream, "%s\n", archive[idx]->escaped_path); g_fprintf (stream,"\n"); g_fprintf (stream,"\n"); g_fprintf (stream,""); @@ -534,7 +534,7 @@ void xa_list_archive (GtkMenuItem *menuitem,gpointer data) g_fprintf(stream,_("Files:")); g_fprintf(stream,_("Compressed:")); g_fprintf(stream,""); - + } xa_print_entry_in_file(archive[idx]->root_entry,idx,0,stream,bp); if (bp) @@ -639,7 +639,7 @@ void xa_quit_application (GtkWidget *widget, GdkEvent *event, gpointer data) idx = xa_find_archive_index (i); if (idx > -1 && archive[idx]->child_pid) return; - + g_list_free ( Suffix); g_list_free ( Name); @@ -659,10 +659,10 @@ void xa_quit_application (GtkWidget *widget, GdkEvent *event, gpointer data) xa_prefs_save_options (prefs_window,config_file); gtk_widget_destroy(prefs_window->dialog1); g_free(prefs_window); - + gtk_widget_destroy (extract_window->dialog1); g_free(extract_window); - + gtk_widget_destroy (add_window->dialog1); g_free(add_window); @@ -707,7 +707,7 @@ void xa_delete_archive (GtkMenuItem *menuitem,gpointer user_data) if (archive[id]->type == XARCHIVETYPE_TAR || is_tar_compressed(archive[id]->type)) goto one_file; else - { + { list = g_slist_prepend (list,xa_build_full_path_name_from_entry(entry,archive[id])); xa_fill_list_with_recursed_entries(entry->child,&list); } @@ -1415,7 +1415,7 @@ void xa_archive_properties (GtkMenuItem *menuitem,gpointer user_data) t = g_strdup_printf ( "%d",archive[idx]->nr_of_files); gtk_label_set_text(GTK_LABEL(number_of_files_data),t); g_free (t); - + if (archive[idx]->has_passwd) gtk_label_set_text(GTK_LABEL(encrypted_data),_("Yes")); else @@ -1650,7 +1650,7 @@ void drag_begin (GtkWidget *treeview1,GdkDragContext *context,XArchive *archive) GtkTreeIter iter; GList *row_list; XEntry *entry; - + gtk_drag_source_set_icon_name (archive->treeview,"xarchiver"); selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (archive->treeview)); @@ -1854,7 +1854,7 @@ void xa_concat_selected_filenames (GtkTreeModel *model,GtkTreePath *treepath,Gtk current_page = gtk_notebook_get_current_page(notebook); idx = xa_find_archive_index (current_page); - + gtk_tree_model_get (model,iter,archive[idx]->nc+1,&entry,-1); if (entry->is_dir) xa_fill_list_with_recursed_entries(entry->child,data); @@ -2097,7 +2097,7 @@ void xa_comment_window_insert_in_archive(GtkButton *button,gpointer data) result = xa_create_temp_directory(archive[idx]); tmp = g_strconcat(archive[idx]->tmp,"/xa_tmp_file",NULL); gtk_widget_destroy(comment_dialog); - + if (archive[idx]->comment == NULL) { archive[idx]->comment = g_string_new(""); @@ -2116,16 +2116,16 @@ void xa_comment_window_insert_in_archive(GtkButton *button,gpointer data) case XARCHIVETYPE_ARJ: command = g_strconcat ("arj c ",archive[idx]->escaped_path," -z",tmp,NULL); break; - + case XARCHIVETYPE_RAR: case XARCHIVETYPE_RAR5: command = g_strconcat ("rar c ",archive[idx]->escaped_path," -z",tmp,NULL); break; - + case XARCHIVETYPE_ZIP: command = g_strconcat ("sh -c \"zip ",archive[idx]->escaped_path," -z <",tmp,"\"",NULL); break; - + default: command = NULL; break; @@ -2295,7 +2295,7 @@ int xa_mouse_button_event(GtkWidget *widget,GdkEventButton *event,XArchive *arch gtk_widget_set_sensitive(view,TRUE); } gtk_widget_set_sensitive(rrename,TRUE); - + } clipboard = gtk_clipboard_get(XA_CLIPBOARD); clipboard_selection = gtk_clipboard_wait_for_contents(clipboard,XA_INFO_LIST); @@ -2331,14 +2331,14 @@ XAClipboard *xa_clipboard_data_new() XAClipboard *data = NULL; data = g_new0(XAClipboard,1); - + return data; } void xa_clipboard_cut(GtkMenuItem* item,gpointer data) { gint idx,current_page; - + current_page = gtk_notebook_get_current_page (notebook); idx = xa_find_archive_index (current_page); @@ -2396,7 +2396,7 @@ void xa_clipboard_cut_copy_operation(XArchive *archive,XAClipboardMode mode) gboolean result = FALSE; gboolean overwrite; GtkTreeSelection *selection; - GtkTargetEntry targets[] = + GtkTargetEntry targets[] = { { "application/xarchiver-info-list",0,1 } }; @@ -2688,7 +2688,7 @@ void xa_open_with_from_popupmenu(GtkMenuItem *item,gpointer data) while (list_of_files); xa_create_open_with_dialog(entry->filename,names->str,nr); g_slist_foreach(list_of_files,(GFunc)g_free,NULL); - g_slist_free(list_of_files); + g_slist_free(list_of_files); } void xa_view_from_popupmenu(GtkMenuItem *item,gpointer data) diff --git a/src/window.h b/src/window.h index 4b7827d4..9955746a 100644 --- a/src/window.h +++ b/src/window.h @@ -136,4 +136,3 @@ gboolean treeview_select_search (GtkTreeModel *,gint ,const gchar *,GtkTreeIter XAClipboard *xa_clipboard_data_new(); XAClipboard *xa_get_paste_data_from_clipboard_selection(const char *); #endif - diff --git a/src/zip.c b/src/zip.c index 12af401a..21073d30 100644 --- a/src/zip.c +++ b/src/zip.c @@ -181,7 +181,7 @@ void xa_zip_delete (XArchive *archive,GSList *names) gchar *command = NULL; GSList *list = NULL; GString *files = g_string_new(""); - + xa_zip_prepend_backslash(names,files); command = g_strconcat ("zip -d ",archive->escaped_path," ",files->str,NULL); g_string_free(files,TRUE); @@ -268,12 +268,12 @@ void xa_zip_test (XArchive *archive) list = g_slist_append(list,command); xa_run_command (archive,list); } - + void xa_zip_prepend_backslash(GSList *names,GString *files) { gchar *e_filename,*e_filename2 = NULL; GSList *_names; - + _names = names; while (_names) { diff --git a/xarchiver.tap b/xarchiver.tap index f1f11356..db15d45c 100644 --- a/xarchiver.tap +++ b/xarchiver.tap @@ -45,4 +45,3 @@ extract-to) echo "Unsupported action '$action'" >&2 exit 1 esac -