[gnome-games/wip/exalm/rebrand: 33/124] preferences: Use HdyPreferencesPage
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/rebrand: 33/124] preferences: Use HdyPreferencesPage
- Date: Sat, 19 Jun 2021 14:37:44 +0000 (UTC)
commit ea01536a5f1f084e43f6a2b62071431ea9316e0e
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Wed Mar 24 20:37:17 2021 +0500
preferences: Use HdyPreferencesPage
Since the error message bar isn't needed anymore, we can just do this.
src/meson.build | 1 -
src/org.gnome.Games.gresource.xml | 1 -
src/preferences/preferences-page-controllers.ui | 2 +-
src/preferences/preferences-page-controllers.vala | 4 +-
src/preferences/preferences-page-platforms.ui | 2 +-
src/preferences/preferences-page-platforms.vala | 2 +-
src/preferences/preferences-page-video.ui | 2 +-
src/preferences/preferences-page-video.vala | 2 +-
src/preferences/preferences-page.ui | 81 -----------------------
src/preferences/preferences-page.vala | 32 ---------
src/preferences/preferences-window.ui | 3 -
11 files changed, 8 insertions(+), 124 deletions(-)
---
diff --git a/src/meson.build b/src/meson.build
index 783ad1e3..d92775e5 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -89,7 +89,6 @@ vala_sources = [
'keyboard/keyboard-mapping-manager.vala',
'keyboard/keyboard-tester.vala',
- 'preferences/preferences-page.vala',
'preferences/preferences-page-controllers.vala',
'preferences/preferences-page-platforms.vala',
'preferences/preferences-page-platforms-retro-row.vala',
diff --git a/src/org.gnome.Games.gresource.xml b/src/org.gnome.Games.gresource.xml
index 03c71149..9816c852 100644
--- a/src/org.gnome.Games.gresource.xml
+++ b/src/org.gnome.Games.gresource.xml
@@ -25,7 +25,6 @@
<file preprocess="xml-stripblanks">keyboard/keyboard-mapper.ui</file>
<file preprocess="xml-stripblanks">keyboard/keyboard-tester.ui</file>
- <file preprocess="xml-stripblanks">preferences/preferences-page.ui</file>
<file preprocess="xml-stripblanks">preferences/preferences-page-controllers.ui</file>
<file preprocess="xml-stripblanks">preferences/preferences-page-platforms.ui</file>
<file preprocess="xml-stripblanks">preferences/preferences-page-video.ui</file>
diff --git a/src/preferences/preferences-page-controllers.ui b/src/preferences/preferences-page-controllers.ui
index 59f56950..3c8ee7c0 100644
--- a/src/preferences/preferences-page-controllers.ui
+++ b/src/preferences/preferences-page-controllers.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.24"/>
- <template class="GamesPreferencesPageControllers" parent="GamesPreferencesPage">
+ <template class="GamesPreferencesPageControllers" parent="HdyPreferencesPage">
<property name="visible">True</property>
<child>
<object class="HdyPreferencesGroup" id="gamepads_group">
diff --git a/src/preferences/preferences-page-controllers.vala
b/src/preferences/preferences-page-controllers.vala
index b169de21..8e92bcaa 100644
--- a/src/preferences/preferences-page-controllers.vala
+++ b/src/preferences/preferences-page-controllers.vala
@@ -1,7 +1,7 @@
// This file is part of GNOME Games. License: GPL-3.0+.
[GtkTemplate (ui = "/org/gnome/Games/preferences/preferences-page-controllers.ui")]
-private class Games.PreferencesPageControllers : PreferencesPage {
+private class Games.PreferencesPageControllers : Hdy.PreferencesPage {
[GtkChild]
private unowned Hdy.PreferencesGroup gamepads_group;
[GtkChild]
@@ -39,6 +39,7 @@ private class Games.PreferencesPageControllers : PreferencesPage {
var this_device = device;
row.activated.connect (() => {
+ var window = get_toplevel () as PreferencesWindow;
window.open_subpage (new PreferencesSubpageGamepad (this_device));
});
@@ -62,6 +63,7 @@ private class Games.PreferencesPageControllers : PreferencesPage {
row.activatable = true;
row.activated.connect (() => {
+ var window = get_toplevel () as PreferencesWindow;
window.open_subpage (new PreferencesSubpageKeyboard ());
});
diff --git a/src/preferences/preferences-page-platforms.ui b/src/preferences/preferences-page-platforms.ui
index 004d2b81..1a91c052 100644
--- a/src/preferences/preferences-page-platforms.ui
+++ b/src/preferences/preferences-page-platforms.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.24"/>
- <template class="GamesPreferencesPagePlatforms" parent="GamesPreferencesPage">
+ <template class="GamesPreferencesPagePlatforms" parent="HdyPreferencesPage">
<property name="visible">True</property>
<child>
<object class="HdyPreferencesGroup" id="platforms_group">
diff --git a/src/preferences/preferences-page-platforms.vala b/src/preferences/preferences-page-platforms.vala
index 698109c9..59864b8f 100644
--- a/src/preferences/preferences-page-platforms.vala
+++ b/src/preferences/preferences-page-platforms.vala
@@ -1,7 +1,7 @@
// This file is part of GNOME Games. License: GPL-3.0+.
[GtkTemplate (ui = "/org/gnome/Games/preferences/preferences-page-platforms.ui")]
-private class Games.PreferencesPagePlatforms : PreferencesPage {
+private class Games.PreferencesPagePlatforms : Hdy.PreferencesPage {
[GtkChild]
private unowned Hdy.PreferencesGroup platforms_group;
diff --git a/src/preferences/preferences-page-video.ui b/src/preferences/preferences-page-video.ui
index 8355108b..f6ad4e36 100644
--- a/src/preferences/preferences-page-video.ui
+++ b/src/preferences/preferences-page-video.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="3.24"/>
- <template class="GamesPreferencesPageVideo" parent="GamesPreferencesPage">
+ <template class="GamesPreferencesPageVideo" parent="HdyPreferencesPage">
<property name="visible">True</property>
<child>
<object class="HdyPreferencesGroup" id="filter_group">
diff --git a/src/preferences/preferences-page-video.vala b/src/preferences/preferences-page-video.vala
index 9d667d24..a28ed6fd 100644
--- a/src/preferences/preferences-page-video.vala
+++ b/src/preferences/preferences-page-video.vala
@@ -1,7 +1,7 @@
// This file is part of GNOME Games. License: GPL-3.0+.
[GtkTemplate (ui = "/org/gnome/Games/preferences/preferences-page-video.ui")]
-private class Games.PreferencesPageVideo : PreferencesPage {
+private class Games.PreferencesPageVideo : Hdy.PreferencesPage {
private string _filter_active;
public string filter_active {
set {
diff --git a/src/preferences/preferences-window.ui b/src/preferences/preferences-window.ui
index 0f113e96..f7cd1b99 100644
--- a/src/preferences/preferences-window.ui
+++ b/src/preferences/preferences-window.ui
@@ -40,7 +40,6 @@
<child>
<object class="GamesPreferencesPageVideo" id="video_page">
<property name="visible">True</property>
- <property name="window">GamesPreferencesWindow</property>
</object>
<packing>
<property name="title" translatable="yes">Video</property>
@@ -50,7 +49,6 @@
<child>
<object class="GamesPreferencesPageControllers" id="controllers_page">
<property name="visible">True</property>
- <property name="window">GamesPreferencesWindow</property>
</object>
<packing>
<property name="title" translatable="yes">Controllers</property>
@@ -60,7 +58,6 @@
<child>
<object class="GamesPreferencesPagePlatforms" id="platforms_page">
<property name="visible">True</property>
- <property name="window">GamesPreferencesWindow</property>
</object>
<packing>
<property name="title" translatable="yes">Platforms</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]