コード例 #1
0
    def __init__(self, parent):
        MyWizPage.__init__(self, parent)

        vb = wm.vbox()

        l = wm.label(self, """Pick a name for your wiki SQLite file.""")
        vb.add(l, 0)

        hb = wm.hbox()

        l = wm.label(self, 'Filename:')
        hb.add(l, 0)

        s = wm.string(self, 'wiki.db')
        hb.add(s, 5)
        self.s_filename = s

        vb.add(hb, 0)

        l = wm.label(
            self,
            "Your wiki will be stored in as a single SQLite database file.\nThis file will be stored in your wiki folder."
        )
        fn = l.GetFont()
        fn.SetStyle(wx.FONTSTYLE_SLANT)
        l.SetFont(fn)

        vb.add(l, 0)

        self.SetSizer(vb)
コード例 #2
0
    def __init__(self, parent):
        MyWizPage.__init__(self, parent)

        vb = wm.vbox()

        l = wm.label(
            self,
            """Set the server parameters. Make sure to set a port number\nthat is not already in use."""
        )
        vb.add(l, 0)

        hb = wm.hbox()

        l = wm.label(self, 'Address:')
        hb.add(l, 0)

        s = wm.string(self, '127.0.0.1')
        hb.add(s, 5)
        self.s_addr = s

        l = wm.label(self, 'Port:')
        hb.add(l, 0)

        s = wm.string(self, '8000')
        hb.add(s, 5)
        self.s_port = s

        vb.add(hb, 0)

        self.SetSizer(vb)
コード例 #3
0
    def __init__(self, parent):
        MyWizPage.__init__(self, parent)

        vb = wm.vbox()

        l = wm.label(
            self,
            """Choose a location to store your wiki. I recommend\ncreating a new folder, or picking an empty folder here."""
        )
        vb.add(l, 0)

        hb = wm.hbox()

        l = wm.label(self, 'Folder:')
        hb.add(l, 0)

        s = wm.string(self, '')
        hb.add(s, 5)
        self.s_rootdir = s

        b = wm.button(self, 'Browse ...', self.on_browse)
        hb.add(b, 2)

        vb.add(hb, 0)

        self.SetSizer(vb)

        self.Bind(wiz.EVT_WIZARD_PAGE_CHANGING, self.on_changing)
コード例 #4
0
ファイル: wikgui.py プロジェクト: dvorberg/wikklytext
	def __init__(self,parent):
		wx.Frame.__init__(self,parent,-1,'Wik Control Center')

		vbox = wm.vbox()
		p = WikListCtrlPanel(self)
		vbox.add(p,6,border=0)
		self.panel = p
		
		hb = wm.hbox()
		
		b = wxbuttons.GenBitmapTextButton(self, 
				bitmap = wikimages.getAddBitmap(),
				label = 'Add ...')
		hb.add(b,1,border=0)
		self.Bind(wx.EVT_BUTTON, self.on_add, b)
		
		b = wxbuttons.GenBitmapTextButton(self, 
				bitmap = wikimages.getBrowseBitmap(),
				label = 'Browse')
		hb.add(b,1,border=0)
		self.Bind(wx.EVT_BUTTON, self.on_browse, b)
		
		b = wxbuttons.GenBitmapTextButton(self, 
				bitmap = wikimages.getReloadBitmap(),
				label = 'Restart')
		hb.add(b,1,border=0)
		self.Bind(wx.EVT_BUTTON, self.on_restart, b)
		
		b = wxbuttons.GenBitmapTextButton(self, 
				bitmap = wikimages.getRedXBitmap(),
				label = 'Stop')
		hb.add(b,1,border=0)
		self.Bind(wx.EVT_BUTTON, self.on_stop, b)
		
		vbox.add(hb,1,border=0)
		
		hb = wm.hbox()
		
		b = wxbuttons.GenBitmapTextButton(self, 
				bitmap = wikimages.getWrenchBitmap(),
				label = 'Configure ...')
		hb.add(b,1,border=0)
		self.Bind(wx.EVT_BUTTON, self.on_configure, b)
		
		b = wxbuttons.GenBitmapTextButton(self, 
				bitmap = wikimages.getInspectBitmap(),
				label = 'View Log')
		hb.add(b,1,border=0)
		self.Bind(wx.EVT_BUTTON, self.on_viewlog, b)
		
		b = wxbuttons.GenBitmapTextButton(self, 
				bitmap = wikimages.getTrashBitmap(),
				label = 'Remove')
		hb.add(b,1,border=0)
		self.Bind(wx.EVT_BUTTON, self.on_remove, b)
		
		b = wxbuttons.GenBitmapTextButton(self, 
				bitmap = wikimages.getHelpBitmap(),
				label = 'Help')
		hb.add(b,1,border=0)
		self.Bind(wx.EVT_BUTTON, self.on_help, b)
		
		vbox.add(hb, 1, border=0)
		
		self.Bind(wx.EVT_CLOSE, self.on_close)
		
		self.SetIcon(wikimages.getMainIconIcon())
		
		self.SetSizer(vbox)
		vbox.SetSizeHints(self)
		self.SetAutoLayout(True)
		
		wx.CallAfter(self.on_startup)
コード例 #5
0
ファイル: wikgui.py プロジェクト: dvorberg/wikklytext
	def __init__(self, parent):
		wx.Dialog.__init__(self, parent, -1, "Wiki Configuration")
		
		vb = wm.vbox()
		
		hb = wm.hbox()
		
		l = wm.label(self, 'Location:')
		hb.add(l,0)
		
		s = wm.string(self, '')
		hb.add(s, 5)
		self.s_rootdir = s
		
		b = wm.button(self, 'Browse ...', self.on_choose_rootdir)
		hb.add(b, 2)
		self.b_browse_rootdir = b
		
		vb.add(hb,1)
		
		hb = wm.hbox()
		
		l = wm.label(self, 'Storage format:')
		hb.add(l,0)
		self.l_format = l
		
		cb = wm.combo(self, ['Text (.txt) files', 'TiddlyWiki (.html) file', 'SQLite database'],
					self.on_choose_format)
		hb.add(cb,1)
		self.cb_format = cb
		
		vb.add(hb,1)
		
		hb = wm.hbox()
		
		l = wm.label(self, 'Filename:')
		hb.add(l,0)
		self.l_filename = l
		
		s = wm.string(self, '')
		hb.add(s, 5)
		self.s_filename = s
		
		b = wm.button(self, 'Browse ...')
		hb.add(b, 2)
		self.b_browse_file = b
		
		vb.add(hb,1)

		hb = wm.hbox()

		l = wm.label(self, 'Server address:')
		hb.add(l,0)
		self.l_server_addr = l
		
		s = wm.string(self, '127.0.0.1')
		hb.add(s, 5)
		self.s_server_addr = s
		
		l = wm.label(self, 'Port:')
		hb.add(l,0)
		self.l_server_port = l
		
		s = wm.string(self, '8000')
		hb.add(s, 5)
		self.s_server_port = s
		
		vb.add(hb,1)

		hb = wm.hbox()
		
		b = wm.button(self,'Save',self.on_save)
		hb.add(b,1)
		
		b = wm.button(self, 'Cancel',self.on_cancel)
		hb.add(b,1)
		
		b = wm.button(self, 'Help')
		hb.add(b,1)
		
		vb.add(hb,1)
		
		self.SetSizer(vb)
		vb.SetSizeHints(self)
		self.SetAutoLayout(True)
		
		wx.CallAfter(self.update_enables)
コード例 #6
0
ファイル: wikgui.py プロジェクト: dvorberg/wikklytext
    def __init__(self, parent):
        wx.Frame.__init__(self, parent, -1, 'Wik Control Center')

        vbox = wm.vbox()
        p = WikListCtrlPanel(self)
        vbox.add(p, 6, border=0)
        self.panel = p

        hb = wm.hbox()

        b = wxbuttons.GenBitmapTextButton(self,
                                          bitmap=wikimages.getAddBitmap(),
                                          label='Add ...')
        hb.add(b, 1, border=0)
        self.Bind(wx.EVT_BUTTON, self.on_add, b)

        b = wxbuttons.GenBitmapTextButton(self,
                                          bitmap=wikimages.getBrowseBitmap(),
                                          label='Browse')
        hb.add(b, 1, border=0)
        self.Bind(wx.EVT_BUTTON, self.on_browse, b)

        b = wxbuttons.GenBitmapTextButton(self,
                                          bitmap=wikimages.getReloadBitmap(),
                                          label='Restart')
        hb.add(b, 1, border=0)
        self.Bind(wx.EVT_BUTTON, self.on_restart, b)

        b = wxbuttons.GenBitmapTextButton(self,
                                          bitmap=wikimages.getRedXBitmap(),
                                          label='Stop')
        hb.add(b, 1, border=0)
        self.Bind(wx.EVT_BUTTON, self.on_stop, b)

        vbox.add(hb, 1, border=0)

        hb = wm.hbox()

        b = wxbuttons.GenBitmapTextButton(self,
                                          bitmap=wikimages.getWrenchBitmap(),
                                          label='Configure ...')
        hb.add(b, 1, border=0)
        self.Bind(wx.EVT_BUTTON, self.on_configure, b)

        b = wxbuttons.GenBitmapTextButton(self,
                                          bitmap=wikimages.getInspectBitmap(),
                                          label='View Log')
        hb.add(b, 1, border=0)
        self.Bind(wx.EVT_BUTTON, self.on_viewlog, b)

        b = wxbuttons.GenBitmapTextButton(self,
                                          bitmap=wikimages.getTrashBitmap(),
                                          label='Remove')
        hb.add(b, 1, border=0)
        self.Bind(wx.EVT_BUTTON, self.on_remove, b)

        b = wxbuttons.GenBitmapTextButton(self,
                                          bitmap=wikimages.getHelpBitmap(),
                                          label='Help')
        hb.add(b, 1, border=0)
        self.Bind(wx.EVT_BUTTON, self.on_help, b)

        vbox.add(hb, 1, border=0)

        self.Bind(wx.EVT_CLOSE, self.on_close)

        self.SetIcon(wikimages.getMainIconIcon())

        self.SetSizer(vbox)
        vbox.SetSizeHints(self)
        self.SetAutoLayout(True)

        wx.CallAfter(self.on_startup)
コード例 #7
0
ファイル: wikgui.py プロジェクト: dvorberg/wikklytext
    def __init__(self, parent):
        wx.Dialog.__init__(self, parent, -1, "Wiki Configuration")

        vb = wm.vbox()

        hb = wm.hbox()

        l = wm.label(self, 'Location:')
        hb.add(l, 0)

        s = wm.string(self, '')
        hb.add(s, 5)
        self.s_rootdir = s

        b = wm.button(self, 'Browse ...', self.on_choose_rootdir)
        hb.add(b, 2)
        self.b_browse_rootdir = b

        vb.add(hb, 1)

        hb = wm.hbox()

        l = wm.label(self, 'Storage format:')
        hb.add(l, 0)
        self.l_format = l

        cb = wm.combo(self, [
            'Text (.txt) files', 'TiddlyWiki (.html) file', 'SQLite database'
        ], self.on_choose_format)
        hb.add(cb, 1)
        self.cb_format = cb

        vb.add(hb, 1)

        hb = wm.hbox()

        l = wm.label(self, 'Filename:')
        hb.add(l, 0)
        self.l_filename = l

        s = wm.string(self, '')
        hb.add(s, 5)
        self.s_filename = s

        b = wm.button(self, 'Browse ...')
        hb.add(b, 2)
        self.b_browse_file = b

        vb.add(hb, 1)

        hb = wm.hbox()

        l = wm.label(self, 'Server address:')
        hb.add(l, 0)
        self.l_server_addr = l

        s = wm.string(self, '127.0.0.1')
        hb.add(s, 5)
        self.s_server_addr = s

        l = wm.label(self, 'Port:')
        hb.add(l, 0)
        self.l_server_port = l

        s = wm.string(self, '8000')
        hb.add(s, 5)
        self.s_server_port = s

        vb.add(hb, 1)

        hb = wm.hbox()

        b = wm.button(self, 'Save', self.on_save)
        hb.add(b, 1)

        b = wm.button(self, 'Cancel', self.on_cancel)
        hb.add(b, 1)

        b = wm.button(self, 'Help')
        hb.add(b, 1)

        vb.add(hb, 1)

        self.SetSizer(vb)
        vb.SetSizeHints(self)
        self.SetAutoLayout(True)

        wx.CallAfter(self.update_enables)