Exemplo n.º 1
0
 def __init__(self, event):  ## FIXME
     common.WidgetClass.__init__(self, event)
     ################
     hbox = gtk.HBox()
     pack(hbox, gtk.Label(_('Month')))
     self.monthCombo = MonthComboBox()
     self.monthCombo.build(event.mode)
     pack(hbox, self.monthCombo)
     pack(hbox, gtk.Label(''), 1, 1)
     #pack(self, hbox)
     ###
     #hbox = gtk.HBox()
     pack(hbox, gtk.Label(_('Day')))
     self.daySpin = DaySpinButton()
     pack(hbox, self.daySpin)
     pack(hbox, gtk.Label(''), 1, 1)
     pack(self, hbox)
     ###
     hbox = gtk.HBox()
     self.startYearCheck = gtk.CheckButton(_('Start Year'))
     pack(hbox, self.startYearCheck)
     self.startYearSpin = YearSpinButton()
     pack(hbox, self.startYearSpin)
     pack(hbox, gtk.Label(''), 1, 1)
     pack(self, hbox)
     self.startYearCheck.connect('clicked', self.startYearCheckClicked)
     ####
     self.notificationBox = common.NotificationBox(event)
     pack(self, self.notificationBox)
Exemplo n.º 2
0
 def __init__(self):
     gtk.HBox.__init__(self, spacing=4)
     self.mode = calTypes.primary
     ####
     pack(self, gtk.Label(_('Year')))
     self.spinY = YearSpinButton()
     pack(self, self.spinY)
     ####
     pack(self, gtk.Label(_('Month')))
     comboMonth = gtk.combo_box_new_text()
     module = calTypes[self.mode]
     for i in range(12):
         comboMonth.append_text(_(module.getMonthName(
             i + 1, None)))  ## year=None means all months
     comboMonth.set_active(0)
     pack(self, comboMonth)
     self.comboMonth = comboMonth
     ####
     pack(self, gtk.Label(_('Day')))
     self.spinD = DaySpinButton()
     pack(self, self.spinD)
     self.comboMonthConn = comboMonth.connect('changed',
                                              self.comboMonthChanged)
     self.spinY.connect('changed', self.comboMonthChanged)