[go: up one dir, main page]

Menu

[dfe9bc]: / ui / startpage.py  Maximize  Restore  History

Download this file

67 lines (49 with data), 2.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# ******************************************************
# * Copyright © 2016-2023 - Jordan Irwin (AntumDeluge) *
# ******************************************************
# * This software is licensed under the MIT license. *
# * See: LICENSE.txt for details. *
# ******************************************************
## The initial wizard page.
#
# @module ui.startpage
import wx
import ui.page
from dbr.language import GT
from globals import tooltips
from libdebreate.ident import pgid
from ui.hyperlink import Hyperlink
from ui.layout import BoxSizer
## The initial wizard page
class Page(ui.page.Page):
def __init__(self, parent):
super().__init__(parent, pgid.GREETING)
m1 = GT("Welcome to Debreate!")
m2 = GT("Debreate aids in building packages for installation on Debian based systems. Use the arrows located in the top-right corner or the \"Page\" menu to navigate through the program. For some information on Debian packages use the reference links in the \"Help\" menu.")
m3 = GT("For a video tutorial check the link below.")
str_info = "{}\n\n{}\n\n{}".format(m1, m2, m3)
# --- Information to be displayed about each mode
txt_info = wx.StaticText(self, label=str_info)
# Keep characters within the width of the window
txt_info.Wrap(600)
lnk_video = Hyperlink(self, wx.ID_ANY, GT("Building a Debian Package with Debreate"),
"http://www.youtube.com/watch?v=kx4D5eL6HKE")
tooltips.register(lnk_video, lnk_video.url)
# *** Layout *** #
lyt_info = wx.GridSizer(1, 1, 0, 0)
lyt_info.Add(txt_info, 1, wx.ALIGN_CENTER|wx.ALIGN_CENTER_VERTICAL)
lyt_main = BoxSizer(wx.VERTICAL)
lyt_main.Add(lyt_info, 4, wx.ALIGN_CENTER|wx.ALL, 10)
lyt_main.Add(lnk_video, 2, wx.ALIGN_CENTER)
self.SetAutoLayout(True)
self.SetSizer(lyt_main)
self.Layout()
## @override ui.page.Page.init
def init(self):
return True
## @override ui.page.Page.toString
def toString(self):
return None
## @override ui.page.Page.reset
def reset(self):
pass