]> git.eshelyaron.com Git - emacs.git/commitdiff
* gtkutil.c (xg_get_file_with_chooser): Don't mention specific keys in
authorJan Djärv <jan.h.d@swipnet.se>
Mon, 4 Sep 2006 14:47:52 +0000 (14:47 +0000)
committerJan Djärv <jan.h.d@swipnet.se>
Mon, 4 Sep 2006 14:47:52 +0000 (14:47 +0000)
 the file chooser message.  Only call gtk_file_chooser_set_current_name
 when action is SAVE.

src/ChangeLog
src/gtkutil.c

index b730c8d9889331f33735871e6ff0ea458187491a..e21593fbd45f5c6c06aaeb5245414e732d17b6d2 100644 (file)
@@ -1,3 +1,9 @@
+2006-09-04  Jan Dj\e,Ad\e(Brv  <jan.h.d@swipnet.se>
+
+       * 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  <schwab@suse.de>
 
        * Makefile.in: Double all single and back quotes in C-style
index 172c7b94a64c748143636cb470bfb5d3002151b1..89b0f8b11c610f35a132762004e53e4dc154c247 100644 (file)
@@ -1326,12 +1326,9 @@ xg_get_file_with_chooser (f, prompt, default_filename,
   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 @@ xg_get_file_with_chooser (f, prompt, default_filename,
                                              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;