[gnome-music/freeze-break: 87/107] view: Set sidebar and menu button insensitive in selection mode
- From: Arnel A. Borja <arnelborja src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/freeze-break: 87/107] view: Set sidebar and menu button insensitive in selection mode
- Date: Wed, 11 Sep 2013 13:21:41 +0000 (UTC)
commit 01b2f0973b26e22fdf2d5a041303261bc10ce74e
Author: Arnel A. Borja <arnelborja src gnome org>
Date: Sun Sep 8 14:50:51 2013 +0800
view: Set sidebar and menu button insensitive in selection mode
gnomemusic/view.py | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 295ff22..c7eda20 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -136,6 +136,8 @@ class ViewContainer(Stack):
grilo.connect('ready', self._on_grilo_ready)
self.header_bar.header_bar.connect('state-changed',
self._on_state_changed)
+ self.header_bar.connect('selection-mode-changed',
+ self._on_selection_mode_changed)
self.view.connect('view-selection-changed',
self._on_view_selection_changed)
@@ -184,6 +186,9 @@ class ViewContainer(Stack):
def _on_state_changed(self, widget, data=None):
pass
+ def _on_selection_mode_changed(self, widget, data=None):
+ pass
+
def _connect_view(self):
self._adjustmentValueId = self.vadjustment.connect(
'value-changed',
@@ -863,6 +868,10 @@ class Playlist(ViewContainer):
ngettext(_("%d Song"), _("%d Songs"), self.songs_count)
% self.songs_count)
+ def _on_selection_mode_changed(self, widget, data=None):
+ self.playlists_sidebar.set_sensitive(not self.header_bar._selectionMode)
+ self.menubutton.set_sensitive(not self.header_bar._selectionMode)
+
def populate(self):
for item in self.playlists_list:
self._add_item(item)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]