[gnome-music/wip/jfelder/gtk4-v3: 10/119] Switch from libhandy to libadwaita




commit 600f040546db05599ecb8ff0b014a0351901495c
Author: Marinus Schraal <mschraal gnome org>
Date:   Sat May 22 22:42:15 2021 +0200

    Switch from libhandy to libadwaita

 data/ui/AlbumWidget.ui                   | 219 ++++++++++++++++---------------
 data/ui/ArtistAlbumsWidget.ui            |   2 +-
 data/ui/EmptyView.ui                     |   2 +-
 data/ui/HeaderBar.ui                     | 184 +++++++++++++-------------
 data/ui/PlayerToolbar.ui                 |   2 +-
 data/ui/PlaylistsWidget.ui               |   5 +-
 data/ui/SearchHeaderBar.ui               | 120 +++++++++--------
 data/ui/SearchView.ui                    |   4 +-
 data/ui/Window.ui                        |   2 +-
 gnome-music.in                           |   6 +-
 gnomemusic/views/emptyview.py            |   8 +-
 gnomemusic/widgets/albumwidget.py        |   4 +-
 gnomemusic/widgets/artistalbumswidget.py |   4 +-
 gnomemusic/widgets/headerbar.py          |   9 +-
 gnomemusic/widgets/searchheaderbar.py    |   4 +-
 gnomemusic/window.py                     |  10 +-
 meson.build                              |   2 +-
 17 files changed, 300 insertions(+), 287 deletions(-)
---
diff --git a/data/ui/AlbumWidget.ui b/data/ui/AlbumWidget.ui
index 0b4388a89..4c090857f 100644
--- a/data/ui/AlbumWidget.ui
+++ b/data/ui/AlbumWidget.ui
@@ -2,145 +2,150 @@
 <!-- Generated with glade 3.20.0 -->
 <interface>
   <requires lib="gtk+" version="3.12"/>
-  <template class="AlbumWidget" parent="HdyClamp">
-    <property name="margin-bottom">48</property>
-    <property name="margin-top">48</property>
-    <property name="maximum-size">1000</property>
-    <property name="orientation">horizontal</property>
-    <property name="visible">True</property>
+  <template class="AlbumWidget" parent="GtkBox">
+    <property name="orientation">vertical</property>
     <child>
-      <object class="GtkBox">
-        <property name="halign">fill</property>
-        <property name="orientation">vertical</property>
+      <object class="AdwClamp">
+        <property name="margin-bottom">48</property>
+        <property name="margin-top">48</property>
+        <property name="maximum-size">1000</property>
+        <property name="orientation">horizontal</property>
         <property name="visible">True</property>
         <child>
-          <object class="GtkBox" id="albumInfo">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
+          <object class="GtkBox">
             <property name="halign">fill</property>
-            <property name="hexpand">True</property>
-            <property name="spacing">32</property>
-            <child>
-              <object class="ArtStack" id="_art_stack">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="halign">center</property>
-                <property name="valign">start</property>
-                <property name="hhomogeneous">False</property>
-                <property name="vhomogeneous">False</property>
-              </object>
-            </child>
+            <property name="orientation">vertical</property>
+            <property name="visible">True</property>
             <child>
-              <object class="GtkBox" id="albumDetails">
+              <object class="GtkBox" id="albumInfo">
                 <property name="visible">True</property>
                 <property name="can_focus">False</property>
-                <property name="halign">center</property>
-                <property name="valign">start</property>
-                <property name="orientation">vertical</property>
-                <property name="margin-top">18</property>
-                <child>
-                  <object class="GtkLabel" id="_title_label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="ellipsize">middle</property>
-                    <property name="margin-bottom">18</property>
-                    <style>
-                      <class name="title-1"/>
-                    </style>
-                  </object>
-                </child>
+                <property name="halign">fill</property>
+                <property name="hexpand">True</property>
+                <property name="spacing">32</property>
                 <child>
-                  <object class="GtkLabel" id="_artist_label">
+                  <object class="ArtStack" id="_art_stack">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="ellipsize">middle</property>
-                    <property name="margin-bottom">12</property>
-                    <style>
-                      <class name="title-3"/>
-                    </style>
+                    <property name="halign">center</property>
+                    <property name="valign">start</property>
+                    <property name="hhomogeneous">False</property>
+                    <property name="vhomogeneous">False</property>
                   </object>
                 </child>
                 <child>
-                  <object class="GtkLabel" id="_released_label">
+                  <object class="GtkBox" id="albumDetails">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="use_markup">True</property>
-                    <property name="margin-bottom">12</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkLabel" id="_composer_label">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="halign">start</property>
-                    <property name="ellipsize">end</property>
-                    <property name="margin-bottom">12</property>
-                    <style>
-                      <class name="dim-label"/>
-                    </style>
-                  </object>
-                </child>
-                <child>
-                  <object class="GtkBox">
-                    <property name="orientation">horizontal</property>
-                    <property name="visible">True</property>
-                    <property name="spacing">12</property>
-                    <property name="margin-top">6</property>
+                    <property name="halign">center</property>
+                    <property name="valign">start</property>
+                    <property name="orientation">vertical</property>
+                    <property name="margin-top">18</property>
+                    <child>
+                      <object class="GtkLabel" id="_title_label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="halign">start</property>
+                        <property name="ellipsize">middle</property>
+                        <property name="margin-bottom">18</property>
+                        <style>
+                          <class name="title-1"/>
+                        </style>
+                      </object>
+                    </child>
                     <child>
-                      <object class="GtkButton" id="_play_button">
-                        <property name="width-request">44</property>
-                        <property name="height-request">44</property>
+                      <object class="GtkLabel" id="_artist_label">
                         <property name="visible">True</property>
-                        <property name="can-focus">True</property>
-                        <property name="receives-default">True</property>
-                        <property name="image">_play_image</property>
-                        <property name="always_show_image">True</property>
-                        <property name="tooltip-text" translatable="yes">Play</property>
-                        <property name="valign">center</property>
-                        <signal name="clicked" handler="_on_play_button_clicked" swapped="no"/>
+                        <property name="can_focus">False</property>
+                        <property name="halign">start</property>
+                        <property name="ellipsize">middle</property>
+                        <property name="margin-bottom">12</property>
                         <style>
-                          <class name="circular"/>
+                          <class name="title-3"/>
                         </style>
                       </object>
                     </child>
                     <child>
-                      <object class="GtkMenuButton" id="_menu_button">
-                        <property name="width-request">44</property>
-                        <property name="height-request">44</property>
+                      <object class="GtkLabel" id="_released_label">
                         <property name="visible">True</property>
-                        <property name="can_focus">True</property>
-                        <property name="receives_default">True</property>
+                        <property name="can_focus">False</property>
                         <property name="halign">start</property>
-                        <property name="valign">center</property>
-                        <property name="focus_on_click">False</property>
-                        <property name="menu-model">album_menu</property>
-                        <property name="direction">none</property>
-                        <property name="use_popover">True</property>
-                        <property name="image">_view_more_image</property>
+                        <property name="use_markup">True</property>
+                        <property name="margin-bottom">12</property>
                         <style>
-                          <class name="image-button"/>
-                          <class name="circular"/>
+                          <class name="dim-label"/>
                         </style>
                       </object>
                     </child>
+                    <child>
+                      <object class="GtkLabel" id="_composer_label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="halign">start</property>
+                        <property name="ellipsize">end</property>
+                        <property name="margin-bottom">12</property>
+                        <style>
+                          <class name="dim-label"/>
+                        </style>
+                      </object>
+                    </child>
+                    <child>
+                      <object class="GtkBox">
+                        <property name="orientation">horizontal</property>
+                        <property name="visible">True</property>
+                        <property name="spacing">12</property>
+                        <property name="margin-top">6</property>
+                        <child>
+                          <object class="GtkButton" id="_play_button">
+                            <property name="width-request">44</property>
+                            <property name="height-request">44</property>
+                            <property name="visible">True</property>
+                            <property name="can-focus">True</property>
+                            <property name="receives-default">True</property>
+                            <property name="image">_play_image</property>
+                            <property name="always_show_image">True</property>
+                            <property name="tooltip-text" translatable="yes">Play</property>
+                            <property name="valign">center</property>
+                            <signal name="clicked" handler="_on_play_button_clicked" swapped="no"/>
+                            <style>
+                              <class name="circular"/>
+                            </style>
+                          </object>
+                        </child>
+                        <child>
+                          <object class="GtkMenuButton" id="_menu_button">
+                            <property name="width-request">44</property>
+                            <property name="height-request">44</property>
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="receives_default">True</property>
+                            <property name="halign">start</property>
+                            <property name="valign">center</property>
+                            <property name="focus_on_click">False</property>
+                            <property name="menu-model">album_menu</property>
+                            <property name="direction">none</property>
+                            <property name="use_popover">True</property>
+                            <property name="image">_view_more_image</property>
+                            <style>
+                              <class name="image-button"/>
+                              <class name="circular"/>
+                            </style>
+                          </object>
+                        </child>
+                      </object>
+                    </child>
                   </object>
                 </child>
               </object>
             </child>
-          </object>
-        </child>
-        <child>
-          <object class="GtkListBox" id="_disc_list_box">
-            <property name="can_focus">False</property>
-            <property name="margin-top">48</property>
-            <property name="selection_mode">0</property>
-            <property name="visible">True</property>
+            <child>
+              <object class="GtkListBox" id="_disc_list_box">
+                <property name="can_focus">False</property>
+                <property name="margin-top">48</property>
+                <property name="selection_mode">0</property>
+                <property name="visible">True</property>
+              </object>
+            </child>
           </object>
         </child>
       </object>
diff --git a/data/ui/ArtistAlbumsWidget.ui b/data/ui/ArtistAlbumsWidget.ui
index ae6a4cf54..eb7fe0032 100644
--- a/data/ui/ArtistAlbumsWidget.ui
+++ b/data/ui/ArtistAlbumsWidget.ui
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <requires lib="gtk+" version="3.18"/>
-  <template class="ArtistAlbumsWidget" parent="HdyClamp">
+  <template class="ArtistAlbumsWidget" parent="AdwClamp">
     <property name="maximum-size">1000</property>
     <property name="orientation">horizontal</property>
     <property name="visible">True</property>
diff --git a/data/ui/EmptyView.ui b/data/ui/EmptyView.ui
index 61b748997..e39c48a82 100644
--- a/data/ui/EmptyView.ui
+++ b/data/ui/EmptyView.ui
@@ -5,7 +5,7 @@
     <property name="transition_type">crossfade</property>
     <property name="visible">False</property>
     <child>
-      <object class="HdyStatusPage" id="_status_page">
+      <object class="AdwStatusPage" id="_status_page">
         <property name="visible">True</property>
         <property name="hexpand">True</property>
         <property name="vexpand">True</property>
diff --git a/data/ui/HeaderBar.ui b/data/ui/HeaderBar.ui
index 4ffd0db56..9e46b7036 100644
--- a/data/ui/HeaderBar.ui
+++ b/data/ui/HeaderBar.ui
@@ -1,121 +1,125 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.10 -->
-  <template class="HeaderBar" parent="HdyHeaderBar">
-    <property name="visible">True</property>
-    <property name="vexpand">False</property>
-    <style>
-      <class name="titlebar"/>
-    </style>
+  <template class="HeaderBar" parent="AdwBin">
     <child>
-      <object class="GtkMenuButton" id="_menu_button">
+      <object class="AdwHeaderBar">
         <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <property name="tooltip_text" translatable="yes">Menu</property>
+        <property name="vexpand">False</property>
         <style>
-          <class name="image-button"/>
+          <class name="titlebar"/>
         </style>
         <child>
-          <object class="GtkImage" id="_menu_button_image">
+          <object class="GtkMenuButton" id="_menu_button">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="icon-name">open-menu-symbolic</property>
-            <property name="icon-size">1</property>
+            <property name="valign">center</property>
+            <property name="sensitive">True</property>
+            <property name="tooltip_text" translatable="yes">Menu</property>
+            <style>
+              <class name="image-button"/>
+            </style>
+            <child>
+              <object class="GtkImage" id="_menu_button_image">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="icon-name">open-menu-symbolic</property>
+                <property name="icon-size">1</property>
+              </object>
+            </child>
           </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
         </child>
-      </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkToggleButton" id="_select_button">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <property name="tooltip_text" translatable="yes">Select</property>
-        <style>
-          <class name="image-button"/>
-        </style>
         <child>
-          <object class="GtkImage" id="_select_button_image">
+          <object class="GtkToggleButton" id="_select_button">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="icon-name">object-select-symbolic</property>
-            <property name="icon-size">1</property>
+            <property name="valign">center</property>
+            <property name="sensitive">True</property>
+            <property name="tooltip_text" translatable="yes">Select</property>
+            <style>
+              <class name="image-button"/>
+            </style>
+            <child>
+              <object class="GtkImage" id="_select_button_image">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="icon-name">object-select-symbolic</property>
+                <property name="icon-size">1</property>
+              </object>
+            </child>
           </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="_cancel_button">
+            <property name="visible">False</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">_Cancel</property>
+            <property name="use_underline">True</property>
+            <property name="valign">center</property>
+            <property name="sensitive">True</property>
+            <signal name="clicked" handler="_on_cancel_button_clicked" swapped="no"/>
+            <style>
+              <class name="text-button"/>
+            </style>
+          </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
         </child>
-      </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkButton" id="_cancel_button">
-        <property name="visible">False</property>
-        <property name="can_focus">False</property>
-        <property name="label" translatable="yes">_Cancel</property>
-        <property name="use_underline">True</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <signal name="clicked" handler="_on_cancel_button_clicked" swapped="no"/>
-        <style>
-          <class name="text-button"/>
-        </style>
-      </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkToggleButton" id="_search_button">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <property name="tooltip_text" translatable="yes">Search</property>
-        <style>
-          <class name="image-button"/>
-        </style>
         <child>
-          <object class="GtkImage" id="_search_button_image">
+          <object class="GtkToggleButton" id="_search_button">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="icon-name">edit-find-symbolic</property>
-            <property name="icon-size">1</property>
+            <property name="valign">center</property>
+            <property name="sensitive">True</property>
+            <property name="tooltip_text" translatable="yes">Search</property>
+            <style>
+              <class name="image-button"/>
+            </style>
+            <child>
+              <object class="GtkImage" id="_search_button_image">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="icon-name">edit-find-symbolic</property>
+                <property name="icon-size">1</property>
+              </object>
+            </child>
           </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
         </child>
-      </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkButton" id="_back_button">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <property name="tooltip_text" translatable="yes">Back</property>
-        <signal name="clicked" handler="_on_back_button_clicked" swapped="no"/>
-        <style>
-          <class name="image-button"/>
-        </style>
         <child>
-          <object class="GtkImage" id="_back_button_image">
+          <object class="GtkButton" id="_back_button">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="icon-name">go-previous-symbolic</property>
-            <property name="icon-size">1</property>
+            <property name="valign">center</property>
+            <property name="sensitive">True</property>
+            <property name="tooltip_text" translatable="yes">Back</property>
+            <signal name="clicked" handler="_on_back_button_clicked" swapped="no"/>
+            <style>
+              <class name="image-button"/>
+            </style>
+            <child>
+              <object class="GtkImage" id="_back_button_image">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="icon-name">go-previous-symbolic</property>
+                <property name="icon-size">1</property>
+              </object>
+            </child>
           </object>
+          <packing>
+            <property name="pack_type">start</property>
+          </packing>
         </child>
       </object>
-      <packing>
-        <property name="pack_type">start</property>
-      </packing>
     </child>
   </template>
   <object class="GtkSizeGroup" id="size1">
diff --git a/data/ui/PlayerToolbar.ui b/data/ui/PlayerToolbar.ui
index 3742d8957..f67fbae81 100644
--- a/data/ui/PlayerToolbar.ui
+++ b/data/ui/PlayerToolbar.ui
@@ -156,7 +156,7 @@
           </object>
         </child>
         <child>
-          <object class="HdyClamp">
+          <object class="AdwClamp">
             <property name="maximum-size">1000</property>
             <property name="visible">True</property>
             <child>
diff --git a/data/ui/PlaylistsWidget.ui b/data/ui/PlaylistsWidget.ui
index 721e89b55..0f3ce6189 100644
--- a/data/ui/PlaylistsWidget.ui
+++ b/data/ui/PlaylistsWidget.ui
@@ -4,7 +4,7 @@
     <property name="orientation">vertical</property>
     <property name="visible">True</property>
     <child>
-      <object class="HdyClamp">
+      <object class="AdwClamp">
         <property name="maximum-size">1000</property>
         <property name="visible">True</property>
         <child>
@@ -19,9 +19,10 @@
         <property name="vexpand">True</property>
         <property name="visible">True</property>
         <child>
-          <object class="HdyClamp">
+          <object class="AdwClamp">
             <property name="maximum-size">1000</property>
             <property name="visible">True</property>
+            <property name="valign">start</property>
             <child>
               <object class="GtkListBox" id="_songs_list">
                 <property name="margin-bottom">20</property>
diff --git a/data/ui/SearchHeaderBar.ui b/data/ui/SearchHeaderBar.ui
index 37c70b669..ecead5017 100644
--- a/data/ui/SearchHeaderBar.ui
+++ b/data/ui/SearchHeaderBar.ui
@@ -1,81 +1,85 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
   <!-- interface-requires gtk+ 3.10 -->
-  <template class="SearchHeaderBar" parent="HdyHeaderBar">
-    <property name="visible">True</property>
-    <property name="vexpand">False</property>
-    <style>
-      <class name="titlebar"/>
-    </style>
+  <template class="SearchHeaderBar" parent="AdwBin">
     <child>
-      <object class="GtkToggleButton" id="_select_button">
+      <object class="AdwHeaderBar">
         <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <property name="tooltip_text" translatable="yes">Select</property>
+        <property name="vexpand">False</property>
         <style>
-          <class name="image-button"/>
+          <class name="titlebar"/>
         </style>
         <child>
-          <object class="GtkImage" id="_select_button_image">
+          <object class="GtkToggleButton" id="_select_button">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="icon-name">object-select-symbolic</property>
-            <property name="icon-size">1</property>
+            <property name="valign">center</property>
+            <property name="sensitive">True</property>
+            <property name="tooltip_text" translatable="yes">Select</property>
+            <style>
+              <class name="image-button"/>
+            </style>
+            <child>
+              <object class="GtkImage" id="_select_button_image">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="icon-name">object-select-symbolic</property>
+                <property name="icon-size">1</property>
+              </object>
+            </child>
           </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
+        </child>
+        <child>
+          <object class="GtkButton" id="_cancel_button">
+            <property name="visible">False</property>
+            <property name="can_focus">False</property>
+            <property name="label" translatable="yes">_Cancel</property>
+            <property name="use_underline">True</property>
+            <property name="valign">center</property>
+            <property name="sensitive">True</property>
+            <signal name="clicked" handler="_on_cancel_button_clicked" swapped="no"/>
+            <style>
+              <class name="text-button"/>
+            </style>
+          </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
         </child>
-      </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkButton" id="_cancel_button">
-        <property name="visible">False</property>
-        <property name="can_focus">False</property>
-        <property name="label" translatable="yes">_Cancel</property>
-        <property name="use_underline">True</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <signal name="clicked" handler="_on_cancel_button_clicked" swapped="no"/>
-        <style>
-          <class name="text-button"/>
-        </style>
-      </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
-    </child>
-    <child>
-      <object class="GtkToggleButton" id="_search_button">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="valign">center</property>
-        <property name="sensitive">True</property>
-        <property name="tooltip_text" translatable="yes">Search</property>
-        <style>
-          <class name="image-button"/>
-        </style>
         <child>
-          <object class="GtkImage" id="_search_button_image">
+          <object class="GtkToggleButton" id="_search_button">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
-            <property name="icon-name">edit-find-symbolic</property>
-            <property name="icon-size">1</property>
+            <property name="valign">center</property>
+            <property name="sensitive">True</property>
+            <property name="tooltip_text" translatable="yes">Search</property>
+            <style>
+              <class name="image-button"/>
+            </style>
+            <child>
+              <object class="GtkImage" id="_search_button_image">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="icon-name">edit-find-symbolic</property>
+                <property name="icon-size">1</property>
+              </object>
+            </child>
           </object>
+          <packing>
+            <property name="pack_type">end</property>
+          </packing>
         </child>
       </object>
-      <packing>
-        <property name="pack_type">end</property>
-      </packing>
     </child>
   </template>
   <object class="GtkSizeGroup" id="size1">
-      <property name="mode">vertical</property>
-      <widgets>
-        <widget name="_search_button"/>
-        <widget name="_cancel_button"/>
-      </widgets>
+    <property name="mode">vertical</property>
+    <widgets>
+      <widget name="_search_button"/>
+      <widget name="_cancel_button"/>
+    </widgets>
   </object>
 </interface>
diff --git a/data/ui/SearchView.ui b/data/ui/SearchView.ui
index d7dc09dd1..de3a6f260 100644
--- a/data/ui/SearchView.ui
+++ b/data/ui/SearchView.ui
@@ -20,7 +20,7 @@
         <property name="vexpand">True</property>
         <property name="visible">True</property>
         <child>
-          <object class="HdyClamp">
+          <object class="AdwClamp">
             <property name="maximum-size">1600</property>
             <property name="visible">True</property>
             <child>
@@ -177,7 +177,7 @@
         <property name="vexpand">True</property>
         <property name="visible">True</property>
         <child>
-          <object class="HdyClamp">
+          <object class="AdwClamp">
             <property name="maximum-size">1600</property>
             <property name="visible">True</property>
             <child>
diff --git a/data/ui/Window.ui b/data/ui/Window.ui
index 276952595..91892b5d9 100644
--- a/data/ui/Window.ui
+++ b/data/ui/Window.ui
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <interface>
-  <template class="Window" parent="HdyApplicationWindow">
+  <template class="Window" parent="AdwApplicationWindow">
     <property name="default-height">500</property>
     <property name="default-width">300</property>
     <child>
diff --git a/gnome-music.in b/gnome-music.in
index d30a7ff0c..3cc186f00 100755
--- a/gnome-music.in
+++ b/gnome-music.in
@@ -40,14 +40,14 @@ if _LOCAL:
 
 import gi
 
+gi.require_version("Adw", "1")
 gi.require_version('Gtk', '4.0')
 gi.require_version('GIRepository', '2.0')
 gi.require_version('Gst', '1.0')
-gi.require_version("Handy", "1")
-from gi.repository import GIRepository, Gio, Gtk, Gst, Handy
+from gi.repository import Adw, GIRepository, Gio, Gtk, Gst
 
 Gst.init(None)
-Handy.init()
+Adw.init()
 
 LOCALE_DIR = '@localedir@'
 PKGDATA_DIR = '@pkgdatadir@'
diff --git a/gnomemusic/views/emptyview.py b/gnomemusic/views/emptyview.py
index 737dbc67d..9f27e9fab 100644
--- a/gnomemusic/views/emptyview.py
+++ b/gnomemusic/views/emptyview.py
@@ -76,10 +76,10 @@ class EmptyView(Gtk.Stack):
         folder_text = _("The contents of your {} will appear here.")
         self._content_text = folder_text.format(href_text)
 
-        # Hack to get to HdyClamp, so it can be hidden for the
+        # Hack to get to AdwClamp, so it can be hidden for the
         # initial state.
         child_of_child = self._status_page.get_child().get_child()
-        self._hdy_clamp = child_of_child.get_child().get_children()[0]
+        self._adw_clamp = child_of_child.get_child().get_children()[0]
 
         self._status_page.add(self._initial_state)
 
@@ -102,7 +102,7 @@ class EmptyView(Gtk.Stack):
         """
         self._state = value
 
-        self._hdy_clamp.props.visible = True
+        self._adw_clamp.props.visible = True
         self._initial_state.props.visible = False
 
         if self._state == EmptyView.State.EMPTY:
@@ -115,7 +115,7 @@ class EmptyView(Gtk.Stack):
             self._set_tracker_outdated_state()
 
     def _set_empty_state(self):
-        self._hdy_clamp.props.visible = False
+        self._adw_clamp.props.visible = False
         self._initial_state.props.visible = True
 
         self._description_label.props.label = self._content_text
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index 19ea6d062..8df57d5b9 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -27,7 +27,7 @@ from gettext import ngettext
 from typing import Optional, Union
 import typing
 
-from gi.repository import Gio, GLib, GObject, Gtk, Handy
+from gi.repository import Gio, GLib, GObject, Gtk
 
 from gnomemusic.corealbum import CoreAlbum
 from gnomemusic.defaulticon import DefaultIcon
@@ -43,7 +43,7 @@ if typing.TYPE_CHECKING:
 
 
 @Gtk.Template(resource_path='/org/gnome/Music/ui/AlbumWidget.ui')
-class AlbumWidget(Handy.Clamp):
+class AlbumWidget(Gtk.Box):
     """Album widget.
 
     The album widget consists of an image with the album art
diff --git a/gnomemusic/widgets/artistalbumswidget.py b/gnomemusic/widgets/artistalbumswidget.py
index 1f494ae06..cf9601489 100644
--- a/gnomemusic/widgets/artistalbumswidget.py
+++ b/gnomemusic/widgets/artistalbumswidget.py
@@ -25,7 +25,7 @@
 from __future__ import annotations
 import typing
 
-from gi.repository import GObject, Gtk, Handy
+from gi.repository import Adw, GObject, Gtk
 
 from gnomemusic.widgets.albumwidget import AlbumWidget
 if typing.TYPE_CHECKING:
@@ -34,7 +34,7 @@ if typing.TYPE_CHECKING:
 
 
 @Gtk.Template(resource_path="/org/gnome/Music/ui/ArtistAlbumsWidget.ui")
-class ArtistAlbumsWidget(Handy.Clamp):
+class ArtistAlbumsWidget(Adw.Clamp):
     """Widget containing all albums by an artist
 
     A vertical list of AlbumWidget, containing all the albums
diff --git a/gnomemusic/widgets/headerbar.py b/gnomemusic/widgets/headerbar.py
index 8190638d4..27b28012c 100644
--- a/gnomemusic/widgets/headerbar.py
+++ b/gnomemusic/widgets/headerbar.py
@@ -25,7 +25,7 @@
 from enum import IntEnum
 
 from gettext import gettext as _, ngettext
-from gi.repository import GObject, Gtk, Handy
+from gi.repository import Adw, GObject, Gtk
 
 from gnomemusic.widgets.appmenu import AppMenu
 
@@ -72,7 +72,7 @@ class SelectionBarMenuButton(Gtk.MenuButton):
 
 
 @Gtk.Template(resource_path="/org/gnome/Music/ui/HeaderBar.ui")
-class HeaderBar(Handy.HeaderBar):
+class HeaderBar(Adw.Bin):
     """Headerbar of the application"""
 
     class State(IntEnum):
@@ -108,9 +108,8 @@ class HeaderBar(Handy.HeaderBar):
 
         self._selection_mode = False
 
-        self._stack_switcher = Handy.ViewSwitcher(
-            can_focus=False, halign="center")
-        self._stack_switcher.show()
+        self._stack_switcher = Adw.ViewSwitcher(
+            focusable=False, halign="center")
 
         self._selection_menu = SelectionBarMenuButton()
 
diff --git a/gnomemusic/widgets/searchheaderbar.py b/gnomemusic/widgets/searchheaderbar.py
index d5efaea55..4c8f10cea 100644
--- a/gnomemusic/widgets/searchheaderbar.py
+++ b/gnomemusic/widgets/searchheaderbar.py
@@ -24,14 +24,14 @@
 
 from enum import IntEnum
 
-from gi.repository import GLib, GObject, Gtk, Handy
+from gi.repository import Adw, GLib, GObject, Gtk
 
 from gnomemusic.search import Search
 from gnomemusic.widgets.headerbar import HeaderBar, SelectionBarMenuButton
 
 
 @Gtk.Template(resource_path="/org/gnome/Music/ui/SearchHeaderBar.ui")
-class SearchHeaderBar(Handy.HeaderBar):
+class SearchHeaderBar(Adw.Bin):
     """SearcnHeaderbar of the application"""
 
     class State(IntEnum):
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 578e84b8a..3a19653f8 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -24,7 +24,7 @@
 
 from typing import Optional
 
-from gi.repository import Gtk, Gdk, Gio, GLib, GObject, Handy
+from gi.repository import Adw, Gtk, Gdk, Gio, GLib, GObject
 from gettext import gettext as _
 
 from gnomemusic.gstplayer import Playback
@@ -48,7 +48,7 @@ from gnomemusic.widgets.selectiontoolbar import SelectionToolbar  # noqa: F401
 
 
 @Gtk.Template(resource_path="/org/gnome/Music/ui/Window.ui")
-class Window(Handy.ApplicationWindow):
+class Window(Adw.ApplicationWindow):
 
     __gtype_name__ = "Window"
 
@@ -252,9 +252,9 @@ class Window(Handy.ApplicationWindow):
             if isinstance(i, Gtk.Box):
                 continue
             if i.props.title:
-                self._stack.add_titled(i, i.props.name, i.props.title)
-                self._stack.child_set_property(
-                    i, "icon-name", i.props.icon_name)
+                stackpage = self._stack.add_titled(
+                    i, i.props.name, i.props.title)
+                stackpage.props.icon_name = i.props.icon_name
             else:
                 self._stack.add_named(i, i.props.name)
 
diff --git a/meson.build b/meson.build
index 82a48c71d..b213d6194 100644
--- a/meson.build
+++ b/meson.build
@@ -45,7 +45,7 @@ dependency('glib-2.0', version: '>= 2.67.1')
 dependency('goa-1.0', version: '>= 3.35.90')
 dependency('gobject-introspection-1.0', version: '>= 1.35.0')
 dependency('gtk4', version: '>= 4.5.0')
-dependency('libhandy-1', version: '>= 1.2.0')
+dependency('libadwaita-1', version: '>= 1.0')
 dependency('libmediaart-2.0', version: '>= 1.9.1')
 dependency('libsoup-2.4')
 dependency('tracker-sparql-3.0', version: '>= 2.99.3')


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