Beispiel #1
0
 def __init__(self, group):
     self._group = group
     gtk.Dialog.__init__(self)
     self.set_title(_('Convert Calendar Type'))
     ####
     dialog_add_button(self, gtk.STOCK_CANCEL, _('_Cancel'), gtk.RESPONSE_CANCEL)
     dialog_add_button(self, gtk.STOCK_OK, _('_OK'), gtk.RESPONSE_OK)
     ##
     self.connect('response', lambda w, e: self.hide())
     ####
     hbox = gtk.HBox()
     label = gtk.Label(_('This is going to convert calendar types of all events inside group \"%s\" to a specific type. This operation does not work for Yearly events and also some of Custom events. You have to edit those events manually to change calendar type.')%group.title)
     label.set_line_wrap(True)
     hbox.pack_start(label, 0, 0)
     hbox.pack_start(gtk.Label(''), 1, 1)
     self.vbox.pack_start(hbox, 0, 0)
     ###
     hbox = gtk.HBox()
     hbox.pack_start(gtk.Label(_('Calendar Type')+':'), 0, 0)
     combo = DateTypeCombo()
     combo.set_active(group.mode)
     hbox.pack_start(combo, 0, 0)
     hbox.pack_start(gtk.Label(''), 1, 1)
     self.modeCombo = combo
     self.vbox.pack_start(hbox, 0, 0)
     ####
     self.vbox.show_all()
 def __init__(self):
     gtk.Dialog.__init__(self)
     ####
     dialog_add_button(self, gtk.STOCK_OK, _('_OK'), gtk.RESPONSE_OK)
     self.connect('response', self.onResponse)
     ####
     sizeGroup = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL)
     ####
     hbox = gtk.HBox()
     label = gtk.Label(_('Calendar Type'))
     label.set_alignment(0, 0.5)
     sizeGroup.add_widget(label)
     hbox.pack_start(label, 0, 0)
     combo = DateTypeCombo()
     combo.set_active(core.primaryMode)
     hbox.pack_start(combo, 0, 0)
     hbox.pack_start(gtk.Label(''), 1, 1)
     self.vbox.pack_start(hbox, 0, 0)
     self.modeCombo = combo
     ####
     hbox = gtk.HBox()
     hbox = gtk.HBox()
     label = gtk.Label(_('Group Title'))
     label.set_alignment(0, 0.5)
     sizeGroup.add_widget(label)
     hbox.pack_start(label, 0, 0)
     self.groupTitleEntry = gtk.Entry()
     self.groupTitleEntry.set_text(_('Imported Events'))
     hbox.pack_start(self.groupTitleEntry, 0, 0)
     self.vbox.pack_start(hbox, 0, 0)
     ####
     self.vbox.show_all()
Beispiel #3
0
 def __init__(self, event):
     gtk.VBox.__init__(self)
     self.event = event
     ###########
     hbox = gtk.HBox()
     ###
     hbox.pack_start(gtk.Label(_('Calendar Type')+':'), 0, 0)
     combo = DateTypeCombo()
     combo.set_active(core.primaryMode)## overwritten in updateWidget()
     hbox.pack_start(combo, 0, 0)
     hbox.pack_start(gtk.Label(''), 1, 1)
     self.modeCombo = combo
     ###
     self.pack_start(hbox, 0, 0)
     ###########
     hbox = gtk.HBox()
     hbox.pack_start(gtk.Label(_('Summary')), 0, 0)
     self.summaryEntry = gtk.Entry()
     hbox.pack_start(self.summaryEntry, 1, 1)
     self.pack_start(hbox, 0, 0)
     ###########
     hbox = gtk.HBox()
     hbox.pack_start(gtk.Label(_('Description')), 0, 0)
     self.descriptionInput = TextFrame()
     hbox.pack_start(self.descriptionInput, 1, 1)
     self.pack_start(hbox, 0, 0)
     ###########
     hbox = gtk.HBox()
     hbox.pack_start(gtk.Label(_('Icon')+':'), 0, 0)
     self.iconSelect = IconSelectButton()
     #print join(pixDir, self.icon)
     hbox.pack_start(self.iconSelect, 0, 0)
     hbox.pack_start(gtk.Label(''), 1, 1)
     self.pack_start(hbox, 0, 0)
     ##########
     self.modeCombo.connect('changed', self.modeComboChanged)## right place? before updateWidget? FIXME