def build(self): table = wal.GridPanel(self, rows=8, cols=2, hgap=25, vgap=7) txt = _('New document on start') table.pack(wal.Label(table, txt)) self.newdoc = wal.Switch(table, config.new_doc_on_start) table.pack(self.newdoc) txt = _('Backup on document save') table.pack(wal.Label(table, txt)) self.backup = wal.Switch(table, config.make_backup) table.pack(self.backup) txt = _('Backup on export') table.pack(wal.Label(table, txt)) self.expbackup = wal.Switch(table, config.make_export_backup) table.pack(self.expbackup) txt = _('Make font cache on start') table.pack(wal.Label(table, txt)) self.fcache = wal.Switch(table, config.make_font_cache_on_start) table.pack(self.fcache) txt = _('Run as server') table.pack(wal.Label(table, txt)) self.server = wal.Switch(table, config.app_server) table.pack(self.server) txt = _('History log size:') table.pack(wal.Label(table, txt)) self.hist_size = wal.IntSpin(table, config.history_size, (10, 1000)) table.pack(self.hist_size) txt = _('History menu size:') table.pack(wal.Label(table, txt)) self.hist_menu_size = wal.IntSpin( table, config.history_list_size, (5, 20)) table.pack(self.hist_menu_size) txt = _('Logging level (*):') table.pack(wal.Label(table, txt)) self.log_level = wal.Combolist(table, items=LEVELS) self.log_level.set_active(LEVELS.index(config.log_level)) table.pack(self.log_level) self.pack(table) self.pack((1, 1), expand=True) txt = _('(*) - Application restart is required to apply these options') self.pack(wal.Label(self, txt, fontsize=-1)) self.built = True
def __init__(self): wal.MainWindow.__init__(self) self.set_size(SIZE) self.pack((10, 10)) self.switch = wal.Switch(self, onclick=self.on_change) self.pack(self.switch) self.pack((10, 10)) self.switch1 = wal.Switch(self, onclick=self.on_change1) self.pack(self.switch1) self.pack((10, 10)) self.switch2 = wal.Switch(self, onclick=self.on_change2) self.pack(self.switch2) self.switch2.set_enable(False) self.pack((10, 10)) self.switch3 = wal.Switch(self, onclick=self.on_change2) self.pack(self.switch3) self.switch3.set_enable(False) self.switch3.set_value(True)
def __init__(self, parent, prefpanel): CmsTab.__init__(self, parent, prefpanel) txt = _('Enable Color Management') panel = wal.VPanel(self) hp = wal.HPanel(panel) hp.pack(wal.Label(hp, txt)) hp.pack((1, 1), expand=True) self.cms_check = wal.Switch(hp, config.cms_use, onclick=self.activate_cms) hp.pack(self.cms_check, end_padding=1) panel.pack(hp, fill=True, padding_all=5) self.banner = wal.VPanel(panel) self.banner.set_bg(wal.DARK_GRAY) bmp = get_bmp(self.banner, icons.PD_PREFS_CMS_BANNER) self.banner.pack(bmp, padding=2) panel.pack(self.banner, fill=True, expand=True) txt = _('Note: If Color Management is disabled, ' 'color values will be inaccurate.') label = wal.Label(panel, txt, fontsize=-1) panel.pack(label, fill=True, padding_all=5) self.pack(panel, fill=True, expand=True)
def build(self): vpanel = wal.VPanel(self) grid = wal.GridPanel(vpanel, rows=4, cols=2, hgap=25, vgap=7) txt = _('Language (*):') grid.pack(wal.Label(grid, txt)) self.lang = wal.Combolist(grid, items=LANGS) index = 0 if config.language == 'system' \ else LANGS.index(config.language) self.lang.set_active(index) grid.pack(self.lang, fill=True) txt = _('UI style (*):') grid.pack(wal.Label(grid, txt)) items = [_('Classic'), _('Tabbed')] self.ui_style = wal.Combolist(grid, items=items) self.ui_style.set_active(config.ui_style) grid.pack(self.ui_style, fill=True) txt = _('Tab style:') grid.pack(wal.Label(grid, txt)) items = [ _('Rectangular tabs'), _('Rounded tabs'), _('Flat tabs'), _('Trapezoidal tabs') ] self.tab_style = wal.Combolist(grid, items=items) index = config.tab_style if config.tab_style < len(items) else 0 self.tab_style.set_active(index) grid.pack(self.tab_style, fill=True) txt = _('Show quick access buttons') grid.pack(wal.Label(grid, txt)) self.stub_buttons = wal.Switch(grid, config.show_stub_buttons) grid.pack(self.stub_buttons) vpanel.pack(grid, align_center=False, padding_all=10) # --------------------------------- int_vp = wal.VPanel(vpanel) vpanel.pack(int_vp, fill=True, padding_all=5) if not wal.IS_MAC and wal.IS_WX2: txt = _('Use overlay for spinbox widgets (*)') self.spin_overlay = wal.Checkbox(int_vp, txt, config.spin_overlay) int_vp.pack(self.spin_overlay, align_center=False) if wal.IS_GTK and wal.IS_WX2: txt = _('Separate spin in spinbox widgets (*)') self.spin_sep = wal.Checkbox(int_vp, txt, config.spin_sep) int_vp.pack(self.spin_sep, align_center=False) if wal.IS_UNITY: txt = _('Unity related features') int_vp.pack(wal.Label(int_vp, txt, fontsize=2, fontbold=True), start_padding=10) int_vp.pack(wal.HLine(int_vp), fill=True, padding=2) txt = _('Use Unity Global Menu (*)') self.ubuntu_gm = wal.Checkbox(int_vp, txt, config.ubuntu_global_menu) int_vp.pack(self.ubuntu_gm, align_center=False) txt = _('Allow overlay for scrollbars (*)') self.ubuntu_overlay = wal.Checkbox(int_vp, txt, config.ubuntu_scrollbar_overlay) int_vp.pack(self.ubuntu_overlay, align_center=False) self.pack(vpanel) self.pack((1, 1), expand=True) txt = _('(*) - Application restart is required to apply these options') self.pack(wal.Label(self, txt, fontsize=-1)) self.built = True