[file-roller: 121/123] fixed crash when opening a file with an external application



commit d91ec2bf7f07991e0ed3c93d0bc2a0c3e71f0d55
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Aug 6 14:07:45 2012 +0200

    fixed crash when opening a file with an external application

 src/dlg-open-with.c |    4 +---
 src/fr-window.c     |    2 +-
 2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/dlg-open-with.c b/src/dlg-open-with.c
index 9d32a37..b797c61 100644
--- a/src/dlg-open-with.c
+++ b/src/dlg-open-with.c
@@ -73,16 +73,14 @@ dlg_open_with (FrWindow *window,
 {
 	OpenData  *o_data;
 	GtkWidget *app_chooser;
-	GFile     *first_file;
 
 	o_data = g_new0 (OpenData, 1);
 	o_data->window = window;
 	o_data->file_list = file_list;
 
-	first_file = g_file_new_for_path (file_list->data);
 	app_chooser = gtk_app_chooser_dialog_new (GTK_WINDOW (window),
 						  GTK_DIALOG_MODAL,
-						  first_file);
+						  G_FILE (file_list->data));
 	g_signal_connect (app_chooser,
 			  "response",
 			  G_CALLBACK (app_chooser_response_cb),
diff --git a/src/fr-window.c b/src/fr-window.c
index e6e3793..86ad4a2 100644
--- a/src/fr-window.c
+++ b/src/fr-window.c
@@ -8578,7 +8578,7 @@ fr_window_open_files_with_application (FrWindow *window,
 
 	uris = NULL;
 	for (scan = file_list; scan; scan = scan->next)
-		uris = g_list_prepend (uris, g_filename_to_uri (scan->data, NULL, NULL));
+		uris = g_list_prepend (uris, g_file_get_uri (G_FILE (scan->data)));
 
 	context = gdk_display_get_app_launch_context (gtk_widget_get_display (GTK_WIDGET (window)));
 	gdk_app_launch_context_set_screen (context, gtk_widget_get_screen (GTK_WIDGET (window)));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]