diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-01-13 14:20:33 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2014-01-13 14:20:33 -0300 |
commit | 24e7c4f505d92164187c8afe038b24c67e2bdedc (patch) | |
tree | 64b8ec7eda2b018dc9f2cb97c03a0c369e81c144 /src/leap/bitmask/gui | |
parent | 5b07c229c6dd507e910f1086af5706b3710f6127 (diff) |
Use set_status for all messages.
Remove set_login_status since it's a remaining code after split the
login in a separated widget.
[Closes #4942]
Diffstat (limited to 'src/leap/bitmask/gui')
-rw-r--r-- | src/leap/bitmask/gui/login.py | 17 | ||||
-rw-r--r-- | src/leap/bitmask/gui/mainwindow.py | 5 | ||||
-rw-r--r-- | src/leap/bitmask/gui/ui/login.ui | 43 |
3 files changed, 18 insertions, 47 deletions
diff --git a/src/leap/bitmask/gui/login.py b/src/leap/bitmask/gui/login.py index d0cb20b1..8a7c6996 100644 --- a/src/leap/bitmask/gui/login.py +++ b/src/leap/bitmask/gui/login.py @@ -327,7 +327,6 @@ class LoginWidget(QtGui.QWidget): self.ui.logged_widget.show() self.ui.lblUser.setText(make_address( self.get_user(), self.get_selected_provider())) - self.set_login_status("") if flags.OFFLINE is False: self.logged_in_signal.emit() @@ -346,22 +345,6 @@ class LoginWidget(QtGui.QWidget): self.set_enabled(True) self.set_status("", error=False) - def set_login_status(self, msg, error=False): - """ - Sets the status label for the logged in state. - - :param msg: status message - :type msg: str or unicode - :param error: if the status is an erroneous one, then set this - to True - :type error: bool - """ - leap_assert_type(error, bool) - if error: - msg = "<font color='red'><b>%s</b></font>" % (msg,) - self.ui.lblLoginStatus.setText(msg) - self.ui.lblLoginStatus.show() - def start_logout(self): """ Sets the widgets to the logging out state diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 83aa47a9..ddaa085c 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -1754,9 +1754,8 @@ class MainWindow(QtGui.QMainWindow): self._mail_status.mail_state_disabled() else: - self._login_widget.set_login_status( - self.tr("Something went wrong with the logout."), - error=True) + self._login_widget.set_status( + self.tr("Something went wrong with the logout.")) def _intermediate_stage(self, data): # TODO this method name is confusing as hell. diff --git a/src/leap/bitmask/gui/ui/login.ui b/src/leap/bitmask/gui/ui/login.ui index 7e8f9daf..f5725d5a 100644 --- a/src/leap/bitmask/gui/ui/login.ui +++ b/src/leap/bitmask/gui/ui/login.ui @@ -217,26 +217,6 @@ <property name="bottomMargin"> <number>0</number> </property> - <item row="1" column="1"> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item row="1" column="0"> - <widget class="QPushButton" name="btnLogout"> - <property name="text"> - <string>Logout</string> - </property> - </widget> - </item> <item row="0" column="0" colspan="2"> <widget class="QLabel" name="lblUser"> <property name="font"> @@ -251,17 +231,26 @@ </property> </widget> </item> - <item row="2" column="0" colspan="2"> - <widget class="QLabel" name="lblLoginStatus"> - <property name="styleSheet"> - <string notr="true">color: rgb(132, 132, 132); -font: 75 12pt;</string> - </property> + <item row="1" column="0"> + <widget class="QPushButton" name="btnLogout"> <property name="text"> - <string/> + <string>Logout</string> </property> </widget> </item> + <item row="1" column="1"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> </layout> </widget> </item> |