[glade] GladeGladePropertyShell: Give the shell a label in the UI while editing.



commit fca1c3f491f80454f286d2ef05e3f9f388220579
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date:   Sun Apr 14 21:20:58 2013 +0900

    GladeGladePropertyShell: Give the shell a label in the UI while editing.
    
    Makes designing a property editor more comfortable.

 plugins/gladeui/Makefile.am                  |  4 +++-
 plugins/gladeui/glade-glade-property-shell.c | 36 ++++++++++++++++++++++++++++
 plugins/gladeui/gladeui.xml                  |  1 +
 3 files changed, 40 insertions(+), 1 deletion(-)
---
diff --git a/plugins/gladeui/Makefile.am b/plugins/gladeui/Makefile.am
index 4705e2f..51853d2 100644
--- a/plugins/gladeui/Makefile.am
+++ b/plugins/gladeui/Makefile.am
@@ -17,7 +17,9 @@ libgladeglade_la_CPPFLAGS =   \
 libgladeglade_la_CFLAGS      = $(AM_CFLAGS)
 libgladeglade_la_LDFLAGS     = -module -avoid-version $(AM_LDFLAGS)
 libgladeglade_la_LIBADD      = $(libgladeui) $(GTK_LIBS)
-libgladeglade_la_SOURCES     = glade-glade-editor-skeleton.c
+libgladeglade_la_SOURCES     =                 \
+       glade-glade-editor-skeleton.c   \
+       glade-glade-property-shell.c
 
 catalogsdir = $(pkgdatadir)/catalogs
 
diff --git a/plugins/gladeui/glade-glade-property-shell.c b/plugins/gladeui/glade-glade-property-shell.c
new file mode 100644
index 0000000..20c718f
--- /dev/null
+++ b/plugins/gladeui/glade-glade-property-shell.c
@@ -0,0 +1,36 @@
+/*
+ * glade-glade-property-shell.c
+ *
+ * Copyright (C) 2013 Tristan Van Berkom.
+ *
+ * Author:
+ *   Tristan Van Berkom <tvb gnome org>
+ *
+ * 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>
+
+void
+glade_glade_property_shell_post_create (GladeWidgetAdaptor *adaptor,
+                                       GObject            *object,
+                                       GladeCreateReason   reason)
+{
+  gtk_container_add (GTK_CONTAINER (object),
+                    gtk_label_new ("[ editor ]"));
+}
+
diff --git a/plugins/gladeui/gladeui.xml b/plugins/gladeui/gladeui.xml
index edb7e9c..de1d264 100644
--- a/plugins/gladeui/gladeui.xml
+++ b/plugins/gladeui/gladeui.xml
@@ -48,6 +48,7 @@
 
     <glade-widget-class name="GladePropertyShell" generic-name="propertyshell"
                        title="Property Shell" icon-name="widget-gtk-entry" use-placeholders="False">
+      <post-create-function>glade_glade_property_shell_post_create</post-create-function>
       <properties>
        <property id="editor-type" name="Editor Type" ignore="True"/>
        <property id="orientation" disabled="True"/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]