[gnome-music/wip/mschraal/gtk4: 23/102] songwidget: Disable/remove EventBox



commit c7133c4c003558d58af996c8d972a77198f44c1f
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Oct 31 12:53:00 2019 +0100

    songwidget: Disable/remove EventBox

 data/ui/SongWidget.ui            | 15 ++++++++++-----
 gnomemusic/widgets/songwidget.py |  2 +-
 2 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/data/ui/SongWidget.ui b/data/ui/SongWidget.ui
index cd5f1c43..97627b24 100644
--- a/data/ui/SongWidget.ui
+++ b/data/ui/SongWidget.ui
@@ -2,11 +2,11 @@
 <!-- Generated with glade 3.20.0 -->
 <interface>
   <requires lib="gtk+" version="3.10"/>
-  <template class="SongWidget" parent="GtkEventBox">
+  <template class="SongWidget" parent="GtkBox">
     <property name="visible">True</property>
     <property name="can_focus">False</property>
     <signal name="notify::selected" handler="_on_selection_changed"/>
-    <signal name="drag_data_received" handler="_on_drag_data_received"/>
+<!--<signal name="drag_data_received" handler="_on_drag_data_received"/> -->
     <child>
       <object class="GtkBox" id="box1">
         <property name="visible">True</property>
@@ -15,11 +15,13 @@
         <property name="margin_top">10</property>
         <property name="margin_bottom">10</property>
         <child>
-          <object class="GtkEventBox" id="_dnd_eventbox">
+          <object class="GtkBox" id="_dnd_eventbox">
             <property name="visible">False</property>
+<!--
             <signal name="drag-begin" handler="_on_drag_begin"/>
             <signal name="drag-end" handler="_on_drag_end"/>
             <signal name="drag_data_get" handler="_on_drag_data_get"/>
+-->
             <child>
               <object class="GtkImage">
                 <property name="visible">True</property>
@@ -38,7 +40,8 @@
             <property name="can_focus">False</property>
             <property name="homogeneous">True</property>
             <child>
-              <object class="GtkEventBox" id="eventbox2">
+              <!-- FIXME: Remove this box? -->
+              <object class="GtkBox" id="eventbox2">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <child>
@@ -158,16 +161,18 @@
             <property name="can-focus">False</property>
             <property name="visible">True</property>
             <child>
-              <object class="GtkEventBox" id="_star_eventbox">
+              <object class="GtkBox" id="_star_eventbox">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
                 <property name="halign">end</property>
                 <property name="valign">center</property>
                 <property name="visible_window">True</property>
                 <property name="margin_right">12</property>
+<!--
                 <signal name="button-release-event" handler="_on_star_toggle" swapped="no"/>
                 <signal name="enter-notify-event" handler="_on_star_hover" swapped="no"/>
                 <signal name="leave-notify-event" handler="_on_star_unhover" swapped="no"/>
+-->
                 <child>
                   <object class="StarImage" id="_star_image">
                     <property name="visible">True</property>
diff --git a/gnomemusic/widgets/songwidget.py b/gnomemusic/widgets/songwidget.py
index e87db228..0183f1ea 100644
--- a/gnomemusic/widgets/songwidget.py
+++ b/gnomemusic/widgets/songwidget.py
@@ -34,7 +34,7 @@ from gnomemusic.widgets.starimage import StarImage  # noqa: F401
 
 
 @Gtk.Template(resource_path='/org/gnome/Music/ui/SongWidget.ui')
-class SongWidget(Gtk.EventBox):
+class SongWidget(Gtk.Box):
     """The single song widget used in DiscListBox
 
     Contains


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