[gnome-music/wip/merge: 140/343] Simplify selection mode check
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/merge: 140/343] Simplify selection mode check
- Date: Thu, 25 Jul 2013 11:25:11 +0000 (UTC)
commit 19c89086c7bd6a85c0cbc1e2fb89aedde5a09abb
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Mon Jul 15 20:30:06 2013 +0200
Simplify selection mode check
gnomemusic/toolbar.py | 11 ++++-------
1 files changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gnomemusic/toolbar.py b/gnomemusic/toolbar.py
index 178a790..ccc464a 100644
--- a/gnomemusic/toolbar.py
+++ b/gnomemusic/toolbar.py
@@ -14,7 +14,7 @@ class Toolbar(GObject.GObject):
__gsignals__ = {
'state-changed': (GObject.SIGNAL_RUN_FIRST, None, ())
}
- _selectionMode = None
+ _selectionMode = False
def __init__(self):
GObject.GObject.__init__(self)
@@ -46,7 +46,7 @@ class Toolbar(GObject.GObject):
def setSelectionMode(self, selectionMode):
self._selectionMode = selectionMode
- if (selectionMode):
+ if selectionMode:
self._selectButton.hide()
self._cancelButton.show()
self.headerBar.get_style_context().add_class('selection-mode')
@@ -66,16 +66,13 @@ class Toolbar(GObject.GObject):
def _update(self):
if (self._state == ToolbarState.SINGLE or self._selectionMode):
self.headerBar.custom_title = None
+ self._backButton.show()
else:
self.title = ""
self.headerBar.custom_title = self._stackSwitcher
-
- if (self._state == ToolbarState.SINGLE and self._selectionMode is not None):
- self._backButton.show()
- else:
self._backButton.hide()
- if (self._selectionMode):
+ if self._selectionMode:
self.headerBar.custom_title = self._selectionMenuButton
self._closeSeparator.hide()
self._closeButton.hide()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]