aboutsummaryrefslogtreecommitdiffstats
path: root/src/gtkutil.c
diff options
context:
space:
mode:
authorJan Djärv2005-12-23 11:34:13 +0000
committerJan Djärv2005-12-23 11:34:13 +0000
commit90f2e16b151bc42305f352ab3bfcb25429125179 (patch)
treeb1310cf51254370bcfdc183b7b9c77c6467af7b3 /src/gtkutil.c
parent5a4aad035fb7c3652913864e69fa095e6cb361ad (diff)
downloademacs-90f2e16b151bc42305f352ab3bfcb25429125179.tar.gz
emacs-90f2e16b151bc42305f352ab3bfcb25429125179.zip
* xfns.c (Fx_uses_old_gtk_dialog): New function.
* gtkutil.c (xg_uses_old_file_dialog): New function. (xg_get_file_name): Use xg_uses_old_file_dialog. * gtkutil.h: Declare xg_uses_old_file_dialog.
Diffstat (limited to 'src/gtkutil.c')
-rw-r--r--src/gtkutil.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 54cb43b8398..9da3c5bf457 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -1155,6 +1155,27 @@ create_dialog (wv, select_cb, deactivate_cb)
1155/*********************************************************************** 1155/***********************************************************************
1156 File dialog functions 1156 File dialog functions
1157 ***********************************************************************/ 1157 ***********************************************************************/
1158/* Return non-zero if the old file selection dialog is being used.
1159 Return zero if not. */
1160
1161int
1162xg_uses_old_file_dialog ()
1163{
1164#ifdef HAVE_GTK_FILE_BOTH
1165 extern int x_use_old_gtk_file_dialog;
1166 return x_use_old_gtk_file_dialog;
1167#else /* ! HAVE_GTK_FILE_BOTH */
1168
1169#ifdef HAVE_GTK_FILE_SELECTION_NEW
1170 return 1;
1171#else
1172 return 0;
1173#endif
1174
1175#endif /* ! HAVE_GTK_FILE_BOTH */
1176}
1177
1178
1158/* Function that is called when the file dialog pops down. 1179/* Function that is called when the file dialog pops down.
1159 W is the dialog widget, RESPONSE is the response code. 1180 W is the dialog widget, RESPONSE is the response code.
1160 USER_DATA is what we passed in to g_signal_connect (pointer to int). */ 1181 USER_DATA is what we passed in to g_signal_connect (pointer to int). */
@@ -1343,7 +1364,6 @@ xg_get_file_name (f, prompt, default_filename, mustmatch_p, only_dir_p)
1343 char *fn = 0; 1364 char *fn = 0;
1344 int filesel_done = 0; 1365 int filesel_done = 0;
1345 xg_get_file_func func; 1366 xg_get_file_func func;
1346 extern int x_use_old_gtk_file_dialog;
1347 1367
1348#if defined (HAVE_GTK_AND_PTHREAD) && defined (__SIGRTMIN) 1368#if defined (HAVE_GTK_AND_PTHREAD) && defined (__SIGRTMIN)
1349 /* I really don't know why this is needed, but without this the GLIBC add on 1369 /* I really don't know why this is needed, but without this the GLIBC add on
@@ -1354,7 +1374,7 @@ xg_get_file_name (f, prompt, default_filename, mustmatch_p, only_dir_p)
1354 1374
1355#ifdef HAVE_GTK_FILE_BOTH 1375#ifdef HAVE_GTK_FILE_BOTH
1356 1376
1357 if (x_use_old_gtk_file_dialog) 1377 if (xg_uses_old_file_dialog ())
1358 w = xg_get_file_with_selection (f, prompt, default_filename, 1378 w = xg_get_file_with_selection (f, prompt, default_filename,
1359 mustmatch_p, only_dir_p, &func); 1379 mustmatch_p, only_dir_p, &func);
1360 else 1380 else