[glade: 2/2] Finished support for GtkRevealer. Ignore reveal-child property and added a proxy property to test it
- From: Juan Pablo Ugarte <jpu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade: 2/2] Finished support for GtkRevealer. Ignore reveal-child property and added a proxy property to test it
- Date: Wed, 7 Aug 2013 09:48:31 +0000 (UTC)
commit 385ab2939c05b6d783df2012a4c02af843442342
Author: Juan Pablo Ugarte <juanpablougarte gmail com>
Date: Tue Aug 6 07:51:31 2013 -0300
Finished support for GtkRevealer.
Ignore reveal-child property and added a proxy property to test it.
Added icons.
plugins/gtk+/Makefile.am | 1 +
plugins/gtk+/glade-gtk-revealer.c | 51 ++++++++++++++++++++++
plugins/gtk+/gtk+.xml.in | 23 +++++++---
plugins/gtk+/icons/16x16/Makefile.am | 1 +
plugins/gtk+/icons/16x16/widget-gtk-revealer.png | Bin 0 -> 217 bytes
plugins/gtk+/icons/22x22/Makefile.am | 1 +
plugins/gtk+/icons/22x22/widget-gtk-revealer.png | Bin 0 -> 221 bytes
7 files changed, 70 insertions(+), 7 deletions(-)
---
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index 2a93918..4d0a8a9 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -95,6 +95,7 @@ libgladegtk_la_SOURCES = \
glade-gtk-recent-chooser-menu.c \
glade-gtk-recent-chooser-widget.c \
glade-gtk-recent-file-filter.c \
+ glade-gtk-revealer.c \
glade-gtk-scale.c \
glade-gtk-scrollbar.c \
glade-gtk-scrolled-window.c \
diff --git a/plugins/gtk+/glade-gtk-revealer.c b/plugins/gtk+/glade-gtk-revealer.c
new file mode 100644
index 0000000..4085c30
--- /dev/null
+++ b/plugins/gtk+/glade-gtk-revealer.c
@@ -0,0 +1,51 @@
+/*
+ * glade-gtk-revealer.c - GladeWidgetAdaptor for GtkRevealer
+ *
+ * Copyright (C) 2013 Juan Pablo Ugarte
+ *
+ * Authors:
+ * Juan Pablo Ugarte <juanpablougarte gmail com>
+ *
+ * This library is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include <config.h>
+#include <glib/gi18n-lib.h>
+#include <gladeui/glade.h>
+
+void
+glade_gtk_revealer_post_create (GladeWidgetAdaptor *adaptor,
+ GObject *container,
+ GladeCreateReason reason)
+{
+ if (reason == GLADE_CREATE_USER)
+ {
+ gtk_container_add (GTK_CONTAINER (container), glade_placeholder_new ());
+ }
+ gtk_revealer_set_reveal_child (GTK_REVEALER (container), TRUE);
+}
+
+void
+glade_gtk_revealer_set_property (GladeWidgetAdaptor *adaptor,
+ GObject *object,
+ const gchar *id,
+ const GValue *value)
+{
+ if (!g_strcmp0 (id, "glade-test-reveal"))
+ gtk_revealer_set_reveal_child (GTK_REVEALER (object),
+ g_value_get_boolean (value));
+ else
+ GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
+}
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index b5abffb..251c0d5 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -1950,16 +1950,25 @@ range of values</_tooltip>
</packing-properties>
</glade-widget-class>
- <glade-widget-class name="GtkRevealer" generic-name="revealer" _title="Revealer">
+ <glade-widget-class name="GtkRevealer" generic-name="revealer" _title="Revealer" since="3.10">
+ <post-create-function>glade_gtk_revealer_post_create</post-create-function>
+ <set-property-function>glade_gtk_revealer_set_property</set-property-function>
<properties>
+ <property id="reveal-child" ignore="True"/>
+ <property id="glade-test-reveal" _name="Reveal Child Test Proxy" save="False" default="True">
+ <parameter-spec>
+ <type>GParamBoolean</type>
+ </parameter-spec>
+ <_tooltip>Proxy property to test revealing child in the workspace</_tooltip>
+ </property>
<property id="transition-type" default="GTK_REVEALER_TRANSITION_TYPE_NONE">
<displayable-values>
- <value id="GTK_REVEALER_TRANSITION_TYPE_NONE" _name="None" />
- <value id="GTK_REVEALER_TRANSITION_TYPE_CROSSFADE" _name="Crossfade" />
- <value id="GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT" _name="Slide Right" />
- <value id="GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT" _name="Slide Left" />
- <value id="GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP" _name="Slide Up" />
- <value id="GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN" _name="Slide Down" />
+ <value id="GTK_REVEALER_TRANSITION_TYPE_NONE" _name="None" />
+ <value id="GTK_REVEALER_TRANSITION_TYPE_CROSSFADE" _name="Crossfade" />
+ <value id="GTK_REVEALER_TRANSITION_TYPE_SLIDE_RIGHT" _name="Slide Right" />
+ <value id="GTK_REVEALER_TRANSITION_TYPE_SLIDE_LEFT" _name="Slide Left" />
+ <value id="GTK_REVEALER_TRANSITION_TYPE_SLIDE_UP" _name="Slide Up" />
+ <value id="GTK_REVEALER_TRANSITION_TYPE_SLIDE_DOWN" _name="Slide Down" />
</displayable-values>
</property>
</properties>
diff --git a/plugins/gtk+/icons/16x16/Makefile.am b/plugins/gtk+/icons/16x16/Makefile.am
index cf0e268..81e5c73 100644
--- a/plugins/gtk+/icons/16x16/Makefile.am
+++ b/plugins/gtk+/icons/16x16/Makefile.am
@@ -137,6 +137,7 @@ icons_DATA = \
widget-gtk-treestore.png \
widget-gtk-liststore.png \
widget-gtk-scalebutton.png \
+ widget-gtk-revealer.png \
widget-gtk-iconfactory.png
diff --git a/plugins/gtk+/icons/16x16/widget-gtk-revealer.png
b/plugins/gtk+/icons/16x16/widget-gtk-revealer.png
new file mode 100644
index 0000000..5d4bfca
Binary files /dev/null and b/plugins/gtk+/icons/16x16/widget-gtk-revealer.png differ
diff --git a/plugins/gtk+/icons/22x22/Makefile.am b/plugins/gtk+/icons/22x22/Makefile.am
index 30c1c32..c22c2cf 100644
--- a/plugins/gtk+/icons/22x22/Makefile.am
+++ b/plugins/gtk+/icons/22x22/Makefile.am
@@ -137,6 +137,7 @@ icons_DATA = \
widget-gtk-treestore.png \
widget-gtk-liststore.png \
widget-gtk-scalebutton.png \
+ widget-gtk-revealer.png \
widget-gtk-iconfactory.png
diff --git a/plugins/gtk+/icons/22x22/widget-gtk-revealer.png
b/plugins/gtk+/icons/22x22/widget-gtk-revealer.png
new file mode 100644
index 0000000..894a266
Binary files /dev/null and b/plugins/gtk+/icons/22x22/widget-gtk-revealer.png differ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]