[libadwaita/wip/exalm/demo: 5/8] Prefer properties over <child>
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/demo: 5/8] Prefer properties over <child>
- Date: Tue, 2 Aug 2022 05:33:18 +0000 (UTC)
commit 357f56a248b8d65d8a2ccd0fb292db77cb088846
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Aug 2 08:59:40 2022 +0400
Prefer properties over <child>
demo/adw-demo-window.ui | 4 +-
demo/pages/carousel/adw-demo-page-carousel.ui | 4 +-
demo/pages/flap/adw-flap-demo-window.ui | 4 +-
demo/pages/styles/adw-style-demo-window.ui | 44 +++++++++++-----------
demo/pages/tab-view/adw-tab-view-demo-window.ui | 4 +-
.../view-switcher/adw-demo-page-view-switcher.ui | 4 +-
.../view-switcher/adw-view-switcher-demo-window.ui | 4 +-
doc/tools/data/popover-menu-list.ui | 4 +-
src/adw-action-row.ui | 4 +-
src/adw-combo-row.ui | 8 ++--
src/adw-entry-row.ui | 4 +-
src/adw-expander-row.ui | 8 ++--
src/adw-preferences-page.ui | 4 +-
src/adw-preferences-window.ui | 12 +++---
src/adw-status-page.ui | 4 +-
src/adw-tab-bar.ui | 12 +++---
src/adw-view-switcher-bar.c | 12 +++---
src/adw-view-switcher-button.ui | 4 +-
src/adw-view-switcher-title.c | 10 ++---
19 files changed, 77 insertions(+), 77 deletions(-)
---
diff --git a/demo/adw-demo-window.ui b/demo/adw-demo-window.ui
index 76f90f9f..6cd37fc4 100644
--- a/demo/adw-demo-window.ui
+++ b/demo/adw-demo-window.ui
@@ -25,7 +25,7 @@
<property name="title" translatable="yes">Adwaita Demo</property>
<property name="default_width">800</property>
<property name="default_height">576</property>
- <child>
+ <property name="content">
<object class="AdwToastOverlay" id="toast_overlay">
<property name="child">
<object class="AdwLeaflet" id="subpage_leaflet">
@@ -296,6 +296,6 @@
</object>
</property>
</object>
- </child>
+ </property>
</template>
</interface>
diff --git a/demo/pages/carousel/adw-demo-page-carousel.ui b/demo/pages/carousel/adw-demo-page-carousel.ui
index 5689a19f..ed204321 100644
--- a/demo/pages/carousel/adw-demo-page-carousel.ui
+++ b/demo/pages/carousel/adw-demo-page-carousel.ui
@@ -31,7 +31,7 @@
<property name="maximum-size">400</property>
<property name="tightening-threshold">300</property>
<property name="valign">center</property>
- <child>
+ <property name="child">
<object class="AdwPreferencesGroup">
<child>
<object class="AdwComboRow" id="orientation_row">
@@ -88,7 +88,7 @@
</object>
</child>
</object>
- </child>
+ </property>
</object>
</child>
<child>
diff --git a/demo/pages/flap/adw-flap-demo-window.ui b/demo/pages/flap/adw-flap-demo-window.ui
index ba70f226..bdb09bfb 100644
--- a/demo/pages/flap/adw-flap-demo-window.ui
+++ b/demo/pages/flap/adw-flap-demo-window.ui
@@ -7,7 +7,7 @@
<property name="title" translatable="yes">AdwFlap Demo</property>
<property name="default-width">640</property>
<property name="default-height">480</property>
- <child>
+ <property name="content">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
@@ -199,6 +199,6 @@
</object>
</child>
</object>
- </child>
+ </property>
</template>
</interface>
diff --git a/demo/pages/styles/adw-style-demo-window.ui b/demo/pages/styles/adw-style-demo-window.ui
index 4162dbdd..070fa10b 100644
--- a/demo/pages/styles/adw-style-demo-window.ui
+++ b/demo/pages/styles/adw-style-demo-window.ui
@@ -660,12 +660,12 @@ The "card" style class can be used to achieve the same style with GtkBox or simi
<style>
<class name="card"/>
</style>
- <child>
+ <property name="child">
<object class="GtkLabel">
<property name="label" translatable="yes">Card</property>
<property name="wrap">True</property>
</object>
- </child>
+ </property>
</object>
</child>
<child>
@@ -676,12 +676,12 @@ The "card" style class can be used to achieve the same style with GtkBox or simi
<class name="card"/>
<class name="activatable"/>
</style>
- <child>
+ <property name="child">
<object class="GtkLabel">
<property name="label" translatable="yes">Card (activatable)</property>
<property name="wrap">True</property>
</object>
- </child>
+ </property>
</object>
</child>
<child>
@@ -690,12 +690,12 @@ The "card" style class can be used to achieve the same style with GtkBox or simi
<style>
<class name="card"/>
</style>
- <child>
+ <property name="child">
<object class="GtkLabel">
<property name="label" translatable="yes">Card (button)</property>
<property name="wrap">True</property>
</object>
- </child>
+ </property>
</object>
</child>
</object>
@@ -907,7 +907,7 @@ The "raised" style class can be used to make a button inside a toolbar use defau
<child>
<object class="GtkFrame">
<property name="margin-bottom">12</property>
- <child>
+ <property name="child">
<object class="GtkBox">
<property name="tooltip-text">toolbar</property>
<style>
@@ -956,7 +956,7 @@ The "raised" style class can be used to make a button inside a toolbar use defau
</object>
</child>
</object>
- </child>
+ </property>
</object>
</child>
<child>
@@ -1014,11 +1014,11 @@ The "raised" style class can be used to make a button inside a toolbar use defau
<style>
<class name="background"/>
</style>
- <child>
+ <property name="child">
<object class="GtkLabel">
<property name="label" translatable="yes">Background</property>
</object>
- </child>
+ </property>
</object>
</child>
<child>
@@ -1027,11 +1027,11 @@ The "raised" style class can be used to make a button inside a toolbar use defau
<style>
<class name="view"/>
</style>
- <child>
+ <property name="child">
<object class="GtkLabel">
<property name="label" translatable="yes">View</property>
</object>
- </child>
+ </property>
</object>
</child>
<child>
@@ -1040,11 +1040,11 @@ The "raised" style class can be used to make a button inside a toolbar use defau
<style>
<class name="osd"/>
</style>
- <child>
+ <property name="child">
<object class="GtkLabel">
<property name="label" translatable="yes">OSD</property>
</object>
- </child>
+ </property>
</object>
</child>
</object>
@@ -1139,7 +1139,7 @@ The "raised" style class can be used to make a button inside a toolbar use defau
<property name="transient-for">AdwStyleDemoWindow</property>
<property name="title" translatable="yes">Flat Header Bar</property>
<property name="hide-on-close">True</property>
- <child type="titlebar">
+ <property name="titlebar">
<object class="GtkHeaderBar">
<property name="tooltip-text">flat</property>
<property name="title-widget">
@@ -1149,8 +1149,8 @@ The "raised" style class can be used to make a button inside a toolbar use defau
<class name="flat"/>
</style>
</object>
- </child>
- <child>
+ </property>
+ <property name="child">
<object class="GtkLabel">
<property name="use-markup">True</property>
<property name="label" translatable="yes">The header bar in this window has the "flat" style
class.</property>
@@ -1159,7 +1159,7 @@ The "raised" style class can be used to make a button inside a toolbar use defau
<property name="margin-end">48</property>
<property name="margin-bottom">48</property>
</object>
- </child>
+ </property>
</object>
<object class="GtkWindow" id="status_page_window">
<property name="modal">True</property>
@@ -1168,7 +1168,7 @@ The "raised" style class can be used to make a button inside a toolbar use defau
<property name="hide-on-close">True</property>
<property name="default-width">640</property>
<property name="default-height">480</property>
- <child type="titlebar">
+ <property name="titlebar">
<object class="GtkHeaderBar">
<child>
<object class="GtkRevealer">
@@ -1183,8 +1183,8 @@ The "raised" style class can be used to make a button inside a toolbar use defau
</object>
</child>
</object>
- </child>
- <child>
+ </property>
+ <property name="child">
<object class="AdwFlap" id="status_page_flap">
<property name="width-request">360</property>
<property name="flap">
@@ -1230,7 +1230,7 @@ The "raised" style class can be used to make a button inside a toolbar use defau
</object>
</property>
</object>
- </child>
+ </property>
</object>
<object class="AdwWindow" id="sidebar_window">
<property name="modal">True</property>
diff --git a/demo/pages/tab-view/adw-tab-view-demo-window.ui b/demo/pages/tab-view/adw-tab-view-demo-window.ui
index 70b793c4..a53ad72e 100644
--- a/demo/pages/tab-view/adw-tab-view-demo-window.ui
+++ b/demo/pages/tab-view/adw-tab-view-demo-window.ui
@@ -6,7 +6,7 @@
<property name="title" translatable="yes">Tab View Demo</property>
<property name="default-width">800</property>
<property name="default-height">600</property>
- <child>
+ <property name="content">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
@@ -42,7 +42,7 @@
</object>
</child>
</object>
- </child>
+ </property>
</template>
<menu id="tab_menu">
<section>
diff --git a/demo/pages/view-switcher/adw-demo-page-view-switcher.ui
b/demo/pages/view-switcher/adw-demo-page-view-switcher.ui
index 0721d51d..50b16632 100644
--- a/demo/pages/view-switcher/adw-demo-page-view-switcher.ui
+++ b/demo/pages/view-switcher/adw-demo-page-view-switcher.ui
@@ -8,7 +8,7 @@
<property name="icon-name">widget-view-switcher-symbolic</property>
<property name="title" translatable="yes">View Switcher</property>
<property name="description" translatable="yes">Widgets to switch the window's view.</property>
- <child>
+ <property name="child">
<object class="GtkButton">
<property name="label" translatable="yes">Run the Demo</property>
<property name="halign">center</property>
@@ -17,7 +17,7 @@
<class name="pill"/>
</style>
</object>
- </child>
+ </property>
</object>
</property>
</template>
diff --git a/demo/pages/view-switcher/adw-view-switcher-demo-window.ui
b/demo/pages/view-switcher/adw-view-switcher-demo-window.ui
index c3056fcf..2b832c21 100644
--- a/demo/pages/view-switcher/adw-view-switcher-demo-window.ui
+++ b/demo/pages/view-switcher/adw-view-switcher-demo-window.ui
@@ -7,7 +7,7 @@
<property name="modal">True</property>
<property name="width-request">360</property>
<property name="title" translatable="yes">AdwViewSwitcher Demo</property>
- <child>
+ <property name="content">
<object class="GtkBox">
<property name="orientation">vertical</property>
<child>
@@ -103,6 +103,6 @@
</object>
</child>
</object>
- </child>
+ </property>
</template>
</interface>
diff --git a/doc/tools/data/popover-menu-list.ui b/doc/tools/data/popover-menu-list.ui
index 1da2f6d3..fe63afdb 100644
--- a/doc/tools/data/popover-menu-list.ui
+++ b/doc/tools/data/popover-menu-list.ui
@@ -11,12 +11,12 @@
<property name="width-request">100</property>
<child>
<object class="GtkListBoxRow" id="hover">
- <child>
+ <property name="child">
<object class="GtkLabel">
<property name="label">Item 1</property>
<property name="xalign">0</property>
</object>
- </child>
+ </property>
</object>
</child>
<child>
diff --git a/src/adw-action-row.ui b/src/adw-action-row.ui
index bd41b8c8..2b38a358 100644
--- a/src/adw-action-row.ui
+++ b/src/adw-action-row.ui
@@ -7,7 +7,7 @@
<relation name="labelled-by">title</relation>
<relation name="described-by">subtitle</relation>
</accessibility>
- <child>
+ <property name="child">
<object class="GtkBox" id="header">
<property name="valign">center</property>
<property name="hexpand">False</property>
@@ -94,6 +94,6 @@
</object>
</child>
</object>
- </child>
+ </property>
</template>
</interface>
diff --git a/src/adw-combo-row.ui b/src/adw-combo-row.ui
index ae7a4370..01b23f25 100644
--- a/src/adw-combo-row.ui
+++ b/src/adw-combo-row.ui
@@ -33,20 +33,20 @@
<style>
<class name="menu"/>
</style>
- <child>
+ <property name="child">
<object class="GtkScrolledWindow">
<property name="hscrollbar_policy">never</property>
<property name="max_content_height">400</property>
<property name="propagate_natural_width">True</property>
<property name="propagate_natural_height">True</property>
- <child>
+ <property name="child">
<object class="GtkListView" id="list">
<property name="single-click-activate">True</property>
<signal name="activate" handler="row_activated_cb" swapped="true"/>
</object>
- </child>
+ </property>
</object>
- </child>
+ </property>
</object>
</child>
</object>
diff --git a/src/adw-entry-row.ui b/src/adw-entry-row.ui
index 979200be..06dadd20 100644
--- a/src/adw-entry-row.ui
+++ b/src/adw-entry-row.ui
@@ -11,7 +11,7 @@
<signal name="pressed" handler="pressed_cb"/>
</object>
</child>
- <child>
+ <property name="child">
<object class="GtkBox" id="header">
<property name="valign">center</property>
<style>
@@ -118,7 +118,7 @@
</object>
</child>
</object>
- </child>
+ </property>
<style>
<class name="entry"/>
</style>
diff --git a/src/adw-expander-row.ui b/src/adw-expander-row.ui
index 21e832c3..26faed1f 100644
--- a/src/adw-expander-row.ui
+++ b/src/adw-expander-row.ui
@@ -8,7 +8,7 @@
<class name="empty"/>
<class name="expander"/>
</style>
- <child>
+ <property name="child">
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
<child>
@@ -64,7 +64,7 @@
<object class="GtkRevealer">
<property name="reveal-child" bind-source="AdwExpanderRow" bind-property="expanded"
bind-flags="sync-create"/>
<property name="transition-type">slide-up</property>
- <child>
+ <property name="child">
<object class="GtkListBox" id="list">
<property name="selection-mode">none</property>
<signal name="keynav-failed" handler="keynav_failed_cb" swapped="yes"/>
@@ -72,10 +72,10 @@
<class name="nested"/>
</style>
</object>
- </child>
+ </property>
</object>
</child>
</object>
- </child>
+ </property>
</template>
</interface>
diff --git a/src/adw-preferences-page.ui b/src/adw-preferences-page.ui
index d4d707c0..c6cc0f25 100644
--- a/src/adw-preferences-page.ui
+++ b/src/adw-preferences-page.ui
@@ -11,11 +11,11 @@
<property name="scroll-to-focus">True</property>
<property name="child">
<object class="AdwClamp">
- <child>
+ <property name="child">
<object class="GtkBox" id="box">
<property name="orientation">vertical</property>
</object>
- </child>
+ </property>
</object>
</property>
</object>
diff --git a/src/adw-preferences-window.ui b/src/adw-preferences-window.ui
index aee5f948..7f7bd661 100644
--- a/src/adw-preferences-window.ui
+++ b/src/adw-preferences-window.ui
@@ -11,9 +11,9 @@
<style>
<class name="preferences"/>
</style>
- <child>
+ <property name="content">
<object class="AdwToastOverlay" id="toast_overlay">
- <child>
+ <property name="child">
<object class="AdwLeaflet" id="subpages_leaflet">
<property name="can-navigate-back" bind-source="AdwPreferencesWindow"
bind-property="can-navigate-back" bind-flags="sync-create"/>
<property name="can-unfold">False</property>
@@ -50,13 +50,13 @@
<object class="AdwClamp">
<property name="tightening-threshold">300</property>
<property name="maximum-size">400</property>
- <child>
+ <property name="child">
<object class="GtkSearchEntry" id="search_entry">
<signal name="search-started" handler="search_started_cb" swapped="yes"/>
<signal name="search-changed" handler="search_changed_cb" swapped="yes"/>
<signal name="stop-search" handler="stop_search_cb" swapped="yes"/>
</object>
- </child>
+ </property>
</object>
</property>
</object>
@@ -151,8 +151,8 @@
</object>
</child>
</object>
- </child>
+ </property>
</object>
- </child>
+ </property>
</template>
</interface>
diff --git a/src/adw-status-page.ui b/src/adw-status-page.ui
index f7837388..3d876f38 100644
--- a/src/adw-status-page.ui
+++ b/src/adw-status-page.ui
@@ -19,7 +19,7 @@
<property name="valign">center</property>
<child>
<object class="AdwClamp">
- <child>
+ <property name="child">
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="valign">center</property>
@@ -71,7 +71,7 @@
</object>
</child>
</object>
- </child>
+ </property>
</object>
</child>
</object>
diff --git a/src/adw-tab-bar.ui b/src/adw-tab-bar.ui
index 81583d7c..c550e160 100644
--- a/src/adw-tab-bar.ui
+++ b/src/adw-tab-bar.ui
@@ -6,7 +6,7 @@
<object class="GtkRevealer" id="revealer">
<property name="transition-duration">200</property>
<property name="transition-type">slide-down</property>
- <child>
+ <property name="child">
<object class="GtkBox">
<style>
<class name="box"/>
@@ -29,7 +29,7 @@
<style>
<class name="pinned"/>
</style>
- <child>
+ <property name="child">
<object class="AdwTabBox" id="pinned_box">
<property name="pinned">True</property>
<property name="tab-bar">AdwTabBar</property>
@@ -37,7 +37,7 @@
<signal name="stop-kinetic-scrolling" handler="stop_kinetic_scrolling_cb"
object="pinned_scrolled_window" swapped="true"/>
<signal name="extra-drag-drop" handler="extra_drag_drop_cb" swapped="true"/>
</object>
- </child>
+ </property>
</object>
</child>
<child>
@@ -47,14 +47,14 @@
<property name="overlay-scrolling">False</property>
<property name="hexpand">True</property>
<property name="min-content-width">100</property>
- <child>
+ <property name="child">
<object class="AdwTabBox" id="box">
<property name="tab-bar">AdwTabBar</property>
<signal name="notify::resize-frozen" handler="notify_resize_frozen_cb" swapped="true"/>
<signal name="stop-kinetic-scrolling" handler="stop_kinetic_scrolling_cb"
object="scrolled_window" swapped="true"/>
<signal name="extra-drag-drop" handler="extra_drag_drop_cb" swapped="true"/>
</object>
- </child>
+ </property>
</object>
</child>
<child>
@@ -66,7 +66,7 @@
</object>
</child>
</object>
- </child>
+ </property>
</object>
</child>
</template>
diff --git a/src/adw-view-switcher-bar.c b/src/adw-view-switcher-bar.c
index ac439fa7..538beda7 100644
--- a/src/adw-view-switcher-bar.c
+++ b/src/adw-view-switcher-bar.c
@@ -36,17 +36,17 @@
*
* ```xml
* <object class="GtkWindow">
- * <child type="titlebar">
+ * <property name="titlebar">
* <object class="AdwHeaderBar">
* <property name="centering-policy">strict</property>
- * <child type="title">
+ * <property name="title-widget">
* <object class="AdwViewSwitcherTitle" id="title">
* <property name="stack">stack</property>
* </object>
- * </child>
+ * </property>
* </object>
- * </child>
- * <child>
+ * </property>
+ * <property>
* <object class="GtkBox">
* <property name="orientation">vertical</property>
* <child>
@@ -61,7 +61,7 @@
* </object>
* </child>
* </object>
- * </child>
+ * </property>
* </object>
* ```
*
diff --git a/src/adw-view-switcher-button.ui b/src/adw-view-switcher-button.ui
index 707cda89..ba15c189 100644
--- a/src/adw-view-switcher-button.ui
+++ b/src/adw-view-switcher-button.ui
@@ -5,7 +5,7 @@
<style>
<class name="flat"/>
</style>
- <child>
+ <property name="child">
<object class="GtkStack" id="stack">
<property name="hhomogeneous">False</property>
<property name="vhomogeneous">False</property>
@@ -80,7 +80,7 @@
</object>
</child>
</object>
- </child>
+ </property>
<child>
<object class="GtkDropControllerMotion">
<signal name="enter" handler="drag_enter_cb" swapped="yes"/>
diff --git a/src/adw-view-switcher-title.c b/src/adw-view-switcher-title.c
index 6d80ee3f..f20ba291 100644
--- a/src/adw-view-switcher-title.c
+++ b/src/adw-view-switcher-title.c
@@ -43,17 +43,17 @@
*
* ```xml
* <object class="GtkWindow">
- * <child type="titlebar">
+ * <property name="titlebar">
* <object class="AdwHeaderBar">
* <property name="centering-policy">strict</property>
- * <child type="title">
+ * <property name="title-widget">
* <object class="AdwViewSwitcherTitle" id="title">
* <property name="stack">stack</property>
* </object>
* </child>
* </object>
- * </child>
- * <child>
+ * </property>
+ * <property>
* <object class="GtkBox">
* <property name="orientation">vertical</property>
* <child>
@@ -68,7 +68,7 @@
* </object>
* </child>
* </object>
- * </child>
+ * </property>
* </object>
* ```
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]