[Xfce4-commits] r23270 - in xarchiver/trunk: doc src
Giuseppe Torelli
colossus at xfce.org
Tue Oct 3 12:45:48 UTC 2006
Author: colossus
Date: 2006-10-03 12:45:43 +0000 (Tue, 03 Oct 2006)
New Revision: 23270
Removed:
xarchiver/trunk/doc/Makefile
Modified:
xarchiver/trunk/src/add_dialog.c
xarchiver/trunk/src/callbacks.c
xarchiver/trunk/src/callbacks.h
xarchiver/trunk/src/extract_dialog.c
xarchiver/trunk/src/extract_dialog.h
xarchiver/trunk/src/main.c
xarchiver/trunk/src/support.c
Log:
Changed code in src/callbacks.c in Show_File_Dialog() and renamed it as xa_open_file_dialog().
Several code cleanups in src/callbacks.h.
Deleted: xarchiver/trunk/doc/Makefile
Modified: xarchiver/trunk/src/add_dialog.c
===================================================================
--- xarchiver/trunk/src/add_dialog.c 2006-10-03 10:53:47 UTC (rev 23269)
+++ xarchiver/trunk/src/add_dialog.c 2006-10-03 12:45:43 UTC (rev 23270)
@@ -366,6 +366,7 @@
void xa_select_files_to_add ( GtkButton* button, gpointer _add_dialog )
{
+ GtkWidget *File_Selector;
Add_dialog_data *add_dialog = _add_dialog;
GSList *dummy = NULL;
gchar *title = NULL;
@@ -476,6 +477,7 @@
gchar *compression_string = NULL;
gchar *first_item = NULL;
gboolean done = FALSE;
+ GString *names;
while ( ! done )
{
Modified: xarchiver/trunk/src/callbacks.c
===================================================================
--- xarchiver/trunk/src/callbacks.c 2006-10-03 10:53:47 UTC (rev 23269)
+++ xarchiver/trunk/src/callbacks.c 2006-10-03 12:45:43 UTC (rev 23270)
@@ -150,6 +150,10 @@
return;
}
}
+
+ if (archive->status == XA_ARCHIVESTATUS_SFX)
+ response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_INFO, GTK_BUTTONS_OK,_("Operation completed"),archive->tmp );
+
if (archive->status == XA_ARCHIVESTATUS_TEST)
ShowShellOutput (NULL);
@@ -205,10 +209,13 @@
}
}
- if ( archive->status != XA_ARCHIVESTATUS_EXTRACT && archive->type != XARCHIVETYPE_BZIP2 && archive->type != XARCHIVETYPE_GZIP)
+ if ( archive->status == XA_ARCHIVESTATUS_OPEN)
{
- gtk_tree_view_set_model (GTK_TREE_VIEW(treeview1), model);
- g_object_unref (model);
+ if ( archive->type != XARCHIVETYPE_BZIP2 && archive->type != XARCHIVETYPE_GZIP)
+ {
+ gtk_tree_view_set_model (GTK_TREE_VIEW(treeview1), model);
+ g_object_unref (model);
+ }
}
gtk_widget_grab_focus (treeview1);
xa_set_window_title (MainWindow , archive->path);
@@ -275,10 +282,12 @@
void xa_open_archive (GtkMenuItem *menuitem, gpointer data)
{
+ gchar *path = NULL;
+
path = (gchar *)data;
if ( path == NULL)
{
- path = Show_File_Dialog ( 1 , "open" );
+ path = xa_open_file_dialog ();
if (path == NULL)
return;
}
@@ -496,6 +505,7 @@
gchar *command = NULL;
gchar *tar;
gint x;
+ GString *names;
GtkTreeSelection *selection = gtk_tree_view_get_selection ( GTK_TREE_VIEW (treeview1) );
names = g_string_new ( " " );
@@ -607,6 +617,7 @@
gchar *command;
gboolean result;
+ //TODO: to remove this ?
if ( archive->has_passwd )
{
if ( archive->passwd == NULL)
@@ -618,8 +629,7 @@
}
Update_StatusBar ( _("Converting archive to self-extracting, please wait..."));
gtk_widget_set_sensitive (Stop_button,TRUE);
- gtk_widget_set_sensitive ( check_menu , FALSE );
- xa_set_button_state (0,0,0,0,0,0);
+ archive->status = XA_ARCHIVESTATUS_SFX;
switch ( archive->type )
{
case XARCHIVETYPE_RAR:
@@ -633,7 +643,13 @@
{
gchar *archive_name;
gchar *dummy;
- gchar *text;
+ FILE *sfx_archive;
+ FILE *archive_not_sfx;
+ gchar *content;
+ gsize length;
+ GError *error = NULL;
+ gchar *unzipsfx_path = NULL;
+ gchar buffer[1024];
dummy = g_strrstr (archive->escaped_path, ".");
if (dummy != NULL)
@@ -647,22 +663,54 @@
else
archive_name = g_strdup(archive->escaped_path);
- command = g_strconcat ("cat unzipsfx ",archive->escaped_path," > ",archive_name,NULL);
- result = xa_run_command (command , 0);
- g_free (command);
+ unzipsfx_path = g_find_program_in_path ( "unzipsfx" );
+ if ( unzipsfx_path != NULL )
+ {
+ /* Load the unzipsfx executable in memory, about 50 KB */
+ result = g_file_get_contents (unzipsfx_path,&content,&length,&error);
+ if ( ! result)
+ {
+ Update_StatusBar (_("Operation failed."));
+ gtk_widget_set_sensitive (Stop_button,FALSE);
+ response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't convert the archive to self-extracting:"),error->message);
+ g_error_free (error);
+ g_free (unzipsfx_path);
+ return;
+ }
+ g_free (unzipsfx_path);
- command = g_strconcat ("chmod 755 ",archive_name,NULL);
- result = xa_run_command (command , 0);
- g_free (command);
+ /* Write unzipsfx to a new file */
+ sfx_archive = g_fopen ( archive_name ,"w" );
+ if (sfx_archive == NULL)
+ {
+ Update_StatusBar (_("Operation failed."));
+ gtk_widget_set_sensitive (Stop_button,FALSE);
+ response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_ERROR,GTK_BUTTONS_OK,_("Can't write the unzipsfx module to the archive:"),g_strerror(errno) );
+ return;
+ }
+ archive_not_sfx = g_fopen ( archive->path ,"r" );
+ fwrite (content, 1, length, sfx_archive);
+ g_free (content);
- command = g_strconcat ("zip -A ",archive_name,NULL);
- result = xa_run_command (command , 1);
- g_free (command);
- g_free (archive_name);
+ /* Read archive data and write it after the unzipsfx in the new file */
+ while ( ! feof(archive_not_sfx) )
+ {
+ fread (&buffer, 1, 1024, archive_not_sfx);
+ fwrite (&buffer, 1, 1024, sfx_archive);
+ }
+ fclose (archive_not_sfx);
+ fclose (sfx_archive);
- text = g_strconcat (_("The self extracting archive is named: "),archive_name,NULL);
- response = ShowGtkMessageDialog (GTK_WINDOW (MainWindow),GTK_DIALOG_MODAL,GTK_MESSAGE_INFO, GTK_BUTTONS_OK,_("Operation completed"),text );
- g_free (text);
+ command = g_strconcat ("chmod 755 ", archive_name , NULL);
+ result = xa_run_command (command , 0);
+ g_free (command);
+
+ archive->tmp = g_strconcat (_("The self extracting archive is:\n"), archive_name , NULL);
+ command = g_strconcat ("zip -A ",archive_name,NULL);
+ result = xa_run_command (command , 1);
+ g_free (command);
+ }
+ g_free (archive_name);
}
break;
@@ -683,9 +731,6 @@
default:
command = NULL;
}
- archive->status = XA_ARCHIVESTATUS_SFX;
- xa_run_command ( command , 1);
- g_free (command);
}
void xa_about (GtkMenuItem *menuitem, gpointer user_data)
@@ -734,145 +779,73 @@
gtk_widget_destroy (about);
}
-GSList *Add_File_Dialog ( gchar *mode )
+gchar *xa_open_file_dialog ()
{
- GSList *list = NULL;
- gchar *title = NULL;
- int flag;
-
- if ( mode == "file" )
- {
- title = _("Select the files to be added to the current archive; use SHIFT to multiple select");
- flag = GTK_FILE_CHOOSER_ACTION_OPEN;
- }
- else
- {
- if (archive->type == XARCHIVETYPE_ARJ)
- title = _("Select the folder to be added to the current archive");
- else
- title = _("Select the folders to be added to the current archive; use SHIFT to multiple select");
- flag = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
- }
- File_Selector = gtk_file_chooser_dialog_new ( title,
- GTK_WINDOW (MainWindow),
- flag,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- GTK_STOCK_ADD,
- GTK_RESPONSE_ACCEPT,
- NULL);
- /* We set gtk_file_chooser_set_select_multiple to FALSE because a bug in ARJ prevents adding more of two directories */
- if (archive->type == XARCHIVETYPE_BZIP2 || archive->type == XARCHIVETYPE_GZIP || ( archive->type == XARCHIVETYPE_ARJ && mode == "folder" ) )
- gtk_file_chooser_set_select_multiple ( GTK_FILE_CHOOSER (File_Selector) , FALSE );
- else
- gtk_file_chooser_set_select_multiple ( GTK_FILE_CHOOSER (File_Selector) , TRUE );
-
- if (current_open_directory != NULL)
- gtk_file_chooser_set_current_folder ( GTK_FILE_CHOOSER (File_Selector) , current_open_directory );
- response = gtk_dialog_run (GTK_DIALOG (File_Selector) );
- if (response == GTK_RESPONSE_ACCEPT)
- list = gtk_file_chooser_get_filenames ( GTK_FILE_CHOOSER (File_Selector) );
- gtk_widget_destroy (File_Selector);
- return list;
-}
-
-gchar *Show_File_Dialog ( int dummy , gpointer mode )
-{
+ GtkWidget *File_Selector = NULL;
GtkFileFilter *filter;
gchar *path = NULL;
- gchar *title = NULL;
- const gchar *flag2 = NULL;
- unsigned short int flag = 0;
- if ( mode == "open" )
+ if (File_Selector == NULL)
{
- title = _("Open an archive");
- flag = GTK_FILE_CHOOSER_ACTION_OPEN;
- flag2 = "gtk-open";
- }
+ File_Selector = gtk_file_chooser_dialog_new ( _("Open an archive"),
+ GTK_WINDOW (MainWindow),
+ GTK_FILE_CHOOSER_ACTION_OPEN,
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL,
+ "gtk-open",
+ GTK_RESPONSE_ACCEPT,
+ NULL);
- else if (mode == "extract" )
- {
- title = _("Choose the destination folder where to extract the current archive");
- File_Selector = gtk_file_chooser_dialog_new ( title,
- GTK_WINDOW (MainWindow),
- GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN,
- GTK_RESPONSE_ACCEPT,
- NULL );
- if (destination_path != NULL)
- gtk_file_chooser_set_current_folder ( GTK_FILE_CHOOSER (File_Selector) , destination_path );
- response = gtk_dialog_run (GTK_DIALOG (File_Selector));
- if (response == GTK_RESPONSE_ACCEPT)
- gtk_entry_set_text (GTK_ENTRY(extract_window->destination_path_entry),gtk_file_chooser_get_filename ( GTK_FILE_CHOOSER (File_Selector) ) );
- gtk_widget_destroy (File_Selector);
- return NULL;
- }
+ gtk_dialog_set_default_response (GTK_DIALOG (File_Selector), GTK_RESPONSE_ACCEPT);
- File_Selector = gtk_file_chooser_dialog_new ( title,
- GTK_WINDOW (MainWindow),
- flag,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- flag2,
- GTK_RESPONSE_ACCEPT,
- NULL);
+ filter = gtk_file_filter_new ();
+ gtk_file_filter_set_name ( filter , _("All files") );
+ gtk_file_filter_add_pattern ( filter, "*" );
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (File_Selector), filter);
- gtk_dialog_set_default_response (GTK_DIALOG (File_Selector), GTK_RESPONSE_ACCEPT);
+ filter = gtk_file_filter_new ();
+ gtk_file_filter_set_name ( filter , _("Only archives") );
- filter = gtk_file_filter_new ();
- gtk_file_filter_set_name ( filter , _("All files") );
- gtk_file_filter_add_pattern ( filter, "*" );
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (File_Selector), filter);
+ Suffix = g_list_first ( ArchiveSuffix );
- filter = gtk_file_filter_new ();
- gtk_file_filter_set_name ( filter , _("Only archives") );
+ while ( Suffix != NULL )
+ {
+ gtk_file_filter_add_pattern (filter, Suffix->data);
+ Suffix = g_list_next ( Suffix );
+ }
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (File_Selector), filter);
- Suffix = g_list_first ( ArchiveSuffix );
-
- while ( Suffix != NULL )
- {
- gtk_file_filter_add_pattern (filter, Suffix->data);
- Suffix = g_list_next ( Suffix );
- }
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (File_Selector), filter);
-
- Suffix = g_list_first ( ArchiveSuffix );
- while ( Suffix != NULL )
- {
- if ( Suffix->data != "" ) /* To avoid double filtering when opening the archive */
+ Suffix = g_list_first ( ArchiveSuffix );
+ while ( Suffix != NULL )
{
- filter = gtk_file_filter_new ();
- gtk_file_filter_set_name (filter, Suffix->data );
- gtk_file_filter_add_pattern (filter, Suffix->data );
- gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (File_Selector), filter);
+ if ( Suffix->data != "" ) /* To avoid double filtering when opening the archive */
+ {
+ filter = gtk_file_filter_new ();
+ gtk_file_filter_set_name (filter, Suffix->data );
+ gtk_file_filter_add_pattern (filter, Suffix->data );
+ gtk_file_chooser_add_filter (GTK_FILE_CHOOSER (File_Selector), filter);
+ }
+ Suffix = g_list_next ( Suffix );
}
- Suffix = g_list_next ( Suffix );
+ gtk_window_set_modal (GTK_WINDOW (File_Selector),TRUE);
}
if (current_open_directory != NULL)
gtk_file_chooser_set_current_folder ( GTK_FILE_CHOOSER (File_Selector) , current_open_directory );
- /*if (open_file_filter != NULL)
- gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (File_Selector) , open_file_filter );*/
+ if (open_file_filter != NULL)
+ gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (File_Selector) , open_file_filter );
- gtk_window_set_modal (GTK_WINDOW (File_Selector),TRUE);
response = gtk_dialog_run (GTK_DIALOG (File_Selector));
current_open_directory = gtk_file_chooser_get_current_folder ( GTK_FILE_CHOOSER (File_Selector) );
open_file_filter = gtk_file_chooser_get_filter ( GTK_FILE_CHOOSER (File_Selector) );
if (response == GTK_RESPONSE_ACCEPT)
- {
path = gtk_file_chooser_get_filename ( GTK_FILE_CHOOSER (File_Selector) );
- gtk_widget_destroy (File_Selector);
- }
else if ( (response == GTK_RESPONSE_CANCEL) || (response == GTK_RESPONSE_DELETE_EVENT) )
- {
- gtk_widget_destroy (File_Selector);
path = NULL;
- }
+
+ gtk_widget_hide (File_Selector);
return path;
}
@@ -1082,6 +1055,8 @@
void xa_create_liststore ( unsigned short int nc, gchar *columns_names[] , GType columns_types[])
{
unsigned short int x;
+ GtkCellRenderer *renderer;
+ GtkTreeViewColumn *column;
liststore = gtk_list_store_newv ( nc , (GType *)columns_types);
gtk_tree_view_set_model ( GTK_TREE_VIEW (treeview1), GTK_TREE_MODEL (liststore) );
@@ -1192,6 +1167,7 @@
gboolean tofree = FALSE;
gboolean result = FALSE;
GList *row_list = NULL;
+ GString *names;
if ( archive->has_passwd )
{
@@ -1784,6 +1760,7 @@
gchar *command , *no_uri_path , *name;
gchar *to_send = "E";
GList *row_list, *_row_list;
+ GString *names;
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview1));
row_list = _row_list = gtk_tree_selection_get_selected_rows (selection, NULL);
@@ -1967,6 +1944,7 @@
void xa_append_rows ( XArchive *archive , unsigned short int nc )
{
+ GtkTreeIter iter;
unsigned short int i = 0;
if (archive->row == NULL)
Modified: xarchiver/trunk/src/callbacks.h
===================================================================
--- xarchiver/trunk/src/callbacks.h 2006-10-03 10:53:47 UTC (rev 23269)
+++ xarchiver/trunk/src/callbacks.h 2006-10-03 12:45:43 UTC (rev 23270)
@@ -26,6 +26,7 @@
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
+#include <glib/gstdio.h>
#include <errno.h>
#include <sys/wait.h>
#include <sys/types.h>
@@ -54,26 +55,14 @@
gboolean done,full_path,overwrite,add_recurse;
Extract_dialog_data *extract_window;
Add_dialog_data *add_window;
-GtkWidget *dialog , *textview, *scrollwin, *vbox, *OutputWindow , *File_Selector , *view_window, *archive_properties_win;
+GtkWidget *dialog , *textview, *scrollwin, *vbox, *OutputWindow , *view_window, *archive_properties_win;
GtkTextBuffer *textbuf , *viewtextbuf;
GtkTextIter enditer , start, end;
GtkTextIter viewenditer, viewstart, viewend;
GtkListStore *liststore;
-GtkTreeIter iter;
-GtkCellRenderer *renderer;
-GtkTreeViewColumn *column;
-gchar *path, *ComboArchiveType, *destination_path;
+gchar *ComboArchiveType, *destination_path;
GtkTreeModel *model;
-GString *names;
-GSList *Files_to_Add;
-struct File_Chooser_Data
-{
- GtkListStore *ls;
- GtkTreeView *tv;
- GtkFileChooser *fc;
-};
-
void xa_new_archive (GtkMenuItem *menuitem, gpointer user_data);
void xa_open_archive (GtkMenuItem *menuitem, gpointer user_data );
void xa_test_archive (GtkMenuItem *menuitem, gpointer user_data);
@@ -100,7 +89,6 @@
void drag_end (GtkWidget *treeview1, GdkDragContext *context, gpointer data);
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 *message1,const gchar *message2);
int DetectArchiveType ( gchar *filename );
@@ -123,7 +111,7 @@
void OffTooltipPadlock();
void Update_StatusBar (gchar *msg);
void xa_watch_child ( GPid pid, gint status, gpointer data);
-char *Show_File_Dialog (int dummy , gpointer title);
+gchar *xa_open_file_dialog ();
void xa_activate_link (GtkAboutDialog *about, const gchar *link, gpointer data);
gchar *name;
gchar *permissions;
Modified: xarchiver/trunk/src/extract_dialog.c
===================================================================
--- xarchiver/trunk/src/extract_dialog.c 2006-10-03 10:53:47 UTC (rev 23269)
+++ xarchiver/trunk/src/extract_dialog.c 2006-10-03 12:45:43 UTC (rev 23270)
@@ -99,7 +99,7 @@
gtk_container_add(GTK_CONTAINER(dialog_data->button1), dialog_data->image1);
gtk_tooltips_set_tip (dialog_data->option_tooltip,dialog_data->button1 , _("Choose a folder where to extract files"), NULL );
- g_signal_connect ( (gpointer) dialog_data->button1, "clicked", G_CALLBACK (Show_File_Dialog) , "extract" );
+ g_signal_connect ( (gpointer) dialog_data->button1, "clicked", G_CALLBACK (xa_choose_extraction_directory) , dialog_data );
dialog_data->hbox4 = gtk_hbox_new (TRUE, 7);
gtk_widget_show (dialog_data->hbox4);
@@ -293,6 +293,7 @@
gboolean done = FALSE;
gboolean end = FALSE;
GtkTreeIter iter;
+ GString *names;
if (unrar)
rar = "unrar";
@@ -576,6 +577,7 @@
{
gchar *command = NULL;
gchar *tar;
+ GtkTreeIter iter;
if (unrar)
rar = "unrar";
@@ -903,3 +905,27 @@
return TRUE;
}
+void xa_choose_extraction_directory (GtkWidget *widget, gpointer data)
+{
+ Extract_dialog_data *dialog_data = data;
+ GtkWidget *File_Selector;
+ int response;
+ gchar *path;
+
+ File_Selector = gtk_file_chooser_dialog_new ( _("Choose the destination folder where to extract the current archive"),
+ GTK_WINDOW (MainWindow),
+ GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
+ GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OPEN,
+ GTK_RESPONSE_ACCEPT,
+ NULL );
+ response = gtk_dialog_run (GTK_DIALOG (File_Selector));
+ if (response == GTK_RESPONSE_ACCEPT)
+ {
+ path = gtk_file_chooser_get_filename ( GTK_FILE_CHOOSER (File_Selector) );
+ gtk_entry_set_text (GTK_ENTRY(dialog_data->destination_path_entry),path);
+ g_free (path);
+ }
+ gtk_widget_destroy (File_Selector);
+}
Modified: xarchiver/trunk/src/extract_dialog.h
===================================================================
--- xarchiver/trunk/src/extract_dialog.h 2006-10-03 10:53:47 UTC (rev 23269)
+++ xarchiver/trunk/src/extract_dialog.h 2006-10-03 12:45:43 UTC (rev 23270)
@@ -71,5 +71,6 @@
gboolean xa_create_temp_directory (gchar tmp_dir[]);
gboolean xa_extract_tar_without_directories ( gchar *string, gchar *escaped_path, gboolean overwrite, gboolean tar_touch, gchar *extract_path , gboolean cpio_flag);
gboolean xa_delete_temp_directory ( gchar *dir_name, gboolean flag);
+void xa_choose_extraction_directory (GtkWidget *widget, gpointer data);
#endif
Modified: xarchiver/trunk/src/main.c
===================================================================
--- xarchiver/trunk/src/main.c 2006-10-03 10:53:47 UTC (rev 23269)
+++ xarchiver/trunk/src/main.c 2006-10-03 12:45:43 UTC (rev 23270)
@@ -234,7 +234,6 @@
ArchiveSuffix = g_list_reverse (ArchiveSuffix);
ArchiveType = g_list_reverse (ArchiveType);
- Files_to_Add = NULL;
MainWindow = create_MainWindow ();
ShowShellOutput (NULL);
gtk_window_set_position ( GTK_WINDOW (MainWindow),GTK_WIN_POS_CENTER);
Modified: xarchiver/trunk/src/support.c
===================================================================
--- xarchiver/trunk/src/support.c 2006-10-03 10:53:47 UTC (rev 23269)
+++ xarchiver/trunk/src/support.c 2006-10-03 12:45:43 UTC (rev 23270)
@@ -34,15 +34,14 @@
GdkPixbuf *file_pixbuf = gdk_pixbuf_new_from_file(path, &error);
if(!file_pixbuf)
{
- /*
- * perhaps xarchiver has not been installed and is being executed from source dir
- */
- g_free(error);
+ /* perhaps xarchiver has not been installed and is being executed from source dir */
+ g_free (error);
+ g_free (path);
error = NULL;
path = g_strconcat("./pixmaps/", filename, NULL);
file_pixbuf = gdk_pixbuf_new_from_file(path, &error);
}
- if(file_pixbuf)
+ if (file_pixbuf)
{
file_image = gtk_image_new_from_pixbuf(file_pixbuf);
g_object_unref(file_pixbuf);
More information about the Xfce4-commits
mailing list