]> Pileus Git - ~andy/gtk/blob - gdk/x11/gdksettings.c
Add Gtk/EnableAccels and Gtk/EnableMnemonics xsettings for
[~andy/gtk] / gdk / x11 / gdksettings.c
1 /* GDK - The GIMP Drawing Kit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
25  */
26
27
28 #define GDK_SETTINGS_N_ELEMENTS()       G_N_ELEMENTS (gdk_settings_map)
29 #define GDK_SETTINGS_X_NAME(nth)        (gdk_settings_names + gdk_settings_map[nth].xsettings_offset)
30 #define GDK_SETTINGS_GDK_NAME(nth)      (gdk_settings_names + gdk_settings_map[nth].gdk_offset)
31
32 static const char gdk_settings_names[] =
33   "Net/DoubleClickTime\0"     "gtk-double-click-time\0"
34   "Net/DoubleClickDistance\0" "gtk-double-click-distance\0"
35   "Net/DndDragThreshold\0"    "gtk-dnd-drag-threshold\0"
36   "Net/CursorBlink\0"         "gtk-cursor-blink\0"
37   "Net/CursorBlinkTime\0"     "gtk-cursor-blink-time\0"
38   "Net/ThemeName\0"           "gtk-theme-name\0"
39   "Net/IconThemeName\0"       "gtk-icon-theme-name\0"
40   "Gtk/CanChangeAccels\0"     "gtk-can-change-accels\0"
41   "Gtk/ColorPalette\0"        "gtk-color-palette\0"
42   "Gtk/FontName\0"            "gtk-font-name\0"
43   "Gtk/IconSizes\0"           "gtk-icon-sizes\0"
44   "Gtk/KeyThemeName\0"        "gtk-key-theme-name\0"
45   "Gtk/ToolbarStyle\0"        "gtk-toolbar-style\0"
46   "Gtk/ToolbarIconSize\0"     "gtk-toolbar-icon-size\0"
47   "Gtk/IMPreeditStyle\0"      "gtk-im-preedit-style\0"
48   "Gtk/IMStatusStyle\0"       "gtk-im-status-style\0"
49   "Gtk/Modules\0"             "gtk-modules\0"
50   "Gtk/FileChooserBackend\0"  "gtk-file-chooser-backend\0"
51   "Gtk/ButtonImages\0"        "gtk-button-images\0"
52   "Gtk/MenuImages\0"          "gtk-menu-images\0"
53   "Gtk/MenuBarAccel\0"        "gtk-menu-bar-accel\0"
54   "Gtk/CursorThemeName\0"     "gtk-cursor-theme-name\0"
55   "Gtk/CursorThemeSize\0"     "gtk-cursor-theme-size\0"
56   "Gtk/ShowInputMethodMenu\0" "gtk-show-input-method-menu\0"
57   "Gtk/ShowUnicodeMenu\0"     "gtk-show-unicode-menu\0"
58   "Gtk/TimeoutInitial\0"      "gtk-timeout-initial\0"
59   "Gtk/TimeoutRepeat\0"       "gtk-timeout-repeat\0"
60   "Gtk/ColorScheme\0"         "gtk-color-scheme\0"
61   "Gtk/EnableAnimations\0"    "gtk-enable-animations\0"
62   "Xft/Antialias\0"           "gtk-xft-antialias\0"
63   "Xft/Hinting\0"             "gtk-xft-hinting\0"
64   "Xft/HintStyle\0"           "gtk-xft-hintstyle\0"
65   "Xft/RGBA\0"                "gtk-xft-rgba\0"
66   "Xft/DPI\0"                 "gtk-xft-dpi\0"
67   "Net/FallbackIconTheme\0"   "gtk-fallback-icon-theme\0"
68   "Gtk/TouchscreenMode\0"     "gtk-touchscreen-mode\0"
69   "Gtk/EnableAccels\0"        "gtk-enable-accels\0"
70   "Gtk/EnableMnemonics\0"     "gtk-enable-mnemonics\0";
71
72 static const struct
73 {
74   gint xsettings_offset;
75   gint gdk_offset;
76 } gdk_settings_map[] = {
77   {    0,   20 },
78   {   42,   66 },
79   {   92,  113 },
80   {  136,  152 },
81   {  169,  189 },
82   {  211,  225 },
83   {  240,  258 },
84   {  278,  298 },
85   {  320,  337 },
86   {  355,  368 },
87   {  382,  396 },
88   {  411,  428 },
89   {  447,  464 },
90   {  482,  502 },
91   {  524,  543 },
92   {  564,  582 },
93   {  602,  614 },
94   {  626,  649 },
95   {  674,  691 },
96   {  709,  724 },
97   {  740,  757 },
98   {  776,  796 },
99   {  818,  838 },
100   {  860,  884 },
101   {  911,  931 },
102   {  953,  972 },
103   {  992, 1010 },
104   { 1029, 1045 },
105   { 1062, 1083 },
106   { 1105, 1119 },
107   { 1137, 1149 },
108   { 1165, 1179 },
109   { 1197, 1206 },
110   { 1219, 1227 },
111   { 1239, 1261 },
112   { 1285, 1305 },
113   { 1326, 1343 },
114   { 1361, 1381 }
115 };