Exemple #1
0
	def build(self):
		GenericPrefsPlugin.build(self)
		self.nb = wal.NoteBook(self)
		self.tabs = [CMSTab(self.nb, self, self.app, self.dlg),
					ProfilesTab(self.nb, self.app, self.dlg),
					SettingsTab(self.nb, self.app, self.dlg)]
		self.set_tabs(config.cms_use)
		self.pack_end(self.nb, True, True, 0)
Exemple #2
0
 def build(self):
     GenericPrefsPlugin.build(self)
     self.nb = wal.NoteBook(self)
     self.tabs = [
         CMSTab(self.nb, self, self.app, self.dlg),
         ProfilesTab(self.nb, self.app, self.dlg),
         SettingsTab(self.nb, self.app, self.dlg)
     ]
     self.set_tabs(config.cms_use)
     self.pack_end(self.nb, True, True, 0)
	def build(self):
		GenericPrefsPlugin.build(self)

		txt = _('Create new document on start')
		self.newdoc_check = wal.CheckButton(self, txt, config.new_doc_on_start)
		self.pack_start(self.newdoc_check, False, True, 5)

		txt = _('Store application window size')
		self.winsize_check = wal.CheckButton(self, txt, config.mw_store_size)
		self.pack_start(self.winsize_check, False, True, 5)

		txt = _('Maximize application window on start')
		self.maxwin_check = wal.CheckButton(self, txt, config.mw_keep_maximized)
		self.pack_start(self.maxwin_check, False, True, 5)
	def __init__(self, app, dlg, fmt_config):
		GenericPrefsPlugin.__init__(self, app, dlg, fmt_config)
Exemple #5
0
	def build(self):
		GenericPrefsPlugin.build(self)
Exemple #6
0
    def build(self):
        GenericPrefsPlugin.build(self)

        self.test_ruler = TestRuler(self)

        tab = gtk.Table(1, 1, False)
        tab.set_row_spacings(5)
        tab.set_col_spacings(10)
        tab.set_border_width(5)

        # --- Ruler size
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_("Ruler size (px):")))
        tab.attach(al, 0, 1, 0, 1, gtk.FILL, gtk.SHRINK)

        self.size_spin = wal.SpinButtonInt(
            tab, config.ruler_size, (15, 30), cmd=self.test_ruler.redraw, check_enter=False
        )
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.size_spin)
        tab.attach(al, 1, 2, 0, 1, gtk.FILL, gtk.SHRINK)

        # --- Ruler font size
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_("Ruler font size (px):")))
        tab.attach(al, 0, 1, 1, 2, gtk.FILL, gtk.SHRINK)

        self.fsize_spin = wal.SpinButtonInt(
            tab, config.ruler_font_size, (5, 8), cmd=self.test_ruler.redraw, check_enter=False
        )
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.fsize_spin)
        tab.attach(al, 1, 2, 1, 2, gtk.FILL, gtk.SHRINK)

        # --- Background color
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_("Ruler background color:")))
        tab.attach(al, 0, 1, 2, 3, gtk.FILL, gtk.SHRINK)

        self.bgcolor = wal.ColorButton(tab, config.ruler_bgcolor, cmd=self.test_ruler.redraw)
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.bgcolor)
        tab.attach(al, 1, 2, 2, 3, gtk.FILL, gtk.SHRINK)

        # --- Foreground color
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_("Ruler tick color:")))
        tab.attach(al, 0, 1, 3, 4, gtk.FILL, gtk.SHRINK)

        self.fgcolor = wal.ColorButton(tab, config.ruler_fgcolor, cmd=self.test_ruler.redraw)
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.fgcolor)
        tab.attach(al, 1, 2, 3, 4, gtk.FILL, gtk.SHRINK)

        # --- Small tick size
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_("Small tick size (px):")))
        tab.attach(al, 0, 1, 4, 5, gtk.FILL, gtk.SHRINK)

        self.stick_spin = wal.SpinButtonInt(
            tab, config.ruler_small_tick, (1, 30), cmd=self.test_ruler.redraw, check_enter=False
        )
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.stick_spin)
        tab.attach(al, 1, 2, 4, 5, gtk.FILL, gtk.SHRINK)

        # --- Large tick size
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_("Large tick size (px):")))
        tab.attach(al, 0, 1, 5, 6, gtk.FILL, gtk.SHRINK)

        self.ltick_spin = wal.SpinButtonInt(
            tab, config.ruler_text_tick, (1, 30), cmd=self.test_ruler.redraw, check_enter=False
        )
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.ltick_spin)
        tab.attach(al, 1, 2, 5, 6, gtk.FILL, gtk.SHRINK)

        # --- Text mark shift
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_("Text mark shift (px):")))
        tab.attach(al, 0, 1, 6, 7, gtk.FILL, gtk.SHRINK)

        self.tmshift_spin = wal.SpinButtonInt(
            tab, config.ruler_text_shift, (-30, 30), cmd=self.test_ruler.redraw, check_enter=False
        )
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.tmshift_spin)
        tab.attach(al, 1, 2, 6, 7, gtk.FILL, gtk.SHRINK)

        self.pack_start(tab, False, False, 0)

        # --- Testing ruler
        al = wal.DecorLabel(self, _("Testing ruler:"), bold=True)
        self.pack_start(al, False, False, 20)

        self.pack_start(gtk.HSeparator(), False, False, 0)
        self.pack_start(self.test_ruler, False, False, 0)
Exemple #7
0
    def build(self):
        GenericPrefsPlugin.build(self)

        self.test_ruler = TestRuler(self)

        tab = gtk.Table(1, 1, False)
        tab.set_row_spacings(5)
        tab.set_col_spacings(10)
        tab.set_border_width(5)

        #--- Ruler size
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_('Ruler size (px):')))
        tab.attach(al, 0, 1, 0, 1, gtk.FILL, gtk.SHRINK)

        self.size_spin = wal.SpinButtonInt(tab,
                                           config.ruler_size, (15, 30),
                                           cmd=self.test_ruler.redraw,
                                           check_enter=False)
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.size_spin)
        tab.attach(al, 1, 2, 0, 1, gtk.FILL, gtk.SHRINK)

        #--- Ruler font size
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_('Ruler font size (px):')))
        tab.attach(al, 0, 1, 1, 2, gtk.FILL, gtk.SHRINK)

        self.fsize_spin = wal.SpinButtonInt(tab,
                                            config.ruler_font_size, (5, 8),
                                            cmd=self.test_ruler.redraw,
                                            check_enter=False)
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.fsize_spin)
        tab.attach(al, 1, 2, 1, 2, gtk.FILL, gtk.SHRINK)

        #--- Background color
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_('Ruler background color:')))
        tab.attach(al, 0, 1, 2, 3, gtk.FILL, gtk.SHRINK)

        self.bgcolor = wal.ColorButton(tab,
                                       config.ruler_bgcolor,
                                       cmd=self.test_ruler.redraw)
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.bgcolor)
        tab.attach(al, 1, 2, 2, 3, gtk.FILL, gtk.SHRINK)

        #--- Foreground color
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_('Ruler tick color:')))
        tab.attach(al, 0, 1, 3, 4, gtk.FILL, gtk.SHRINK)

        self.fgcolor = wal.ColorButton(tab,
                                       config.ruler_fgcolor,
                                       cmd=self.test_ruler.redraw)
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.fgcolor)
        tab.attach(al, 1, 2, 3, 4, gtk.FILL, gtk.SHRINK)

        #--- Small tick size
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_('Small tick size (px):')))
        tab.attach(al, 0, 1, 4, 5, gtk.FILL, gtk.SHRINK)

        self.stick_spin = wal.SpinButtonInt(tab,
                                            config.ruler_small_tick, (1, 30),
                                            cmd=self.test_ruler.redraw,
                                            check_enter=False)
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.stick_spin)
        tab.attach(al, 1, 2, 4, 5, gtk.FILL, gtk.SHRINK)

        #--- Large tick size
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_('Large tick size (px):')))
        tab.attach(al, 0, 1, 5, 6, gtk.FILL, gtk.SHRINK)

        self.ltick_spin = wal.SpinButtonInt(tab,
                                            config.ruler_text_tick, (1, 30),
                                            cmd=self.test_ruler.redraw,
                                            check_enter=False)
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.ltick_spin)
        tab.attach(al, 1, 2, 5, 6, gtk.FILL, gtk.SHRINK)

        #--- Text mark shift
        al = gtk.Alignment(1.0, 0.5)
        al.add(gtk.Label(_('Text mark shift (px):')))
        tab.attach(al, 0, 1, 6, 7, gtk.FILL, gtk.SHRINK)

        self.tmshift_spin = wal.SpinButtonInt(tab,
                                              config.ruler_text_shift,
                                              (-30, 30),
                                              cmd=self.test_ruler.redraw,
                                              check_enter=False)
        al = gtk.Alignment(0.0, 0.5)
        al.add(self.tmshift_spin)
        tab.attach(al, 1, 2, 6, 7, gtk.FILL, gtk.SHRINK)

        self.pack_start(tab, False, False, 0)

        #--- Testing ruler
        al = wal.DecorLabel(self, _('Testing ruler:'), bold=True)
        self.pack_start(al, False, False, 20)

        self.pack_start(gtk.HSeparator(), False, False, 0)
        self.pack_start(self.test_ruler, False, False, 0)