aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Djärv2004-11-04 14:18:22 +0000
committerJan Djärv2004-11-04 14:18:22 +0000
commita872928c524e28d328ad5abd87ed3bb0f0ebc771 (patch)
tree1f42b201d1934ebfe952b2f4df6d2a5a3e624950
parentfb54e72e289a810b1c4c90e78c720c23c4e1d47d (diff)
downloademacs-a872928c524e28d328ad5abd87ed3bb0f0ebc771.tar.gz
emacs-a872928c524e28d328ad5abd87ed3bb0f0ebc771.zip
* gtkutil.c (xg_get_file_with_chooser): Expand DEFAULT_FILENAME if
it doesn't start with /.
-rw-r--r--src/ChangeLog5
-rw-r--r--src/gtkutil.c20
2 files changed, 23 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 01d35ba8e9b..4b88374e71e 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12004-11-04 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2
3 * gtkutil.c (xg_get_file_with_chooser): Expand DEFAULT_FILENAME if
4 it doesn't start with /.
5
12004-11-04 Kenichi Handa <handa@m17n.org> 62004-11-04 Kenichi Handa <handa@m17n.org>
2 7
3 * fontset.c (fontset_pattern_regexp): If '*' is preceded by '\', 8 * fontset.c (fontset_pattern_regexp): If '*' is preceded by '\',
diff --git a/src/gtkutil.c b/src/gtkutil.c
index e1331891140..f59ccecbcb8 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1178,8 +1178,24 @@ xg_get_file_with_chooser (f, prompt, default_filename, mustmatch_p, only_dir_p)
1178 1178
1179 1179
1180 if (default_filename) 1180 if (default_filename)
1181 gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin), 1181 {
1182 default_filename); 1182 Lisp_Object file;
1183 struct gcpro gcpro1;
1184 GCPRO1 (file);
1185
1186 /* File chooser does not understand ~/... in the file name. It must be
1187 an absolute name starting with /. */
1188 if (default_filename[0] != '/')
1189 {
1190 file = Fexpand_file_name (build_string (default_filename), Qnil);
1191 default_filename = SDATA (file);
1192 }
1193
1194 gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin),
1195 default_filename);
1196
1197 UNGCPRO;
1198 }
1183 1199
1184 gtk_widget_show (filewin); 1200 gtk_widget_show (filewin);
1185 1201