def optionsWidgetCreate(self): from scal2.ui_gtk.mywidgets.multi_spin.integer import IntSpinButton if self.optionsWidget: return self.optionsWidget = gtk.VBox() #### if self.customizeWidth: value = self.getWidthValue() ### hbox = gtk.HBox() pack(hbox, gtk.Label(_('Width'))) spin = IntSpinButton(0, 999) pack(hbox, spin) spin.set_value(value) spin.connect('changed', self.widthSpinChanged) pack(self.optionsWidget, hbox) #### if self.customizeFont: hbox = gtk.HBox() pack(hbox, gtk.Label(_('Font Family'))) combo = FontFamilyCombo(hasAuto=True) combo.set_value(self.getFontValue()) pack(hbox, combo) combo.connect('changed', self.fontFamilyComboChanged) pack(self.optionsWidget, hbox) #### self.optionsWidget.show_all()
def initVars(self, *a, **ka): CustomizableCalObj.initVars(self, *a, **ka) if not self.optionsWidget: self.optionsWidget = gtk.VBox() #### if self.customizeWidth: value = self.getWidthValue() self.setWidthWidget(value) ### hbox = gtk.HBox() pack(hbox, gtk.Label(_('Width'))) spin = IntSpinButton(0, 999) pack(hbox, spin) spin.set_value(value) spin.connect('changed', self.widthSpinChanged) pack(self.optionsWidget, hbox) #### if self.customizeFont: hbox = gtk.HBox() pack(hbox, gtk.Label(_('Font Family'))) combo = FontFamilyCombo(hasAuto=True) combo.set_value(self.getFontValue()) pack(hbox, combo) combo.connect('changed', self.fontFamilyComboChanged) pack(self.optionsWidget, hbox) #### self.optionsWidget.show_all()
def makeWidget(self): from scal2.ui_gtk.mywidgets.font_family_combo import FontFamilyCombo return FontFamilyCombo(True)