diff options
author | kali <kali@leap.se> | 2014-08-13 14:16:09 -0500 |
---|---|---|
committer | kali <kali@leap.se> | 2014-08-13 14:16:09 -0500 |
commit | 481b5e51b88bd5e0c2d856fbc0593d81634442da (patch) | |
tree | 7c8e1bdc72916535ab5fd14697d8dc05e696b4bc /src/leap | |
parent | ab28bd5056e5d3e1c5a6b14307e67cea618e3359 (diff) | |
parent | 8eff8582f39c5f3872f75ebd2c530a17d366310d (diff) |
Merge branch 'develop' into deb-0.6.1-rc
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/bitmask/gui/eip_status.py | 15 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mail_status.py | 12 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 186 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/advanced_key_management.ui | 4 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/eip_status.ui | 14 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/eippreferences.ui | 4 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/loggerwindow.ui | 4 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/login.ui | 64 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/logout.ui | 74 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/mail_status.ui | 6 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/mainwindow.ui | 28 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/preferences.ui | 4 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/wizard.ui | 126 | ||||
-rw-r--r-- | src/leap/bitmask/gui/wizard.py | 21 |
14 files changed, 373 insertions, 189 deletions
diff --git a/src/leap/bitmask/gui/eip_status.py b/src/leap/bitmask/gui/eip_status.py index 1e764a8c..abd6e2c9 100644 --- a/src/leap/bitmask/gui/eip_status.py +++ b/src/leap/bitmask/gui/eip_status.py @@ -214,15 +214,15 @@ class EIPStatusWidget(QtGui.QWidget): WIN : light icons """ EIP_ICONS = EIP_ICONS_TRAY = ( - ":/images/black/32/wait.png", - ":/images/black/32/on.png", - ":/images/black/32/off.png") + ":/images/black/22/wait.png", + ":/images/black/22/on.png", + ":/images/black/22/off.png") if IS_LINUX: EIP_ICONS_TRAY = ( - ":/images/white/32/wait.png", - ":/images/white/32/on.png", - ":/images/white/32/off.png") + ":/images/white/22/wait.png", + ":/images/white/22/on.png", + ":/images/white/22/off.png") self.CONNECTING_ICON = QtGui.QPixmap(EIP_ICONS[0]) self.CONNECTED_ICON = QtGui.QPixmap(EIP_ICONS[1]) @@ -793,6 +793,3 @@ class EIPStatusWidget(QtGui.QWidget): """ self.set_eip_status("", error=error) self.set_eip_status_icon("error") - -import eipstatus_rc -assert(eipstatus_rc) diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py index bb755b5c..d523f449 100644 --- a/src/leap/bitmask/gui/mail_status.py +++ b/src/leap/bitmask/gui/mail_status.py @@ -134,15 +134,15 @@ class MailStatusWidget(QtGui.QWidget): WIN : light icons """ EIP_ICONS = EIP_ICONS_TRAY = ( - ":/images/black/32/wait.png", - ":/images/black/32/on.png", - ":/images/black/32/off.png") + ":/images/black/22/wait.png", + ":/images/black/22/on.png", + ":/images/black/22/off.png") if IS_LINUX: EIP_ICONS_TRAY = ( - ":/images/white/32/wait.png", - ":/images/white/32/on.png", - ":/images/white/32/off.png") + ":/images/white/22/wait.png", + ":/images/white/22/on.png", + ":/images/white/22/off.png") self.CONNECTING_ICON = QtGui.QPixmap(EIP_ICONS[0]) self.CONNECTED_ICON = QtGui.QPixmap(EIP_ICONS[1]) diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 389ff172..0518350e 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -237,8 +237,8 @@ class MainWindow(QtGui.QMainWindow): self._action_eip_startstop = QtGui.QAction("", self) self._eip_status.set_action_eip_startstop(self._action_eip_startstop) - self._action_visible = QtGui.QAction(self.tr("Hide Main Window"), self) - self._action_visible.triggered.connect(self._toggle_visible) + self._action_visible = QtGui.QAction(self.tr("Show Main Window"), self) + self._action_visible.triggered.connect(self._ensure_visible) # disable buttons for now, may come back later. # self.ui.btnPreferences.clicked.connect(self._show_preferences) @@ -285,14 +285,8 @@ class MainWindow(QtGui.QMainWindow): self.logout.connect(self._mail_conductor.stop_mail_services) - # Eip machine is a public attribute where the state machine for - # the eip connection will be available to the different components. - # Remember that this will not live in the +1600LOC mainwindow for - # all the eternity, so at some point we will be moving this to - # the EIPConductor or some other clever component that we will - # instantiate from here. + # start event machines from within the eip and mail conductors - # start event machines # TODO should encapsulate all actions into one object self._eip_conductor.start_eip_machine( action=self._action_eip_startstop) @@ -963,8 +957,6 @@ class MainWindow(QtGui.QMainWindow): Display the context menu from the tray icon """ - self._update_hideshow_menu() - context_menu = self._systray.contextMenu() if not IS_MAC: # for some reason, context_menu.show() @@ -973,50 +965,38 @@ class MainWindow(QtGui.QMainWindow): # this works however. context_menu.exec_(self._systray.geometry().center()) - def _update_hideshow_menu(self): - """ - Update the Hide/Show main window menu text based on the - visibility of the window. + @QtCore.Slot() + def _ensure_visible(self): """ - get_action = lambda visible: ( - self.tr("Show Main Window"), - self.tr("Hide Main Window"))[int(visible)] + TRIGGERS: + self._action_visible.triggered - # set labels - visible = self.isVisible() and self.isActiveWindow() - self._action_visible.setText(get_action(visible)) + Ensure that the window is visible and raised. + """ + QtGui.QApplication.setQuitOnLastWindowClosed(True) + self.show() + if IS_LINUX: + # On ubuntu, activateWindow doesn't work reliably, so + # we do the following as a workaround. See + # https://bugreports.qt-project.org/browse/QTBUG-24932 + # for more details + QtGui.QX11Info.setAppUserTime(0) + self.activateWindow() + self.raise_() @QtCore.Slot() - def _toggle_visible(self): + def _ensure_invisible(self): """ TRIGGERS: self._action_visible.triggered - Toggle the window visibility + Ensure that the window is hidden. """ - visible = self.isVisible() and self.isActiveWindow() - - if not visible: - QtGui.QApplication.setQuitOnLastWindowClosed(True) - self.show() - if IS_LINUX: - # On ubuntu, activateWindow doesn't work reliably, so - # we do the following as a workaround. See - # https://bugreports.qt-project.org/browse/QTBUG-24932 - # for more details - QtGui.QX11Info.setAppUserTime(0) - self.activateWindow() - self.raise_() - else: - # We set this in order to avoid dialogs shutting down the - # app on close, as they will be the only visible window. - # e.g.: PreferencesWindow, LoggerWindow - QtGui.QApplication.setQuitOnLastWindowClosed(False) - self.hide() - - # Wait a bit until the window visibility has changed so - # the menu is set with the correct value. - QtDelayedCall(500, self._update_hideshow_menu) + # We set this in order to avoid dialogs shutting down the + # app on close, as they will be the only visible window. + # e.g.: PreferencesWindow, LoggerWindow + QtGui.QApplication.setQuitOnLastWindowClosed(False) + self.hide() def _center_window(self): """ @@ -1079,22 +1059,38 @@ class MainWindow(QtGui.QMainWindow): # TODO: don't hardcode! smtp_port = 2013 - url = ("<a href='https://addons.mozilla.org/es/thunderbird/" - "addon/bitmask/'>bitmask addon</a>") - - msg = self.tr( - "<strong>Instructions to use mail:</strong><br>" - "If you use Thunderbird you can use the Bitmask extension helper. " - "Search for 'Bitmask' in the add-on manager or download it " - "from: {0}.<br><br>" - "You can configure Bitmask manually with these options:<br>" - "<em>" - " Incoming -> IMAP, port: {1}<br>" - " Outgoing -> SMTP, port: {2}<br>" - " Username -> your bitmask username.<br>" - " Password -> does not matter, use any text. " - " Just don't leave it empty and don't use your account's password." - "</em>").format(url, IMAP_PORT, smtp_port) + help_url = "<p><a href='https://{0}'>{0}</a></p>".format( + self.tr("bitmask.net/help")) + + lang = QtCore.QLocale.system().name().replace('_','-') + thunderbird_extension_url = \ + "https://addons.mozilla.org/{0}/" \ + "thunderbird/addon/bitmask/".format(lang) + + email_quick_reference = self.tr("Email quick reference") + thunderbird_text = self.tr("For Thunderbird, you can use the " + "Bitmask extension. Search for \"Bitmask\" in the add-on " + "manager or download it from <a href='{0}'>" + "addons.mozilla.org</a>.".format(thunderbird_extension_url)) + manual_text = self.tr("Alternately, you can manually configure " + "your mail client to use Bitmask Email with these options:") + manual_imap = self.tr("IMAP: localhost, port {0}".format(IMAP_PORT)) + manual_smtp = self.tr("SMTP: localhost, port {0}".format(smtp_port)) + manual_username = self.tr("Username: your full email address") + manual_password = self.tr("Password: any non-empty text") + + msg = help_url + self.tr( + "<p><strong>{0}</strong></p>" + "<p>{1}</p>" + "<p>{2}" + "<ul>" + "<li> {3}</li>" + "<li> {4}</li>" + "<li> {5}</li>" + "<li> {6}</li>" + "</ul></p>").format(email_quick_reference, thunderbird_text, + manual_text, manual_imap, manual_smtp, + manual_username, manual_password) QtGui.QMessageBox.about(self, self.tr("Bitmask Help"), msg) def _needs_update(self): @@ -1120,19 +1116,6 @@ class MainWindow(QtGui.QMainWindow): "Error: API version incompatible.") QtGui.QMessageBox.warning(self, self.tr("Incompatible Provider"), msg) - def changeEvent(self, e): - """ - Reimplementation of changeEvent method to minimize to tray - """ - if not IS_MAC and \ - QtGui.QSystemTrayIcon.isSystemTrayAvailable() and \ - e.type() == QtCore.QEvent.WindowStateChange and \ - self.isMinimized(): - self._toggle_visible() - e.accept() - return - QtGui.QMainWindow.changeEvent(self, e) - def closeEvent(self, e): """ Reimplementation of closeEvent to close to tray @@ -1145,7 +1128,7 @@ class MainWindow(QtGui.QMainWindow): if QtGui.QSystemTrayIcon.isSystemTrayAvailable() and \ not self._really_quit: - self._toggle_visible() + self._ensure_invisible() e.ignore() return @@ -1165,12 +1148,14 @@ class MainWindow(QtGui.QMainWindow): skip_first_run = self._settings.get_skip_first_run() return not (has_provider_on_disk and skip_first_run) + @QtCore.Slot() def _download_provider_config(self): """ Start the bootstrapping sequence. It will download the provider configuration if it's not present, otherwise will emit the corresponding signals inmediately """ + self._disconnect_scheduled_login() domain = self._login_widget.get_selected_provider() self._backend.provider_setup(provider=domain) @@ -1204,6 +1189,40 @@ class MainWindow(QtGui.QMainWindow): self.tr("Unable to login: Problem with provider")) self._login_widget.set_enabled(True) + def _schedule_login(self): + """ + Schedule the login sequence to go after the EIP started. + + The login sequence is connected to all finishing status of EIP + (connected, disconnected, aborted or died) to continue with the login + after EIP. + """ + logger.debug('Login scheduled when eip_connected is triggered') + eip_sigs = self._eip_conductor.qtsigs + eip_sigs.connected_signal.connect(self._download_provider_config) + eip_sigs.disconnected_signal.connect(self._download_provider_config) + eip_sigs.connection_aborted_signal.connect(self._download_provider_config) + eip_sigs.connection_died_signal.connect(self._download_provider_config) + + def _disconnect_scheduled_login(self): + """ + Disconnect scheduled login signals if exists + """ + try: + eip_sigs = self._eip_conductor.qtsigs + eip_sigs.connected_signal.disconnect( + self._download_provider_config) + eip_sigs.disconnected_signal.disconnect( + self._download_provider_config) + eip_sigs.connection_aborted_signal.disconnect( + self._download_provider_config) + eip_sigs.connection_died_signal.disconnect( + self._download_provider_config) + except Exception: + # signal not connected + pass + + @QtCore.Slot() def _login(self): """ @@ -1229,7 +1248,10 @@ class MainWindow(QtGui.QMainWindow): else: self.ui.action_create_new_account.setEnabled(False) if self._login_widget.start_login(): - self._download_provider_config() + if self._trying_to_start_eip: + self._schedule_login() + else: + self._download_provider_config() @QtCore.Slot(unicode) def _authentication_error(self, msg): @@ -1258,8 +1280,13 @@ class MainWindow(QtGui.QMainWindow): Stop the login sequence. """ logger.debug("Cancelling log in.") + self._disconnect_scheduled_login() + self._cancel_ongoing_defers() + # Needed in case of EIP starting and login deferer never set + self._set_login_cancelled() + def _cancel_ongoing_defers(self): """ Cancel the running defers to avoid app blocking. @@ -1673,8 +1700,9 @@ class MainWindow(QtGui.QMainWindow): """ passed = data[PASSED_KEY] if not passed: - self._login_widget.set_status( - self.tr("Unable to connect: Problem with provider")) + self._eip_status.set_eip_status( + self.tr("Unable to connect: Problem with provider"), + error=True) logger.error(data[ERROR_KEY]) self._already_started_eip = False self._eip_status.aborted() diff --git a/src/leap/bitmask/gui/ui/advanced_key_management.ui b/src/leap/bitmask/gui/ui/advanced_key_management.ui index 3b567347..72f70d24 100644 --- a/src/leap/bitmask/gui/ui/advanced_key_management.ui +++ b/src/leap/bitmask/gui/ui/advanced_key_management.ui @@ -14,7 +14,7 @@ <string>Advanced Key Management</string> </property> <property name="windowIcon"> - <iconset resource="../../../../../data/resources/mainwindow.qrc"> + <iconset resource="../../../../../data/resources/icons.qrc"> <normaloff>:/images/mask-icon.png</normaloff>:/images/mask-icon.png</iconset> </property> <layout class="QGridLayout" name="gridLayout_4"> @@ -184,7 +184,7 @@ </layout> </widget> <resources> - <include location="../../../../../data/resources/mainwindow.qrc"/> + <include location="../../../../../data/resources/icons.qrc"/> </resources> <connections/> </ui> diff --git a/src/leap/bitmask/gui/ui/eip_status.ui b/src/leap/bitmask/gui/ui/eip_status.ui index e0996620..0fb861bc 100644 --- a/src/leap/bitmask/gui/ui/eip_status.ui +++ b/src/leap/bitmask/gui/ui/eip_status.ui @@ -60,7 +60,7 @@ <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/black/32/earth.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/32/earth.png</pixmap> </property> </widget> </item> @@ -103,15 +103,15 @@ <widget class="QLabel" name="lblVPNStatusIcon"> <property name="maximumSize"> <size> - <width>24</width> - <height>24</height> + <width>22</width> + <height>22</height> </size> </property> <property name="text"> <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/black/32/off.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/22/off.png</pixmap> </property> <property name="scaledContents"> <bool>true</bool> @@ -162,7 +162,7 @@ <string>0.0 KB/s</string> </property> <property name="icon"> - <iconset resource="../../../../../data/resources/mainwindow.qrc"> + <iconset resource="../../../../../data/resources/icons.qrc"> <normaloff>:/images/black/32/arrow-down.png</normaloff>:/images/black/32/arrow-down.png</iconset> </property> <property name="flat"> @@ -213,7 +213,7 @@ <string>0.0 KB/s</string> </property> <property name="icon"> - <iconset resource="../../../../../data/resources/mainwindow.qrc"> + <iconset resource="../../../../../data/resources/icons.qrc"> <normaloff>:/images/black/32/arrow-up.png</normaloff>:/images/black/32/arrow-up.png</iconset> </property> <property name="flat"> @@ -265,8 +265,8 @@ </layout> </widget> <resources> - <include location="../../../../../data/resources/mainwindow.qrc"/> <include location="../../../../../data/resources/icons.qrc"/> + <include location="../../../../../data/resources/flags.qrc"/> </resources> <connections/> </ui> diff --git a/src/leap/bitmask/gui/ui/eippreferences.ui b/src/leap/bitmask/gui/ui/eippreferences.ui index a3050683..1a5fcd24 100644 --- a/src/leap/bitmask/gui/ui/eippreferences.ui +++ b/src/leap/bitmask/gui/ui/eippreferences.ui @@ -14,7 +14,7 @@ <string>Encrypted Internet Preferences</string> </property> <property name="windowIcon"> - <iconset resource="../../../../../data/resources/mainwindow.qrc"> + <iconset resource="../../../../../data/resources/icons.qrc"> <normaloff>:/images/mask-icon.png</normaloff>:/images/mask-icon.png</iconset> </property> <layout class="QGridLayout" name="gridLayout_2"> @@ -96,7 +96,7 @@ <tabstop>pbSaveGateway</tabstop> </tabstops> <resources> - <include location="../../../../../data/resources/mainwindow.qrc"/> + <include location="../../../../../data/resources/icons.qrc"/> </resources> <connections/> </ui> diff --git a/src/leap/bitmask/gui/ui/loggerwindow.ui b/src/leap/bitmask/gui/ui/loggerwindow.ui index b19ed91a..fd8644c9 100644 --- a/src/leap/bitmask/gui/ui/loggerwindow.ui +++ b/src/leap/bitmask/gui/ui/loggerwindow.ui @@ -14,7 +14,7 @@ <string>Logs</string> </property> <property name="windowIcon"> - <iconset resource="../../../../../data/resources/mainwindow.qrc"> + <iconset resource="../../../../../data/resources/icons.qrc"> <normaloff>:/images/mask-icon.png</normaloff>:/images/mask-icon.png</iconset> </property> <layout class="QGridLayout" name="gridLayout"> @@ -180,7 +180,7 @@ </tabstops> <resources> <include location="../../../../../data/resources/loggerwindow.qrc"/> - <include location="../../../../../data/resources/mainwindow.qrc"/> + <include location="../../../../../data/resources/icons.qrc"/> </resources> <connections/> </ui> diff --git a/src/leap/bitmask/gui/ui/login.ui b/src/leap/bitmask/gui/ui/login.ui index 216eca9e..26decc6d 100644 --- a/src/leap/bitmask/gui/ui/login.ui +++ b/src/leap/bitmask/gui/ui/login.ui @@ -33,7 +33,7 @@ <number>0</number> </property> <property name="verticalSpacing"> - <number>-1</number> + <number>6</number> </property> <item row="2" column="0"> <spacer name="horizontalSpacer_2"> @@ -79,8 +79,14 @@ </property> </widget> </item> - <item row="3" column="0"> + <item row="4" column="1"> <widget class="QPushButton" name="btnLogin"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Maximum" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="text"> <string>Log In</string> </property> @@ -164,7 +170,7 @@ <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/black/32/user.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/32/user.png</pixmap> </property> <property name="scaledContents"> <bool>false</bool> @@ -198,26 +204,17 @@ </item> <item row="3" column="2" colspan="2"> <widget class="QWidget" name="logged_widget" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <layout class="QGridLayout" name="gridLayout_5"> + <layout class="QHBoxLayout" name="horizontalLayout"> <property name="topMargin"> <number>0</number> </property> + <property name="rightMargin"> + <number>25</number> + </property> <property name="bottomMargin"> - <number>12</number> + <number>18</number> </property> - <item row="0" column="0" colspan="2"> + <item> <widget class="QLabel" name="lblUser"> <property name="font"> <font> @@ -231,22 +228,41 @@ </property> </widget> </item> - <item row="1" column="0"> + <item> + <spacer name="expandingSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </spacer> + </item> + <item> <widget class="QPushButton" name="btnLogout"> <property name="text"> <string>Logout</string> </property> </widget> </item> - <item row="1" column="1"> - <spacer name="horizontalSpacer"> + <item> + <spacer name="fixedSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> <property name="sizeHint" stdset="0"> <size> - <width>40</width> - <height>20</height> + <width>24</width> + <height>24</height> </size> </property> </spacer> @@ -283,7 +299,7 @@ <tabstop>chkRemember</tabstop> </tabstops> <resources> - <include location="../../../../../data/resources/mainwindow.qrc"/> + <include location="../../../../../data/resources/icons.qrc"/> </resources> <connections/> </ui> diff --git a/src/leap/bitmask/gui/ui/logout.ui b/src/leap/bitmask/gui/ui/logout.ui new file mode 100644 index 00000000..3faa93b6 --- /dev/null +++ b/src/leap/bitmask/gui/ui/logout.ui @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>Form</class> + <widget class="QWidget" name="Form"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>434</width> + <height>202</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="lblUser"> + <property name="font"> + <font> + <pointsize>15</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>...</string> + </property> + </widget> + </item> + <item> + <spacer name="expandingSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="btnLogout"> + <property name="text"> + <string>Logout</string> + </property> + </widget> + </item> + <item> + <spacer name="fixedSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>24</width> + <height>24</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/leap/bitmask/gui/ui/mail_status.ui b/src/leap/bitmask/gui/ui/mail_status.ui index 22976f39..6fd63aec 100644 --- a/src/leap/bitmask/gui/ui/mail_status.ui +++ b/src/leap/bitmask/gui/ui/mail_status.ui @@ -60,7 +60,7 @@ <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/black/32/off.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/22/off.png</pixmap> </property> <property name="scaledContents"> <bool>true</bool> @@ -104,14 +104,14 @@ <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/black/32/email.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/32/email.png</pixmap> </property> </widget> </item> </layout> </widget> <resources> - <include location="../../../../../data/resources/mainwindow.qrc"/> + <include location="../../../../../data/resources/icons.qrc"/> </resources> <connections/> </ui> diff --git a/src/leap/bitmask/gui/ui/mainwindow.ui b/src/leap/bitmask/gui/ui/mainwindow.ui index 1eeb636f..5dc48f29 100644 --- a/src/leap/bitmask/gui/ui/mainwindow.ui +++ b/src/leap/bitmask/gui/ui/mainwindow.ui @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>524</width> - <height>640</height> + <height>600</height> </rect> </property> <property name="sizePolicy"> @@ -32,7 +32,7 @@ <string>Bitmask</string> </property> <property name="windowIcon"> - <iconset resource="../../../../../data/resources/mainwindow.qrc"> + <iconset resource="../../../../../data/resources/icons.qrc"> <normaloff>:/images/mask-icon.png</normaloff>:/images/mask-icon.png</iconset> </property> <property name="inputMethodHints"> @@ -216,6 +216,28 @@ </property> </spacer> </item> + <item> + <widget class="QFrame" name="frame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="autoFillBackground"> + <bool>false</bool> + </property> + <property name="styleSheet"> + <string notr="true">background-color: rgba(0,0,0,20); border-top: 1px solid rgba(0,0,0,30);</string> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>16</height> + </size> + </property> + </widget> + </item> </layout> </widget> </widget> @@ -377,7 +399,7 @@ </action> </widget> <resources> - <include location="../../../../../data/resources/mainwindow.qrc"/> + <include location="../../../../../data/resources/icons.qrc"/> <include location="../../../../../data/resources/locale.qrc"/> </resources> <connections/> diff --git a/src/leap/bitmask/gui/ui/preferences.ui b/src/leap/bitmask/gui/ui/preferences.ui index e187c016..cd4d3a77 100644 --- a/src/leap/bitmask/gui/ui/preferences.ui +++ b/src/leap/bitmask/gui/ui/preferences.ui @@ -14,7 +14,7 @@ <string>Preferences</string> </property> <property name="windowIcon"> - <iconset resource="../../../../../data/resources/mainwindow.qrc"> + <iconset resource="../../../../../data/resources/icons.qrc"> <normaloff>:/images/mask-icon.png</normaloff>:/images/mask-icon.png</iconset> </property> <layout class="QGridLayout" name="gridLayout_3"> @@ -174,7 +174,7 @@ </layout> </widget> <resources> - <include location="../../../../../data/resources/mainwindow.qrc"/> + <include location="../../../../../data/resources/icons.qrc"/> </resources> <connections/> </ui> diff --git a/src/leap/bitmask/gui/ui/wizard.ui b/src/leap/bitmask/gui/ui/wizard.ui index 8c52897d..0e28ecbf 100644 --- a/src/leap/bitmask/gui/ui/wizard.ui +++ b/src/leap/bitmask/gui/ui/wizard.ui @@ -23,10 +23,10 @@ </size> </property> <property name="windowTitle"> - <string>Bitmask first run</string> + <string>Bitmask Provider Setup</string> </property> <property name="windowIcon"> - <iconset resource="../../../../../data/resources/mainwindow.qrc"> + <iconset resource="../../../../../data/resources/icons.qrc"> <normaloff>:/images/mask-icon.png</normaloff>:/images/mask-icon.png</iconset> </property> <property name="modal"> @@ -40,10 +40,10 @@ </property> <widget class="WizardPage" name="introduction_page"> <property name="title"> - <string>Welcome</string> + <string>Welcome to Bitmask</string> </property> <property name="subTitle"> - <string>This is the Bitmask first run wizard</string> + <string> </string> </property> <attribute name="pageId"> <string notr="true">0</string> @@ -59,7 +59,7 @@ <item row="0" column="0"> <widget class="QLabel" name="label_3"> <property name="text"> - <string><html><head/><body><p>Now we will guide you through some configuration that is needed before you can connect for the first time.</p><p>If you ever need to modify these options again, you can find the wizard in the <span style=" font-style:italic;">'Bitmask -&gt; Create new account...'</span> menu from the main window.</p><p>Do you want to <span style=" font-weight:600;">sign up</span> for a new account, or <span style=" font-weight:600;">log in</span> with an already existing username?</p></body></html></string> + <string></string> </property> <property name="textFormat"> <enum>Qt::RichText</enum> @@ -109,10 +109,10 @@ </widget> <widget class="WizardPage" name="select_provider_page"> <property name="title"> - <string>Provider selection</string> + <string>Choose a provider</string> </property> <property name="subTitle"> - <string>Please enter the domain of the provider you want to use for your connection</string> + <string> </string> </property> <attribute name="pageId"> <string notr="true">1</string> @@ -156,7 +156,7 @@ <item row="3" column="0"> <widget class="QLabel" name="label_5"> <property name="text"> - <string>Getting provider information</string> + <string>Getting provider information.</string> </property> </widget> </item> @@ -177,15 +177,24 @@ </property> <property name="minimumSize"> <size> - <width>24</width> - <height>24</height> + <width>22</width> + <height>22</height> </size> </property> + <property name="maximumSize"> + <size> + <width>22</width> + <height>22</height> + </size> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> <property name="text"> <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/Emblem-question.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/22/question.png</pixmap> </property> </widget> </item> @@ -199,15 +208,24 @@ </property> <property name="minimumSize"> <size> - <width>24</width> - <height>24</height> + <width>22</width> + <height>22</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>22</width> + <height>22</height> </size> </property> + <property name="scaledContents"> + <bool>true</bool> + </property> <property name="text"> <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/Emblem-question.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/22/question.png</pixmap> </property> </widget> </item> @@ -221,15 +239,24 @@ </property> <property name="minimumSize"> <size> - <width>24</width> - <height>24</height> + <width>22</width> + <height>22</height> </size> </property> + <property name="maximumSize"> + <size> + <width>22</width> + <height>22</height> + </size> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> <property name="text"> <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/Emblem-question.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/22/question.png</pixmap> </property> </widget> </item> @@ -350,10 +377,10 @@ </widget> <widget class="QWizardPage" name="provider_info_page"> <property name="title"> - <string>Provider Information</string> + <string>About this provider</string> </property> <property name="subTitle"> - <string>Description of services offered by this provider</string> + <string> </string> </property> <attribute name="pageId"> <string notr="true">2</string> @@ -495,7 +522,7 @@ <string>Provider setup</string> </property> <property name="subTitle"> - <string>Gathering configuration options for this provider</string> + <string> </string> </property> <attribute name="pageId"> <string notr="true">3</string> @@ -517,7 +544,7 @@ <item> <widget class="QLabel" name="lblSetupProviderExpl"> <property name="text"> - <string>We are downloading some bits that we need to establish a secure connection with the provider for the first time.</string> + <string>Bitmask is attempting to establish a secure connection with this provider for the first time.</string> </property> <property name="wordWrap"> <bool>true</bool> @@ -553,15 +580,24 @@ </property> <property name="minimumSize"> <size> - <width>24</width> - <height>24</height> + <width>22</width> + <height>22</height> </size> </property> + <property name="maximumSize"> + <size> + <width>22</width> + <height>22</height> + </size> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> <property name="text"> <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/Emblem-question.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/22/question.png</pixmap> </property> </widget> </item> @@ -575,36 +611,45 @@ </property> <property name="minimumSize"> <size> - <width>24</width> - <height>24</height> + <width>22</width> + <height>22</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>22</width> + <height>22</height> </size> </property> + <property name="scaledContents"> + <bool>true</bool> + </property> <property name="text"> <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/Emblem-question.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/22/question.png</pixmap> </property> </widget> </item> <item row="1" column="0"> <widget class="QLabel" name="label_9"> <property name="text"> - <string>Getting info from the Certificate Authority</string> + <string>Fetching provider credentials.</string> </property> </widget> </item> <item row="2" column="0"> <widget class="QLabel" name="label_10"> <property name="text"> - <string>Do we trust this Certificate Authority?</string> + <string>Do we trust these credentials?</string> </property> </widget> </item> <item row="3" column="0"> <widget class="QLabel" name="label_11"> <property name="text"> - <string>Establishing a trust relationship with this provider</string> + <string>Connecting to provider.</string> </property> </widget> </item> @@ -618,15 +663,24 @@ </property> <property name="minimumSize"> <size> - <width>24</width> - <height>24</height> + <width>22</width> + <height>22</height> </size> </property> + <property name="maximumSize"> + <size> + <width>22</width> + <height>22</height> + </size> + </property> + <property name="scaledContents"> + <bool>true</bool> + </property> <property name="text"> <string/> </property> <property name="pixmap"> - <pixmap resource="../../../../../data/resources/mainwindow.qrc">:/images/Emblem-question.png</pixmap> + <pixmap resource="../../../../../data/resources/icons.qrc">:/images/black/22/question.png</pixmap> </property> </widget> </item> @@ -666,7 +720,7 @@ <string>Register new user</string> </property> <property name="subTitle"> - <string>Register a new user with provider</string> + <string> </string> </property> <attribute name="pageId"> <string notr="true">4</string> @@ -791,7 +845,7 @@ <string>Service selection</string> </property> <property name="subTitle"> - <string>Please select the services you would like to have</string> + <string> </string> </property> <attribute name="pageId"> <string notr="true">5</string> @@ -829,7 +883,7 @@ <tabstop>rdoLogin</tabstop> </tabstops> <resources> - <include location="../../../../../data/resources/mainwindow.qrc"/> + <include location="../../../../../data/resources/icons.qrc"/> <include location="../../../../../data/resources/locale.qrc"/> </resources> <connections> diff --git a/src/leap/bitmask/gui/wizard.py b/src/leap/bitmask/gui/wizard.py index be5bde52..0223c053 100644 --- a/src/leap/bitmask/gui/wizard.py +++ b/src/leap/bitmask/gui/wizard.py @@ -70,9 +70,9 @@ class Wizard(QtGui.QWizard): self.setPixmap(QtGui.QWizard.LogoPixmap, QtGui.QPixmap(":/images/mask-icon.png")) - self.QUESTION_ICON = QtGui.QPixmap(":/images/Emblem-question.png") - self.ERROR_ICON = QtGui.QPixmap(":/images/Dialog-error.png") - self.OK_ICON = QtGui.QPixmap(":/images/Dialog-accept.png") + self.QUESTION_ICON = QtGui.QPixmap(":/images/black/22/question.png") + self.ERROR_ICON = QtGui.QPixmap(":/images/black/22/off.png") + self.OK_ICON = QtGui.QPixmap(":/images/black/22/on.png") self._selected_services = set() self._shown_services = set() @@ -679,7 +679,7 @@ class Wizard(QtGui.QWizard): the user to enable or disable. """ self.ui.grpServices.setTitle( - self.tr("Services by {0}").format(self._provider_details['name'])) + self.tr("Services by {0}").format(self._provider_details['domain'])) services = get_supported(self._provider_details['services']) @@ -723,18 +723,11 @@ class Wizard(QtGui.QWizard): if pageId == self.SETUP_PROVIDER_PAGE: if not self._provider_setup_ok: self._reset_provider_setup() - sub_title = self.tr("Gathering configuration options for {0}") - sub_title = sub_title.format(self._provider_details['name']) - self.page(pageId).setSubTitle(sub_title) self.ui.lblDownloadCaCert.setPixmap(self.QUESTION_ICON) self._provider_setup_defer = self._backend.\ provider_bootstrap(provider=self._domain) if pageId == self.PRESENT_PROVIDER_PAGE: - sub_title = self.tr("Description of services offered by {0}") - sub_title = sub_title.format(self._provider_details['name']) - self.page(pageId).setSubTitle(sub_title) - details = self._provider_details name = "<b>{0}</b>".format(details['name']) domain = "https://{0}".format(details['domain']) @@ -746,9 +739,9 @@ class Wizard(QtGui.QWizard): self.ui.lblProviderPolicy.setText(details['enrollment_policy']) if pageId == self.REGISTER_USER_PAGE: - sub_title = self.tr("Register a new user with {0}") - sub_title = sub_title.format(self._provider_details['name']) - self.page(pageId).setSubTitle(sub_title) + title = self.tr("Register a new user with {0}") + title = title.format(self._provider_details['domain']) + self.page(pageId).setTitle(title) self.ui.chkRemember.setVisible(False) if pageId == self.SERVICES_PAGE: |