summaryrefslogtreecommitdiff
path: root/demos/widget-factory
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-07-12 21:04:54 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-07-13 09:26:35 -0400
commit42d97c380e50aded08b1248789bf2706c789d894 (patch)
tree309627a04bd2c13fb06432304ca9f213a5b4c85b /demos/widget-factory
parent2b9285e52e08dabed39ee4305cd82449fdba337f (diff)
downloadgtk+-42d97c380e50aded08b1248789bf2706c789d894.tar.gz
widget-factory: Use the new ::activatable property
Diffstat (limited to 'demos/widget-factory')
-rw-r--r--demos/widget-factory/widget-factory.c4
-rw-r--r--demos/widget-factory/widget-factory.ui210
2 files changed, 119 insertions, 95 deletions
diff --git a/demos/widget-factory/widget-factory.c b/demos/widget-factory/widget-factory.c
index fe7b3951a7..4ac5ec9b6c 100644
--- a/demos/widget-factory/widget-factory.c
+++ b/demos/widget-factory/widget-factory.c
@@ -603,11 +603,11 @@ activate (GApplication *app)
gtk_list_box_set_header_func (GTK_LIST_BOX (widget), update_header, NULL, NULL);
g_signal_connect (widget, "row-activated", G_CALLBACK (row_activated), NULL);
- widget = gtk_widget_get_parent ((GtkWidget *)gtk_builder_get_object (builder, "listboxrow3"));
+ widget = (GtkWidget *)gtk_builder_get_object (builder, "listboxrow3");
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "listboxrow3image");
g_object_set_data (G_OBJECT (widget), "image", widget2);
- widget = gtk_widget_get_parent ((GtkWidget *)gtk_builder_get_object (builder, "listboxrow4"));
+ widget = (GtkWidget *)gtk_builder_get_object (builder, "listboxrow4");
widget2 = (GtkWidget *)gtk_builder_get_object (builder, "info_dialog");
g_object_set_data (G_OBJECT (widget), "dialog", widget2);
diff --git a/demos/widget-factory/widget-factory.ui b/demos/widget-factory/widget-factory.ui
index 64348005d6..c2d952af3d 100644
--- a/demos/widget-factory/widget-factory.ui
+++ b/demos/widget-factory/widget-factory.ui
@@ -2102,127 +2102,151 @@ Suspendisse feugiat quam quis dolor accumsan cursus. </property>
<property name="selection-mode">none</property>
<property name="activate-on-single-click">True</property>
<child>
- <object class="GtkBox" id="listboxrow1">
+ <object class="GtkListBoxRow" id="listboxrow1">
<property name="visible">True</property>
- <property name="orientation">horizontal</property>
- <child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Row 1</property>
- <property name="halign">start</property>
- <property name="valign">enter</property>
- <property name="margin">6</property>
- </object>
- <packing>
- <property name="expand">True</property>
- </packing>
- </child>
+ <property name="activatable">False</property>
<child>
- <object class="GtkSwitch">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="margin-start">12</property>
- <property name="margin-end">12</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Row 1</property>
+ <property name="halign">start</property>
+ <property name="valign">enter</property>
+ <property name="margin">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkSwitch">
+ <property name="visible">True</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ </object>
+ </child>
</object>
</child>
</object>
</child>
<child>
- <object class="GtkBox" id="listboxrow2">
+ <object class="GtkListBoxRow" id="listboxrow2">
<property name="visible">True</property>
- <property name="orientation">horizontal</property>
+ <property name="activatable">False</property>
<child>
- <object class="GtkLabel">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="label" translatable="yes">Row 2</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="margin">6</property>
- </object>
- <packing>
- <property name="expand">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkScale">
<property name="orientation">horizontal</property>
- <property name="visible">True</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="margin-start">12</property>
- <property name="margin-end">12</property>
- <property name="draw-value">False</property>
- <property name="width-request">150</property>
- <property name="adjustment">adjustment1</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Row 2</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="margin">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkScale">
+ <property name="orientation">horizontal</property>
+ <property name="visible">True</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="draw-value">False</property>
+ <property name="width-request">150</property>
+ <property name="adjustment">adjustment1</property>
+ </object>
+ </child>
</object>
</child>
</object>
</child>
<child>
- <object class="GtkBox" id="listboxrow3">
+ <object class="GtkListBoxRow" id="listboxrow3">
<property name="visible">True</property>
- <property name="orientation">horizontal</property>
+ <property name="activatable">True</property>
<child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Row 3</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="margin">6</property>
- </object>
- <packing>
- <property name="expand">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage" id="listboxrow3image">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="icon-name">object-select-symbolic</property>
- <property name="icon-size">1</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="margin-start">12</property>
- <property name="margin-end">12</property>
- <property name="opacity">0</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Row 3</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="margin">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage" id="listboxrow3image">
+ <property name="visible">True</property>
+ <property name="icon-name">object-select-symbolic</property>
+ <property name="icon-size">1</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="opacity">0</property>
+ </object>
+ </child>
</object>
</child>
</object>
</child>
<child>
- <object class="GtkBox" id="listboxrow4">
+ <object class="GtkListBoxRow" id="listboxrow4">
<property name="visible">True</property>
- <property name="orientation">horizontal</property>
+ <property name="activatable">True</property>
<child>
- <object class="GtkLabel">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Row 4</property>
- <property name="halign">start</property>
- <property name="valign">center</property>
- <property name="margin">6</property>
- </object>
- <packing>
- <property name="expand">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkImage">
+ <object class="GtkBox">
<property name="visible">True</property>
- <property name="icon-name">object-select-symbolic</property>
- <property name="icon-size">1</property>
- <property name="halign">end</property>
- <property name="valign">center</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="margin-start">12</property>
- <property name="margin-end">12</property>
- <property name="opacity">0</property>
+ <property name="orientation">horizontal</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Row 4</property>
+ <property name="halign">start</property>
+ <property name="valign">center</property>
+ <property name="margin">6</property>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkImage">
+ <property name="visible">True</property>
+ <property name="icon-name">object-select-symbolic</property>
+ <property name="icon-size">1</property>
+ <property name="halign">end</property>
+ <property name="valign">center</property>
+ <property name="margin-top">6</property>
+ <property name="margin-bottom">6</property>
+ <property name="margin-start">12</property>
+ <property name="margin-end">12</property>
+ <property name="opacity">0</property>
+ </object>
+ </child>
</object>
</child>
</object>