diff options
author | kali <kali@leap.se> | 2013-04-09 00:43:13 +0900 |
---|---|---|
committer | kali <kali@leap.se> | 2013-04-09 00:43:13 +0900 |
commit | e75fe6ffd58b067b3fc32196ad245d26a1287e99 (patch) | |
tree | 8d8d15f80950fda8b1447c5b9fdab4129a4be0a4 /src | |
parent | 22342664951ac32756ceb7ade59ada90f92c8793 (diff) |
fixes as per review
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/gui/ui/wizard.ui | 184 | ||||
-rw-r--r-- | src/leap/gui/wizard.py | 13 | ||||
-rw-r--r-- | src/leap/util/privilege_policies.py | 4 |
3 files changed, 106 insertions, 95 deletions
diff --git a/src/leap/gui/ui/wizard.ui b/src/leap/gui/ui/wizard.ui index 141418db..ed7fe37c 100644 --- a/src/leap/gui/ui/wizard.ui +++ b/src/leap/gui/ui/wizard.ui @@ -284,8 +284,8 @@ <string notr="true">2</string> </attribute> <layout class="QGridLayout" name="gridLayout_4"> - <item row="0" column="5"> - <spacer name="verticalSpacer_20"> + <item row="0" column="0"> + <spacer name="verticalSpacer_5"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -297,8 +297,8 @@ </property> </spacer> </item> - <item row="10" column="6"> - <spacer name="verticalSpacer_16"> + <item row="0" column="1"> + <spacer name="verticalSpacer_13"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -310,8 +310,8 @@ </property> </spacer> </item> - <item row="10" column="1"> - <spacer name="verticalSpacer_15"> + <item row="0" column="2"> + <spacer name="verticalSpacer_17"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -323,15 +323,8 @@ </property> </spacer> </item> - <item row="9" column="0"> - <widget class="QLabel" name="label_12"> - <property name="text"> - <string><b>Enrollment policy:</b></string> - </property> - </widget> - </item> - <item row="0" column="4"> - <spacer name="verticalSpacer_19"> + <item row="0" column="3"> + <spacer name="verticalSpacer_18"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -343,8 +336,8 @@ </property> </spacer> </item> - <item row="0" column="2"> - <spacer name="verticalSpacer_17"> + <item row="0" column="4"> + <spacer name="verticalSpacer_19"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -356,15 +349,8 @@ </property> </spacer> </item> - <item row="9" column="1"> - <widget class="QLabel" name="lblProviderPolicy"> - <property name="text"> - <string>policy</string> - </property> - </widget> - </item> - <item row="0" column="3"> - <spacer name="verticalSpacer_18"> + <item row="0" column="5"> + <spacer name="verticalSpacer_20"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> @@ -376,7 +362,21 @@ </property> </spacer> </item> - <item row="2" column="6"> + <item row="1" column="0"> + <widget class="QLabel" name="lblProviderName"> + <property name="text"> + <string>Name</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="lblProviderURL"> + <property name="text"> + <string>URL</string> + </property> + </widget> + </item> + <item row="1" column="6"> <spacer name="horizontalSpacer_3"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -390,66 +390,55 @@ </spacer> </item> <item row="2" column="0"> - <widget class="QLabel" name="lblProviderName"> - <property name="text"> - <string>Name</string> - </property> - </widget> - </item> - <item row="10" column="0"> - <spacer name="verticalSpacer_14"> + <spacer name="horizontalSpacer_7"> <property name="orientation"> - <enum>Qt::Vertical</enum> + <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>20</width> - <height>40</height> + <width>40</width> + <height>20</height> </size> </property> </spacer> </item> - <item row="8" column="0"> - <widget class="QLabel" name="lblServ"> - <property name="text"> - <string><b>Services offered:</b></string> - </property> - </widget> - </item> - <item row="0" column="1"> - <spacer name="verticalSpacer_13"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> + <item row="2" column="1" colspan="6"> + <widget class="QLabel" name="lblProviderDesc"> + <property name="minimumSize"> <size> - <width>20</width> - <height>40</height> + <width>0</width> + <height>0</height> </size> </property> - </spacer> - </item> - <item row="0" column="0"> - <spacer name="verticalSpacer_5"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> + <property name="baseSize"> <size> - <width>20</width> - <height>40</height> + <width>200</width> + <height>0</height> </size> </property> - </spacer> + <property name="text"> + <string>Desc</string> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> </item> - <item row="2" column="1"> - <widget class="QLabel" name="lblProviderURL"> + <item row="3" column="0"> + <widget class="QLabel" name="lblServ"> <property name="text"> - <string>URL</string> + <string><b>Services offered:</b></string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QLabel" name="lblServicesOffered"> + <property name="text"> + <string>services</string> </property> </widget> </item> - <item row="8" column="6"> + <item row="3" column="6"> <spacer name="horizontalSpacer_6"> <property name="orientation"> <enum>Qt::Horizontal</enum> @@ -462,47 +451,58 @@ </property> </spacer> </item> - <item row="8" column="1"> - <widget class="QLabel" name="lblServicesOffered"> + <item row="4" column="0"> + <widget class="QLabel" name="label_12"> <property name="text"> - <string>services</string> + <string><b>Enrollment policy:</b></string> </property> </widget> </item> - <item row="3" column="0"> - <spacer name="horizontalSpacer_7"> + <item row="4" column="1"> + <widget class="QLabel" name="lblProviderPolicy"> + <property name="text"> + <string>policy</string> + </property> + </widget> + </item> + <item row="5" column="0"> + <spacer name="verticalSpacer_14"> <property name="orientation"> - <enum>Qt::Horizontal</enum> + <enum>Qt::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> - <width>40</width> - <height>20</height> + <width>20</width> + <height>40</height> </size> </property> </spacer> </item> - <item row="3" column="1" colspan="3"> - <widget class="QLabel" name="lblProviderDesc"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> + <item row="5" column="1"> + <spacer name="verticalSpacer_15"> + <property name="orientation"> + <enum>Qt::Vertical</enum> </property> - <property name="baseSize"> + <property name="sizeHint" stdset="0"> <size> - <width>200</width> - <height>0</height> + <width>20</width> + <height>40</height> </size> </property> - <property name="text"> - <string>Desc</string> + </spacer> + </item> + <item row="5" column="6"> + <spacer name="verticalSpacer_16"> + <property name="orientation"> + <enum>Qt::Vertical</enum> </property> - <property name="wordWrap"> - <bool>true</bool> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> </property> - </widget> + </spacer> </item> </layout> </widget> @@ -533,7 +533,7 @@ <item> <widget class="QLabel" name="lblSetupProviderExpl"> <property name="text"> - <string>We are downloading some bits that we need to stablish a secure connection with the provider for the first time.</string> + <string>We are downloading some bits that we need to establish a secure connection with the provider for the first time.</string> </property> <property name="wordWrap"> <bool>true</bool> diff --git a/src/leap/gui/wizard.py b/src/leap/gui/wizard.py index 5742dfef..cc00039b 100644 --- a/src/leap/gui/wizard.py +++ b/src/leap/gui/wizard.py @@ -52,6 +52,15 @@ class Wizard(QtGui.QWizard): BARE_USERNAME_REGEX = r"^[A-Za-z\d_]+$" def __init__(self, checker, standalone=False): + """ + Constructor for the main Wizard. + + @param checker: Checker thread that the wizard should use. + @type checker: CheckerThread + @param standalone: If True, the application is running as standalone + and the wizard should display some messages according to this. + @type standalone: bool + """ QtGui.QWizard.__init__(self) self.standalone = standalone @@ -67,13 +76,11 @@ class Wizard(QtGui.QWizard): self.OK_ICON = QtGui.QPixmap(":/images/Dialog-accept.png") # Correspondence for services and their name to display - # XXX need to add a note about "requires admin pass" if - # no polkit found. EIP_LABEL = self.tr("Encrypted Internet") if self._is_need_eip_password_warning(): EIP_LABEL += " " + self.tr( - "(will need admin pass to start)") + "(<br>will need admin password to start</br>)") self.SERVICE_DISPLAY = [ EIP_LABEL diff --git a/src/leap/util/privilege_policies.py b/src/leap/util/privilege_policies.py index 5bf1b476..e74c4d33 100644 --- a/src/leap/util/privilege_policies.py +++ b/src/leap/util/privilege_policies.py @@ -32,6 +32,8 @@ def is_missing_policy_permissions(): Returns True if we do not have implemented a policy checker for this platform, or if the policy checker exists but it cannot find the appropriate policy mechanisms in place. + + @rtype: bool """ _system = platform.system() platform_checker = _system + "PolicyChecker" @@ -74,5 +76,7 @@ class LinuxPolicyChecker(PolicyChecker): """ Returns True if we could not find the appropriate policykit file in place + + @rtype: bool """ return not os.path.isfile(self.LINUX_POLKIT_FILE) |