def __init__(self): from scal2.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo 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()
def __init__(self): from scal2.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo 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()
def __init__(self, group): from scal2.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo 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()
def __init__(self, group): from scal2.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo 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()
def __init__(self, event): from scal2.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo from scal2.ui_gtk.mywidgets.tz_combo import TimeZoneComboBoxEntry 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
def __init__(self, event): from scal2.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo from scal2.ui_gtk.mywidgets.tz_combo import TimeZoneComboBoxEntry 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
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()
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()
def __init__(self, group): from scal2.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo gtk.VBox.__init__(self) self.group = group ######## self.sizeGroup = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) ##### hbox = gtk.HBox() label = gtk.Label(_('Title')) label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) self.titleEntry = gtk.Entry() pack(hbox, self.titleEntry, 1, 1) pack(self, hbox) ##### hbox = gtk.HBox() label = gtk.Label(_('Color')) label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) self.colorButton = MyColorButton() self.colorButton.set_use_alpha(True) ## FIXME pack(hbox, self.colorButton) pack(self, hbox) ##### hbox = gtk.HBox() label = gtk.Label(_('Default Icon')) ## FIXME label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) self.iconSelect = IconSelectButton() pack(hbox, self.iconSelect) pack(self, hbox) ##### hbox = gtk.HBox() label = gtk.Label(_('Default Calendar Type')) label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) combo = CalTypeCombo() pack(hbox, combo) pack(hbox, gtk.Label(''), 1, 1) self.modeCombo = combo pack(self, hbox) ##### hbox = gtk.HBox() label = gtk.Label(_('Show in Calendar')) label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) self.showInDCalCheck = gtk.CheckButton(_('Day')) self.showInWCalCheck = gtk.CheckButton(_('Week')) self.showInMCalCheck = gtk.CheckButton(_('Month')) pack(hbox, self.showInDCalCheck) pack(hbox, gtk.Label(''), 1, 1) pack(hbox, self.showInWCalCheck) pack(hbox, gtk.Label(''), 1, 1) pack(hbox, self.showInMCalCheck) pack(hbox, gtk.Label(''), 1, 1) pack(self, hbox) ##### hbox = gtk.HBox() label = gtk.Label(_('Show in')) label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) self.showInTimeLineCheck = gtk.CheckButton(_('Time Line')) self.showInStatusIconCheck = gtk.CheckButton(_('Status Icon')) pack(hbox, self.showInTimeLineCheck) pack(hbox, gtk.Label(''), 1, 1) pack(hbox, self.showInStatusIconCheck) pack(hbox, gtk.Label(''), 1, 1) pack(self, hbox) ##### hbox = gtk.HBox() label = gtk.Label(_('Event Cache Size')) label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) self.cacheSizeSpin = IntSpinButton(0, 9999) pack(hbox, self.cacheSizeSpin) pack(self, hbox) ##### hbox = gtk.HBox() label = gtk.Label(_('Event Text Seperator')) label.set_alignment(0, 0.5) pack(hbox, label) self.sizeGroup.add_widget(label) self.sepInput = TextFrame() pack(hbox, self.sepInput, 1, 1) pack(self, hbox) set_tooltip( hbox, _('Using to seperate Summary and Description when displaying event' )) ##### #hbox = gtk.HBox() #label = gtk.Label(_('Show Full Event Description')) #label.set_alignment(0, 0.5) #pack(hbox, label) #self.sizeGroup.add_widget(label) #self.showFullEventDescCheck = gtk.CheckButton('') #pack(hbox, self.showFullEventDescCheck, 1, 1) #pack(self, hbox) ### self.modeCombo.connect( 'changed', self.modeComboChanged) ## right place? before updateWidget? FIXME