From ad16a72f60ecc84524c22e8912df4eb8a48a2a42 Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 6 Nov 2012 16:26:10 +0900 Subject: split wizard into separate files so we don't go nuts yet. --- src/leap/gui/firstrun/intro.py | 68 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 src/leap/gui/firstrun/intro.py (limited to 'src/leap/gui/firstrun/intro.py') diff --git a/src/leap/gui/firstrun/intro.py b/src/leap/gui/firstrun/intro.py new file mode 100644 index 00000000..4bb008c7 --- /dev/null +++ b/src/leap/gui/firstrun/intro.py @@ -0,0 +1,68 @@ +""" +Intro page used in first run wizard +""" + +from PyQt4 import QtGui + +from leap.gui.constants import APP_LOGO + + +class IntroPage(QtGui.QWizardPage): + def __init__(self, parent=None): + super(IntroPage, self).__init__(parent) + + self.setTitle("First run wizard.") + + #self.setPixmap( + #QtGui.QWizard.WatermarkPixmap, + #QtGui.QPixmap(':/images/watermark1.png')) + + self.setPixmap( + QtGui.QWizard.LogoPixmap, + QtGui.QPixmap(APP_LOGO)) + + label = QtGui.QLabel( + "Now we will guide you through " + "some configuration that is needed before you " + "can connect for the first time.

" + "If you ever need to modify these options again, " + "you can find the wizard in the 'Settings' menu from the " + "main window.

" + "Do you want to sign up for a new account, or log " + "in with an already existing username?
") + label.setWordWrap(True) + + radiobuttonGroup = QtGui.QGroupBox() + + self.sign_up = QtGui.QRadioButton( + "Sign up for a new account.") + self.sign_up.setChecked(True) + self.log_in = QtGui.QRadioButton( + "Log In with my credentials.") + + radiobLayout = QtGui.QVBoxLayout() + radiobLayout.addWidget(self.sign_up) + radiobLayout.addWidget(self.log_in) + radiobuttonGroup.setLayout(radiobLayout) + + layout = QtGui.QVBoxLayout() + layout.addWidget(label) + layout.addWidget(radiobuttonGroup) + self.setLayout(layout) + + self.registerField('is_signup', self.sign_up) + + def validatePage(self): + return True + + def nextId(self): + """ + returns next id + in a non-linear wizard + """ + if self.sign_up.isChecked(): + next_ = 'providerselection' + if self.log_in.isChecked(): + next_ = 'login' + wizard = self.wizard() + return wizard.get_page_index(next_) -- cgit v1.2.3 From d04c93134ad3daaee0ca280824ab3288bfc5029c Mon Sep 17 00:00:00 2001 From: kali Date: Fri, 16 Nov 2012 22:59:16 +0900 Subject: initial translation example. --- src/leap/gui/firstrun/intro.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/leap/gui/firstrun/intro.py') diff --git a/src/leap/gui/firstrun/intro.py b/src/leap/gui/firstrun/intro.py index 4bb008c7..0a7484e2 100644 --- a/src/leap/gui/firstrun/intro.py +++ b/src/leap/gui/firstrun/intro.py @@ -11,7 +11,7 @@ class IntroPage(QtGui.QWizardPage): def __init__(self, parent=None): super(IntroPage, self).__init__(parent) - self.setTitle("First run wizard.") + self.setTitle(self.tr("First run wizard.")) #self.setPixmap( #QtGui.QWizard.WatermarkPixmap, @@ -21,7 +21,7 @@ class IntroPage(QtGui.QWizardPage): QtGui.QWizard.LogoPixmap, QtGui.QPixmap(APP_LOGO)) - label = QtGui.QLabel( + label = QtGui.QLabel(self.tr( "Now we will guide you through " "some configuration that is needed before you " "can connect for the first time.

" @@ -29,16 +29,16 @@ class IntroPage(QtGui.QWizardPage): "you can find the wizard in the 'Settings' menu from the " "main window.

" "Do you want to sign up for a new account, or log " - "in with an already existing username?
") + "in with an already existing username?
")) label.setWordWrap(True) radiobuttonGroup = QtGui.QGroupBox() self.sign_up = QtGui.QRadioButton( - "Sign up for a new account.") + self.tr("Sign up for a new account.")) self.sign_up.setChecked(True) self.log_in = QtGui.QRadioButton( - "Log In with my credentials.") + self.tr("Log In with my credentials.")) radiobLayout = QtGui.QVBoxLayout() radiobLayout.addWidget(self.sign_up) -- cgit v1.2.3 From f55dcd717a946651492142ed198853b1c667254b Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 10 Jan 2013 02:00:21 +0900 Subject: renamed connection page --- src/leap/gui/firstrun/intro.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/leap/gui/firstrun/intro.py') diff --git a/src/leap/gui/firstrun/intro.py b/src/leap/gui/firstrun/intro.py index 0a7484e2..0425b764 100644 --- a/src/leap/gui/firstrun/intro.py +++ b/src/leap/gui/firstrun/intro.py @@ -50,7 +50,7 @@ class IntroPage(QtGui.QWizardPage): layout.addWidget(radiobuttonGroup) self.setLayout(layout) - self.registerField('is_signup', self.sign_up) + #self.registerField('is_signup', self.sign_up) def validatePage(self): return True -- cgit v1.2.3 From ff59da55ef9a176b36cef19d67e7ec363bf5d739 Mon Sep 17 00:00:00 2001 From: kali Date: Thu, 24 Jan 2013 02:30:00 +0900 Subject: wizard rephrasing & punctuation --- src/leap/gui/firstrun/intro.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/leap/gui/firstrun/intro.py') diff --git a/src/leap/gui/firstrun/intro.py b/src/leap/gui/firstrun/intro.py index 0425b764..b519362f 100644 --- a/src/leap/gui/firstrun/intro.py +++ b/src/leap/gui/firstrun/intro.py @@ -11,7 +11,7 @@ class IntroPage(QtGui.QWizardPage): def __init__(self, parent=None): super(IntroPage, self).__init__(parent) - self.setTitle(self.tr("First run wizard.")) + self.setTitle(self.tr("First run wizard")) #self.setPixmap( #QtGui.QWizard.WatermarkPixmap, @@ -35,10 +35,10 @@ class IntroPage(QtGui.QWizardPage): radiobuttonGroup = QtGui.QGroupBox() self.sign_up = QtGui.QRadioButton( - self.tr("Sign up for a new account.")) + self.tr("Sign up for a new account")) self.sign_up.setChecked(True) self.log_in = QtGui.QRadioButton( - self.tr("Log In with my credentials.")) + self.tr("Log In with my credentials")) radiobLayout = QtGui.QVBoxLayout() radiobLayout.addWidget(self.sign_up) -- cgit v1.2.3 From 0f9a1d4bc85def69dae0621eb7daaf5a0ee48004 Mon Sep 17 00:00:00 2001 From: kali Date: Fri, 1 Feb 2013 00:49:10 +0900 Subject: add watermark image to wizard --- src/leap/gui/firstrun/intro.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/leap/gui/firstrun/intro.py') diff --git a/src/leap/gui/firstrun/intro.py b/src/leap/gui/firstrun/intro.py index b519362f..8e5014e6 100644 --- a/src/leap/gui/firstrun/intro.py +++ b/src/leap/gui/firstrun/intro.py @@ -4,7 +4,7 @@ Intro page used in first run wizard from PyQt4 import QtGui -from leap.gui.constants import APP_LOGO +from leap.gui.constants import APP_LOGO, APP_WATERMARK class IntroPage(QtGui.QWizardPage): @@ -13,9 +13,9 @@ class IntroPage(QtGui.QWizardPage): self.setTitle(self.tr("First run wizard")) - #self.setPixmap( - #QtGui.QWizard.WatermarkPixmap, - #QtGui.QPixmap(':/images/watermark1.png')) + self.setPixmap( + QtGui.QWizard.WatermarkPixmap, + QtGui.QPixmap(APP_WATERMARK)) self.setPixmap( QtGui.QWizard.LogoPixmap, -- cgit v1.2.3