Mercurial > hg > xemacs-beta
comparison lib-src/gnuclient.c @ 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 | aa5ed11f473b |
children | 308d34e9f07d |
comparison
equal
deleted
inserted
replaced
5224:35c2b7e9c03f | 5225:1086297242fe |
---|---|
298 | 298 |
299 int | 299 int |
300 main (int argc, char *argv[]) | 300 main (int argc, char *argv[]) |
301 { | 301 { |
302 int starting_line = 0; /* line to start editing at */ | 302 int starting_line = 0; /* line to start editing at */ |
303 char command[QXE_PATH_MAX+50];/* emacs command buffer */ | 303 char command[QXE_PATH_MAX + 512];/* emacs command buffer */ |
304 char fullpath[QXE_PATH_MAX+1];/* full pathname to file */ | 304 char fullpath[QXE_PATH_MAX+1];/* full pathname to file */ |
305 char *eval_form = NULL; /* form to evaluate with `-eval' */ | 305 char *eval_form = NULL; /* form to evaluate with `-eval' */ |
306 char *eval_function = NULL; /* function to evaluate with `-f' */ | 306 char *eval_function = NULL; /* function to evaluate with `-f' */ |
307 char *load_library = NULL; /* library to load */ | 307 char *load_library = NULL; /* library to load */ |
308 int quick = 0; /* quick edit, don't wait for user to | 308 int quick = 0; /* quick edit, don't wait for user to |
643 sprintf (command, "(gnuserv-edit-files '(x %s) '(", | 643 sprintf (command, "(gnuserv-edit-files '(x %s) '(", |
644 clean_string (display)); | 644 clean_string (display)); |
645 #endif | 645 #endif |
646 #ifdef HAVE_GTK | 646 #ifdef HAVE_GTK |
647 else if (display) | 647 else if (display) |
648 strcpy (command, "(gnuserv-edit-files '(gtk nil) '("); | 648 sprintf (command, |
649 /* #### We should probably do this sort of thing for | |
650 other window systems. */ | |
651 "(gnuserv-edit-files (assoc* t '((gtk nil) (x %s)) " | |
652 ":key #'valid-device-type-p) '(", clean_string (display)); | |
649 #endif | 653 #endif |
650 #ifdef HAVE_MS_WINDOWS | 654 #ifdef HAVE_MS_WINDOWS |
651 else | 655 else |
652 sprintf (command, "(gnuserv-edit-files '(mswindows nil) '("); | 656 sprintf (command, "(gnuserv-edit-files '(mswindows nil) '("); |
653 #endif | 657 #endif |