From e9c8c2096277dcf2f2084e627f469f1a6ed088b0 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Wed, 13 Feb 2008 04:34:51 +0000 Subject: [PATCH] (gtk) more open dialog tweaks based on feedback from Lacrocivious --- gtk/open.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gtk/open.c b/gtk/open.c index 10edae766..890d0b8fa 100644 --- a/gtk/open.c +++ b/gtk/open.c @@ -177,7 +177,8 @@ makeaddwind( GtkWindow * parent, gtk_file_chooser_add_filter( GTK_FILE_CHOOSER( w ), filter ); g_signal_connect( w, "selection-changed", G_CALLBACK( sourceChanged ), data ); if( data->filename ) - gtk_file_chooser_set_uri( GTK_FILE_CHOOSER( w ), data->filename ); + if( !gtk_file_chooser_set_filename( GTK_FILE_CHOOSER( w ), data->filename ) ) + g_warning( "couldn't select '%s'", data->filename ); ++row; col = 0; @@ -186,7 +187,8 @@ makeaddwind( GtkWindow * parent, gtk_table_attach( GTK_TABLE( t ), l, col, col+1, row, row+1, GTK_FILL, 0, 0, 0 ); ++col; w = gtk_file_chooser_button_new( _( "Destination" ), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER ); - gtk_file_chooser_set_uri( GTK_FILE_CHOOSER( w ), data->destination ); + if( !gtk_file_chooser_set_filename( GTK_FILE_CHOOSER( w ), data->destination ) ) + g_warning( "couldn't select '%s'", data->destination ); gtk_table_attach( GTK_TABLE( t ), w, col, col+1, row, row+1, ~0, 0, 0, 0 ); gtk_label_set_mnemonic_widget( GTK_LABEL( l ), w ); g_signal_connect( w, "selection-changed", G_CALLBACK( destinationChanged ), data );