aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann1999-07-21 21:43:52 +0000
committerGerd Moellmann1999-07-21 21:43:52 +0000
commit4da4f201337713562628123446e5f62185ea9fb5 (patch)
tree4795e5e1df72a4fca57e1907072186bb31555651 /src
parent06a2c2193fa9be993b244c920a4ccfa11ea75705 (diff)
downloademacs-4da4f201337713562628123446e5f62185ea9fb5.tar.gz
emacs-4da4f201337713562628123446e5f62185ea9fb5.zip
(x_load_resources): Set double-click time defaults
for Motif list boxes from double-click-time. (x_load_resources): Add default resoures for file selection dialog. (x_load_resources): Add grey background colors as defaults for menus, scroll bars, and dialogs. (x_load_resources): Add font defaults for menus and dialogs.
Diffstat (limited to 'src')
-rw-r--r--src/xrdb.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/xrdb.c b/src/xrdb.c
index 1fda59cb22e..92cc53aa433 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -62,6 +62,8 @@ Boston, MA 02111-1307, USA. */
62#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) 62#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
63#endif 63#endif
64 64
65#include "lisp.h"
66
65extern char *getenv (); 67extern char *getenv ();
66 68
67/* This does cause trouble on AIX. I'm going to take the comment at 69/* This does cause trouble on AIX. I'm going to take the comment at
@@ -526,6 +528,10 @@ x_load_resources (display, xrm_string, myname, myclass)
526 XrmDatabase user_database; 528 XrmDatabase user_database;
527 XrmDatabase rdb; 529 XrmDatabase rdb;
528 XrmDatabase db; 530 XrmDatabase db;
531 char line[256];
532 char *helv = "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1";
533 char *courier = "-*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1";
534 extern Lisp_Object Vdouble_click_time;
529 535
530 x_rm_string = XrmStringToQuark (XrmStringType); 536 x_rm_string = XrmStringToQuark (XrmStringType);
531#ifndef USE_X_TOOLKIT 537#ifndef USE_X_TOOLKIT
@@ -535,6 +541,70 @@ x_load_resources (display, xrm_string, myname, myclass)
535#endif 541#endif
536 rdb = XrmGetStringDatabase (""); 542 rdb = XrmGetStringDatabase ("");
537 543
544 /* Add some font defaults. If the font `helv' doesn't exist, widgets
545 will use some other default font. */
546#ifdef USE_MOTIF
547
548 sprintf (line, "%s*fontList: %s", myname, helv);
549 XrmPutLineResource (&rdb, line);
550 sprintf (line, "%s*menu*background: grey75", myname);
551 XrmPutLineResource (&rdb, line);
552 sprintf (line, "%s*menubar*background: grey75", myname, helv);
553 XrmPutLineResource (&rdb, line);
554 sprintf (line, "%s*verticalScrollBar.background: grey75", myname);
555 XrmPutLineResource (&rdb, line);
556 sprintf (line, "%s.dialog*.background: grey75", myname);
557 XrmPutLineResource (&rdb, line);
558 sprintf (line, "%s*fsb.Text.background: white", myname);
559 XrmPutLineResource (&rdb, line);
560 sprintf (line, "%s*fsb.FilterText.background: white", myname);
561 XrmPutLineResource (&rdb, line);
562 sprintf (line, "%s*fsb*DirList.background: white", myname);
563 XrmPutLineResource (&rdb, line);
564 sprintf (line, "%s*fsb*ItemsList.background: white", myname);
565 XrmPutLineResource (&rdb, line);
566 sprintf (line, "%s*fsb*background: grey75", myname);
567 XrmPutLineResource (&rdb, line);
568 sprintf (line, "%s*fsb.Text.fontList: %s", myname, courier);
569 XrmPutLineResource (&rdb, line);
570 sprintf (line, "%s*fsb.FilterText.fontList: %s", myname, courier);
571 XrmPutLineResource (&rdb, line);
572 sprintf (line, "%s*fsb*ItemsList.fontList: %s", myname, courier);
573 XrmPutLineResource (&rdb, line);
574 sprintf (line, "%s*fsb*DirList.fontList: %s", myname, courier);
575 XrmPutLineResource (&rdb, line);
576
577 /* Set double click time of list boxes in the file selection
578 dialog from `double-click-time'. */
579 if (INTEGERP (Vdouble_click_time) && XINT (Vdouble_click_time) > 0)
580 {
581 sprintf (line, "%s*fsb*DirList.doubleClickInterval: %d",
582 myname, XFASTINT (Vdouble_click_time));
583 XrmPutLineResource (&rdb, line);
584 sprintf (line, "%s*fsb*ItemsList.doubleClickInterval: %d",
585 myname, XFASTINT (Vdouble_click_time));
586 XrmPutLineResource (&rdb, line);
587 }
588
589#else /* not USE_MOTIF */
590
591 sprintf (line, "%s.dialog*.font: %s", myname, helv);
592 XrmPutLineResource (&rdb, line);
593 sprintf (line, "%s.dialog*.background: grey75", myname);
594 XrmPutLineResource (&rdb, line);
595 sprintf (line, "%s.pane.menubar.font: %s", myname, helv);
596 XrmPutLineResource (&rdb, line);
597 sprintf (line, "%s.pane.menubar.background: grey75", myname);
598 XrmPutLineResource (&rdb, line);
599 sprintf (line, "%s.menu*.font: %s", myname, helv);
600 XrmPutLineResource (&rdb, line);
601 sprintf (line, "%s.menu*.background: grey75", myname);
602 XrmPutLineResource (&rdb, line);
603 sprintf (line, "%s*verticalScrollBar.background: grey75", myname);
604 XrmPutLineResource (&rdb, line);
605
606#endif /* not USE_MOTIF */
607
538 user_database = get_user_db (display); 608 user_database = get_user_db (display);
539 609
540 /* Figure out what the "customization string" is, so we can use it 610 /* Figure out what the "customization string" is, so we can use it