コード例 #1
0
 def __init__(self):
     gtk.ComboBox.__init__(self)
     ProxyWidgetMixin.__init__(self)
     self._helper = _EasyComboBoxHelper(self)
     self.connect('changed', self._on__changed)
     renderer = gtk.CellRendererText()
     self.pack_start(renderer)
     self.add_attribute(renderer, 'text', ComboColumn.LABEL)
コード例 #2
0
ファイル: filechooser.py プロジェクト: rcaferraz/kiwi
 def __init__(self, action=gtk.FILE_CHOOSER_ACTION_OPEN, backend=None):
     """
     Create a new ProxyFileChooserWidget object.
     :param action:
     :param backend:
     """
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = str
     gtk.FileChooserWidget.__init__(self, action=action, backend=backend)
コード例 #3
0
ファイル: filechooser.py プロジェクト: RENATOZANETTI9/kiwi
 def __init__(self, action=gtk.FILE_CHOOSER_ACTION_OPEN, backend=None):
     """
     Create a new ProxyFileChooserWidget object.
     :param action:
     :param backend:
     """
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = str
     gtk.FileChooserWidget.__init__(self, action=action, backend=backend)
コード例 #4
0
    def __init__(self, adjustment=None):
        if not adjustment:
            adjustment = Gtk.Adjustment(lower=-sys.maxsize,
                                        upper=sys.maxsize,
                                        value=0)
        Gtk.VScale.__init__(self, adjustment=adjustment)
        ProxyWidgetMixin.__init__(self)

        self.props.data_type = float
コード例 #5
0
ファイル: combo.py プロジェクト: dsaran/packagehelper
 def __init__(self):
     gtk.ComboBox.__init__(self)
     ProxyWidgetMixin.__init__(self)
     PropertyObject.__init__(self)
     self._helper = _EasyComboBoxHelper(self)
     self.connect('changed', self._on__changed)
     renderer = gtk.CellRendererText()
     self.pack_start(renderer)
     self.add_attribute(renderer, 'text', ComboColumn.LABEL)
コード例 #6
0
 def __init__(self, action=Gtk.FileChooserAction.OPEN, backend=None):
     """
     Create a new ProxyFileChooserWidget object.
     :param action:
     :param backend:
     """
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = str
     Gtk.FileChooserWidget.__init__(self, action=action, backend=backend)
コード例 #7
0
ファイル: filechooser.py プロジェクト: hackedbellini/kiwi
 def __init__(self, action=Gtk.FileChooserAction.OPEN, backend=None):
     """
     Create a new ProxyFileChooserWidget object.
     :param action:
     :param backend:
     """
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = str
     Gtk.FileChooserWidget.__init__(self, action=action, backend=backend)
コード例 #8
0
ファイル: combo.py プロジェクト: RENATOZANETTI9/kiwi
    def __init__(self):
        self._color_attribute = None
        gtk.ComboBox.__init__(self)
        ProxyWidgetMixin.__init__(self)
        self._helper = _EasyComboBoxHelper(self)
        self.connect('changed', self._on__changed)

        self._text_renderer = gtk.CellRendererText()
        self.pack_start(self._text_renderer)
        self.add_attribute(self._text_renderer, 'text', ComboColumn.LABEL)
コード例 #9
0
ファイル: filechooser.py プロジェクト: hackedbellini/kiwi
 def __init__(self, title=None, backend=None, dialog=None):
     """
     Create a new ProxyFileChooserButton object.
     :param title:
     :param backend:
     :param dialog:
     """
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = str
     Gtk.FileChooserWidget.__init__(
         self, title=title, action=backend, dialog=dialog)
コード例 #10
0
    def __init__(self):
        self._color_attribute = None
        Gtk.ComboBox.__init__(self)
        ProxyWidgetMixin.__init__(self)
        self._helper = _EasyComboBoxHelper(self)
        self.connect('changed', self._on__changed)

        self._text_renderer = Gtk.CellRendererText()
        self.pack_start(self._text_renderer, True)
        self.add_attribute(self._text_renderer, 'text', ComboColumn.LABEL)
        self.set_valign(Gtk.Align.CENTER)
コード例 #11
0
 def __init__(self, title=None, backend=None, dialog=None):
     """
     Create a new ProxyFileChooserButton object.
     :param title:
     :param backend:
     :param dialog:
     """
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = str
     Gtk.FileChooserWidget.__init__(self,
                                    title=title,
                                    action=backend,
                                    dialog=dialog)
コード例 #12
0
ファイル: filechooser.py プロジェクト: RENATOZANETTI9/kiwi
    def __init__(self, title=None, backend=None, dialog=None):
        """
        Create a new ProxyFileChooserButton object.
        :param title:
        :param backend:
        :param dialog:
        """
        ProxyWidgetMixin.__init__(self)
        self.props.data_type = str

        # Broken, Broken PyGTK
        if isinstance(title, str):
            gtk.FileChooserButton.__init__(self, title, backend)
        else:
            gtk.FileChooserButton.__init__(self, dialog or title)
コード例 #13
0
ファイル: filechooser.py プロジェクト: rcaferraz/kiwi
    def __init__(self, title=None, backend=None, dialog=None):
        """
        Create a new ProxyFileChooserButton object.
        :param title:
        :param backend:
        :param dialog:
        """
        ProxyWidgetMixin.__init__(self)
        self.props.data_type = str

        # Broken, Broken PyGTK
        if isinstance(title, str):
            gtk.FileChooserButton.__init__(self, title, backend)
        else:
            gtk.FileChooserButton.__init__(self, dialog or title)
コード例 #14
0
ファイル: label.py プロジェクト: hsavolai/vmlab
    def _set_data_type(self, data_type):
        if not ProxyWidgetMixin.set_data_type(self, data_type):
            return

        conv = converter.get_converter(data_type)
        if conv.align == Alignment.RIGHT:
            self.set_property('xalign', 1.0)
コード例 #15
0
    def _set_data_type(self, data_type):
        if not ProxyWidgetMixin.set_data_type(self, data_type):
            return

        conv = converter.get_converter(data_type)
        if conv.align == Alignment.RIGHT:
            self.set_property('xalign', 1.0)
コード例 #16
0
ファイル: label.py プロジェクト: rcaferraz/kiwi
    def __init__(self, label='', data_type=None):
        """
        Create a new ProxyLabel object.
        :param label: initial text
        :param data_type: data type of label
        """
        gtk.Label.__init__(self, label)
        ProxyWidgetMixin.__init__(self)
        self.props.data_type = data_type
        self.set_use_markup(True)
        self._attr_dic = {
            "style": None,
            "weight": None,
            "size": None,
            "underline": None
        }
        self._size_list = ('xx-small', 'x-small', 'small', 'medium', 'large',
                           'x-large', 'xx-large')

        self.connect("notify::label", self._on_label_changed)
        self._block_notify_label = False
コード例 #17
0
ファイル: label.py プロジェクト: hsavolai/vmlab
    def __init__(self, label='', data_type=None):
        """
        Create a new ProxyLabel object.
        @param label: initial text
        @param data_type: data type of label
        """
        gtk.Label.__init__(self, label)
        ProxyWidgetMixin.__init__(self)
        self.props.data_type = data_type
        self.set_use_markup(True)
        self._attr_dic = { "style": None,
                           "weight": None,
                           "size": None,
                           "underline": None }
        self._size_list = ('xx-small', 'x-small',
                           'small', 'medium',
                           'large', 'x-large',
                           'xx-large')

        self.connect("notify::label", self._on_label_changed)
        self._block_notify_label = False
コード例 #18
0
ファイル: entry.py プロジェクト: fuinha/kiwi
    def _set_data_type(self, data_type):
        if not ProxyWidgetMixin.set_data_type(self, data_type):
            return

        # Numbers and dates should be right aligned
        conv = converter.get_converter(data_type)
        if conv.align == Alignment.RIGHT:
            self.set_property('xalign', 1.0)

        # Apply a mask for the data types, some types like
        # dates has a default mask
        try:
            self.set_mask_for_data_type(data_type)
        except MaskError:
            pass
コード例 #19
0
ファイル: entry.py プロジェクト: hsavolai/vmlab
    def _set_data_type(self, data_type):
        if not ProxyWidgetMixin.set_data_type(self, data_type):
            return

        # Numbers and dates should be right aligned
        conv = converter.get_converter(data_type)
        if conv.align == Alignment.RIGHT:
            self.set_property('xalign', 1.0)

        # Apply a mask for the data types, some types like
        # dates has a default mask
        try:
            self.set_mask_for_data_type(data_type)
        except MaskError:
            pass
コード例 #20
0
 def __init__(self):
     gtk.VScale.__init__(self)
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = float
コード例 #21
0
ファイル: radiobutton.py プロジェクト: rcaferraz/kiwi
 def __init__(self, group=None, label=None, use_underline=True):
     gtk.RadioButton.__init__(self, None, label, use_underline)
     if group:
         self.set_group(group)
     ProxyWidgetMixin.__init__(self)
     self.connect('group-changed', self._on_group_changed)
コード例 #22
0
 def __init__(self, fontname=None):
     ProxyWidgetMixin.__init__(self)
     gtk.FontButton.__init__(self, fontname)
     self.props.data_type = str
コード例 #23
0
 def __init__(self, label=None, use_underline=True):
     gtk.CheckButton.__init__(self, label=label,
                              use_underline=use_underline)
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = bool
コード例 #24
0
ファイル: colorbutton.py プロジェクト: hackedbellini/kiwi
 def __init__(self, color=Gdk.Color(0, 0, 0)):
     ProxyWidgetMixin.__init__(self)
     Gtk.ColorButton.__init__(self, color=color)
コード例 #25
0
ファイル: multicombo.py プロジェクト: leandrodax/kiwi
    def __init__(self, **kwargs):
        ProxyWidgetMixin.__init__(self)
        MultiCombo.__init__(self, **kwargs)

        self.connect('item-added', self._on_combo__item_added)
        self.connect('item-removed', self._on_combo__item_removed)
コード例 #26
0
ファイル: radiobutton.py プロジェクト: rosemberg-al/kiwi
 def __init__(self, group=None, label=None):
     Gtk.RadioButton.__init__(self, label=label or '', group=group)
     ProxyWidgetMixin.__init__(self)
     self.connect('group-changed', self._on_group_changed)
コード例 #27
0
ファイル: radiobutton.py プロジェクト: hackedbellini/kiwi
 def __init__(self, group=None, label=None):
     Gtk.RadioButton.__init__(self, label=label or '', group=group)
     ProxyWidgetMixin.__init__(self)
     self.connect('group-changed', self._on_group_changed)
コード例 #28
0
ファイル: checkbutton.py プロジェクト: fuinha/kiwi
 def __init__(self, label=None, use_underline=True):
     gtk.CheckButton.__init__(self, label=label,
                              use_underline=use_underline)
     ProxyWidgetMixin.__init__(self)
コード例 #29
0
ファイル: colorbutton.py プロジェクト: RENATOZANETTI9/kiwi
 def __init__(self, color=gtk.gdk.Color(0, 0, 0)):
     ProxyWidgetMixin.__init__(self)
     gtk.ColorButton.__init__(self, color)
コード例 #30
0
ファイル: button.py プロジェクト: hsavolai/vmlab
 def __init__(self):
     gtk.Button.__init__(self)
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = str
コード例 #31
0
ファイル: checkbutton.py プロジェクト: Schevo/kiwi
 def __init__(self, label=None, use_underline=True):
     ProxyWidgetMixin.__init__(self)
     PropertyObject.__init__(self, data_type=bool)
     gtk.CheckButton.__init__(self, label=label,
                              use_underline=use_underline)
コード例 #32
0
 def __init__(self, label=None, use_underline=True):
     Gtk.CheckButton.__init__(self,
                              label=label,
                              use_underline=use_underline)
     ProxyWidgetMixin.__init__(self)
コード例 #33
0
ファイル: colorbutton.py プロジェクト: nondasjr/kiwi
 def __init__(self, color=Gdk.Color(0, 0, 0)):
     ProxyWidgetMixin.__init__(self)
     Gtk.ColorButton.__init__(self, color=color)
コード例 #34
0
ファイル: fontbutton.py プロジェクト: hsavolai/vmlab
 def __init__(self, fontname=None):
     ProxyWidgetMixin.__init__(self)
     gtk.FontButton.__init__(self, fontname)
     self.props.data_type = str
コード例 #35
0
ファイル: label.py プロジェクト: rcaferraz/kiwi
 def _set_data_type(self, data_type):
     if not ProxyWidgetMixin.set_data_type(self, data_type):
         return
コード例 #36
0
ファイル: fontbutton.py プロジェクト: Schevo/kiwi
 def __init__(self, fontname=None):
     ProxyWidgetMixin.__init__(self)
     PropertyObject.__init__(self, data_type=str)
     gtk.FontButton.__init__(self, fontname)
コード例 #37
0
ファイル: label.py プロジェクト: fuinha/kiwi
 def _set_data_type(self, data_type):
     if not ProxyWidgetMixin.set_data_type(self, data_type):
         return
コード例 #38
0
ファイル: colorbutton.py プロジェクト: rcaferraz/kiwi
 def __init__(self, color=gtk.gdk.Color(0, 0, 0)):
     ProxyWidgetMixin.__init__(self)
     gtk.ColorButton.__init__(self, color)
コード例 #39
0
ファイル: button.py プロジェクト: Schevo/kiwi
 def __init__(self):
     ProxyWidgetMixin.__init__(self)
     PropertyObject.__init__(self, data_type=str)
     gtk.Button.__init__(self)
コード例 #40
0
 def __init__(self):
     Gtk.Button.__init__(self)
     ProxyWidgetMixin.__init__(self)
     self.props.data_type = str
コード例 #41
0
ファイル: colorbutton.py プロジェクト: Schevo/kiwi
 def __init__(self, color=gtk.gdk.Color(0, 0, 0)):
     ProxyWidgetMixin.__init__(self)
     PropertyObject.__init__(self, data_type=str)
     gtk.ColorButton.__init__(self, color)
コード例 #42
0
ファイル: radiobutton.py プロジェクト: RENATOZANETTI9/kiwi
 def __init__(self, group=None, label=None, use_underline=True):
     gtk.RadioButton.__init__(self, None, label, use_underline)
     if group:
         self.set_group(group)
     ProxyWidgetMixin.__init__(self)
     self.connect('group-changed', self._on_group_changed)
コード例 #43
0
ファイル: scale.py プロジェクト: Schevo/kiwi
 def __init__(self):
     ProxyWidgetMixin.__init__(self)
     PropertyObject.__init__(self, data_type=float)
     gtk.VScale.__init__(self)