def __init__(self, **kwargs): gtk.Dialog.__init__(self, **kwargs) self.set_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( gtk.DestDefaults.ALL, (), gdk.DragAction.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.new_with_label(None, '') 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.new_with_label_from_widget(rb1, '') 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() self.resize(1, 1)
def __init__(self, **kwargs): gtk.Dialog.__init__(self, **kwargs) self.set_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( gtk.DestDefaults.ALL, (), gdk.DragAction.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.new_with_label(None, '') 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.new_with_label_from_widget(rb1, '') 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() self.resize(1, 1)
def __init__(self, group, **kwargs): from scal3.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo self._group = group gtk.Dialog.__init__(self, **kwargs) self.set_title(_('Convert Calendar Type')) #### dialog_add_button(self, gtk.STOCK_CANCEL, _('_Cancel'), gtk.ResponseType.CANCEL) dialog_add_button(self, gtk.STOCK_OK, _('_OK'), gtk.ResponseType.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() window_set_size_aspect(self, 1.6)
def __init__(self, group, **kwargs): from scal3.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo self._group = group gtk.Dialog.__init__(self, **kwargs) self.set_title(_('Convert Calendar Type')) #### dialog_add_button(self, gtk.STOCK_CANCEL, _('_Cancel'), gtk.ResponseType.CANCEL) dialog_add_button(self, gtk.STOCK_OK, _('_OK'), gtk.ResponseType.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() window_set_size_aspect(self, 1.6)
def __init__(self, event): from scal3.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo from scal3.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.PolicyType.AUTOMATIC, gtk.PolicyType.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 scal3.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo from scal3.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.PolicyType.AUTOMATIC, gtk.PolicyType.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 scal3.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo from scal3.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.PolicyType.AUTOMATIC, gtk.PolicyType.AUTOMATIC) swin.add_with_viewport(self.descriptionInput) ### frame = gtk.Frame() frame.set_label(_("Description")) frame.add(swin) pack(self, frame, self.expandDescription, self.expandDescription) ########### 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 scal3.ui_gtk.mywidgets.cal_type_combo import CalTypeCombo from scal3.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.PolicyType.AUTOMATIC, gtk.PolicyType.AUTOMATIC) swin.add_with_viewport(self.descriptionInput) ### frame = gtk.Frame() frame.set_label(_("Description")) frame.add(swin) pack(self, frame, self.expandDescription, self.expandDescription) ########### 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