changeset 72931:0ee8cea94c25

* gtkutil.c (xg_get_file_with_chooser): Check x-gtk-show-chooser-help-text before adding the help text.
author Jan Djärv <jan.h.d@swipnet.se>
date Sat, 16 Sep 2006 17:43:21 +0000
parents ffb882df13fa
children eea4777d0d23
files src/gtkutil.c
diffstat 1 files changed, 16 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkutil.c	Sat Sep 16 17:43:09 2006 +0000
+++ b/src/gtkutil.c	Sat Sep 16 17:43:21 2006 +0000
@@ -1350,6 +1350,8 @@
                                  GTK_FILE_CHOOSER_ACTION_OPEN :
                                  GTK_FILE_CHOOSER_ACTION_SAVE);
   extern int x_gtk_show_hidden_files;
+  extern int x_gtk_show_chooser_help_text;
+
 
   if (only_dir_p)
     action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
@@ -1377,17 +1379,22 @@
   g_signal_connect (G_OBJECT (filewin), "notify",
                     G_CALLBACK (xg_toggle_notify_cb), wtoggle);
 
-  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, use the "
-          "corresponding\nkey binding or customize "
-          "use-file-dialog to turn it off.");
+  if (x_gtk_show_chooser_help_text)
+    {
+      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, use the "
+              "corresponding\nkey binding or customize "
+              "use-file-dialog to turn it off.");
     
-  wmessage = gtk_label_new (message);
-  gtk_widget_show (wmessage);
+      wmessage = gtk_label_new (message);
+      gtk_widget_show (wmessage);
+    }
+
   gtk_box_pack_start (GTK_BOX (wbox), wtoggle, FALSE, FALSE, 0);
-  gtk_box_pack_start (GTK_BOX (wbox), wmessage, FALSE, FALSE, 0);
+  if (x_gtk_show_chooser_help_text)
+    gtk_box_pack_start (GTK_BOX (wbox), wmessage, FALSE, FALSE, 0);
   gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (filewin), wbox);
 
   if (default_filename)