gtk.Settingsan object that contains the global settings for the
widgets on a gtk.gdk.ScreenSynopsisgtk.Settingsgobject.GObjectset_string_propertynamev_stringoriginset_long_propertynamev_longoriginset_double_propertynamev_doubleoriginFunctionsgtk.settings_get_defaultgtk.settings_get_for_screenscreenAncestry+-- gobject.GObject
+-- gtk.Settings
gtk.Settings Properties
"color-hash"ReadHolds a hash table representation of the
gtk-color-scheme setting, mapping color names to gtk.gdk.Colors.
This property is available in GTK+ 2.10 and above."gtk-alternative-button-order"Read-WriteIf True, buttons in dialogs should
use the alternative button order. Available in GTK+ 2.6 and above. Default
value: False"gtk-alternative-sort-arrows"Read-WriteControls the direction of the sort indicators in sorted list
and tree views. By default an arrow pointing down means the column
is sorted in ascending order. When set to True,
this order will be inverted. Default value: False.
This property is available in GTK+ 2.12 and above."gtk-auto-mnemonics"Read-WriteControls whether mnemonics should be automatically shown and
hidden when the user presses the mnemonic activator. Default value: False
Available in GTK+ 2.20 and above."gtk-button-images"Read-WriteIf True, stock icons should be shown
in buttons. Available in GTK+ 2.4 and above.
Default value: True"gtk-can-change-accels"Read-WriteIf True, the menu accelerators can
be changed by pressing a key over the menu item. Default
value: False"gtk-color-palette"Read-WriteThe palette to use in the color selector.
Default value: "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90""gtk-color-scheme"Read-WriteA palette of named colors for use in themes. The format of
the string is:
name1: color1
name2: color2
...
Color names must be acceptable as identifiers in the gtk.RcStyle syntax,
and color specifications must be in the format accepted by the gtk.gdk.color_parse()
function. Note that due to the way the color tables from different sources
are merged, color specifications will be converted to hexadecimal form when
getting this property. Default value: ''. This property is available in
GTK+ 2.10 and above."gtk-cursor-blink"Read-WriteIf True, the cursor should
blink. Default value: True"gtk-cursor-blink-time"Read-WriteThe length of the cursor blink cycle, in
milliseconds. Allowed values: >= 100. Default value: 1200"gtk-cursor-blink-timeout"Read-WriteTime after which the cursor stops blinking, in seconds.
The timer is reset after each user interaction.
Setting this to zero has the same effect as setting
GtkSettings:gtk-cursor-blink to False.
Allowed values: >= 1. Default value: 2147483647.
This property is available in GTK+ 2.12 and above."gtk-cursor-theme-name"Read-WriteName of the cursor theme to use, or
None to use the default theme. Default
value: None"gtk-cursor-theme-size"Read-WriteSize to use for cursors, or 0 to use the default
size. Allowed values: [0,128]. Default value: 0."gtk-dnd-drag-threshold"Read-WriteThe number of pixels the cursor can move before
dragging starts. Allowed values: >= 1. Default value: 8"gtk-double-click-distance"Read-WriteThe maximum distance allowed between two clicks for
them to be considered a double click (in pixels). Available in GTK+ 2.4
and above. Allowed values: >= 0. Default value: 5"gtk-double-click-time"Read-WriteThe maximum time allowed between two clicks for them to
be considered a double click (in milliseconds). Allowed values: >= 0.
Default value: 250"gtk-enable-accels"Read-WriteWhether menu items should have visible accelerators which
can be activated.
Default value: True.
This property is available in GTK+ 2.12 and above."gtk-enable-animations"Read-WriteIf True enable toolkit-wide
animations. Default value: True."gtk-enable-event-sounds"Read-WriteWhether to play any event sounds at all. See the Sound
Theme spec for more information on event sounds and sound themes.
GTK+ itself does not support event sounds, you have to use a
loadable module like the one that comes with libcanberra.
Default value: True.
This property is available in GTK+ 2.14 and above."gtk-enable-input-feedback-sounds"Read-WriteWhether to play event sounds as feedback to user input.
See the Sound Theme spec for more information on event sounds
and sound themes. GTK+ itself does not support event sounds, you
have to use a loadable module like the one that comes
with libcanberra. Default value: True.
This property is available in GTK+ 2.14 and above."gtk-enable-mnemonics"Read-WriteWhether labels and menu items should have visible mnemonics
which can be activated.
Default value: True.
This property is available in GTK+ 2.12 and above."gtk-enable-tooltips"Read-WriteWhether tooltips should be shown on widgets.
Default value: True.
This property is available in GTK+ 2.14 and above."gtk-entry-password-hint-timeout"Read-WriteHow long to show the last input character in hidden
entries. This value is in milliseconds. 0 disables showing the
last char. 600 is a good value for enabling it. Default value:
0. This property is available in GTK+ 2.10 and above."gtk-entry-select-on-focus"Read-WriteIf True, select the contents of an
entry when it is focused. Default value: True"gtk-error-bell"Read-WriteWhen True, keyboard navigation and other
input-related errors will cause a beep. Since the error bell is
implemented using
gtk.gdk.Window.bell(),
the windowing system may
offer ways to configure the error bell in many ways, such as
flashing the window or similar visual effects.
Default value: True.
This property is available in GTK+ 2.12 and above."gtk-fallback-icon-theme"Read-WriteName of a icon theme to fall back to. Default value:
None."gtk-file-chooser-backend"Read-WriteName of the GtkFileChooser backend to use by default.
Default value: None"gtk-font-name"Read-WriteThe name of the default font to use.
Default value: "Sans 10""gtk-fontconfig-timestamp"Read-WriteTimestamp of current fontconfig configuration.
Default value: 0"gtk-icon-sizes"Read-WriteThe list of icon sizes (gtk-menu=16,16;gtk-button=20,20...).
Default value: None"gtk-icon-theme-name"Read-WriteThe name of the icon theme to use. Available in
GTK+ 2.4 and above. Default value: "hicolor""gtk-im-module"Read-WriteWhich IM (input method) module should be used by default. This is the input method that will be used if the user has not explicitly chosen another input method from the IM context menu.
Default value: None"gtk-key-theme-name"Read-WriteThe name of the key theme RC file to load.
Default value: None"gtk-keynav-cursor-only"Read-WriteWhen True, keyboard navigation should be
able to reach all widgets by using the cursor keys only. Tab,
Shift etc. keys can't be expected to be present on the used
input device.
Default value: False.
This property is available in GTK+ 2.12 and above."gtk-keynav-wrap-around"Read-WriteWhen True, some widgets will wrap around
when doing keyboard navigation, such as menus, menubars and notebooks.
Default value: True.
This property is available in GTK+ 2.12 and above."gtk-label-select-on-focus"Read-WriteIf True select the contents of a
selectable label when it is focused. Default value:
True."gtk-menu-bar-accel"Read-WriteThe keybinding to activate the menu bar. Default
value: "F10""gtk-menu-bar-popup-delay"Read-WriteThe delay before the submenus of a menu bar appear.
Allowed values: >= 0. Default value: 0 Available in GTK+ 2.2
and above."gtk-menu-images"Read-WriteIf True images should be shown in
menus. Default value: True. Available in
GTK+ 2.4 and above."gtk-menu-popdown-delay"Read-WriteThe time before hiding a submenu when the pointer is
moving toward the submenu. Allowed values: >= 0. Default
value: 1000. Available in GTK+ 2.2 and above."gtk-menu-popup-delay"Read-WriteMinimum time the pointer must stay over a menu item
before the submenu appears. Allowed values: >= 0. Default
value: 225. Available in GTK+ 2.2 and above."gtk-modules"Read-WriteThe list of currently active GTK modules. Default
value: None. Available in GTK+ 2.6 and
above."gtk-print-backends"Read-WriteA comma-separated list of print backends to use in the print dialog. Available print backends depend
on the GTK+ installation, and may include "file", "cups", "lpr" or "papi".
Default value: "file,cups".
Available in GTK+ 2.10 and above."gtk-print-preview-command"Read-WriteA command to run for displaying the print preview. The command should contain a "f" placeholder, which
will get replaced by the path to the pdf file. The command may also contain a "s" placeholder, which will get
replaced by the path to a file containing the print settings in the format produced by gtk_print_settings_to_file().
The preview application is responsible for removing the pdf file and the print settings file when it is done.
Default value: "evince --unlink-tempfile --preview --print-settings %s %f".
Available in GTK+ 2.10 and above."gtk-recent-files-limit"Read-WriteThe number of recently used files that should be displayed
by default by GtkRecentChooser implementations and by the GtkFileChooser.
A value of -1 means every recently used file stored.
Allowed values: >= -1. Default value: 50.
This property is available in GTK+ 2.12 and above."gtk-recent-files-max-age"Read-WriteThe maximum age, in days, of the items inside the recently
used resources list. Items older than this setting will be excised
from the list. If set to 0, the list will always be empty;
if set to -1, no item will be removed. Allowed values: >= -1.
Default value: 30
This property is available in GTK+ 2.14 and above."gtk-scrolled-window-placement"Read-WriteWhere the contents of scrolled windows are located with
respect to the scrollbars, if not overridden by the scrolled
window's own placement. Default value:
gtk.CORNER_TOP_LEFT."gtk-show-input-method-menu"Read-WriteIf True the context menus of entries
and text views should offer to change the input
method. Default value: True."gtk-show-unicode-menu"Read-WriteIf True the context menus of entries
and text views should offer to insert control
characters. Default value: True."gtk-sound-theme-name"Read-WriteThe XDG sound theme to use for event sounds. See the Sound
Theme spec for more information on event sounds and sound themes.
GTK+ itself does not support event sounds, you have to use a
loadable module like the one that comes with libcanberra.
Default value: "freedesktop".
This property is available in GTK+ 2.14 and above."gtk-split-cursor"Read-WriteIf True, two cursors should be
displayed for mixed left-to-right and right-to-left text.
Default value: True"gtk-theme-name"Read-WriteThe name of the theme RC file to load. Default value:
"Raleigh""gtk-timeout-expand"Read-WriteExpand value for timeouts, when a widget is expanding a
new region. Allowed values: >= 0. Default value: 500."gtk-timeout-initial"Read-WriteStarting value for timeouts, when button is
pressed. Allowed values: >= 0. Default value: 200."gtk-timeout-repeat"Read-WriteRepeat value for timeouts, when button is
pressed. Allowed values: >= 0. Default value: 20."gtk-toolbar-icon-size"Read-Writethe toolbar icon size - one of:
gtk.ICON_SIZE_MENU,
gtk.ICON_SIZE_SMALL_TOOLBAR,
gtk.ICON_SIZE_LARGE_TOOLBAR,
gtk.ICON_SIZE_BUTTON,
gtk.ICON_SIZE_DND or
gtk.ICON_SIZE_DIALOG. Default value:
gtk.ICON_SIZE_LARGE_TOOLBAR."gtk-toolbar-style"Read-WriteThe toolbar display style - one of:
gtk.TOOLBAR_ICONS,
gtk.TOOLBAR_TEXT,
gtk.TOOLBAR_BOTH or
gtk.TOOLBAR_BOTH_HORIZ. Default value:
gtk.TOOLBAR_BOTH"gtk-tooltip-browse-mode-timeout"Read-WriteAmount of time, in milliseconds, after which the browse mode will be disabled.
See GtkSettings:gtk-tooltip-browse-timeout for more information about browse mode.
Allowed values: >= 0. Default value: 500.
This property is available in GTK+ 2.12 and above"gtk-tooltip-browse-timeout"Read-WriteControls the time after which tooltips will appear when
browse mode is enabled, in milliseconds.
Browse mode is enabled when the mouse pointer moves off an object
where a tooltip was currently being displayed. If the mouse pointer
hits another object before the browse mode timeout expires
(see GtkSettings:gtk-tooltip-browse-mode-timeout), it will take the
amount of milliseconds specified by this setting to popup the tooltip
for the new object.
Allowed values: >= 0. Default value: 100.
This property is available in GTK+ 2.12 and above"gtk-tooltip-timeout"Read-WriteTime, in milliseconds, after which a tooltip could appear
if the cursor is hovering on top of a widget.
Allowed values: >= 0. Default value: 1500.
This property is available in GTK+ 2.12 and above"gtk-touchscreen-mode"Read-WriteWhen True, there are no motion notify events delivered
on this screen, and widgets can't use the pointer hovering
them for any essential functionality. Default value:
False. This property is available in GTK+
2.10 and above."gtk-xft-antialias"Read-WriteWhether to antialias Xft fonts; 0=no, 1=yes,
-1=default. Default value: -1. Available in GTK+ 2.4 and
above."gtk-xft-dpi"Read-WriteResolution for Xft, in 1024 * dots/inch. -1 to use
default value. Allowed values: [-1,1048576]. Default value:
-1. Available in GTK+ 2.4 and above."gtk-xft-hinting"Read-WriteWhether to hint Xft fonts; 0=no, 1=yes, -1=default.
Default value: -1. Available in GTK+ 2.4 and above."gtk-xft-hintstyle"Read-WriteWhat degree of hinting to use; none, slight, medium, or
full. Default value: None. Available in
GTK+ 2.4 and above."gtk-xft-rgba"Read-WriteType of subpixel antialiasing; none, rgb, bgr, vrgb,
vbgr. Default value: None. Available in
GTK+ 2.4 and above.
DescriptionThe gtk.Settings
object stores the values of the global settings associated with a gtk.gdk.Screen. The
gtk.Settings
object for the default gtk.gdk.Screen can
be retrieved using the gtk.settings_get_default()
function. The gtk.Widget.get_settings()
method returns the gtk.Settings
object of the gtk.gdk.Screen that
the widget is displayed on.Methodsgtk.Settings.set_string_propertyset_string_propertynamev_stringoriginname :the name of the property to
setv_string :the string valueorigin :the string value of the
originThe set_string_property() method sets
the property named name to the string value specified
by v_string at the string origin specified by
origin. origin is an
application specified string like "filename:linenumber" or
"myapp:widgetname".gtk.Settings.set_long_propertyset_long_propertynamev_longoriginname :the name of the property to
setv_long :the long valueorigin :the string value of the
originThe set_long_property() method sets the
property named name to the long value specified by
v_long at the string origin specified by
origin. origin is an
application specified string like "filename:linenumber" or
"myapp:widgetname".gtk.Settings.set_double_propertyset_double_propertynamev_doubleoriginname :the name of the property to
setv_double :the double valueorigin :the string value of the
originThe set_double_property() method sets
the property named name to the double value specified
by v_long at the string origin specified by
origin. origin is an
application specified string like "filename:linenumber" or
"myapp:widgetname".Functionsgtk.settings_get_defaultgtk.settings_get_defaultReturns :the singleton gtk.Settings
objectThe gtk.settings_get_default function
returns the singleton gtk.Settings
object.gtk.settings_get_for_screengtk.settings_get_for_screenscreenscreen :a gtk.gdk.Screen
objectReturns :a gtk.Settings
objectThis function is available in PyGTK 2.2 and above.The gtk.settings_get_for_screen() function
returns the singleton gtk.Settings
object for the gtk.gdk.Screen
specified by screen.