def _set_initial_values(self): self.view.SetOpenRecentCheckboxValue(self.config.open_recent_at_startup) self.view.SetInertialScrollingCheckboxValue(self.config.use_inertial_scrolling) self.view.SetNeverPeriodPointCheckboxValue(self.config.never_show_period_events_as_point_events) self.view.SetCenterTextCheckboxValue(self.config.center_event_texts) self.view.SetWeekStartSelection(self._week_index(self.config.get_week_start())) self.view.AddExperimentalFeatures(self.experimental_features.get_all_features()) self.view.SetUncheckTimeForNewEventsCheckboxValue(self.config.uncheck_time_for_new_events) self.view.SetTextBelowIconCheckboxValue(self.config.text_below_icon) self.view.SetFilteredListboxExport(self.config.filtered_listbox_export) self.view.SetMinorStripColor(wx.Colour(*self.config.minor_strip_divider_line_colour)) self.view.SetMajorStripColor(wx.Colour(*self.config.major_strip_divider_line_colour)) self.view.SetNowLineColor(wx.Colour(*self.config.now_line_colour)) self.view.SetWeekendColor(wx.Colour(*self.config.weekend_colour)) self.view.SetBgColor(wx.Colour(*self.config.bg_colour)) choices = [f for f in os.listdir(EVENT_ICONS_DIR) if f.endswith(".png")] self.view.SetIconsChoices(choices) self.view.SetFuzzyIcon(self.config.fuzzy_icon) self.view.SetLockedIcon(self.config.locked_icon) self.view.SetHyperlinkIcon(self.config.hyperlink_icon) self.view.SetCurrentDateFormat("%s: %s" % (_("Current"), self.config.date_format)) self.view.DisplayIcons() self.view.SetVerticalSpaceBetweenEvents(self.config.vertical_space_between_events) self.view.SetColorizeWeekends(self.config.colorize_weekends) self.view.SetSkipSInDecadeText(self.config.skip_s_in_decade_text) self.view.SetDisplayCheckmarkOnEventsDone(self.config.display_checkmark_on_events_done) self.view.SetNeverUseTime(self.config.never_use_time) self.view.SetMajorStripFont(deserialize_font(self.config.major_strip_font)) self.view.SetMinorStripFont(deserialize_font(self.config.minor_strip_font)) self.view.SetLegendFont(deserialize_font(self.config.legend_font)) self.view.SetBalloonFont(deserialize_font(self.config.balloon_font)) self.view.SetLegendPos(self.config.legend_pos)
def on_legend_click(self, event): font = deserialize_font(self.config.legend_font) if self.view.ShowEditFontDialog(font): self.config.legend_font = font.serialize()
def on_minor_strip_click(self, event): font = deserialize_font(self.config.minor_strip_font) if self.view.ShowEditFontDialog(font): self.config.minor_strip_font = font.serialize()
def on_legend_click(self, event): font = deserialize_font(self.config.legend_font) if self.view.ShowEditFontDialog(font): self.config.legend_font = font.serialize() self.view.SetLegendFont(font)
def on_minor_strip_click(self, event): font = deserialize_font(self.config.minor_strip_font) if self.view.ShowEditFontDialog(font): self.config.minor_strip_font = font.serialize() self.view.SetMinorStripFont(font)
def on_balloon_click(self, evt): font = deserialize_font(self.config.balloon_font) if self.view.ShowEditFontDialog(font): self.config.balloon_font = font.serialize() self.view.SetBalloonFont(font)
def on_balloon_click(self, evt): font = deserialize_font(self.config.balloon_font) if self.view.ShowEditFontDialog(font): self.config.balloon_font = font.serialize() self.view.SetBalloonFont(font)