[gnome-music/wip/jfelder/artistsview-selection: 58/58] artisttile: Remove selection-mode logic



commit deefaecf9deccae3df9371f48a3f37c8cf020d41
Author: Jean Felder <jfelder src gnome org>
Date:   Thu Feb 20 22:32:59 2020 +0100

    artisttile: Remove selection-mode logic
    
    It's not possible to select a whole artist from the ArtistsView
    anymore. So, the selection-mode logic can be removed.

 data/ui/ArtistTile.ui            | 31 ++++---------------------------
 gnomemusic/widgets/artisttile.py | 12 ------------
 2 files changed, 4 insertions(+), 39 deletions(-)
---
diff --git a/data/ui/ArtistTile.ui b/data/ui/ArtistTile.ui
index 2745fc3e..c4d854a8 100644
--- a/data/ui/ArtistTile.ui
+++ b/data/ui/ArtistTile.ui
@@ -4,36 +4,13 @@
     <property name="can_focus">False</property>
     <property name="visible">True</property>
     <child>
-      <object class="GtkBox">
+      <object class="GtkLabel" id="_label">
         <property name="can_focus">False</property>
+        <property name="ellipsize">end</property>
+        <property name="halign">start</property>
         <property name="hexpand">False</property>
-        <property name="orientation">horizontal</property>
+        <property name="margin">16</property>
         <property name="visible">True</property>
-        <child>
-          <object class="GtkRevealer" id="_revealer">
-            <property name="halign">fill</property>
-            <property name="hexpand">False</property>
-            <property name="reveal-child">False</property>
-            <property name="transition-type">slide-right</property>
-            <property name="visible">True</property>
-            <child>
-              <object class="GtkCheckButton" id="_check">
-                <property name="margin-start">12</property>
-                <property name="visible">True</property>
-              </object>
-            </child>
-          </object>
-        </child>
-        <child>
-          <object class="GtkLabel" id="_label">
-            <property name="can_focus">False</property>
-            <property name="ellipsize">end</property>
-            <property name="halign">start</property>
-            <property name="hexpand">True</property>
-            <property name="margin">16</property>
-            <property name="visible">True</property>
-          </object>
-        </child>
       </object>
     </child>
   </template>
diff --git a/gnomemusic/widgets/artisttile.py b/gnomemusic/widgets/artisttile.py
index 0c092060..9be6f0fb 100644
--- a/gnomemusic/widgets/artisttile.py
+++ b/gnomemusic/widgets/artisttile.py
@@ -36,13 +36,9 @@ class ArtistTile(Gtk.ListBoxRow):
 
     __gtype_name__ = 'ArtistTile'
 
-    _check = Gtk.Template.Child()
     _label = Gtk.Template.Child()
-    _revealer = Gtk.Template.Child()
 
     coreartist = GObject.Property(type=CoreArtist, default=None)
-    selected = GObject.Property(type=bool, default=False)
-    selection_mode = GObject.Property(type=bool, default=False)
     text = GObject.Property(type=str, default='')
 
     def __init__(self, coreartist=None):
@@ -50,14 +46,6 @@ class ArtistTile(Gtk.ListBoxRow):
 
         self.props.coreartist = coreartist
 
-        self.bind_property(
-            'selected', self._check, 'active',
-            GObject.BindingFlags.BIDIRECTIONAL)
-        if coreartist:
-            self.bind_property(
-                "selected", coreartist, "selected",
-                GObject.BindingFlags.BIDIRECTIONAL)
-        self.bind_property('selection-mode', self._revealer, 'reveal-child')
         self.bind_property('text', self._label, 'label')
         self.bind_property('text', self._label, 'tooltip-text')
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]