Functions

  catalog_add_path (path)
  catalog_destroy_all ()
  catalog_is_loaded (name)
  catalog_remove_path (path)
  cursor_get_add_widget_pixbuf ()
  cursor_init ()
  cursor_set (project, window, type)
  displayable_value_is_disabled (type, value)
  displayable_value_set_disabled (type, value, disabled)
  get_debug_flags ()
  get_displayable_value (type, value)
  get_value_from_displayable (type, displayabe)
  init ()
  init_debug_flags ()
  propert_get_insensitive_tooltip (property)
  property_class_get_default_from_spec (spec)
  property_class_update_from_node (node, object_type, property_class, domain)
  register_displayable_value (type, value, domain, string)
  register_translated_value (type, value, string)
  setup_log_handlers ()
  standard_stock_append_prefix (prefix)
  type_has_displayable_values (type)
  util_canonical_path (path)
  util_check_and_warn_scrollable (parent, child_adaptor, parent_widget)
  util_compare_stock_labels (a, b)
  util_count_placeholders (parent)
  util_duplicate_underscores (name)
  util_file_is_writeable (path)
  util_filename_to_icon_name (value)
  util_find_iter_by_widget (model, findme, column)
  util_get_file_mtime (filename)
  util_get_type_from_name (name, have_func)
  util_have_devhelp ()
  util_icon_name_to_filename (value)
  util_object_is_loading (object)
  util_read_prop_name (str)
  util_remove_scroll_events (widget)
  util_replace (str, a, b)
  util_search_devhelp (book, page, search)
  util_url_show (url)
  utils_boolean_from_string (string, value)
  utils_cairo_draw_line (cr, color, x1, y1, x2, y2)
  utils_cairo_draw_rectangle (cr, color, filled, x, y, width, height)
  utils_enum_string_from_value (enum_type, value)
  utils_enum_string_from_value_displayable (flags_type, value)
  utils_enum_value_from_string (enum_type, strval)
  utils_flags_string_from_value (enum_type, value)
  utils_flags_string_from_value_displayable (flags_type, value)
  utils_flags_value_from_string (enum_type, strval)
  utils_get_pointer (widget, window, device, x, y)
  utils_hijack_key_press (win, event, user_data)
  utils_replace_home_dir_with_tilde (path)
  utils_string_from_value (value)
  utils_value_from_string (type, string, project)
  xml_dump_from_context (context)
  xml_get_boolean (node, name, _default)
  xml_get_content (node_in)
  xml_get_property_boolean (node_in, name, _default)
  xml_get_property_double (node_in, name, _default)
  xml_get_property_int (node_in, name, _default)
  xml_get_property_string (node_in, name)
  xml_get_property_string_required (node_in, name, xtra)
  xml_get_property_version (node_in, name, major, minor)
  xml_get_value_int (node_in, name, val)
  xml_get_value_int_required (node, name, val)
  xml_get_value_string (node, name)
  xml_get_value_string_required (node, name, xtra_info)
  xml_load_sym_from_node (node_in, module, tagname, sym_location)
  xml_set_content (node_in, content)
  xml_set_value (node_in, name, val)

Details

Gladeui.catalog_add_path(path)
Parameters:path (str) –

Adds a new path to the list of path to look catalogs for.

Gladeui.catalog_destroy_all()

Destroy and free all resources related with every loaded catalog.

Gladeui.catalog_is_loaded(name)
Parameters:name (str) – a catalog object
Returns:Whether name is loaded or not
Return type:bool
Gladeui.catalog_remove_path(path)
Parameters:path (str) –

Remove path from the list of path to look catalogs for. None to remove all paths.

Gladeui.cursor_get_add_widget_pixbuf()
Return type:GdkPixbuf.Pixbuf
Gladeui.cursor_init()

Initializes cursors for use with Gladeui.Cursor.set().

Gladeui.cursor_set(project, window, type)
Parameters:

Sets the cursor for window to something appropriate based on type. (also sets the cursor on all visible project widgets)

Gladeui.displayable_value_is_disabled(type, value)
Parameters:
Return type:

bool

Gladeui.displayable_value_set_disabled(type, value, disabled)
Parameters:
Gladeui.get_debug_flags()
Return type:int
Gladeui.get_displayable_value(type, value)
Parameters:
Return type:

str

Gladeui.get_value_from_displayable(type, displayabe)
Parameters:
Return type:

str

Gladeui.init()

Initialization function for libgladeui (not Gladeui.App) It builds paths, bind text domain, and register icons

Gladeui.init_debug_flags()
Gladeui.propert_get_insensitive_tooltip(property)
Parameters:property (Gladeui.Property) –
Return type:str
Gladeui.property_class_get_default_from_spec(spec)
Parameters:spec (GObject.ParamSpec) –
Return type:GObject.Value
Gladeui.property_class_update_from_node(node, object_type, property_class, domain)
Parameters:
Returns:

True on success. property_class is set to None if the property has Disabled=”True”.

Return type:

bool

Updates the property_class with the contents of the node in the xml file. Only the values found in the xml file are overridden.

Gladeui.register_displayable_value(type, value, domain, string)
Parameters:
Gladeui.register_translated_value(type, value, string)
Parameters:
Gladeui.setup_log_handlers()

Sets up a log handler to manage all GLib.LogLevelFlags.LEVEL_MASK errors of domain: GLib, GLib-GObject.Object, Gtk, Gdk, and domainless.

Gladeui.standard_stock_append_prefix(prefix)
Parameters:prefix (str) –
Gladeui.type_has_displayable_values(type)
Parameters:type (GObject.GType) –
Return type:bool
Gladeui.util_canonical_path(path)
Parameters:path (str) – any path that may contain “..” or “.” components
Returns:an absolute path to the specified file or directory that contains no “..” or “.” components (this does not call readlink like realpath() does).

Note: on some systems; I think its possible that we dont have permission to execute in the directory in which the glade file resides; I decided finally to do it this way anyway since libc’s realpath() does exactly the same.

Return type:str
Gladeui.util_check_and_warn_scrollable(parent, child_adaptor, parent_widget)
Parameters:
Return type:

bool

Gladeui.util_compare_stock_labels(a, b)
Parameters:
Returns:

negative value if a < b; zero if a = b; positive value if a > b

Return type:

int

This is a GLib.CompareFunc that compares the labels of two stock items, ignoring any ‘_’ characters. It isn’t particularly efficient.

Gladeui.util_count_placeholders(parent)
Parameters:parent (Gladeui.Widget) – a Gladeui.Widget
Returns:the amount of Gladeui.Placeholders parented by parent
Return type:int
Gladeui.util_duplicate_underscores(name)
Parameters:name (str) – a string
Returns:a newly allocated string
Return type:str

Duplicates name, but the copy has two underscores in place of any single underscore in the original.

Gladeui.util_file_is_writeable(path)
Parameters:path (str) – the path to the file
Returns:True if file is writeable
Return type:bool

Checks whether the file at path is writeable

Gladeui.util_filename_to_icon_name(value)
Parameters:value (str) –
Return type:str
Gladeui.util_find_iter_by_widget(model, findme, column)
Parameters:
Returns:

a newly allocated Gtk.TreeIter from model corresponding to findme which should be freed with Gtk.TreeIter.free()

Return type:

Gtk.TreeIter

Looks through model for the Gtk.TreeIter corresponding to findme under column.

Gladeui.util_get_file_mtime(filename)
Parameters:filename (str) – A filename
Raises:GLib.Error
Returns:The mtime of the file, or %0 if the file attributes could not be read.
Return type:int

Gets the UTC modification time of file filename.

Gladeui.util_get_type_from_name(name, have_func)
Parameters:
  • name (str) – the name of the GObject.GType - like ‘Gtk.Widget’ or a “get-type” function.
  • have_func (bool) – function-name flag – true if the name is a “get-type” function.
Returns:

the new GObject.GType

Return type:

GObject.GType

Returns the type using the “get type” function name based on name. If the have_func flag is true,`name` is used directly, otherwise the get-type function is contrived from name then used.

Gladeui.util_have_devhelp()
Returns:whether the devhelp module is loaded
Return type:bool
Gladeui.util_icon_name_to_filename(value)
Parameters:value (str) –
Return type:str
Gladeui.util_object_is_loading(object)
Parameters:object (GObject.Object) – A GObject.Object
Returns:Whether the object’s project is being loaded or not.
Return type:bool
Gladeui.util_read_prop_name(str)
Parameters:str (str) – a string
Return type:str

Return a usable version of a property identifier as found in a freshly parserd #GladeInterface

Gladeui.util_remove_scroll_events(widget)
Parameters:widget (Gtk.Widget) –
Gladeui.util_replace(str, a, b)
Parameters:

Replaces each occurance of the character a in str to b.

Gladeui.util_search_devhelp(book, page, search)
Parameters:
  • book (str) –
  • page (str) –
  • search (str) –
Gladeui.util_url_show(url)
Parameters:url (str) – An URL to display
Returns:True if a web browser was successfully launched, or False
Return type:bool

Portable function for showing an URL url in a web browser.

Gladeui.utils_boolean_from_string(string, value)
Parameters:
  • string (str) – the string to convert
  • value (bool) – return location
Returns:

True if there was an error on the conversion.

Return type:

bool

Parse a boolean value

Gladeui.utils_cairo_draw_line(cr, color, x1, y1, x2, y2)
Parameters:
Gladeui.utils_cairo_draw_rectangle(cr, color, filled, x, y, width, height)
Parameters:
Gladeui.utils_enum_string_from_value(enum_type, value)
Parameters:
Return type:

str

Gladeui.utils_enum_string_from_value_displayable(flags_type, value)
Parameters:
Return type:

str

Gladeui.utils_enum_value_from_string(enum_type, strval)
Parameters:
Return type:

int

Gladeui.utils_flags_string_from_value(enum_type, value)
Parameters:
Return type:

str

Gladeui.utils_flags_string_from_value_displayable(flags_type, value)
Parameters:
Return type:

str

Gladeui.utils_flags_value_from_string(enum_type, strval)
Parameters:
Return type:

int

Gladeui.utils_get_pointer(widget, window, device, x, y)
Parameters:
  • widget (Gtk.Widget) – The widget to get the mouse position relative for
  • window (Gdk.Window) – The window of the current event, or None
  • device (Gdk.Device) – The device, if not specified, the current event will be expected to have a device.
  • x (int) – The location to store the mouse pointer X position
  • y (int) – The location to store the mouse pointer Y position

Get’s the pointer position relative to widget, while window and device are not absolutely needed, they should be passed wherever possible.

Gladeui.utils_hijack_key_press(win, event, user_data)
Parameters:
Returns:

whether the event was handled

Return type:

int

This function is meant to be attached to key-press-event of a toplevel, it simply allows the window contents to treat key events /before/ accelerator keys come into play (this way widgets dont get deleted when cutting text in an entry etc.). Creates a liststore suitable for comboboxes and such to chose from a variety of types.

Gladeui.utils_replace_home_dir_with_tilde(path)
Parameters:path (str) –
Return type:str
Gladeui.utils_string_from_value(value)
Parameters:value (GObject.Value) – a GObject.Value to convert
Returns:A newly allocated string
Return type:str

Serializes GObject.Value into a string (using glade conversion routines)

Gladeui.utils_value_from_string(type, string, project)
Parameters:
Returns:

A newly allocated and set GObject.Value

Return type:

GObject.Value

Allocates and sets a GObject.Value of type type set to string (using glade conversion routines)

Gladeui.xml_dump_from_context(context)
Parameters:context (Gladeui.XmlContext) –
Return type:str
Gladeui.xml_get_boolean(node, name, _default)
Parameters:
Return type:

bool

Gladeui.xml_get_content(node_in)
Parameters:node_in (Gladeui.XmlNode) – a Gladeui.XmlNode
Returns:A newly allocated string
Return type:str

Gets a string containing the content of node_in.

Gladeui.xml_get_property_boolean(node_in, name, _default)
Parameters:
Return type:

bool

Gladeui.xml_get_property_double(node_in, name, _default)
Parameters:
Return type:

float

Gladeui.xml_get_property_int(node_in, name, _default)
Parameters:
Return type:

int

Gladeui.xml_get_property_string(node_in, name)
Parameters:
Return type:

str

Gladeui.xml_get_property_string_required(node_in, name, xtra)
Parameters:
Return type:

str

Gladeui.xml_get_property_version(node_in, name, major, minor)
Parameters:
Return type:

bool

Gladeui.xml_get_value_int(node_in, name, val)
Parameters:
Returns:

True if the node is found, False otherwise

Return type:

bool

Gets an integer value for a node either carried as an attribute or as the content of a child.

Gladeui.xml_get_value_int_required(node, name, val)
Parameters:
Return type:

bool

This is a wrapper around Gladeui.xml_get_value_int(), only it emits a g_warning() if node_in did not contain the requested tag

Gladeui.xml_get_value_string(node, name)
Parameters:
Return type:

str

Gladeui.xml_get_value_string_required(node, name, xtra_info)
Parameters:
Return type:

str

Gladeui.xml_load_sym_from_node(node_in, module, tagname, sym_location)
Parameters:
Return type:

bool

Gladeui.xml_set_content(node_in, content)
Parameters:

Sets the content of node to content.

Gladeui.xml_set_value(node_in, name, val)
Parameters:

Sets the property name in node_in to val