diff options
| author | Jan Djärv | 2006-09-16 17:43:21 +0000 |
|---|---|---|
| committer | Jan Djärv | 2006-09-16 17:43:21 +0000 |
| commit | cf1e295ff572f813a19fd6cc1f71e1565954502d (patch) | |
| tree | 3db9d65a5b93f94154750500bbdd5f11e96f026b /src | |
| parent | fbce5860bfff8116aa49bc1a46d4b5710bcb4d44 (diff) | |
| download | emacs-cf1e295ff572f813a19fd6cc1f71e1565954502d.tar.gz emacs-cf1e295ff572f813a19fd6cc1f71e1565954502d.zip | |
* gtkutil.c (xg_get_file_with_chooser): Check
x-gtk-show-chooser-help-text before adding the help text.
Diffstat (limited to 'src')
| -rw-r--r-- | src/gtkutil.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c index 35c2cc0ba18..f16d0aea80c 100644 --- a/src/gtkutil.c +++ b/src/gtkutil.c | |||
| @@ -1350,6 +1350,8 @@ xg_get_file_with_chooser (f, prompt, default_filename, | |||
| 1350 | GTK_FILE_CHOOSER_ACTION_OPEN : | 1350 | GTK_FILE_CHOOSER_ACTION_OPEN : |
| 1351 | GTK_FILE_CHOOSER_ACTION_SAVE); | 1351 | GTK_FILE_CHOOSER_ACTION_SAVE); |
| 1352 | extern int x_gtk_show_hidden_files; | 1352 | extern int x_gtk_show_hidden_files; |
| 1353 | extern int x_gtk_show_chooser_help_text; | ||
| 1354 | |||
| 1353 | 1355 | ||
| 1354 | if (only_dir_p) | 1356 | if (only_dir_p) |
| 1355 | action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; | 1357 | action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; |
| @@ -1377,17 +1379,22 @@ xg_get_file_with_chooser (f, prompt, default_filename, | |||
| 1377 | g_signal_connect (G_OBJECT (filewin), "notify", | 1379 | g_signal_connect (G_OBJECT (filewin), "notify", |
| 1378 | G_CALLBACK (xg_toggle_notify_cb), wtoggle); | 1380 | G_CALLBACK (xg_toggle_notify_cb), wtoggle); |
| 1379 | 1381 | ||
| 1380 | message[0] = '\0'; | 1382 | if (x_gtk_show_chooser_help_text) |
| 1381 | if (action != GTK_FILE_CHOOSER_ACTION_SAVE) | 1383 | { |
| 1382 | strcat (message, "\nType C-l to display a file name text entry box.\n"); | 1384 | message[0] = '\0'; |
| 1383 | strcat (message, "\nIf you don't like this file selector, use the " | 1385 | if (action != GTK_FILE_CHOOSER_ACTION_SAVE) |
| 1384 | "corresponding\nkey binding or customize " | 1386 | strcat (message, "\nType C-l to display a file name text entry box.\n"); |
| 1385 | "use-file-dialog to turn it off."); | 1387 | strcat (message, "\nIf you don't like this file selector, use the " |
| 1388 | "corresponding\nkey binding or customize " | ||
| 1389 | "use-file-dialog to turn it off."); | ||
| 1386 | 1390 | ||
| 1387 | wmessage = gtk_label_new (message); | 1391 | wmessage = gtk_label_new (message); |
| 1388 | gtk_widget_show (wmessage); | 1392 | gtk_widget_show (wmessage); |
| 1393 | } | ||
| 1394 | |||
| 1389 | gtk_box_pack_start (GTK_BOX (wbox), wtoggle, FALSE, FALSE, 0); | 1395 | gtk_box_pack_start (GTK_BOX (wbox), wtoggle, FALSE, FALSE, 0); |
| 1390 | gtk_box_pack_start (GTK_BOX (wbox), wmessage, FALSE, FALSE, 0); | 1396 | if (x_gtk_show_chooser_help_text) |
| 1397 | gtk_box_pack_start (GTK_BOX (wbox), wmessage, FALSE, FALSE, 0); | ||
| 1391 | gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (filewin), wbox); | 1398 | gtk_file_chooser_set_extra_widget (GTK_FILE_CHOOSER (filewin), wbox); |
| 1392 | 1399 | ||
| 1393 | if (default_filename) | 1400 | if (default_filename) |