| |
- __builtin__.object
-
- AuxiliaryWindow
-
- AboutStreamtuner2
- gtk.ComboBox(gtk.Bin, gtk.CellEditable, gtk.CellLayout)
-
- ComboBoxText
- uikit
class AuxiliaryWindow(__builtin__.object) |
|
# Encapsulates references to gtk objects AND properties in main window,
# which allows to use self. and main. almost interchangably.
#
# This is a kludge to keep gtkBuilder widgets accessible; so just one
# instance has to be built. Also ties main.channels{} or .features{}
# dicts together for feature windows. Used by search, config, streamedit. |
|
Methods defined here:
- __getattr__(self, name)
- __init__(self, parent)
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class ComboBoxText(gtk.ComboBox) |
|
# Text-only dropdown list.
#
# Necessary because gtk.ComboBoxText binding is absent in debian packages
# https://bugzilla.gnome.org/show_bug.cgi?id=660659
#
# This one implements a convenience method `.set_default()` to define the active
# selection by value, rather than by index.
#
# Can use a list[] of entries or a key->value dict{}, where the value becomes
# display text, and the key the internal value. |
Methods defined here:
- __init__(self, entries, no_scroll=1)
- get_active_text(self)
- # fetch currently selected text entry
- no_scroll(self, widget, event, data=None)
- # Signal/Event callback to prevent hover scrolling of ComboBox widgets
- set_default(self, value)
- # activate dropdown of given value
Static methods defined here:
- parse_options(opts, sep='|', assoc='=')
- # Expand A=a|B=b|C=c option list into (key,value) tuple list, or A|B|C just into a list.
Data and other attributes defined here:
- ls = None
|
class uikit |
|
# simplified gtk constructors --------------------------------------------- |
|
Static methods defined here:
- add_menu(menuwidget, label, action, insert=None)
- # Attach textual menu entry and callback
- add_signals(builder, map)
- # manual signal binding with a dict of { (widget, signal): callback }
- app_bin_check(v)
- # return OK or CANCEL depending on availability of app
- app_restore(wTree, r=None)
- #-- restore window and widget properties
#
# requires only the previously saved widget state dict
- app_state(wTree, widgetnames='window1', 'treeview2', 'vbox17')
- #-- save window size and widget properties
#
# needs a list of widgetnames
# e.g. pickle.dump(uikit.app_state(...), open(os.environ"HOME"+"/.config/app_winstate", "w"))
- bg(w, color='', where='bg', wrap=1)
- this method should be called after widget creation, and before .add()ing it to container
- columns(widget, datamap=[], entries=None, show_favicons=True, pix_entry=False, fixed_size=24)
- #-- fill a treeview
#
# Adds treeviewcolumns/cellrenderers and liststore from a data dictionary.
# Its datamap and the table contents can be supplied in one or two steps.
# When new data gets applied, the columns aren't recreated.
#
# The columns are created according to the datamap, which describes cell
# mapping and layout. Columns can have multiple cellrenderers, but usually
# there is a direct mapping to a data source key from entries.
#
# datamap = [ # title width dict-key type, renderer, attrs <br>
# ["Name", 150, ["titlerow", str, "text", {} ] ],
# [False, 0, ["interndat", int, None, {} ] ],
# ["Desc", 200, ["descriptn", str, "text", {} ], "icon",str,"pixbuf",{} ],
#
# An according entries list then would contain a dictionary for each row:
# entries = {"titlerow":"first", "interndat":123}, {"titlerow":"..."},
# Keys not mentioned in the datamap get ignored, and defaults are applied
# for missing cols. All values must already be in the correct type however.
- config_treeview(opt, columns='Icon', 'Command')
- # Config win table (editable dictionary, two columns w/ executable indicator pixbuf)
- do(callback, *args, **kwargs)
- # Spool gtk update calls from non-main threads (optional immediate=1 flag to run task next, not last)
- hbox(w1, w2, exr=True, spacing=5)
- # Wrap two widgets in horizontal box
- idle_do()
- # Execute UI updating tasks in order
- label(text, size=305, markup=0)
- # Create GtkLabel
- liststore_edit(cell, row, text, user_data)
- # Generic Gtk callback to update ListStore when entries get edited.
# where user_data = (liststore, column #id)
- msg(text, style=<enum GTK_MESSAGE_INFO of type GtkMessageType>, buttons=<enum GTK_BUTTONS_CLOSE of type GtkButtonsType>, yes=None)
- # gtk.messagebox
- pixbuf(buf, fmt='png', decode=True, gzip=False)
- # Pixbug loader (from inline string, as in `logo.png`, automatic base64 decoding, and gunzipping of raw data)
- save_file(title='Save As', parent=None, fn='', formats=None, action=<enum GTK_FILE_CHOOSER_ACTION_SAVE of type GtkFileChooserAction>, action_btn='gtk-save')
- save_file_filterchange(c)
- # Callback for changed FileFilter, updates current filename extension
- tree(widget, entries, title='category', icon='gtk-directory')
- #-- treeview for categories
#
# simple two-level treeview display in one column
# with entries = main,[sub,sub, title,...,...]
- tree_column(widget, title='Category')
- wrap(widgetstore=None, id=None, w=None, label=None, color=None, image=None, align=1, label_size=305, label_markup=0)
- # Wrap entries/checkboxes with extra label, background, images, etc.
Data and other attributes defined here:
- gtk_position_type_enum = [<enum GTK_POS_LEFT of type GtkPositionType>, <enum GTK_POS_RIGHT of type GtkPositionType>, <enum GTK_POS_TOP of type GtkPositionType>, <enum GTK_POS_BOTTOM of type GtkPositionType>]<enum GTK_POS_LEFT of type GtkPositionType>, <enum GTK_POS_RIGHT of type GtkPositionType>, <enum GTK_POS_TOP of type GtkPositionType>, <enum GTK_POS_BOTTOM of type GtkPositionType>
- idle_tasks = []
- in_idle = False
- save_formats = [('*.pls', '*.pls'), ('*.xspf', '*.xpsf'), ('*.m3u', '*.m3u'), ('*.jspf', '*.jspf'), ('*.asx', '*.asx'), ('*.json', '*.json'), ('*.smil', '*.smil'), ('*.desktop', '*.desktop'), ('*', '*')]('*.pls', '*.pls'), ('*.xspf', '*.xpsf'), ('*.m3u', '*.m3u'), ('*.jspf', '*.jspf'), ('*.asx', '*.asx'), ('*.json', '*.json'), ('*.smil', '*.smil'), ('*.desktop', '*.desktop'), ('*', '*')
| |