[gtk/wip/baedert/box2: 34/43] Stop using GtkBox's pack-type child prop in UI files
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/box2: 34/43] Stop using GtkBox's pack-type child prop in UI files
- Date: Thu, 3 Jan 2019 08:03:53 +0000 (UTC)
commit a916e81fdd46d140060fe0658c7c33d237f226ab
Author: Timm Bäder <mail baedert org>
Date: Wed Dec 26 08:55:46 2018 +0100
Stop using GtkBox's pack-type child prop in UI files
demos/widget-factory/widget-factory.ui | 6 ------
gtk/inspector/recorder.ui | 5 ++---
gtk/ui/gtkappchooserdialog.ui | 5 ++---
gtk/ui/gtkdialog.ui | 6 ------
gtk/ui/gtkfilechooserdialog.ui | 5 ++---
gtk/ui/gtkfilechooserwidget.ui | 14 --------------
gtk/ui/gtkprintunixdialog.ui | 1 -
testsuite/gtk/builder.c | 27 +++++++++------------------
8 files changed, 15 insertions(+), 54 deletions(-)
---
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index 1ebb6efbde..d1ad3ffaff 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -3057,9 +3057,6 @@ microphone-sensitivity-medium-symbolic</property>
<class name="small-button"/>
</style>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
</object>
</child>
@@ -3090,9 +3087,6 @@ microphone-sensitivity-medium-symbolic</property>
<class name="small-button"/>
</style>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
</object>
</child>
diff --git a/gtk/inspector/recorder.ui b/gtk/inspector/recorder.ui
index 7f3f0ccc89..2ee6e90d0f 100644
--- a/gtk/inspector/recorder.ui
+++ b/gtk/inspector/recorder.ui
@@ -31,6 +31,8 @@
<property name="icon-name">insert-object-symbolic</property>
<property name="tooltip-text" translatable="yes">Add debug nodes</property>
<property name="active" bind-source="GtkInspectorRecorder" bind-property="debug-nodes"
bind-flags="bidirectional|sync-create"/>
+ <property name="halign">start</property>
+ <property name="hexpand">1</property>
</object>
</child>
<child>
@@ -41,9 +43,6 @@
<property name="tooltip-text" translatable="yes">Save selected node</property>
<signal name="clicked" handler="render_node_save"/>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
</object>
</child>
diff --git a/gtk/ui/gtkappchooserdialog.ui b/gtk/ui/gtkappchooserdialog.ui
index 6717125671..9c09d757c7 100644
--- a/gtk/ui/gtkappchooserdialog.ui
+++ b/gtk/ui/gtkappchooserdialog.ui
@@ -21,10 +21,9 @@
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="layout-style">end</property>
+ <property name="hexpand">1</property>
+ <property name="halign">end</property>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
<child>
<object class="GtkBox" id="inner_box">
diff --git a/gtk/ui/gtkdialog.ui b/gtk/ui/gtkdialog.ui
index 1a9728a7e6..d2d2638947 100644
--- a/gtk/ui/gtkdialog.ui
+++ b/gtk/ui/gtkdialog.ui
@@ -28,14 +28,8 @@
<class name="dialog-action-area"/>
</style>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
</object>
</child>
diff --git a/gtk/ui/gtkfilechooserdialog.ui b/gtk/ui/gtkfilechooserdialog.ui
index 4b75045015..1b37a4ce0e 100644
--- a/gtk/ui/gtkfilechooserdialog.ui
+++ b/gtk/ui/gtkfilechooserdialog.ui
@@ -13,10 +13,9 @@
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="margin">6</property>
<property name="layout-style">end</property>
+ <property name="hexpand">1</property>
+ <property name="halign">end</property>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
<child>
<object class="GtkFileChooserWidget" id="widget">
diff --git a/gtk/ui/gtkfilechooserwidget.ui b/gtk/ui/gtkfilechooserwidget.ui
index fbb53bd76e..5da98365cf 100644
--- a/gtk/ui/gtkfilechooserwidget.ui
+++ b/gtk/ui/gtkfilechooserwidget.ui
@@ -65,10 +65,6 @@
<property name="icon-name">folder-new-symbolic</property>
<signal name="notify::active" handler="new_folder_popover_active"/>
</object>
- <packing>
- <property name="pack-type">end</property>
- <property name="position">1</property>
- </packing>
</child>
</object>
<packing>
@@ -101,9 +97,6 @@
<object class="GtkSpinner" id="search_spinner">
<property name="visible">0</property>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
</object>
<packing>
@@ -367,9 +360,6 @@
<property name="valign">start</property>
<signal name="changed" handler="filter_combo_changed" swapped="no"/>
</object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
</child>
</object>
<packing>
@@ -377,10 +367,6 @@
</packing>
</child>
</object>
- <packing>
- <property name="position">1</property>
- <property name="pack-type">end</property>
- </packing>
</child>
</object>
</child>
diff --git a/gtk/ui/gtkprintunixdialog.ui b/gtk/ui/gtkprintunixdialog.ui
index ad005f4e0f..056877c5c0 100644
--- a/gtk/ui/gtkprintunixdialog.ui
+++ b/gtk/ui/gtkprintunixdialog.ui
@@ -1169,7 +1169,6 @@
</child>
</object>
<packing>
- <property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c
index e662570a26..6d320bf454 100644
--- a/testsuite/gtk/builder.c
+++ b/testsuite/gtk/builder.c
@@ -983,22 +983,16 @@ test_child_properties (void)
" <object class=\"GtkBox\" id=\"vbox1\">"
" <child>"
" <object class=\"GtkLabel\" id=\"label1\"/>"
- " <packing>"
- " <property name=\"pack-type\">start</property>"
- " </packing>"
" </child>"
" <child>"
" <object class=\"GtkLabel\" id=\"label2\"/>"
- " <packing>"
- " <property name=\"pack-type\">end</property>"
- " </packing>"
" </child>"
" </object>"
"</interface>";
GObject *label, *vbox;
- GtkPackType pack_type;
-
+ int position;
+
builder = builder_new_from_string (buffer1, -1, NULL);
vbox = gtk_builder_get_object (builder, "vbox1");
g_assert (GTK_IS_BOX (vbox));
@@ -1007,19 +1001,19 @@ test_child_properties (void)
g_assert (GTK_IS_LABEL (label));
gtk_container_child_get (GTK_CONTAINER (vbox),
GTK_WIDGET (label),
- "pack-type",
- &pack_type,
+ "position",
+ &position,
NULL);
- g_assert (pack_type == GTK_PACK_START);
-
+ g_assert_cmpint (position, ==, 0);
+
label = gtk_builder_get_object (builder, "label2");
g_assert (GTK_IS_LABEL (label));
gtk_container_child_get (GTK_CONTAINER (vbox),
GTK_WIDGET (label),
- "pack-type",
- &pack_type,
+ "position",
+ &position,
NULL);
- g_assert (pack_type == GTK_PACK_END);
+ g_assert_cmpint (position, ==, 1);
g_object_unref (builder);
}
@@ -1787,9 +1781,6 @@ test_reference_counting (void)
" <property name=\"orientation\">vertical</property>"
" <child>"
" <object class=\"GtkLabel\" id=\"label1\"/>"
- " <packing>"
- " <property name=\"pack-type\">start</property>"
- " </packing>"
" </child>"
" </object>"
"</interface>";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]