Name

gtk.Settings — an object that contains the global settings for widgets

Synopsis

class gtk.Settings(gobject.GObject):
    def set_string_property(name, v_string, origin)
def set_long_property(name, v_long, origin)
def set_double_property(name, v_double, origin)
Functions

    def gtk.settings_get_default()
def gtk.settings_get_for_screen(screen)

Ancestry

+-- gobject.GObject
  +-- gtk.Settings

Properties

"gtk-button-images"Read-WriteIf TRUE, stock icons should be shown in buttons. Available in GTK+ 2.4 and above.
"gtk-can-change-accels"Read-WriteIf TRUE, the menu accelerators can be changed by pressing a key over the menu item.
"gtk-color-palette"Read-WriteThe palette to use in the color selector
"gtk-cursor-blink"Read-WriteIf TRUE, the cursor should blink
"gtk-cursor-blink-time"Read-WriteThe length of the cursor blink cycle, in milliseconds
"gtk-dnd-drag-threshold"Read-WriteThe number of pixels the cursor can move before dragging starts
"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.
"gtk-double-click-time"Read-WriteThe maximum time allowed between two clicks for them to be considered a double click (in milliseconds)
"gtk-entry-select-on-focus"Read-WriteIf TRUE, select the contents of an entry when it is focused.
"gtk-font-name"Read-WriteThe name of the default font to use
"gtk-icon-sizes"Read-WriteThe list of icon sizes (gtk-menu=16,16;gtk-button=20,20...
"gtk-key-theme-name"Read-WriteThe name of the key theme RC file to load
"gtk-menu-bar-accel"Read-WriteThe keybinding to activate the menu bar
"gtk-menu-bar-popup-delay"Read-WriteThe delay before the submenus of a menu bar appear. Available in GTK+ 2.2 and above.
"gtk-menu-images"Read-WriteIf TRUE images should be shown in menus. 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. Available in GTK+ 2.2 and above.
"gtk-menu-popdown-delay"Read-WriteMinimum time the pointer must stay over a menu item before the submenu appears. Available in GTK+ 2.2 and above.
"gtk-split-cursor"Read-WriteIf TRUE, two cursors should be displayed for mixed left-to-right and right-to-left text
"gtk-theme-name"Read-WriteThe name of the theme RC file to load
"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
"gtk-toolbar-style"Read-WriteThe toolbar display style - one of: gtk.TOOLBAR_ICONS, gtk.TOOLBAR_TEXT, gtk.TOOLBAR_BOTH or gtk.TOOLBAR_BOTH_HORIZ
"gtk-xft-antialias"Read-WriteWhether to antialias Xft fonts; 0=no, 1=yes, -1=default. Available in GTK+ 2.4 and above.
"gtk-xft-dpi"Read-WriteResolution for Xft, in 1024 * dots/inch. -1 to use default value. Available in GTK+ 2.4 and above.
"gtk-xft-hinting"Read-WriteWhether to hint Xft fonts; 0=no, 1=yes, -1=default. Available in GTK+ 2.4 and above.
"gtk-xft-hintstyle"Read-WriteWhat degree of hinting to use; none, slight, medium, or full. Available in GTK+ 2.4 and above.
"gtk-xft-rgba"Read-WriteType of subpixel antialiasing; none, rgb, bgr, vrgb, vbgr. Available in GTK+ 2.4 and above.

Description

The gtk.Settings object is a singleton object that stores the values of the global settings. The singleton gtk.Settings object can be retrieved using the settings_get_default() function or the gtk.Widget.get_settings() method.

Methods

gtk.Settings.set_string_property

    def set_string_property(name, v_string, origin)
name :the name of the property to set
v_string :the string value
origin :the string value of the origin

The set_string_property() method sets the property named name to the string value specified by v_string at the string origin specified by origin.

gtk.Settings.set_long_property

    def set_long_property(name, v_long, origin)
name :the name of the property to set
v_long :the long value
origin :the string value of the origin

The set_long_property() method sets the property named name to the long value specified by v_long at the string origin specified by origin.

gtk.Settings.set_double_property

    def set_double_property(name, v_double, origin)
name :the name of the property to set
v_double :the double value
origin :the string value of the origin

The set_double_property() method sets the property named name to the double value specified by v_long at the string origin specified by origin.

Functions

gtk.settings_get_default

    def gtk.settings_get_default()
Returns :the singleton gtk.Settings object

The gtk.settings_get_default function returns the singleton gtk.Settings object.

gtk.settings_get_for_screen

    def gtk.settings_get_for_screen(screen)
screen :a gtk.gdk.Screen object
Returns :a gtk.Settings object

Note

This 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.