[gnome-characters/bilelmoussaoui/gtk4: 4/27] switch to Adw instead of Hdy namespace
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-characters/bilelmoussaoui/gtk4: 4/27] switch to Adw instead of Hdy namespace
- Date: Sun, 21 Nov 2021 14:35:44 +0000 (UTC)
commit 59bf7b0d198583c0adc3fc1bfd419f87d26aa3c9
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Fri Nov 19 11:31:27 2021 +0100
switch to Adw instead of Hdy namespace
data/characterlist.ui | 2 +-
data/mainview.ui | 2 +-
data/mainwindow.ui | 10 +++++-----
src/window.js | 8 ++++----
4 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/data/characterlist.ui b/data/characterlist.ui
index 060245b..c335b37 100644
--- a/data/characterlist.ui
+++ b/data/characterlist.ui
@@ -4,7 +4,7 @@
<template class="Gjs_CharacterListView" parent="GtkStack">
<property name="visible">True</property>
<child>
- <object class="HdyStatusPage">
+ <object class="AdwStatusPage">
<property name="icon-name">system-search-symbolic</property>
<property name="title" translatable="yes">No Results</property>
<property name="description" translatable="yes">Try a different search.</property>
diff --git a/data/mainview.ui b/data/mainview.ui
index 41f133b..6737494 100644
--- a/data/mainview.ui
+++ b/data/mainview.ui
@@ -4,7 +4,7 @@
<template class="Gjs_MainView" parent="GtkStack">
<property name="visible">True</property>
<child>
- <object class="HdyStatusPage">
+ <object class="AdwStatusPage">
<property name="visible">True</property>
<property name="icon_name">characters-punctuation-symbolic</property>
<property name="title" translatable="yes">No Recent Characters</property>
diff --git a/data/mainwindow.ui b/data/mainwindow.ui
index 4783c07..1947b0a 100644
--- a/data/mainwindow.ui
+++ b/data/mainwindow.ui
@@ -13,12 +13,12 @@
</item>
</section>
</menu>
- <template class="Gjs_MainWindow" parent="HdyApplicationWindow">
+ <template class="Gjs_MainWindow" parent="AdwApplicationWindow">
<property name="height-request">660</property>
<property name="default-width">800</property>
<property name="default-height">500</property>
<child>
- <object class="HdyLeaflet" id="leaflet">
+ <object class="AdwwLeaflet" id="leaflet">
<property name="visible">True</property>
<property name="can-swipe-back">True</property>
<child>
@@ -27,7 +27,7 @@
<property name="visible">True</property>
<property name="width-request">280</property>
<child>
- <object class="HdyHeaderBar" id="sidebar-headerbar">
+ <object class="GtkHeaderBar" id="sidebar-headerbar">
<property name="visible">True</property>
<property name="show-close-button">True</property>
<property name="title" translatable="yes">Characters</property>
@@ -89,7 +89,7 @@
<property name="orientation">vertical</property>
<property name="visible">True</property>
<child>
- <object class="HdyWindowHandle" id="header-separator">
+ <object class="AdwWindowHandle" id="header-separator">
<property name="visible">True</property>
<child>
<object class="GtkSeparator">
@@ -123,7 +123,7 @@
<property name="orientation">vertical</property>
<property name="visible">True</property>
<child>
- <object class="HdyHeaderBar" id="main-headerbar">
+ <object class="GtkHeaderBar" id="main-headerbar">
<property name="visible">True</property>
<property name="show-close-button">True</property>
<property name="has-subtitle">False</property>
diff --git a/src/window.js b/src/window.js
index e23ae8e..449a6cb 100644
--- a/src/window.js
+++ b/src/window.js
@@ -24,7 +24,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-const {Gio, GLib, GObject, Gtk, Handy } = imports.gi;
+const {Adw, Gio, GLib, GObject, Gtk } = imports.gi;
const Params = imports.params;
const CategoryList = imports.categoryList;
@@ -49,7 +49,7 @@ var MainWindow = GObject.registerClass({
'search-active', '', '',
GObject.ParamFlags.READABLE | GObject.ParamFlags.WRITABLE, false)
},
-}, class MainWindow extends Handy.ApplicationWindow {
+}, class MainWindow extends Adw.ApplicationWindow {
_init(params) {
params = Params.fill(params, { title: GLib.get_application_name() });
super._init(params);
@@ -94,7 +94,7 @@ var MainWindow = GObject.registerClass({
this._search_entry.connect('search-changed', (entry) => this._handleSearchChanged(entry));
this._back_button.connect('clicked', () => {
- this._leaflet.navigate(Handy.NavigationDirection.BACK);
+ this._leaflet.navigate(Adw.NavigationDirection.BACK);
});
this._menu_popover = new Menu.MenuPopover({});
@@ -240,7 +240,7 @@ var MainWindow = GObject.registerClass({
if (category) {
this._mainView.setPage(category);
this._updateTitle(category.title);
- this._leaflet.navigate(Handy.NavigationDirection.FORWARD);
+ this._leaflet.navigate(Adw.NavigationDirection.FORWARD);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]