diff options
author | Lucas Rocha <lucasr@gnome.org> | 2009-01-09 00:08:01 +0000 |
---|---|---|
committer | Lucas Almeida Rocha <lucasr@src.gnome.org> | 2009-01-09 00:08:01 +0000 |
commit | ec484005101b3720feb95c8d76a65bcd6b0472c2 (patch) | |
tree | 798d9e9acd8fb0ff44303bf2373e533fd1bc8976 | |
parent | document --timeout (Fixes bug #565133). Patch from Luca Bruno (diff) | |
download | zenity-ec484005101b3720feb95c8d76a65bcd6b0472c2.tar.gz zenity-ec484005101b3720feb95c8d76a65bcd6b0472c2.tar.bz2 zenity-ec484005101b3720feb95c8d76a65bcd6b0472c2.zip |
correctly handle --filename option on file selection mode (Fixes bug
2009-01-09 Lucas Rocha <lucasr@gnome.org>
* src/fileselection.c (zenity_fileselection): correctly handle
--filename option on file selection mode (Fixes bug #564552).
Patch from Gilles Detillieux.
svn path=/trunk/; revision=1461
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/fileselection.c | 5 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,9 @@ +2009-01-09 Lucas Rocha <lucasr@gnome.org> + + * src/fileselection.c (zenity_fileselection): correctly handle + --filename option on file selection mode (Fixes bug #564552). + Patch from Gilles Detillieux. + 2009-01-08 Lucas Rocha <lucasr@gnome.org> * data/zenity.1: document --timeout (Fixes bug #565133). diff --git a/src/fileselection.c b/src/fileselection.c index 46d1941d..4cfa0514 100644 --- a/src/fileselection.c +++ b/src/fileselection.c @@ -76,7 +76,10 @@ void zenity_fileselection (ZenityData *data, ZenityFileData *file_data) if (file_data->uri[strlen (file_data->uri) - 1] != '/') { basename = g_path_get_basename (file_data->uri); - gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), basename); + if (file_data->save) + gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (dialog), basename); + else + (void) gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (dialog), file_data->uri); g_free (basename); } g_free (dir); |