Example #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)
     pack(hbox, label)
     pack(hbox, gtk.Label(''), 1, 1)
     pack(self.vbox, hbox)
     ###
     hbox = gtk.HBox()
     pack(hbox, gtk.Label(_('Calendar Type')+':'))
     combo = CalTypeCombo()
     combo.set_active(group.mode)
     pack(hbox, combo)
     pack(hbox, gtk.Label(''), 1, 1)
     self.modeCombo = combo
     pack(self.vbox, hbox)
     ####
     self.vbox.show_all()
Example #2
0
 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)
     pack(hbox, label)
     combo = CalTypeCombo()
     combo.set_active(calTypes.primary)
     pack(hbox, combo)
     pack(hbox, gtk.Label(''), 1, 1)
     pack(self.vbox, hbox)
     self.modeCombo = combo
     ####
     hbox = gtk.HBox()
     hbox = gtk.HBox()
     label = gtk.Label(_('Group Title'))
     label.set_alignment(0, 0.5)
     sizeGroup.add_widget(label)
     pack(hbox, label)
     self.groupTitleEntry = gtk.Entry()
     self.groupTitleEntry.set_text(_('Imported Events'))
     pack(hbox, self.groupTitleEntry)
     pack(self.vbox, hbox)
     ####
     self.vbox.show_all()
Example #3
0
 def __init__(self):
     gtk.Dialog.__init__(self, title=_('Select Date...'))
     self.set_has_separator(False)
     #self.set_skip_taskbar_hint(True)
     self.connect('delete-event', self.hideMe)
     self.mode = calTypes.primary
     ###### Reciving dropped day!
     self.drag_dest_set(gdk.MODIFIER_MASK,\
         (('a', 0, 0),), gdk.ACTION_COPY)
     self.drag_dest_add_text_targets()
     self.connect('drag-data-received', self.dragRec)
     ######
     hb0 = gtk.HBox(spacing=4)
     pack(hb0, gtk.Label(_('Date Mode')))
     combo = CalTypeCombo()
     combo.set_active(self.mode)
     pack(hb0, combo)
     pack(self.vbox, hb0)
     #######################
     hbox = gtk.HBox(spacing=5)
     rb1 = gtk.RadioButton()
     rb1.num = 1
     pack(hbox, rb1)
     self.ymdBox = YearMonthDayBox()
     pack(hbox, self.ymdBox)
     pack(self.vbox, hbox)
     ########
     hb2 = gtk.HBox(spacing=4)
     pack(hb2, gtk.Label('yyyy/mm/dd'))
     dateInput = DateButtonOption(hist_size=16)
     pack(hb2, dateInput)
     rb2 = gtk.RadioButton()
     rb2.num = 2
     rb2.set_group(rb1)
     hb2i = gtk.HBox(spacing=5)
     pack(hb2i, rb2)
     pack(hb2i, hb2)
     pack(self.vbox, hb2i)
     #######
     dialog_add_button(self, gtk.STOCK_CANCEL, _('_Cancel'), 2, self.hideMe)
     dialog_add_button(self, gtk.STOCK_OK, _('_OK'), 1, self.ok)
     #######
     self.comboMode = combo
     self.dateInput = dateInput
     self.radio1 = rb1
     self.radio2 = rb2
     self.hbox2 = hb2
     #######
     combo.connect ('changed', self.comboModeChanged)
     rb1.connect_after('clicked', self.radioChanged)
     rb2.connect_after('clicked', self.radioChanged)
     dateInput.connect('activate', self.ok)
     self.radioChanged()
     #######
     self.vbox.show_all()
Example #4
0
 def __init__(self, event):
     gtk.VBox.__init__(self)
     self.event = event
     ###########
     hbox = gtk.HBox()
     ###
     pack(hbox, gtk.Label(_('Calendar Type')))
     combo = CalTypeCombo()
     combo.set_active(calTypes.primary)## overwritten in updateWidget()
     pack(hbox, combo)
     pack(hbox, gtk.Label(''), 1, 1)
     self.modeCombo = combo
     ###
     pack(self, hbox)
     ###########
     if event.isAllDay:
         self.tzCheck = None
     else:
         hbox = gtk.HBox()
         self.tzCheck = gtk.CheckButton(_('Time Zone'))
         set_tooltip(self.tzCheck, _('For input times of event'))
         pack(hbox, self.tzCheck)
         combo = TimeZoneComboBoxEntry()
         pack(hbox, combo)
         pack(hbox, gtk.Label(''), 1, 1)
         self.tzCombo = combo
         pack(self, hbox)
         self.tzCheck.connect('clicked', lambda check: self.tzCombo.set_sensitive(check.get_active()))
     ###########
     hbox = gtk.HBox()
     pack(hbox, gtk.Label(_('Summary')))
     self.summaryEntry = gtk.Entry()
     pack(hbox, self.summaryEntry, 1, 1)
     pack(self, hbox)
     ###########
     self.descriptionInput = TextFrame()
     swin = gtk.ScrolledWindow()
     swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
     swin.add_with_viewport(self.descriptionInput)
     ###
     exp = gtk.Expander()
     exp.set_expanded(True)
     exp.set_label(_('Description'))
     exp.add(swin)
     pack(self, exp, 1, 1)
     ###########
     hbox = gtk.HBox()
     pack(hbox, gtk.Label(_('Icon')+':'))
     self.iconSelect = IconSelectButton()
     pack(hbox, self.iconSelect)
     pack(hbox, gtk.Label(''), 1, 1)
     pack(self, hbox)
     ##########
     self.modeCombo.connect('changed', self.modeComboChanged)## right place? before updateWidget? FIXME