[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/gtkutil.c [lexbind]
From: |
Miles Bader |
Subject: |
[Emacs-diffs] Changes to emacs/src/gtkutil.c [lexbind] |
Date: |
Wed, 08 Dec 2004 18:57:26 -0500 |
Index: emacs/src/gtkutil.c
diff -c emacs/src/gtkutil.c:1.26.2.13 emacs/src/gtkutil.c:1.26.2.14
*** emacs/src/gtkutil.c:1.26.2.13 Wed Dec 8 23:31:39 2004
--- emacs/src/gtkutil.c Wed Dec 8 23:36:25 2004
***************
*** 23,32 ****
--- 23,34 ----
#ifdef USE_GTK
#include <string.h>
+ #include <signal.h>
#include <stdio.h>
#include "lisp.h"
#include "xterm.h"
#include "blockinput.h"
+ #include "syssignal.h"
#include "window.h"
#include "atimer.h"
#include "gtkutil.h"
***************
*** 1122,1131 ****
/***********************************************************************
File dialog functions
***********************************************************************/
- #ifdef HAVE_GTK_FILE_BOTH
- int use_old_gtk_file_dialog;
- #endif
-
/* Function that is called when the file dialog pops down.
W is the dialog widget, RESPONSE is the response code.
USER_DATA is what we passed in to g_signal_connect (pointer to int). */
--- 1124,1129 ----
***************
*** 1204,1209 ****
--- 1202,1208 ----
GTK_STOCK_OPEN : GTK_STOCK_OK),
GTK_RESPONSE_OK,
NULL);
+ gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (filewin), TRUE);
if (default_filename)
{
***************
*** 1211,1226 ****
struct gcpro gcpro1;
GCPRO1 (file);
/* File chooser does not understand ~/... in the file name. It must be
an absolute name starting with /. */
if (default_filename[0] != '/')
! {
! file = Fexpand_file_name (build_string (default_filename), Qnil);
! default_filename = SDATA (file);
! }
! gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin),
! default_filename);
UNGCPRO;
}
--- 1210,1229 ----
struct gcpro gcpro1;
GCPRO1 (file);
+ file = build_string (default_filename);
+
/* File chooser does not understand ~/... in the file name. It must be
an absolute name starting with /. */
if (default_filename[0] != '/')
! file = Fexpand_file_name (file, Qnil);
! default_filename = SDATA (file);
! if (Ffile_directory_p (file))
! gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (filewin),
! default_filename);
! else
! gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (filewin),
! default_filename);
UNGCPRO;
}
***************
*** 1310,1317 ****
int filesel_done = 0;
xg_get_file_func func;
#ifdef HAVE_GTK_FILE_BOTH
! if (use_old_gtk_file_dialog)
w = xg_get_file_with_selection (f, prompt, default_filename,
mustmatch_p, only_dir_p, &func);
else
--- 1313,1329 ----
int filesel_done = 0;
xg_get_file_func func;
+ #if defined (HAVE_GTK_AND_PTHREAD) && defined (__SIGRTMIN)
+ /* I really don't know why this is needed, but without this the GLIBC add on
+ library linuxthreads hangs when the Gnome file chooser backend creates
+ threads. */
+ sigblock (sigmask (__SIGRTMIN));
+ #endif /* HAVE_GTK_AND_PTHREAD */
+
#ifdef HAVE_GTK_FILE_BOTH
! extern int x_use_old_gtk_file_dialog;
!
! if (x_use_old_gtk_file_dialog)
w = xg_get_file_with_selection (f, prompt, default_filename,
mustmatch_p, only_dir_p, &func);
else
***************
*** 1355,1360 ****
--- 1367,1376 ----
gtk_main_iteration ();
}
+ #if defined (HAVE_GTK_AND_PTHREAD) && defined (__SIGRTMIN)
+ sigunblock (sigmask (__SIGRTMIN));
+ #endif
+
if (filesel_done == GTK_RESPONSE_OK)
fn = (*func) (w);
- [Emacs-diffs] Changes to emacs/src/gtkutil.c [lexbind],
Miles Bader <=