[gnome-music/wip/mschraal/gtk4-v2: 6/55] Switch from libhandy to libadwaita
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4-v2: 6/55] Switch from libhandy to libadwaita
- Date: Sat, 22 May 2021 21:02:07 +0000 (UTC)
commit 2cdd5c4af6dc13fadf7811af1568da9f4f3dabc6
Author: Marinus Schraal <mschraal gnome org>
Date: Sat May 22 22:42:15 2021 +0200
Switch from libhandy to libadwaita
data/ui/EmptyView.ui | 2 +-
data/ui/HeaderBar.ui | 2 +-
data/ui/SearchHeaderBar.ui | 2 +-
data/ui/Window.ui | 2 +-
gnome-music.in | 6 +++---
gnomemusic/widgets/headerbar.py | 6 +++---
gnomemusic/widgets/searchheaderbar.py | 4 ++--
gnomemusic/window.py | 10 +++++-----
meson.build | 2 +-
9 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/data/ui/EmptyView.ui b/data/ui/EmptyView.ui
index 1bd5ee0fb..c9700ff54 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..0b65a9cea 100644
--- a/data/ui/HeaderBar.ui
+++ b/data/ui/HeaderBar.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.10 -->
- <template class="HeaderBar" parent="HdyHeaderBar">
+ <template class="HeaderBar" parent="AdwHeaderBar">
<property name="visible">True</property>
<property name="vexpand">False</property>
<style>
diff --git a/data/ui/SearchHeaderBar.ui b/data/ui/SearchHeaderBar.ui
index 37c70b669..ed65364ef 100644
--- a/data/ui/SearchHeaderBar.ui
+++ b/data/ui/SearchHeaderBar.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.10 -->
- <template class="SearchHeaderBar" parent="HdyHeaderBar">
+ <template class="SearchHeaderBar" parent="AdwHeaderBar">
<property name="visible">True</property>
<property name="vexpand">False</property>
<style>
diff --git a/data/ui/Window.ui b/data/ui/Window.ui
index 365a44fc0..566a5fdb6 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 c5ec888ce..d9463cebc 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/widgets/headerbar.py b/gnomemusic/widgets/headerbar.py
index 8190638d4..0a44f9951 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.HeaderBar):
"""Headerbar of the application"""
class State(IntEnum):
@@ -108,7 +108,7 @@ class HeaderBar(Handy.HeaderBar):
self._selection_mode = False
- self._stack_switcher = Handy.ViewSwitcher(
+ self._stack_switcher = Adw.ViewSwitcher(
can_focus=False, halign="center")
self._stack_switcher.show()
diff --git a/gnomemusic/widgets/searchheaderbar.py b/gnomemusic/widgets/searchheaderbar.py
index d5efaea55..d5d83d963 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.HeaderBar):
"""SearcnHeaderbar of the application"""
class State(IntEnum):
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 91cc0bbe3..a0d2318d6 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -22,7 +22,7 @@
# code, but you are not obligated to do so. If you do not wish to do so,
# delete this exception statement from your version.
-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
@@ -47,7 +47,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"
@@ -259,9 +259,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 c2d140fea..ad8f9c2d7 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('gtk+-3.0', version: '>= 3.24.13')
-dependency('libhandy-1', version: '>= 1.2.0')
+dependency('libadwaita-1', version: '>= 1.1')
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]