Esempio n. 1
0
 def build(self):
     nb = wal.Notebook(self)
     nb.add_page(AboutPage(self.app, nb), _('About'))
     nb.add_page(ComponentsPage(nb), _('Components'))
     nb.add_page(TranslatorsPage(nb), _('Translators'))
     nb.add_page(ThanksPage(nb), _('Thanks to'))
     nb.add_page(LicensePage(nb), _('License'))
     self.pack(nb, expand=True, fill=True, padding_all=5)
Esempio n. 2
0
 def build(self):
     self.panels = []
     nb = wal.Notebook(self)
     for item in PANELS:
         item_panel = item(nb, self.app, self)
         self.panels.append(item_panel)
         nb.add_page(item_panel, item_panel.name)
     self.pack(nb, expand=True, fill=True, padding=5)
Esempio n. 3
0
 def build(self):
     self.nb = wal.Notebook(self)
     self.color_tab = StrokeColor(self.nb, self, self.orig_color)
     self.stroke_tab = StrokeStyle(self.nb, self, self.new_stroke)
     self.nb.add_page(self.color_tab, _('Stroke Color'))
     if self.new_color:
         self.nb.add_page(self.stroke_tab, _('Stroke Style'))
         self.nb.set_active_index(1)
     self.pack(self.nb, fill=True, expand=True)
Esempio n. 4
0
    def build(self):
        nb = wal.Notebook(self)
        nb.add_page(AboutPage(self.app, nb), _('About'))
        nb.add_page(ComponentsPage(self.app, nb), _('Components'))
        nb.add_page(AuthorsPage(nb), _('Authors'))
        nb.add_page(ThanksPage(nb), _('Thanks to'))
        nb.add_page(LicensePage(nb), _('License'))

        # 		nb.add_page(EvetLoopMonitor(nb), 'Event loops')
        self.pack(nb, expand=True, fill=True, padding_all=5)
Esempio n. 5
0
    def build(self):
        self.nb = wal.Notebook(self)

        # ========Color management options
        self.page0 = CmsOptions(self.nb, self)
        self.page1 = CmsProfiles(self.nb, self)
        self.page2 = CmsSettings(self.nb, self)

        for item in [self.page0, self.page1, self.page2]:
            self.nb.add_page(item, item.name)

        self.pack(self.nb, expand=True, fill=True)
        self.built = True
        self.page0.activate_cms()
Esempio n. 6
0
    def build(self):
        self.nb = wal.Notebook(self, on_change=self.on_change)
        self.tabs = [SolidFill(self.nb, self, self.cms),
                     GradientFill(self.nb, self, self.cms),
                     PatternFill(self.nb, self, self.cms)
                     ]
        for item in self.tabs:
            self.nb.add_page(item, item.name)
        self.pack(self.nb, fill=True, expand=True)

        if not self.orig_fill or self.orig_fill[1] == sk2_const.FILL_SOLID:
            self.nb.set_active_index(0)
            self.tabs[0].activate(self.orig_fill)
        elif self.orig_fill[1] == sk2_const.FILL_GRADIENT:
            self.nb.set_active_index(1)
        elif self.orig_fill[1] == sk2_const.FILL_PATTERN:
            self.nb.set_active_index(2)
        self.start = False
Esempio n. 7
0
    def build(self):
        self.nb = wal.Notebook(self, on_change=self.on_change)
        self.tabs = [
            SolidFill(self.nb, self, self.cms),
            GradientFill(self.nb, self, self.cms),
            PatternFill(self.nb, self, self.cms)
        ]
        for item in self.tabs:
            self.nb.add_page(item, item.name)
        self.pack(self.nb, fill=True, expand=True)

        index = 0
        if self.orig_fill:
            if self.orig_fill[1] == sk2const.FILL_GRADIENT:
                index = 1
            elif self.orig_fill[1] == sk2const.FILL_PATTERN:
                index = 2
        self.tabs[index].activate(self.orig_fill)
        self.nb.set_active_index(index)
        self.start = False
Esempio n. 8
0
    def build(self):
        if wal.IS_WX3:
            header_panel = wal.VPanel(self)
            color = wal.GRAY
            if wal.IS_GTK: color = wal.UI_COLORS['pressed_border']
            header_panel.set_bg(color)
            header = AboutHeader(self.app, header_panel)
            header_panel.pack(header, fill=True, padding_all=1)
            self.pack(header_panel, fill=True, padding=5)
        else:
            header = AboutHeader(self.app, self)
            self.pack(header, fill=True, padding=5)

        nb = wal.Notebook(self)
        nb.add_page(AboutPage(self.app, nb), _('About'))
        nb.add_page(ComponentsPage(self.app, nb), _('Components'))
        nb.add_page(AuthorsPage(nb), _('Authors'))
        nb.add_page(ThanksPage(nb), _('Thanks to'))
        nb.add_page(LicensePage(nb), _('License'))

        # 		nb.add_page(EvetLoopMonitor(nb), 'Event loops')
        self.pack(nb, expand=True, fill=True, padding=5)
Esempio n. 9
0
    def __init__(self, parent):
        wal.VPanel.__init__(self, parent)

        #--- Printer list
        self.prn_dict, default = get_printers()
        self.prn_list = self.prn_dict.keys()
        self.prn_list.sort()

        hpanel = wal.HPanel(self)
        hpanel.pack((10, 1))
        hpanel.pack(wal.Label(hpanel, 'Device name:'))

        self.prn_combo = wal.Combolist(hpanel,
                                       items=self.prn_list,
                                       onchange=self.printer_changed)
        hpanel.pack(self.prn_combo, padding=10)
        if self.prn_list:
            self.prn_combo.set_active(self.prn_list.index(default))

        self.pack(hpanel, padding=10)

        #--- Printer tabs

        self.nb = wal.Notebook(self)

        details = self.prn_dict[default]
        self.details_panel = DetailsPanel(self.nb, details)
        self.nb.add_page(self.details_panel, 'Device details')

        attrs = get_printer_attrs(default)
        self.attrs_panel = AttrsPanel(self.nb, attrs)
        self.nb.add_page(self.attrs_panel, 'Device attributes')

        options = get_printer_options(default)
        self.options_panel = OptionPanel(self.nb, options)
        self.nb.add_page(self.options_panel, 'Device options')

        self.pack(self.nb, fill=True, expand=True, padding_all=10)
Esempio n. 10
0
    def build(self):

        self.nb = wal.Notebook(self)

        # ========Palette options
        pal_opt = wal.VPanel(self.nb)
        pal_opt.pack((10, 10))

        grid = wal.GridPanel(self, hgap=5, vgap=5)
        grid.add_growable_col(1)

        txt = _('Current palette:')
        grid.pack(wal.Label(grid, txt))

        pal_list = self.get_palette_list()
        self.pal = wal.Combolist(grid,
                                 items=pal_list,
                                 onchange=self.change_palette)
        current_palette = self.get_current_palette()
        current_palette_name = current_palette.model.name
        self.pal.set_active(pal_list.index(current_palette_name))
        grid.pack(self.pal, fill=True)

        txt = _('Palette orientation:')
        grid.pack(wal.Label(grid, txt))
        self.pal_orient = wal.Combolist(grid, items=PAL_ORIENT)
        self.pal_orient.set_active(config.palette_orientation)
        grid.pack(self.pal_orient)

        pal_opt.pack(grid, fill=True, padding_all=5)

        btm_panel = wal.HPanel(pal_opt)
        pal_opt.pack(btm_panel, expand=True, fill=True)

        cell_panel = wal.VPanel(btm_panel)
        btm_panel.pack(cell_panel, expand=True, fill=True, padding_all=5)

        # ===
        txt = _('Vertical palette')
        vcell_panel = wal.LabeledPanel(cell_panel, text=txt)

        grid = wal.GridPanel(vcell_panel, cols=4, hgap=5, vgap=2)

        grid.pack((15, 1))
        grid.pack(wal.Label(grid, _('Cell width:')))
        self.vcell_width = wal.IntSpin(grid, config.palette_vcell_width,
                                       (10, 20))
        self.vcell_width.set_enable(False)
        grid.pack(self.vcell_width)
        grid.pack(wal.Label(grid, _('px')))

        grid.pack((15, 1))
        grid.pack(wal.Label(grid, _('Cell height:')))
        self.vcell_height = wal.IntSpin(grid, config.palette_vcell_height,
                                        (10, 100))
        grid.pack(self.vcell_height)
        grid.pack(wal.Label(grid, _('px')))

        vcell_panel.pack(grid, align_center=False, padding_all=5)
        cell_panel.pack(vcell_panel, fill=True)

        # ===
        txt = _('Horizontal palette')
        hcell_panel = wal.LabeledPanel(cell_panel, text=txt)

        grid = wal.GridPanel(hcell_panel, cols=4, hgap=5, vgap=2)

        grid.pack((15, 1))
        grid.pack(wal.Label(grid, _('Cell width:')))
        self.hcell_width = wal.IntSpin(grid, config.palette_hcell_width,
                                       (10, 100))
        grid.pack(self.hcell_width)
        grid.pack(wal.Label(grid, _('px')))

        grid.pack((15, 1))
        grid.pack(wal.Label(grid, _('Cell height:')))
        self.hcell_height = wal.IntSpin(grid, config.palette_hcell_height,
                                        (10, 20))
        self.hcell_height.set_enable(False)
        grid.pack(self.hcell_height)
        grid.pack(wal.Label(grid, _('px')))

        hcell_panel.pack(grid, align_center=False, padding_all=5)
        cell_panel.pack(hcell_panel, fill=True, padding=5)
        # ===

        txt = _('Expand short palettes')
        self.expand = wal.Checkbox(cell_panel, txt, config.palette_expand)
        cell_panel.pack(self.expand, align_center=False)

        self.palviewer = PaletteViewer(btm_panel, self.app.default_cms,
                                       current_palette)
        btm_panel.pack(self.palviewer, fill=True, padding_all=5)

        self.nb.add_page(pal_opt, _('Palette options'))

        # ========Palette management
        self.nb.add_page(PaletteManager(self.app, self, self.nb),
                         _('Palette management'))

        self.pack(self.nb, expand=True, fill=True)
        self.built = True
    def build(self):
        self.nb = wal.Notebook(self)

        # ----------------------

        vpanel = wal.VPanel(self.nb)
        grid = wal.GridPanel(vpanel, rows=3, cols=2, hgap=10, vgap=5)

        grid.pack(wal.Label(grid, _('UI style (*):')))
        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)

        grid.pack(wal.Label(grid, _('Tab style:')))
        items = [
            _('Rectangle 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)

        grid.pack((1, 1))
        grid.pack((300, 1))

        vpanel.pack(grid, align_center=False, padding_all=10)

        txt = _('Show quick access buttons')
        self.stub_buttons = wal.Checkbox(grid, txt, config.show_stub_buttons)
        vpanel.pack(self.stub_buttons, align_center=False, padding_all=5)

        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.nb.add_page(vpanel, _('UI style'))

        # ----------------------

        vpanel = wal.VPanel(self.nb)
        table = wal.GridPanel(vpanel, rows=1, cols=3, hgap=5, vgap=5)
        vpanel.pack(table, fill=True, padding_all=5)

        int_vp = wal.VPanel(table)

        txt = _('New document on start')
        self.newdoc = wal.Checkbox(int_vp, txt, config.new_doc_on_start)
        int_vp.pack(self.newdoc, align_center=False, padding=3)

        txt = _('Backup on document save')
        self.backup = wal.Checkbox(int_vp, txt, config.make_backup)
        int_vp.pack(self.backup, align_center=False, padding=3)

        txt = _('Make font cache on start')
        self.fcache = wal.Checkbox(int_vp, txt,
                                   config.make_font_cache_on_start)
        int_vp.pack(self.fcache, align_center=False, padding=3)

        txt = _('Backup on export')
        self.expbackup = wal.Checkbox(int_vp, txt, config.make_export_backup)
        int_vp.pack(self.expbackup, align_center=False, padding=3)

        table.pack(int_vp)
        table.pack((15, 5))

        grid = wal.GridPanel(self, rows=4, cols=2, hgap=5, vgap=3)
        grid.pack(wal.Label(grid, _('History log size:')))
        self.hist_size = wal.IntSpin(grid, config.history_size, (10, 1000))
        grid.pack(self.hist_size)
        grid.pack(wal.Label(grid, _('History menu size:')))
        self.hist_menu_size = wal.IntSpin(grid, config.history_list_size,
                                          (5, 20))
        grid.pack(self.hist_menu_size)

        grid.pack(wal.Label(grid, _('Logging level (*):')))
        self.log_level = wal.Combolist(grid, items=LEVELS)
        self.log_level.set_active(LEVELS.index(config.log_level))
        grid.pack(self.log_level)

        grid.pack(wal.Label(grid, _('Language (*):')))
        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)

        table.pack(grid)

        self.nb.add_page(vpanel, _('Generic features'))
        self.pack(self.nb, fill=True, expand=True, padding=5)

        txt = _('(*) - These options require application restart')
        self.pack(wal.Label(grid, txt, fontsize=-1), align_center=False)

        self.built = True