changeset 5225:1086297242fe

Don't throw an error if gnuclient supports GTK and XEmacs doesn't. 2010-06-02 Aidan Kehoe <kehoea@parhasard.net> * gnuclient.c (main): If gnuclient was built with GTK support, and is asking a gnuserv without GTK support to open a frame, fall back to X11, don't throw an error on the server side, invisible to the client.
author Aidan Kehoe <kehoea@parhasard.net>
date Wed, 02 Jun 2010 15:31:15 +0100
parents 35c2b7e9c03f
children 7789ae555c45
files lib-src/ChangeLog lib-src/gnuclient.c
diffstat 2 files changed, 13 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/ChangeLog	Tue Jun 01 20:32:41 2010 +0100
+++ b/lib-src/ChangeLog	Wed Jun 02 15:31:15 2010 +0100
@@ -1,3 +1,10 @@
+2010-06-02  Aidan Kehoe  <kehoea@parhasard.net>
+
+	* gnuclient.c (main):
+	If gnuclient was built with GTK support, and is asking a gnuserv
+	without GTK support to open a frame, fall back to X11, don't
+	throw an error on the server side, invisible to the client.
+
 2010-04-17  Aidan Kehoe  <kehoea@parhasard.net>
 
 	* make-docfile.c (scan_lisp_file):
--- a/lib-src/gnuclient.c	Tue Jun 01 20:32:41 2010 +0100
+++ b/lib-src/gnuclient.c	Wed Jun 02 15:31:15 2010 +0100
@@ -300,7 +300,7 @@
 main (int argc, char *argv[])
 {
   int starting_line = 0;	/* line to start editing at */
-  char command[QXE_PATH_MAX+50];/* emacs command buffer */
+  char command[QXE_PATH_MAX + 512];/* emacs command buffer */
   char fullpath[QXE_PATH_MAX+1];/* full pathname to file */
   char *eval_form = NULL;	/* form to evaluate with `-eval' */
   char *eval_function = NULL;	/* function to evaluate with `-f' */
@@ -645,7 +645,11 @@
 #endif
 #ifdef HAVE_GTK
 	  else if (display)
-	    strcpy (command, "(gnuserv-edit-files '(gtk nil) '(");
+	    sprintf (command, 
+                     /* #### We should probably do this sort of thing for
+                        other window systems. */
+                     "(gnuserv-edit-files (assoc* t '((gtk nil) (x %s)) "
+                     ":key #'valid-device-type-p) '(", clean_string (display));
 #endif
 #ifdef HAVE_MS_WINDOWS
 	  else