Author: colossus
Date: 2006-11-14 13:25:19 +0000 (Tue, 14 Nov 2006)
New Revision: 23871
Modified:
xarchiver/trunk/src/new_dialog.c
Log:
Fixed bug in the new dialog when using switch -d and the absolute path is
missing; thanks JP for notifying it.
Modified: xarchiver/trunk/src/new_dialog.c
===================================================================
--- xarchiver/trunk/src/new_dialog.c 2006-11-14 12:00:46 UTC (rev 23870)
+++ xarchiver/trunk/src/new_dialog.c 2006-11-14 13:25:19 UTC (rev 23871)
@@ -25,6 +25,8 @@
#include "main.h"
extern gboolean unrar;
+extern gboolean cli;
+
gchar *current_new_directory = NULL;
gint new_combo_box = -1;
@@ -42,6 +44,8 @@
gchar *my_path_ext = NULL;
gchar *basepath = NULL;
gchar *dirname = NULL;
+ gchar *current_dir = NULL;
+ gchar *new_dir = NULL;
xa_file_chooser = gtk_file_chooser_dialog_new ( _("Create a new
archive"),
GTK_WINDOW (MainWindow),
@@ -120,17 +124,24 @@
gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER
(xa_file_chooser),basepath);
dirname = g_path_get_dirname (path);
- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER
(xa_file_chooser),dirname);
+ current_dir = g_get_current_dir ();
+ new_dir = g_strconcat (current_dir,dirname,NULL);
+ g_free (current_dir);
+ g_free (dirname);
+
+ gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER
(xa_file_chooser) , new_dir);
+
+ g_free (basepath);
+ g_free (new_dir);
}
gtk_window_set_modal (GTK_WINDOW (xa_file_chooser),TRUE);
if (current_new_directory != NULL)
gtk_file_chooser_set_current_folder ( GTK_FILE_CHOOSER
(xa_file_chooser) , current_new_directory );
-
response = gtk_dialog_run (GTK_DIALOG (xa_file_chooser));
current_new_directory = gtk_file_chooser_get_current_folder (
GTK_FILE_CHOOSER (xa_file_chooser) );
- g_free (basepath);
- g_free (dirname);
+
+
if (response == GTK_RESPONSE_ACCEPT)
{
my_path = gtk_file_chooser_get_filename ( GTK_FILE_CHOOSER
(xa_file_chooser) );
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits