[glade] * plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Added add-verify-function to allow treevie
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glade] * plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Added add-verify-function to allow treevie
- Date: Sun, 6 Mar 2011 19:43:39 +0000 (UTC)
commit c84af8733c49b3dec3ffcc39908cd7f0b29f572e
Author: Tristan Van Berkom <tristan van berkom gmail com>
Date: Sun Mar 6 16:12:22 2011 +0900
* plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Added add-verify-function
to allow treeview columns to be added to treeviews again.
ChangeLog | 21 +++++++++++++--------
plugins/gtk+/glade-gtk.c | 26 ++++++++++++++++++++++++++
plugins/gtk+/gtk+.xml.in | 1 +
3 files changed, 40 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 39ba8d9..4097f4a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,16 +1,21 @@
+2011-03-06 Tristan Van Berkom <tristanvb openismus com>
+
+ * plugins/gtk+/gtk+.xml.in, plugins/gtk+/glade-gtk.c: Added add-verify-function
+ to allow treeview columns to be added to treeviews again.
+
2011-03-02 Juan Pablo Ugarte <juanpablougarte gmail com>
- * gladeui/glade-design-layout.c:
- o removed double click toplevel maximize feature
- o replaced GDK_FLEUR cursor with GDK_BOTTOM_RIGHT_CORNER for resize action
+ * gladeui/glade-design-layout.c:
+ o removed double click toplevel maximize feature
+ o replaced GDK_FLEUR cursor with GDK_BOTTOM_RIGHT_CORNER for resize action
- * gladeui/glade-design-view.c: make layout_box GTK_ALIGN_START to fix toplevel alignment
+ * gladeui/glade-design-view.c: make layout_box GTK_ALIGN_START to fix toplevel alignment
- * configure.ac, doc/gladepython.sgml, plugins/python/Makefile.am, plugins/python/glade-python.c:
- Applied patch by Craig Keogh to fix bug #626225
- "Migrate from PyGTK to PyGObject introspection-based bindings"
+ * configure.ac, doc/gladepython.sgml, plugins/python/Makefile.am, plugins/python/glade-python.c:
+ Applied patch by Craig Keogh to fix bug #626225
+ "Migrate from PyGTK to PyGObject introspection-based bindings"
-2011-02-01 Marco Diego Aurélio Mesquita <marcodiegomesquita gmail com>
+2010-02-01 Marco Diego Aurélio Mesquita <marcodiegomesquita gmail com>
* gladeui/glade-previewer.c: Initialize core library so that plugin types can be previewed.
diff --git a/plugins/gtk+/glade-gtk.c b/plugins/gtk+/glade-gtk.c
index 5bd5011..64a6e9f 100644
--- a/plugins/gtk+/glade-gtk.c
+++ b/plugins/gtk+/glade-gtk.c
@@ -10664,6 +10664,32 @@ glade_gtk_treeview_post_create (GladeWidgetAdaptor *adaptor,
"selection", "treeview", FALSE, reason);
}
+gboolean
+glade_gtk_treeview_add_verify (GladeWidgetAdaptor *adaptor,
+ GtkWidget *container,
+ GtkWidget *child,
+ gboolean user_feedback)
+{
+ if (!GTK_IS_TREE_VIEW_COLUMN (child))
+ {
+ if (user_feedback)
+ {
+ GladeWidgetAdaptor *cell_adaptor =
+ glade_widget_adaptor_get_by_type (GTK_TYPE_TREE_VIEW_COLUMN);
+
+ glade_util_ui_message (glade_app_get_window (),
+ GLADE_UI_INFO, NULL,
+ _("Only a %s can be added to a %s."),
+ glade_widget_adaptor_get_title (cell_adaptor),
+ glade_widget_adaptor_get_title (adaptor));
+ }
+
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
static void
glade_gtk_treeview_launch_editor (GObject * treeview)
{
diff --git a/plugins/gtk+/gtk+.xml.in b/plugins/gtk+/gtk+.xml.in
index 93453ae..e13cf02 100644
--- a/plugins/gtk+/gtk+.xml.in
+++ b/plugins/gtk+/gtk+.xml.in
@@ -2190,6 +2190,7 @@ embedded in another object</_tooltip>
<glade-widget-class name="GtkTreeView" generic-name="treeview" _title="Tree View">
<post-create-function>glade_gtk_treeview_post_create</post-create-function>
+ <add-child-verify-function>glade_gtk_treeview_add_verify</add-child-verify-function>
<child-set-property-function>glade_gtk_treeview_set_child_property</child-set-property-function>
<child-get-property-function>glade_gtk_treeview_get_child_property</child-get-property-function>
<get-children-function>glade_gtk_treeview_get_children</get-children-function>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]