def __init__(self, group): BaseWidgetClass.__init__(self, group) ###### sizeGroup = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) ###### hbox = gtk.HBox() label = gtk.Label(_('Scale')) label.set_alignment(0, 0.5) sizeGroup.add_widget(label) pack(hbox, label) self.scaleCombo = common.Scale10PowerComboBox() pack(hbox, self.scaleCombo) pack(self, hbox) #### hbox = gtk.HBox() label = gtk.Label(_('Start')) label.set_alignment(0, 0.5) sizeGroup.add_widget(label) pack(hbox, label) self.startSpin = IntSpinButton(-maxStartEnd, maxStartEnd) pack(hbox, self.startSpin) pack(self, hbox) #### hbox = gtk.HBox() label = gtk.Label(_('End')) label.set_alignment(0, 0.5) sizeGroup.add_widget(label) pack(hbox, label) self.endSpin = IntSpinButton(-maxStartEnd, maxStartEnd) pack(hbox, self.endSpin) pack(self, hbox)
def updateVars(self): BaseWidgetClass.updateVars(self) self.group.startJd = self.startDateInput.get_jd(self.group.mode) self.group.endJd = self.endDateInput.get_jd(self.group.mode) ### aid = self.accountCombo.get_active() if aid: gid = self.accountGroupCombo.get_active() self.group.remoteIds = aid, gid else: self.group.remoteIds = None
def updateWidget(self): BaseWidgetClass.updateWidget(self) self.startDateInput.set_value(jd_to(self.group.startJd, self.group.mode)) self.endDateInput.set_value(jd_to(self.group.endJd, self.group.mode)) ### if self.group.remoteIds: aid, gid = self.group.remoteIds else: aid, gid = None, None self.accountCombo.set_active(aid) self.accountGroupCombo.set_active(gid)
def __init__(self, group): BaseWidgetClass.__init__(self, group) #### hbox = gtk.HBox() label = gtk.Label(_('Start')) label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) self.startDateInput = DateButton() pack(hbox, self.startDateInput) pack(self, hbox) ### hbox = gtk.HBox() label = gtk.Label(_('End')) label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) self.endDateInput = DateButton() pack(hbox, self.endDateInput) pack(self, hbox) ###### exp = gtk.Expander(_('Online Service')) vbox = gtk.VBox() exp.add(vbox) sizeGroup = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) ## hbox = gtk.HBox() label = gtk.Label(_('Account')) label.set_alignment(0, 0.5) pack(hbox, label) sizeGroup.add_widget(label) ## FIXME self.accountCombo = AccountCombo() pack(hbox, self.accountCombo) pack(vbox, hbox) ## hbox = gtk.HBox() label = gtk.Label(_('Remote Group')) label.set_alignment(0, 0.5) pack(hbox, label) sizeGroup.add_widget(label) ## FIXME accountGroupBox = AccountGroupBox(self.accountCombo) pack(hbox, accountGroupBox, 1, 1) pack(vbox, hbox) self.accountGroupCombo = accountGroupBox.combo ## pack(self, exp)
def updateVars(self): BaseWidgetClass.updateVars(self) self.group.scale = self.scaleCombo.get_value() self.group.setStartValue(self.startSpin.get_value()) self.group.setEndValue(self.endSpin.get_value())