Exemple #1
0
def widget_defaults(widgets):
    '''
    return a dict name/current value of wvalues which are to be restored
    '''
    wvalues = dict()
    for w in widgets:
        k = widget_name(w)
        try:
            v = get_value(w)
            wvalues[k] = v
        except Exception,msg:
            warn("widget_defaults:" + msg)
            continue
def widget_defaults(widgets):
    '''
    return a dict name/current value of wvalues which are to be restored
    '''
    wvalues = dict()
    for w in widgets:
        k = widget_name(w)
        try:
            v = get_value(w)
            wvalues[k] = v
        except Exception,msg:
            warn("widget_defaults:" + msg)
            continue
Exemple #3
0
    def __init__(self,halcomp,xmlname,builder,buildertype):
        
        self.builder = builder
        self.hal = GComponent(halcomp)
        self.widgets = {}

        for widget in builder.get_objects():
            idname = widget_name(widget)

            if idname is None:
                continue

            if isinstance(widget, _HalWidgetBase):
                widget.hal_init(self.hal, idname)
                self.widgets[idname] = widget

        self.timer = gobject.timeout_add(100, self.update)                  
Exemple #4
0
    def __init__(self, halcomp, xmlname, builder, buildertype):

        self.builder = builder
        self.hal = GComponent(halcomp)
        self.widgets = {}

        for widget in builder.get_objects():
            idname = widget_name(widget)

            if idname is None:
                continue

            if isinstance(widget, _HalWidgetBase):
                widget.hal_init(self.hal, idname)
                self.widgets[idname] = widget

        self.timer = gobject.timeout_add(100, self.update)