Commit e0b4eb9c authored by Juan Pablo Ugarte's avatar Juan Pablo Ugarte

* gladeui/glade-widget-adaptor.[ch]:

   o Added support for reading internal children declaration in the catalog
   o Added GWA base class get_internal_child implementation using gtk_buildable_get_internal_child()
   o Create internal children as specified in catalog in glade_widget_adaptor_post_create()
     before calling deep_post_create() and post_create() methods
   o new API glade_widget_adaptor_has_internal_children()
     glade_widget_adaptor_get_internal_children()

 * gladeui/glade-widget.[ch]:
   o Made GladeWidget::reason property readable
   o Added new API glade_widget_find_child()

 * plugins/gtk+/glade-gtk-action-widgets.[ch]:
   o reworked code from GtkDialog support to read and write widget actions special tags
     found in GtkDialog and GtkInfoBar widgets

 * plugins/gtk+/glade-gtk-info-bar.c: support code for reading and writing GtkInfoBar special tags

 * plugins/gtk+/glade-gtk.c:
   o Removed GtkBox, GtkDialog, GtkComboBox and GtkTreeView unused get_internal_child functions
   o Removed creation of internal children of GtkDialog, GtkColorSelectionDialog,
     GtkFontSelectionDialog, GtkComboBox and GtkTreeView.
   o Implemented GtkDialog action-widgets tag support using common code.

 * plugins/gtk+/gtk+.xml.in:
   o Added support for GtkInfoBar widget.
   o Defined internal children of GtkDialog, GtkColorSelectionDialog,
     GtkFontSelectionDialog, GtkComboBox, GtkInfoBar and GtkTreeView.

 * gladeui/glade-xml-utils.h: Added GLADE_TAG_INTERNAL_CHILDREN and GLADE_TAG_ANARCHIST tags

 * plugins/glade-catalog.dtd: added new syntax to catalog description
parent 0fcf5ccc
......@@ -89,6 +89,7 @@ struct _GladeWidgetAdaptorPrivate
GList *child_packings; /* Default packing property values */
GList *actions; /* A list of GWActionClass */
GList *packing_actions; /* A list of GWActionClass for child objects */
GList *internal_children; /* A list of GladeInternalChild */
gchar *catalog; /* The name of the widget catalog this class
* was declared by.
*/
......@@ -116,6 +117,12 @@ struct _GladePackingDefault
gchar *value;
};
struct _GladeInternalChild
{
gchar *name;
gboolean anarchist;
GList *children;
};
enum
{
......@@ -133,6 +140,7 @@ enum
typedef struct _GladeChildPacking GladeChildPacking;
typedef struct _GladePackingDefault GladePackingDefault;
typedef struct _GladeInternalChild GladeInternalChild;
static GObjectClass *parent_class = NULL;
static GHashTable *adaptor_hash = NULL;
......@@ -277,6 +285,61 @@ glade_widget_adaptor_get_parent_adaptor (GladeWidgetAdaptor * adaptor)
return glade_widget_adaptor_get_parent_adaptor_by_type (adaptor->priv->type);
}
gboolean
glade_widget_adaptor_has_internal_children (GladeWidgetAdaptor *adaptor)
{
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), FALSE);
return adaptor->priv->internal_children != NULL;
}
static void
gwa_get_internal_children (GladeWidgetAdaptor *adaptor,
GObject *container,
GList **children,
GList *list)
{
GList *l;
for (l = list; l; l = g_list_next (l))
{
GladeInternalChild *internal = l->data;
GObject *child;
child = glade_widget_adaptor_get_internal_child (adaptor,
container,
internal->name);
if (child)
{
GtkWidget *parent;
/* Only return a widget if is not packed into a wrapped object */
if (GTK_IS_WIDGET (child) == FALSE ||
((parent = gtk_widget_get_parent (GTK_WIDGET (child))) &&
glade_widget_get_from_gobject (parent) == NULL))
*children = g_list_prepend (*children, child);
if (internal->children)
gwa_get_internal_children (adaptor, container, children, internal->children);
}
}
}
GList *
glade_widget_adaptor_get_internal_children (GladeWidgetAdaptor *adaptor,
GObject *container)
{
GList *children;
g_return_val_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor), NULL);
children = NULL;
gwa_get_internal_children (adaptor, container, &children, adaptor->priv->internal_children);
return children;
}
static gint
gwa_signal_comp (gpointer a, gpointer b)
{
......@@ -525,6 +588,36 @@ gwa_inherit_signals (GladeWidgetAdaptor * adaptor)
}
}
static GladeInternalChild *
gwa_internal_children_new (gchar *name, gboolean anarchist)
{
GladeInternalChild *data = g_slice_new0 (GladeInternalChild);
data->name = g_strdup (name);
data->anarchist = anarchist;
return data;
}
static GList *
gwa_internal_children_clone (GList *children)
{
GList *l, *retval = NULL;
for (l = children; l; l = g_list_next (l))
{
GladeInternalChild *data, *child = l->data;
data = gwa_internal_children_new (child->name, child->anarchist);
retval = g_list_prepend (retval, data);
if (child->children)
data->children = gwa_internal_children_clone (child->children);
}
return g_list_reverse (retval);
}
static GObject *
glade_widget_adaptor_constructor (GType type,
guint n_construct_properties,
......@@ -607,6 +700,10 @@ glade_widget_adaptor_constructor (GType type,
}
}
/* Copy parent internal children */
if (parent_adaptor && parent_adaptor->priv->internal_children)
adaptor->priv->internal_children = gwa_internal_children_clone (parent_adaptor->priv->internal_children);
return ret_obj;
}
......@@ -627,6 +724,32 @@ gwa_child_packing_free (GladeChildPacking * packing)
g_list_free (packing->packing_defaults);
}
static void
gwa_glade_internal_child_free (GladeInternalChild *child)
{
g_free (child->name);
if (child->children)
{
g_list_foreach (child->children, (GFunc) gwa_glade_internal_child_free, NULL);
g_list_free (child->children);
}
g_slice_free (GladeInternalChild, child);
}
static void
gwa_internal_children_free (GladeWidgetAdaptor *adaptor)
{
if (adaptor->priv->internal_children)
{
g_list_foreach (adaptor->priv->internal_children,
(GFunc) gwa_glade_internal_child_free, NULL);
g_list_free (adaptor->priv->internal_children);
adaptor->priv->internal_children = NULL;
}
}
static void
glade_widget_adaptor_finalize (GObject * object)
{
......@@ -686,6 +809,8 @@ glade_widget_adaptor_finalize (GObject * object)
g_list_free (adaptor->priv->packing_actions);
}
gwa_internal_children_free (adaptor);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
......@@ -809,6 +934,22 @@ glade_widget_adaptor_object_construct_object (GladeWidgetAdaptor * adaptor,
return g_object_newv (adaptor->priv->type, n_parameters, parameters);
}
static GObject *
glade_widget_adaptor_object_get_internal_child (GladeWidgetAdaptor *adaptor,
GObject *object,
const gchar *name)
{
static GtkBuilder *builder = NULL;
g_return_val_if_fail (GTK_IS_BUILDABLE (object), NULL);
/* Dummy object just in case the interface use it for something */
if (builder == NULL) builder = gtk_builder_new ();
return gtk_buildable_get_internal_child (GTK_BUILDABLE (object), builder, name);
}
static gboolean
glade_widget_adaptor_object_add_verify (GladeWidgetAdaptor *adaptor,
GObject *parent,
......@@ -1216,7 +1357,7 @@ glade_widget_adaptor_class_init (GladeWidgetAdaptorClass * adaptor_class)
glade_widget_adaptor_object_construct_object;
adaptor_class->deep_post_create = NULL;
adaptor_class->post_create = NULL;
adaptor_class->get_internal_child = NULL;
adaptor_class->get_internal_child = glade_widget_adaptor_object_get_internal_child;
adaptor_class->verify_property = NULL;
adaptor_class->set_property = glade_widget_adaptor_object_set_property;
adaptor_class->get_property = glade_widget_adaptor_object_get_property;
......@@ -2181,6 +2322,51 @@ gwa_set_signals_from_node (GladeWidgetAdaptor *adaptor,
}
}
static gint
gwa_internal_child_cmp (gconstpointer a, gconstpointer b)
{
const GladeInternalChild *da = a;
return strcmp (da->name, b);
}
static GList *
gwa_internal_children_update_from_node (GList *internal_children, GladeXmlNode *node)
{
GList *link, *retval = internal_children;
GladeXmlNode *child, *children;
for (child = glade_xml_node_get_children (node);
child; child = glade_xml_node_next (child))
{
GladeInternalChild *data;
gchar *name;
if (!glade_xml_node_verify (child, GLADE_XML_TAG_WIDGET))
continue;
if (!(name = glade_xml_get_property_string_required (child, GLADE_TAG_NAME, NULL)))
continue;
if ((link = g_list_find_custom (retval, name, gwa_internal_child_cmp)))
{
data = link->data;
}
else
{
gboolean anarchist = glade_xml_get_boolean (child, GLADE_TAG_ANARCHIST, FALSE);
data = gwa_internal_children_new (name, anarchist);
retval = g_list_prepend (retval, data);
}
if ((children = glade_xml_search_child (child, GLADE_TAG_INTERNAL_CHILDREN)))
data->children = gwa_internal_children_update_from_node (data->children, children);
g_free (name);
}
return retval;
}
static gboolean
gwa_extend_with_node (GladeWidgetAdaptor * adaptor,
GladeXmlNode * node,
......@@ -2218,6 +2404,9 @@ gwa_extend_with_node (GladeWidgetAdaptor * adaptor,
glade_xml_search_child (node, GLADE_TAG_PACKING_ACTIONS)) != NULL)
gwa_action_update_from_node (adaptor, TRUE, child, domain, NULL);
if ((child = glade_xml_search_child (node, GLADE_TAG_INTERNAL_CHILDREN)))
adaptor->priv->internal_children = gwa_internal_children_update_from_node (adaptor->priv->internal_children, child);
return TRUE;
}
......@@ -3034,6 +3223,41 @@ glade_widget_adaptor_construct_object (GladeWidgetAdaptor * adaptor,
parameters);
}
static void
gwa_internal_children_create (GladeWidgetAdaptor *adaptor,
GObject *parent_object,
GObject *object,
GList *children,
GladeCreateReason reason)
{
gchar *parent_name = adaptor->priv->generic_name;
GladeWidget *gobject = glade_widget_get_from_gobject (object);
GList *l;
for (l = children; l; l = g_list_next (l))
{
GladeInternalChild *internal = l->data;
GObject *child;
child = glade_widget_adaptor_get_internal_child (adaptor,
parent_object,
internal->name);
if (child)
{
glade_widget_adaptor_create_internal (gobject,
child,
internal->name,
parent_name,
internal->anarchist,
reason);
if (internal->children)
gwa_internal_children_create (adaptor, parent_object, child, internal->children, reason);
}
}
}
/**
* glade_widget_adaptor_post_create:
* @adaptor: A #GladeWidgetAdaptor
......@@ -3043,13 +3267,17 @@ glade_widget_adaptor_construct_object (GladeWidgetAdaptor * adaptor,
* An adaptor function to be called after the object is created
*/
void
glade_widget_adaptor_post_create (GladeWidgetAdaptor * adaptor,
GObject * object, GladeCreateReason reason)
glade_widget_adaptor_post_create (GladeWidgetAdaptor *adaptor,
GObject *object, GladeCreateReason reason)
{
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
g_return_if_fail (G_IS_OBJECT (object));
g_return_if_fail (g_type_is_a (G_OBJECT_TYPE (object), adaptor->priv->type));
/* Create internal widgets */
if (adaptor->priv->internal_children)
gwa_internal_children_create (adaptor, object, object, adaptor->priv->internal_children, reason);
/* Run post_create in 2 stages, one that chains up and all class adaptors
* in the hierarchy get a peek, another that is used to setup placeholders
* and things that differ from the child/parent implementations
......
......@@ -843,6 +843,9 @@ GladeSignalClass *glade_widget_adaptor_get_signal_class (GladeWidgetAdapto
const gchar *name);
GladeWidgetAdaptor *glade_widget_adaptor_get_parent_adaptor (GladeWidgetAdaptor *adaptor);
gboolean glade_widget_adaptor_has_internal_children (GladeWidgetAdaptor *adaptor);
GList *glade_widget_adaptor_get_internal_children (GladeWidgetAdaptor *adaptor,
GObject *container);
G_END_DECLS
#endif /* _GLADE_WIDGET_ADAPTOR_H_ */
......@@ -1142,6 +1142,9 @@ glade_widget_get_real_property (GObject * object,
case PROP_VISIBLE:
g_value_set_boolean (value, widget->priv->visible);
break;
case PROP_REASON:
g_value_set_int (value, widget->priv->construct_reason);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
......@@ -1274,7 +1277,7 @@ glade_widget_class_init (GladeWidgetClass * klass)
GLADE_CREATE_USER,
GLADE_CREATE_REASONS - 1,
GLADE_CREATE_USER,
G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE);
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE);
properties[PROP_TOPLEVEL_WIDTH] =
g_param_spec_int ("toplevel-width", _("Toplevel Width"),
......@@ -1473,10 +1476,7 @@ glade_widget_get_internal_child (GladeWidget * parent, const gchar * internal)
{
while (parent)
{
GladeWidgetAdaptorClass *adaptor_class =
GLADE_WIDGET_ADAPTOR_GET_CLASS (parent->priv->adaptor);
if (adaptor_class->get_internal_child)
if (glade_widget_adaptor_has_internal_children (parent->priv->adaptor))
return glade_widget_adaptor_get_internal_child
(parent->priv->adaptor, parent->priv->object, internal);
......@@ -3462,6 +3462,45 @@ glade_widget_set_parent (GladeWidget * widget, GladeWidget * parent)
g_object_notify_by_pspec (G_OBJECT (widget), properties[PROP_PARENT]);
}
/**
* glade_widget_find_child:
* @widget: A #GladeWidget
* @name: child name
*
* Finds a child widget named @name.
*
* Returns: The child of widget or NULL if it was not found.
*/
GladeWidget *
glade_widget_find_child (GladeWidget *widget, gchar *name)
{
GList *adapter_children;
GladeWidget *real_child = NULL;
GList *node;
g_return_val_if_fail (GLADE_IS_WIDGET (widget), NULL);
adapter_children =
glade_widget_adaptor_get_children (glade_widget_get_adaptor (widget),
widget->priv->object);
for (node = adapter_children; node && !real_child; node = g_list_next (node))
{
GladeWidget *child = glade_widget_get_from_gobject (node->data);
if (child)
{
if (strcmp (child->priv->name, name) == 0)
real_child = child;
else
real_child = glade_widget_find_child (child, name);
}
}
g_list_free (adapter_children);
return real_child;
}
/**
* glade_widget_get_children:
* @widget: A #GladeWidget
......
......@@ -384,6 +384,8 @@ void glade_widget_support_changed (GladeWidget *w
GtkTreeModel *glade_widget_get_signal_model (GladeWidget *widget);
GladeWidget *glade_widget_find_child (GladeWidget *widget,
gchar *name);
G_END_DECLS
......
......@@ -80,6 +80,8 @@ typedef struct _GladeProject GladeProject;
#define GLADE_TAG_BOOK "book"
#define GLADE_TAG_SIGNALS "signals"
#define GLADE_TAG_SIGNAL "signal"
#define GLADE_TAG_INTERNAL_CHILDREN "internal-children"
#define GLADE_TAG_ANARCHIST "anarchist"
#define GLADE_TAG_DEFAULT "default"
#define GLADE_TAG_PARENTLESS_WIDGET "parentless-widget"
#define GLADE_TAG_DISABLED "disabled"
......
......@@ -44,6 +44,8 @@ libgladegtk_la_SOURCES = \
glade-string-list.c \
glade-gtk-table.c \
glade-gtk-grid.c \
glade-gtk-action-widgets.c \
glade-gtk-info-bar.c \
glade-gtk-marshallers.c
libgladegtk_la_LDFLAGS = -module -avoid-version $(AM_LDFLAGS)
......
#define GLADE_TAG_ACTION_WIDGETS "action-widgets"
#define GLADE_TAG_ACTION_WIDGET "action-widget"
#define GLADE_TAG_RESPONSE "response"
/*
* glade-gtk-action-widgets.c
*
* Copyright (C) 2008 - 2010 Tristan Van Berkom
* 2011 Juan Pablo Ugarte
*
* Authors:
* Tristan Van Berkom <tvb@gnome.org>
* 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 "glade-gtk-action-widgets.h"
static GladeWidget *
glade_gtk_action_widgets_get_area (GladeWidget *widget, gchar *action_area)
{
GladeWidgetAdaptor *adaptor = glade_widget_get_adaptor (widget);
GObject *object;
object = glade_widget_adaptor_get_internal_child (adaptor,
glade_widget_get_object (widget),
action_area);
return (object) ? glade_widget_get_from_gobject (object) : NULL;
}
static void
glade_gtk_dialog_read_responses (GladeWidget * widget,
GladeXmlNode * widgets_node)
glade_gtk_action_widgets_read_responses (GladeWidget *widget,
GladeXmlNode *widgets_node,
gchar *action_container)
{
GladeWidget *action_widget, *action_area;
GladeXmlNode *node;
GladeWidget *action_widget;
if ((action_area = glade_gtk_action_widgets_get_area (widget, action_container)) == NULL)
{
g_warning ("%s: Could not find action widgets container [%s]", __func__, action_container);
return;
}
for (node = glade_xml_node_get_children (widgets_node);
node; node = glade_xml_node_next (node))
{
......@@ -23,13 +66,9 @@ glade_gtk_dialog_read_responses (GladeWidget * widget,
NULL);
widget_name = glade_xml_get_content (node);
if ((action_widget =
glade_project_get_widget_by_name (glade_widget_get_project (widget),
widget_name)) != NULL)
{
if ((action_widget = glade_widget_find_child (action_area, widget_name)))
glade_widget_property_set (action_widget, "response-id",
g_ascii_strtoll (response, NULL, 10));
}
g_free (response);
g_free (widget_name);
......@@ -37,32 +76,35 @@ glade_gtk_dialog_read_responses (GladeWidget * widget,
}
void
glade_gtk_dialog_read_child (GladeWidgetAdaptor * adaptor,
GladeWidget * widget, GladeXmlNode * node)
glade_gtk_action_widgets_read_child (GladeWidget *widget,
GladeXmlNode *node,
gchar *action_container)
{
GladeXmlNode *widgets_node;
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->read_child (adaptor, widget, node);
node = glade_xml_node_get_parent (node);
if ((widgets_node =
glade_xml_search_child (node, GLADE_TAG_ACTION_WIDGETS)) != NULL)
glade_gtk_dialog_read_responses (widget, widgets_node);
glade_gtk_action_widgets_read_responses (widget, widgets_node, action_container);
}
static void
glade_gtk_dialog_write_responses (GladeWidget * widget,
GladeXmlContext * context,
GladeXmlNode * node)
glade_gtk_action_widgets_write_responses (GladeWidget *widget,
GladeXmlContext *context,
GladeXmlNode *node,
gchar *action_container)
{
GladeXmlNode *widget_node;
GtkDialog *dialog = GTK_DIALOG (glade_widget_get_object (widget));
GList *l, *action_widgets =
gtk_container_get_children (GTK_CONTAINER
(gtk_dialog_get_action_area (dialog)));
GList *l, *action_widgets;
GladeWidget *action_area;
if ((action_area = glade_gtk_action_widgets_get_area (widget, action_container)) == NULL)
{
g_warning ("%s: Could not find action widgets container [%s]", __func__, action_container);
return;
}
action_widgets = glade_widget_get_children (action_area);
for (l = action_widgets; l; l = l->next)
{
GladeWidget *action_widget;
......@@ -93,29 +135,19 @@ glade_gtk_dialog_write_responses (GladeWidget * widget,
}
void
glade_gtk_dialog_write_child (GladeWidgetAdaptor * adaptor,
GladeWidget * widget,
GladeXmlContext * context, GladeXmlNode * node)
glade_gtk_action_widgets_write_child (GladeWidget *widget,
GladeXmlContext *context,
GladeXmlNode *node,
gchar *action_container)
{
GladeXmlNode *widgets_node;
GladeWidget *parent;
GladeProject *project;
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->write_child (adaptor, widget, context,
node);
parent = glade_widget_get_parent (widget);
project = glade_widget_get_project (widget);
widgets_node = glade_xml_node_new (context, GLADE_TAG_ACTION_WIDGETS);
if (parent && GTK_IS_DIALOG (glade_widget_get_object (parent)))
{
widgets_node = glade_xml_node_new (context, GLADE_TAG_ACTION_WIDGETS);
glade_gtk_dialog_write_responses (parent, context, widgets_node);
glade_gtk_action_widgets_write_responses (widget, context, widgets_node, action_container);
if (!glade_xml_node_get_children (widgets_node))
glade_xml_node_delete (widgets_node);
else
glade_xml_node_append_child (node, widgets_node);
}
if (!glade_xml_node_get_children (widgets_node))
glade_xml_node_delete (widgets_node);
else
glade_xml_node_append_child (node, widgets_node);
}
/*
* glade-gtk-action-widgets.h
*
* Copyright (C) 2011 Juan Pablo Ugarte.
*
* Author:
* 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.
*
*/
#ifndef __GLADE_GTK_ACTION_WIDGETS_H__
#define __GLADE_GTK_ACTION_WIDGETS_H__
#include <gladeui/glade.h>
G_BEGIN_DECLS
#define GLADE_TAG_ACTION_WIDGETS "action-widgets"
#define GLADE_TAG_ACTION_WIDGET "action-widget"
#define GLADE_TAG_RESPONSE "response"
void glade_gtk_action_widgets_read_child (GladeWidget *widget,
GladeXmlNode *node,
gchar *action_container);
void glade_gtk_action_widgets_write_child (GladeWidget *widget,
GladeXmlContext *context,
GladeXmlNode *node,
gchar *action_container);
G_END_DECLS
#endif /* __GLADE_GTK_ACTION_WIDGETS_H__ */
/*
* glade-gtk-info-bar.c
*
* Copyright (C) 2011 Juan Pablo Ugarte.
*
* Author:
* 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>
#include "glade-gtk-action-widgets.h"
void
glade_gtk_info_bar_read_child (GladeWidgetAdaptor *adaptor,
GladeWidget *widget,
GladeXmlNode *node)
{
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->read_child (adaptor, widget, node);
node = glade_xml_node_get_parent (node);
glade_gtk_action_widgets_read_child (widget, node, "action_area");
}
void
glade_gtk_info_bar_write_child (GladeWidgetAdaptor *adaptor,
GladeWidget *widget,
GladeXmlContext *context,
GladeXmlNode *node)
{
GladeWidget *parent = glade_widget_get_parent (widget);
GWA_GET_CLASS (GTK_TYPE_BOX)->write_child (adaptor, widget, context, node);
if (parent && GTK_IS_INFO_BAR (glade_widget_get_object (parent)))
glade_gtk_action_widgets_write_child (parent, context, node, "action_area");
}
......@@ -43,6 +43,7 @@
#include "glade-tool-item-group-editor.h"
#include "glade-string-list.h"
#include "glade-fixed.h"
#include "glade-gtk-action-widgets.h"
#include <gladeui/glade-editor-property.h>
#include <gladeui/glade-base-editor.h>
......@@ -1052,8 +1053,6 @@ glade_gtk_widget_action_submenu (GladeWidgetAdaptor * adaptor,
return NULL;
}
/* ----------------------------- GtkContainer ------------------------------ */
void
glade_gtk_container_post_create (GladeWidgetAdaptor * adaptor,
......@@ -1234,10 +1233,15 @@ glade_gtk_container_get_child_property (GladeWidgetAdaptor * adaptor,
}