# HG changeset patch # User Jan Dj¸«£rv # Date 1157381272 0 # Node ID 9db8c9a68f0fe7134a4a1ff1eb3609b8ca209df7 # Parent cbdca6c6638dc210db0721a531bae14c8a180e58 * gtkutil.c (xg_get_file_with_chooser): Don't mention specific keys in the file chooser message. Only call gtk_file_chooser_set_current_name when action is SAVE. diff -r cbdca6c6638d -r 9db8c9a68f0f src/ChangeLog --- a/src/ChangeLog Mon Sep 04 14:18:10 2006 +0000 +++ b/src/ChangeLog Mon Sep 04 14:47:52 2006 +0000 @@ -1,3 +1,9 @@ +2006-09-04 Jan Dj,Ad(Brv + + * gtkutil.c (xg_get_file_with_chooser): Don't mention specific keys in + the file chooser message. Only call gtk_file_chooser_set_current_name + when action is SAVE. + 2006-09-04 Andreas Schwab * Makefile.in: Double all single and back quotes in C-style diff -r cbdca6c6638d -r 9db8c9a68f0f src/gtkutil.c --- a/src/gtkutil.c Mon Sep 04 14:18:10 2006 +0000 +++ b/src/gtkutil.c Mon Sep 04 14:47:52 2006 +0000 @@ -1326,12 +1326,9 @@ message[0] = '\0'; if (action != GTK_FILE_CHOOSER_ACTION_SAVE) strcat (message, "\nType C-l to display a file name text entry box.\n"); - strcat (message, "\nIf you don't like this file selector, customize " - "use-file-dialog\nto turn it off, or type "); - if (action != GTK_FILE_CHOOSER_ACTION_SAVE) - strcat (message, "C-x C-f to visit files."); - else - strcat (message, "C-x C-w to write files."); + strcat (message, "\nIf you don't like this file selector, use the " + "corresponding\nkey binding or customize " + "use-file-dialog to turn it off."); wmessage = gtk_label_new (message); gtk_widget_show (wmessage); @@ -1359,12 +1356,15 @@ utf8_filename); else { - char *cp = strrchr (utf8_filename, '/'); - if (cp) ++cp; - else cp = utf8_filename; gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin), utf8_filename); - gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filewin), cp); + if (action == GTK_FILE_CHOOSER_ACTION_SAVE) + { + char *cp = strrchr (utf8_filename, '/'); + if (cp) ++cp; + else cp = utf8_filename; + gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (filewin), cp); + } } UNGCPRO;