diff --git a/gnome-settings-daemon/ChangeLog b/gnome-settings-daemon/ChangeLog index 95278447f..245a28955 100644 --- a/gnome-settings-daemon/ChangeLog +++ b/gnome-settings-daemon/ChangeLog @@ -1,3 +1,13 @@ +2003-05-01 Ross Burton + + * gnome-settings-xrdb.[ch]: + Using the current GTK+ theme as a base for colours, set a bunch of + properties in the X resource database. And as if by magic, legacy + apps (Xaw, Tk, Motif) match GNOME! + + * xrdb/*.ad: + Data files for above. + Thu Feb 6 16:43:33 2003 Jonathan Blandford * gnome-settings-font.c (load_xcursor_theme): handle xcursor so diff --git a/gnome-settings-daemon/Makefile.am b/gnome-settings-daemon/Makefile.am index e7cf73cea..dd9e81acf 100644 --- a/gnome-settings-daemon/Makefile.am +++ b/gnome-settings-daemon/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS = xrdb + INCLUDES=$(GNOME_SETTINGS_DAEMON_CFLAGS) -I$(top_srcdir)/libbackground -I$(top_srcdir) \ -DGNOMELOCALEDIR="\"$(datadir)/locale\"" \ -DESD_SERVER="\"$(ESD_SERVER)\"" \ @@ -30,6 +32,8 @@ gnome_settings_daemon_SOURCES = \ gnome-settings-default-editor.h \ gnome-settings-gtk1theme.c \ gnome-settings-gtk1theme.h \ + gnome-settings-xrdb.c \ + gnome-settings-xrdb.h \ xsettings-common.c \ xsettings-manager.c \ xsettings-common.h \ diff --git a/gnome-settings-daemon/gnome-settings-daemon.c b/gnome-settings-daemon/gnome-settings-daemon.c index 3431b3c3d..085618a25 100644 --- a/gnome-settings-daemon/gnome-settings-daemon.c +++ b/gnome-settings-daemon/gnome-settings-daemon.c @@ -52,6 +52,7 @@ #include "gnome-settings-default-editor.h" #include "gnome-settings-keybindings.h" #include "gnome-settings-gtk1theme.h" +#include "gnome-settings-xrdb.h" #include "GNOME_SettingsDaemon.h" @@ -278,6 +279,7 @@ gnome_settings_daemon_new (void) gnome_settings_background_init (client); gnome_settings_keybindings_init (client); gnome_settings_gtk1_theme_init (client); + gnome_settings_xrdb_init (client); for (list = directories; list; list = list->next) { @@ -326,6 +328,7 @@ gnome_settings_daemon_new (void) gnome_settings_background_load (client); gnome_settings_keybindings_load (client); gnome_settings_gtk1_theme_load (client); + gnome_settings_xrdb_load (client); return G_OBJECT (daemon); } diff --git a/gnome-settings-daemon/gnome-settings-xrdb.c b/gnome-settings-daemon/gnome-settings-xrdb.c new file mode 100644 index 000000000..7840ae8e4 --- /dev/null +++ b/gnome-settings-daemon/gnome-settings-xrdb.c @@ -0,0 +1,333 @@ +/* -*- Mode: C; indent-tabs-mode: t; tab-width: 8; c-basic-offset: 8; style: linux -*- */ + +/* gnome-settings-xrdb.c + * + * Copyright © 2003 Ross Burton + * + * Written by Ross Burton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +#include +#include +#include +#include +#include + +#include "gnome-settings-daemon.h" +#include "gnome-settings-xrdb.h" + +#define SYSTEM_AD_DIR DATADIR "/control-center-2.0/xrdb" +#define GENERAL_AD SYSTEM_AD_DIR "/General.ad" +#define USER_AD_DIR ".gnome2/xrdb" +#define USER_X_RESOURCES ".Xresources" + +#define GTK_THEME_KEY "/desktop/gnome/interface/gtk_theme" + +GtkWidget *widget; + +/* + * Theme colour functions + */ + +/* + * TODO: replace with the code from Smooth? (which should really be + * public in GTK+) + */ +static GdkColor* +colour_shade (GdkColor *a, gdouble shade, GdkColor *b) +{ + guint16 red, green, blue; + + red = CLAMP ((a->red) * shade, 0, 0xFFFF); + green = CLAMP ((a->green) * shade, 0, 0xFFFF); + blue = CLAMP ((a->blue) * shade, 0, 0xFFFF); + + b->red = red; + b->green = green; + b->blue = blue; + + return b; +} + +static void +append_colour_define (GString *string, const gchar* name, const GdkColor* colour) +{ + g_return_if_fail (string != NULL); + g_return_if_fail (name != NULL); + g_return_if_fail (colour != NULL); + + g_string_append_printf (string, "#define %s #%2.2hx%2.2hx%2.2hx\n", + name, colour->red>>8, colour->green>>8, colour->blue>>8); +} + +static void +append_theme_colours (GtkStyle *style, GString *string) +{ + GdkColor tmp; + + g_return_if_fail (style != NULL); + g_return_if_fail (string != NULL); + + append_colour_define(string, "BACKGROUND", + &style->bg[GTK_STATE_NORMAL]); + append_colour_define(string, "FOREGROUND", + &style->fg[GTK_STATE_NORMAL]); + append_colour_define(string, "SELECT_BACKGROUND", + &style->bg[GTK_STATE_SELECTED]); + append_colour_define(string, "SELECT_FOREGROUND", + &style->text[GTK_STATE_SELECTED]); + append_colour_define(string, "WINDOW_BACKGROUND", + &style->base[GTK_STATE_NORMAL]); + append_colour_define(string, "WINDOW_FOREGROUND", + &style->text[GTK_STATE_NORMAL]); + + append_colour_define(string, "INACTIVE_BACKGROUND", + &style->bg[GTK_STATE_INSENSITIVE]); + append_colour_define(string, "INACTIVE_FOREGROUND", + &style->text[GTK_STATE_INSENSITIVE]); + + append_colour_define(string, "ACTIVE_BACKGROUND", + &style->bg[GTK_STATE_SELECTED]); + append_colour_define(string, "ACTIVE_FOREGROUND", + &style->text[GTK_STATE_SELECTED]); + + append_colour_define(string, "HIGHLIGHT", + colour_shade (&style->bg[GTK_STATE_NORMAL], + 1.2, &tmp)); + append_colour_define(string, "LOWLIGHT", + colour_shade (&style->bg[GTK_STATE_NORMAL], + 2.0/3.0, &tmp)); + return; +} + +/* + * Directory scanning functions + */ + +/** + * Compare two file names on their base names. + */ +static gint +compare_basenames (gconstpointer a, gconstpointer b) +{ + char *base_a, *base_b; + int res; + base_a = g_path_get_basename (a); + base_b = g_path_get_basename (b); + res = strcmp (base_a, base_b); + g_free (base_a); + g_free (base_b); + return res; +} + +/** + * Append the contents of a file onto the end of a GString + */ +static void +append_file (const char* file, GString *string, GError **error) +{ + gchar *contents; + + g_return_if_fail (string != NULL); + g_return_if_fail (file != NULL); + + if (g_file_get_contents (file, &contents, NULL, error)) { + g_string_append (string, contents); + g_free (contents); + } +} + +/** + * Scan a single directory for .ad files, and return them all in a + * GSList* + */ +static GSList* +scan_ad_directory (const char *path, GError **error) +{ + GSList *list = NULL; + GDir *dir; + const gchar *entry; + + g_return_val_if_fail (path != NULL, NULL); + dir = g_dir_open (path, 0, error); + if (*error) { + return NULL; + } + while ((entry = g_dir_read_name (dir)) != NULL) { + int len; + len = strlen (entry); + if (g_str_has_suffix (entry, ".ad")) { + list = g_slist_prepend (list, g_strdup_printf ("%s/%s", path, entry)); + } + } + g_dir_close (dir); + /* TODO: sort still? */ + return g_slist_sort (list, (GCompareFunc)strcmp); +} + +/** + * Scan the user and system paths, and return a list of strings in the + * right order for processing. + */ +static GSList* +scan_for_files (GError **error) +{ + const char* home_dir; + + GSList *user_list = NULL, *system_list = NULL; + GSList *list = NULL, *p; + + system_list = scan_ad_directory (SYSTEM_AD_DIR, error); + if (*error) return NULL; + + home_dir = g_get_home_dir (); + if (home_dir) { + char *user_ad = g_build_filename (home_dir, USER_AD_DIR, NULL); + user_list = scan_ad_directory (user_ad, error); + if (*error) { + g_slist_foreach (system_list, (GFunc)g_free, NULL); + g_slist_free (system_list); + g_free (user_ad); + return NULL; + } + } else { + g_warning (_("Cannot determine user's home directory")); + } + + /* An alternative approach would be to strdup() the strings + and free the entire contents of these lists, but that is a + little inefficient for my liking - RB */ + for (p = system_list; p != NULL; p = g_slist_next (p)) { + if (strcmp (p->data, GENERAL_AD) == 0) { + /* We ignore this, free the data now */ + g_free (p->data); + continue; + } + if (g_slist_find_custom (user_list, p->data, compare_basenames)) { + /* Ditto */ + g_free (p->data); + continue; + } + list = g_slist_prepend (list, p->data); + } + g_slist_free (system_list); + + for (p = user_list; p != NULL; p = g_slist_next (p)) { + list = g_slist_prepend (list, p->data); + } + g_slist_free (user_list); + + /* Reverse the order so it is the correct way */ + list = g_slist_reverse (list); + + /* Add the initial file */ + list = g_slist_prepend (list, g_strdup (GENERAL_AD)); + + return list; +} + +/** + * Append the users .Xresources file if it exists + */ +static void +append_xresources (GString *string, GError **error) +{ + const char* home_path; + + g_return_if_fail (string != NULL); + + home_path = g_get_home_dir (); + if (home_path == NULL) { + g_warning (_("Cannot determine user's home directory")); + return; + } + char *xresources = g_build_filename (home_path, USER_X_RESOURCES, NULL); + if (g_file_test (xresources, G_FILE_TEST_EXISTS)) { + append_file (xresources, string, error); + if (*error) { + g_warning ("%s", (*error)->message); + g_error_free (*error); + error = NULL; + } + } + g_free (xresources); +} + +/* + * Entry point + */ +static void +apply_settings (GtkStyle *style) +{ + char *xrdb[] = { "xrdb", "-merge", NULL }; + GString *string; + GSList *list = NULL, *p; + GError *error = NULL; + + string = g_string_sized_new (256); + append_theme_colours (style, string); + + list = scan_for_files (&error); + if (error) { + g_warning (error->message); + g_error_free (error); + error = NULL; + } + for (p = list; p != NULL; p=g_slist_next (p)) { + append_file (p->data, string, &error); + if (error) { + g_warning (error->message); + g_error_free (error); + error = NULL; + } + } + + g_slist_foreach (list, (GFunc)g_free, NULL); + g_slist_free (list); + + append_xresources (string, &error); + if (error) { + g_warning (error->message); + g_error_free (error); + error = NULL; + } + + gnome_settings_daemon_spawn_with_input (xrdb, string->str); + g_string_free (string, TRUE); + return; +} + +static void +style_set_cb (GtkWidget *widget, GtkStyle *s, gpointer data) +{ + apply_settings (gtk_widget_get_style (widget)); +} + +void +gnome_settings_xrdb_init (GConfClient *client) +{ + widget = gtk_window_new (GTK_WINDOW_TOPLEVEL); + g_signal_connect (widget, "style-set", (GCallback)style_set_cb, NULL); + gtk_widget_ensure_style (widget); +} + +void +gnome_settings_xrdb_load (GConfClient *client) +{ + style_set_cb (widget, NULL, NULL); +} diff --git a/gnome-settings-daemon/gnome-settings-xrdb.h b/gnome-settings-daemon/gnome-settings-xrdb.h new file mode 100644 index 000000000..8bc1d1e5f --- /dev/null +++ b/gnome-settings-daemon/gnome-settings-xrdb.h @@ -0,0 +1,33 @@ +/* -*- mode: c; style: linux -*- */ + +/* gnome-settings-xrdb + * + * Copyright © 2003 Ross Burton + * + * Written by Ross Burton + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + * 02111-1307, USA. + */ + +#ifndef __GNOME_SETTINGS_XRDB_H +#define __GNOME_SETTINGS_XRDB_H + +#include + +void gnome_settings_xrdb_init (GConfClient *client); +void gnome_settings_xrdb_load (GConfClient *client); + +#endif diff --git a/gnome-settings-daemon/xrdb/Editres.ad b/gnome-settings-daemon/xrdb/Editres.ad new file mode 100644 index 000000000..9cd3e582b --- /dev/null +++ b/gnome-settings-daemon/xrdb/Editres.ad @@ -0,0 +1,6 @@ +!Editres*Font: FONT +Editres*Tree.Background: WINDOW_BACKGROUND +Editres*Tree.Foreground: WINDOW_FOREGROUND +Editres*Tree.Toggle.Foreground: FOREGROUND +Editres*Tree.Toggle.Background: BACKGROUND +Editres*Panner.Background: BACKGROUND diff --git a/gnome-settings-daemon/xrdb/Emacs.ad b/gnome-settings-daemon/xrdb/Emacs.ad new file mode 100644 index 000000000..31850fc5b --- /dev/null +++ b/gnome-settings-daemon/xrdb/Emacs.ad @@ -0,0 +1,24 @@ +Emacs.default.attributeForeground: WINDOW_FOREGROUND +Emacs.default.attributeBackground: WINDOW_BACKGROUND + +Emacs*Foreground: WINDOW_FOREGROUND +Emacs*Background: WINDOW_BACKGROUND +Emacs*menubar*foreground: FOREGROUND +Emacs*menubar*background: BACKGROUND +Emacs*popup*Foreground: FOREGROUND +Emacs*popup*Background: BACKGROUND +Emacs*Dialog*foreground: FOREGROUND +Emacs*Dialog*background: BACKGROUND +Emacs*XlwScrollBar.Foreground: FOREGROUND +Emacs*XlwScrollBar.Background: BACKGROUND +Emacs*topToolBarShadowColor: BACKGROUND +Emacs*bottomToolBarShadowColor: BACKGROUND +Emacs*backgroundToolBarColor: BACKGROUND +Emacs*toolBarShadowThickness: 0 + +!Emacs*font: FIXED_FONT +!Emacs*menubar*Font: FONT +!Emacs*popup*Font: FONT +!Emacs*Dialog*Font: FONT +!Emacs.default.attributeFont: FIXED_FONT + diff --git a/gnome-settings-daemon/xrdb/General.ad b/gnome-settings-daemon/xrdb/General.ad new file mode 100644 index 000000000..f088091ce --- /dev/null +++ b/gnome-settings-daemon/xrdb/General.ad @@ -0,0 +1,5 @@ +*background: BACKGROUND +*foreground: FOREGROUND +!*Font: FONT +!*font: FONT +!*fontList: FONTLIST diff --git a/gnome-settings-daemon/xrdb/Makefile.am b/gnome-settings-daemon/xrdb/Makefile.am new file mode 100644 index 000000000..ccd19348a --- /dev/null +++ b/gnome-settings-daemon/xrdb/Makefile.am @@ -0,0 +1,8 @@ +xrdbdir = $(DATADIR)/control-center-2.0/xrdb +xrdb_DATA = \ + General.ad \ + Editres.ad \ + Emacs.ad \ + Motif.ad \ + Tk.ad \ + Xaw.ad diff --git a/gnome-settings-daemon/xrdb/Motif.ad b/gnome-settings-daemon/xrdb/Motif.ad new file mode 100644 index 000000000..2db820cf6 --- /dev/null +++ b/gnome-settings-daemon/xrdb/Motif.ad @@ -0,0 +1,81 @@ +*XmScrollBar.background: BACKGROUND +*XmScrollBar.foreground: FOREGROUND + +*XmSash.background: BACKGROUND +*XmSash.foreground: FOREGROUND + +*XmLabel.background: BACKGROUND +*XmLabel.foreground: FOREGROUND +*XmLabelGadget.background: BACKGROUND +*XmLabelGadget.foreground: FOREGROUND + +*XmCascadeButton.background: BACKGROUND +*XmCascadeButton.foreground: FOREGROUND +*XmCascadeButtonGadget.background: BACKGROUND +*XmCascadeButtonGadget.foreground: FOREGROUND + +*XmToggleButton.background: BACKGROUND +*XmToggleButton.foreground: FOREGROUND +*XmToggleButtonGadget.background: BACKGROUND +*XmToggleButtonGadget.foreground: FOREGROUND + +*XmPushButton.background: BACKGROUND +*XmPushButton.foreground: FOREGROUND +*XmPushButtonGadget.background: BACKGROUND +*XmPushButtonGadget.foreground: FOREGROUND + +*XmSeparator.background: BACKGROUND +*XmSeparator.foreground: FOREGROUND +*XmSeparatorGadget.background: BACKGROUND +*XmSeparatorGadget.foreground: FOREGROUND + +*XmTearOffButton.background: BACKGROUND +*XmTearOffButton.foreground: FOREGROUND +*XmTearOffButtonGadget.background: BACKGROUND +*XmTearOffButtonGadget.foreground: FOREGROUND + +*XmMenuShell.background: BACKGROUND +*XmMenuShell.foreground: FOREGROUND + +*XmDialogShell.background: BACKGROUND +*XmDialogShell.foreground: FOREGROUND + +*XmFileSelectionBox.background: BACKGROUND +*XmFileSelectionBox.foreground: FOREGROUND + +*XmSelectionBox.background: BACKGROUND +*XmSelectionBox.foreground: FOREGROUND + +*XmMessageBox.background: BACKGROUND +*XmMessageBox.foreground: FOREGROUND + +*XmRowColumn.background: BACKGROUND +*XmRowColumn.foreground: FOREGROUND + +*XmFrame.background: BACKGROUND +*XmFrame.foreground: FOREGROUND + +*XmForm.background: BACKGROUND +*XmForm.foreground: FOREGROUND + +*XmScrolledWindow.background: BACKGROUND +*XmScrolledWindow.foreground: FOREGROUND + +*XmPanedWindow.background: BACKGROUND +*XmPanedWindow.foreground: FOREGROUND + +*XmText.background: WINDOW_BACKGROUND +*XmText.foreground: WINDOW_FOREGROUND + +*XmTextField.background: WINDOW_BACKGROUND +*XmTextField.foreground: WINDOW_FOREGROUND + +*XmList.background: WINDOW_BACKGROUND +*XmList.foreground: WINDOW_FOREGROUND + +!! Use fixed font in motif lists and textfields +!! If you don't want this, copy this file into the +!! $HOME/.grdb directory and comment out these lines. +!*XmTextField.fontList: FIXED_FONT +!*XmText.fontList: FIXED_FONT +!*XmList*fontList: FIXED_FONT diff --git a/gnome-settings-daemon/xrdb/Tk.ad b/gnome-settings-daemon/xrdb/Tk.ad new file mode 100644 index 000000000..33a12009f --- /dev/null +++ b/gnome-settings-daemon/xrdb/Tk.ad @@ -0,0 +1,107 @@ +*Toplevel.background: BACKGROUND +*Toplevel.foreground: FOREGROUND +*Toplevel.highlightBackground: BACKGROUND +*Toplevel.highlightColor: FOREGROUND +*Toplevel.activeBackground: BACKGROUND +*Toplevel.activeForeground: FOREGROUND + +*Button.background: BACKGROUND +*Button.foreground: FOREGROUND +*Button.highlightBackground: BACKGROUND +*Button.highlightColor: FOREGROUND +*Button.activeBackground: BACKGROUND +*Button.activeForeground: FOREGROUND + +*Menubutton.background: BACKGROUND +*Menubutton.foreground: FOREGROUND +*Menubutton.highlightBackground: BACKGROUND +*Menubutton.highlightColor: FOREGROUND +*Menubutton.activeBackground: BACKGROUND +*Menubutton.activeForeground: FOREGROUND + +*Checkbutton.background: BACKGROUND +*Checkbutton.foreground: FOREGROUND +*Checkbutton.highlightBackground: BACKGROUND +*Checkbutton.highlightColor: FOREGROUND +*Checkbutton.activeBackground: BACKGROUND +*Checkbutton.activeForeground: FOREGROUND + +*Radiobutton.background: BACKGROUND +*Radiobutton.foreground: FOREGROUND +*Radiobutton.highlightBackground: BACKGROUND +*Radiobutton.highlightColor: FOREGROUND +*Radiobutton.activeBackground: BACKGROUND +*Radiobutton.activeForeground: FOREGROUND + +!*Label.background: BACKGROUND +!*Label.foreground: FOREGROUND +*Label.highlightBackground: BACKGROUND +*Label.highlightColor: FOREGROUND +*Label.activeBackground: BACKGROUND +*Label.activeForeground: FOREGROUND + +*Menu.background: BACKGROUND +*Menu.foreground: FOREGROUND +*Menu.highlightBackground: BACKGROUND +*Menu.highlightColor: FOREGROUND +*Menu.activeBackground: BACKGROUND +*Menu.activeForeground: FOREGROUND + +*Frame.background: BACKGROUND +*Frame.foreground: FOREGROUND +*Frame.highlightBackground: BACKGROUND +*Frame.highlightColor: FOREGROUND +*Frame.activeBackground: BACKGROUND +*Frame.activeForeground: FOREGROUND + +!*Scrollbar.background: BACKGROUND +!*Scrollbar.foreground: FOREGROUND +*Scrollbar.highlightBackground: BACKGROUND +*Scrollbar.highlightColor: FOREGROUND +*Scrollbar.activeBackground: BACKGROUND +*Scrollbar.activeForeground: FOREGROUND +*Scrollbar.troughColor: BACKGROUND + +*Scale.background: BACKGROUND +*Scale.foreground: FOREGROUND +*Scale.highlightBackground: BACKGROUND +*Scale.highlightColor: FOREGROUND +*Scale.activeBackground: BACKGROUND +*Scale.activeForeground: FOREGROUND +*Scale.troughColor: BACKGROUND + +*Entry.background: WINDOW_BACKGROUND +*Entry.foreground: WINDOW_FOREGROUND +*Entry.highlightBackground: WINDOW_BACKGROUND +*Entry.highlightColor: WINDOW_FOREGROUND +*Entry.activeBackground: WINDOW_BACKGROUND +*Entry.activeForeground: WINDOW_FOREGROUND +*Entry.selectBackground: SELECT_BACKGROUND +*Entry.selectForeground: SELECT_FOREGROUND + +!*Text.background: WINDOW_BACKGROUND +!*Text.foreground: WINDOW_FOREGROUND +*Text.highlightBackground: WINDOW_BACKGROUND +*Text.highlightColor: WINDOW_FOREGROUND +*Text.activeBackground: WINDOW_BACKGROUND +*Text.activeForeground: WINDOW_FOREGROUND +*Text.selectBackground: SELECT_BACKGROUND +*Text.selectForeground: SELECT_FOREGROUND + +*Listbox.background: WINDOW_BACKGROUND +*Listbox.foreground: WINDOW_FOREGROUND +*Listbox.highlightBackground: WINDOW_BACKGROUND +*Listbox.highlightColor: WINDOW_FOREGROUND +*Listbox.activeBackground: WINDOW_BACKGROUND +*Listbox.activeForeground: WINDOW_FOREGROUND +*Listbox.selectBackground: SELECT_BACKGROUND +*Listbox.selectForeground: SELECT_FOREGROUND + +*Canvas.background: WINDOW_BACKGROUND +*Canvas.foreground: WINDOW_FOREGROUND +*Canvas.highlightBackground: WINDOW_BACKGROUND +*Canvas.highlightColor: WINDOW_FOREGROUND +*Canvas.activeBackground: WINDOW_BACKGROUND +*Canvas.activeForeground: WINDOW_FOREGROUND +*Canvas.selectbackground: SELECT_BACKGROUND +*Canvas.selectforeground: SELECT_FOREGROUND diff --git a/gnome-settings-daemon/xrdb/Xaw.ad b/gnome-settings-daemon/xrdb/Xaw.ad new file mode 100644 index 000000000..c88213841 --- /dev/null +++ b/gnome-settings-daemon/xrdb/Xaw.ad @@ -0,0 +1,41 @@ +*beNiceToColormap: false +*borderColor: black + +*MenuButton.background: BACKGROUND +*Command.background: BACKGROUND +*Toggle.background: BACKGROUND +*Label.background: BACKGROUND +*Scrollbar*background: BACKGROUND +*SimpleMenu*background: BACKGROUND +*Box.background: BACKGROUND +*Form.background: BACKGROUND +*Dialog.background: BACKGROUND +*Text.background: WINDOW_BACKGROUND +*List.background: WINDOW_BACKGROUND + +*MenuButton.foreground: FOREGROUND +*Command.foreground: FOREGROUND +*Toggle.foreground: FOREGROUND +*Label.foreground: FOREGROUND +*Scrollbar.foreground: FOREGROUND +*SimpleMenu*foreground: FOREGROUND +*Box.foreground: FOREGROUND +*Form.foreground: FOREGROUND +*Dialog.foreground: FOREGROUND +*Text.foreground: WINDOW_FOREGROUND +*List.foreground: WINDOW_FOREGROUND + +*ScrollbarBackground: BACKGROUND +*Scrollbar*width: 15 +*Scrollbar*height: 15 +*Scrollbar*shadowWidth: 2 +*Scrollbar*cursorName: left_ptr +*Scrollbar*pushThumb: false +*ShapeStyle: Rectangle +*SmeBSB*shadowWidth: 3 +*Scrollbar*Cursor: left_ptr +*Command.translations: \ + : reset()\n\ + : set()\n\ + : notify() unset() +