summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Pablo Ugarte <ugarte@endlessm.com>2018-08-01 17:11:58 -0300
committerJuan Pablo Ugarte <juanpablougarte@gmail.com>2018-08-02 13:27:09 -0300
commitc2971c6713fab46e20a8392e94e40aeec6f6def7 (patch)
tree6fbe51a5a933ee85e86c5de0ae0c37ea745f329e
parentf6bee53a3db712ee46230869f2c7f0e66d63c54b (diff)
downloadglade-c2971c6713fab46e20a8392e94e40aeec6f6def7.tar.gz
GladeGtkBin: add initial support for GtkBin abstract class
-rw-r--r--plugins/gtk+/Makefile.am1
-rw-r--r--plugins/gtk+/glade-gtk-bin.c44
-rw-r--r--plugins/gtk+/gtk+.xml.in5
3 files changed, 49 insertions, 1 deletions
diff --git a/plugins/gtk+/Makefile.am b/plugins/gtk+/Makefile.am
index a1347712..28e3c2da 100644
--- a/plugins/gtk+/Makefile.am
+++ b/plugins/gtk+/Makefile.am
@@ -59,6 +59,7 @@ libgladegtk_la_SOURCES = \
glade-gtk-app-chooser-widget.c \
glade-gtk-arrow.c \
glade-gtk-assistant.c \
+ glade-gtk-bin.c \
glade-gtk-box.c \
glade-gtk-button.c \
glade-gtk-cell-layout.c \
diff --git a/plugins/gtk+/glade-gtk-bin.c b/plugins/gtk+/glade-gtk-bin.c
new file mode 100644
index 00000000..ff64f3ca
--- /dev/null
+++ b/plugins/gtk+/glade-gtk-bin.c
@@ -0,0 +1,44 @@
+/*
+ * glade-gtk-bin.c - GladeWidgetAdaptor for GtkBin
+ *
+ * Copyright (C) 2018 Endless Mobile, Inc.
+ *
+ * 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 <gladeui/glade.h>
+
+struct _GladeInstantiableGtkBin
+{
+ GtkBin parent;
+};
+
+G_DECLARE_FINAL_TYPE (GladeInstantiableGtkBin, glade_instantiable_gtk_bin, GLADE, INSTANTIABLE_GTK_BIN, GtkBin)
+G_DEFINE_TYPE (GladeInstantiableGtkBin, glade_instantiable_gtk_bin, GTK_TYPE_BIN)
+
+static void
+glade_instantiable_gtk_bin_init (GladeInstantiableGtkBin *bin)
+{
+}
+
+static void
+glade_instantiable_gtk_bin_class_init (GladeInstantiableGtkBinClass *class)
+{
+}
+
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index fea366f1..52964fba 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -628,7 +628,9 @@
<property id="child" disabled="True"/>
</properties>
</glade-widget-class>
-
+
+ <glade-widget-class name="GladeInstantiableGtkBin" generic-name="bin" _title="Bin" toplevel="True" />
+
<glade-widget-class name="GtkBox" generic-name="box" _title="Box">
<create-widget-function>glade_gtk_create_fixed_widget</create-widget-function>
<create-editable-function>glade_gtk_box_create_editable</create-editable-function>
@@ -5574,6 +5576,7 @@
</glade-widget-group>
<glade-widget-group name="gtk-containers" _title="Containers">
+ <glade-widget-class-ref name="GladeInstantiableGtkBin"/>
<glade-widget-class-ref name="GtkBox"/>
<glade-widget-class-ref name="GtkGrid"/>
<glade-widget-class-ref name="GtkNotebook"/>