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

GladeWidgetAdaptor: fix gir scanner warnings

Rename all macros starting with GWA to GLADE_WIDGET_ADAPTOR
parent 265367dd
......@@ -316,7 +316,7 @@ treemodelfilter_visible_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer d
catalog = glade_widget_adaptor_get_catalog (adaptor);
glade_project_get_target_version (priv->project, catalog, &major, &minor);
visible = GWA_VERSION_CHECK (adaptor, major, minor);
visible = GLADE_WIDGET_ADAPTOR_VERSION_CHECK (adaptor, major, minor);
}
if (visible && priv->flags)
......@@ -325,13 +325,13 @@ treemodelfilter_visible_func (GtkTreeModel *model, GtkTreeIter *iter, gpointer d
_GladeAdaptorChooserWidgetFlags flags = priv->flags;
/* Skip adaptors according to flags */
if (flags & GLADE_ADAPTOR_CHOOSER_WIDGET_SKIP_DEPRECATED && GWA_DEPRECATED (adaptor))
if (flags & GLADE_ADAPTOR_CHOOSER_WIDGET_SKIP_DEPRECATED && GLADE_WIDGET_ADAPTOR_DEPRECATED (adaptor))
visible = FALSE;
else if (flags & GLADE_ADAPTOR_CHOOSER_WIDGET_SKIP_TOPLEVEL && GWA_IS_TOPLEVEL (adaptor))
else if (flags & GLADE_ADAPTOR_CHOOSER_WIDGET_SKIP_TOPLEVEL && GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (adaptor))
visible = FALSE;
else if (flags & GLADE_ADAPTOR_CHOOSER_WIDGET_WIDGET && !g_type_is_a (type, GTK_TYPE_WIDGET))
visible = FALSE;
else if (flags & GLADE_ADAPTOR_CHOOSER_WIDGET_TOPLEVEL && !GWA_IS_TOPLEVEL (adaptor))
else if (flags & GLADE_ADAPTOR_CHOOSER_WIDGET_TOPLEVEL && !GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (adaptor))
visible = FALSE;
}
......
......@@ -126,7 +126,7 @@ on_adaptor_selected (GtkWidget *widget,
GladeAdaptorChooserPrivate *priv = GET_PRIVATE (chooser);
/* Auto-create toplevel types */
if (GWA_IS_TOPLEVEL (adaptor))
if (GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (adaptor))
{
glade_command_create (adaptor, NULL, NULL, priv->project);
}
......
......@@ -1216,7 +1216,7 @@ glade_command_add (GList *widgets,
widget = GLADE_WIDGET (widgets->data);
adaptor = glade_widget_get_adaptor (widget);
if (placeholder && GWA_IS_TOPLEVEL (adaptor) == FALSE)
if (placeholder && GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (adaptor) == FALSE)
priv->project = glade_placeholder_get_project (placeholder);
else
priv->project = project;
......@@ -1245,7 +1245,7 @@ glade_command_add (GList *widgets,
/* Parent */
if (parent == NULL)
cdata->parent = glade_widget_get_parent (widget);
else if (placeholder && GWA_IS_TOPLEVEL (adaptor) == FALSE)
else if (placeholder && GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (adaptor) == FALSE)
cdata->parent = glade_placeholder_get_parent (placeholder);
else
cdata->parent = parent;
......
......@@ -2952,7 +2952,7 @@ glade_eprop_object_populate_view_real (GtkTreeStore *model,
widget_name = glade_widget_get_display_name (widget);
if (parentless)
good_type = good_type && !GWA_IS_TOPLEVEL (adaptor);
good_type = good_type && !GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (adaptor);
if (good_type || has_decendant)
{
......
......@@ -243,7 +243,7 @@ palette_item_toggled_cb (GtkToggleToolButton *button, GladePalette *palette)
return;
/* Auto-create toplevel types */
if (GWA_IS_TOPLEVEL (adaptor))
if (GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (adaptor))
{
glade_command_create (adaptor, NULL, NULL, priv->project);
......
......@@ -505,7 +505,7 @@ glade_placeholder_drag_can_drop (_GladeDrag *dest, gint x, gint y, GObject *data
{
GType otype = glade_widget_adaptor_get_object_type (GLADE_WIDGET_ADAPTOR (data));
if (g_type_is_a (otype, GTK_TYPE_WIDGET) && !GWA_IS_TOPLEVEL (data))
if (g_type_is_a (otype, GTK_TYPE_WIDGET) && !GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (data))
return TRUE;
}
else if (GTK_IS_WIDGET (data))
......
......@@ -1841,10 +1841,10 @@ glade_project_introspect_gtk_version (GladeProject *project)
/* Check widget class version */
if (is_gtk_adaptor &&
!GWA_VERSION_CHECK (glade_widget_get_adaptor (widget), target_major, target_minor))
!GLADE_WIDGET_ADAPTOR_VERSION_CHECK (glade_widget_get_adaptor (widget), target_major, target_minor))
{
target_major = GWA_VERSION_SINCE_MAJOR (glade_widget_get_adaptor (widget));
target_minor = GWA_VERSION_SINCE_MINOR (glade_widget_get_adaptor (widget));
target_major = GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MAJOR (glade_widget_get_adaptor (widget));
target_minor = GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MINOR (glade_widget_get_adaptor (widget));
}
/* Check all properties */
......@@ -3569,7 +3569,7 @@ glade_project_verify_adaptor (GladeProject *project,
/* Only one versioning message (builder or otherwise)...
*/
if ((flags & GLADE_VERIFY_VERSIONS) != 0 &&
!GWA_VERSION_CHECK (adaptor_iter, target_major, target_minor))
!GLADE_WIDGET_ADAPTOR_VERSION_CHECK (adaptor_iter, target_major, target_minor))
{
GLADE_NOTE (VERIFY, g_print ("VERIFY: Adaptor '%s' not available in version %d.%d\n",
glade_widget_adaptor_get_name (adaptor_iter),
......@@ -3579,8 +3579,8 @@ glade_project_verify_adaptor (GladeProject *project,
g_string_append_printf (string,
WIDGET_VERSION_CONFLICT_MSGFMT,
catalog,
GWA_VERSION_SINCE_MAJOR (adaptor_iter),
GWA_VERSION_SINCE_MINOR (adaptor_iter),
GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MAJOR (adaptor_iter),
GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MINOR (adaptor_iter),
catalog, target_major, target_minor);
else
g_string_append_printf (string,
......@@ -3588,15 +3588,15 @@ glade_project_verify_adaptor (GladeProject *project,
path_name,
glade_widget_adaptor_get_title (adaptor_iter),
catalog,
GWA_VERSION_SINCE_MAJOR (adaptor_iter),
GWA_VERSION_SINCE_MINOR (adaptor_iter));
GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MAJOR (adaptor_iter),
GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MINOR (adaptor_iter));
support_mask |= GLADE_SUPPORT_MISMATCH;
}
if ((flags & GLADE_VERIFY_DEPRECATIONS) != 0 &&
(GWA_DEPRECATED (adaptor_iter) ||
GWA_DEPRECATED_SINCE_CHECK (adaptor_iter, target_major, target_minor)))
(GLADE_WIDGET_ADAPTOR_DEPRECATED (adaptor_iter) ||
GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_CHECK (adaptor_iter, target_major, target_minor)))
{
GLADE_NOTE (VERIFY, g_print ("VERIFY: Adaptor '%s' is deprecated\n",
glade_widget_adaptor_get_name (adaptor_iter)));
......@@ -5383,7 +5383,7 @@ glade_project_command_paste (GladeProject *project,
/* Ignore parent argument if we are pasting a toplevel
*/
if (g_list_length (glade_clipboard_widgets (clipboard)) == 1 &&
widget && GWA_IS_TOPLEVEL (glade_widget_get_adaptor (widget)))
widget && GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (glade_widget_get_adaptor (widget)))
parent = NULL;
/* Check if parent is actually a container of any sort */
......@@ -5435,7 +5435,7 @@ glade_project_command_paste (GladeProject *project,
{
widget = list->data;
if (!GWA_IS_TOPLEVEL (glade_widget_get_adaptor (widget)) && parent)
if (!GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (glade_widget_get_adaptor (widget)) && parent)
{
/* Count placeholder relations
*/
......@@ -5452,7 +5452,7 @@ glade_project_command_paste (GladeProject *project,
* XXX: Not sure if this has to be true.
*/
if (GTK_IS_WIDGET (glade_widget_get_object (widget)) &&
parent && !GWA_USE_PLACEHOLDERS (glade_widget_get_adaptor (parent)) &&
parent && !GLADE_WIDGET_ADAPTOR_USE_PLACEHOLDERS (glade_widget_get_adaptor (parent)) &&
g_list_length (glade_clipboard_widgets (clipboard)) != 1)
{
glade_util_ui_message (glade_app_get_window (),
......@@ -5464,7 +5464,7 @@ glade_project_command_paste (GladeProject *project,
/* Check that enough placeholders are available */
if (parent &&
GWA_USE_PLACEHOLDERS (glade_widget_get_adaptor (parent)) &&
GLADE_WIDGET_ADAPTOR_USE_PLACEHOLDERS (glade_widget_get_adaptor (parent)) &&
glade_util_count_placeholders (parent) < placeholder_relations)
{
glade_util_ui_message (glade_app_get_window (),
......
......@@ -236,9 +236,9 @@ glade_property_def_new (GladeWidgetAdaptor *adaptor,
property_def->create_type = NULL;
/* Initialize property versions & deprecated to adaptor */
property_def->version_since_major = GWA_VERSION_SINCE_MAJOR (adaptor);
property_def->version_since_minor = GWA_VERSION_SINCE_MINOR (adaptor);
property_def->deprecated = GWA_DEPRECATED (adaptor);
property_def->version_since_major = GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MAJOR (adaptor);
property_def->version_since_minor = GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MINOR (adaptor);
property_def->deprecated = GLADE_WIDGET_ADAPTOR_DEPRECATED (adaptor);
return property_def;
}
......
......@@ -81,9 +81,9 @@ glade_signal_def_new (GladeWidgetAdaptor *adaptor,
def->type = g_type_name (for_type);
/* Initialize signal versions & deprecated to adaptor version */
def->version_since_major = GWA_VERSION_SINCE_MAJOR (adaptor);
def->version_since_minor = GWA_VERSION_SINCE_MINOR (adaptor);
def->deprecated = GWA_DEPRECATED (adaptor);
def->version_since_major = GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MAJOR (adaptor);
def->version_since_minor = GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MINOR (adaptor);
def->deprecated = GLADE_WIDGET_ADAPTOR_DEPRECATED (adaptor);
return def;
}
......
......@@ -299,7 +299,7 @@ glade_util_check_and_warn_scrollable (GladeWidget *parent,
GtkWidget *parent_widget)
{
if (GTK_IS_SCROLLED_WINDOW (glade_widget_get_object (parent)) &&
GWA_SCROLLABLE_WIDGET (child_adaptor) == FALSE)
GLADE_WIDGET_ADAPTOR_SCROLLABLE_WIDGET (child_adaptor) == FALSE)
{
GladeWidgetAdaptor *vadaptor =
glade_widget_adaptor_get_by_type (GTK_TYPE_VIEWPORT);
......
......@@ -2989,7 +2989,7 @@ glade_widget_adaptor_from_catalog (GladeCatalog *catalog,
glade_catalog_get_domain (catalog));
/* Finalize the icon and overlay it if it's deprecated */
if (GWA_DEPRECATED (adaptor))
if (GLADE_WIDGET_ADAPTOR_DEPRECATED (adaptor))
{
gchar *deprecated_icon = generate_deprecated_icon (priv->icon_name);
......
......@@ -17,34 +17,34 @@ G_BEGIN_DECLS
G_DECLARE_DERIVABLE_TYPE (GladeWidgetAdaptor, glade_widget_adaptor, GLADE, WIDGET_ADAPTOR, GObject)
/**
* GWA_DEPRECATED:
* GLADE_WIDGET_ADAPTOR_DEPRECATED:
* @obj: A #GladeWidgetAdaptor
*
* Checks whether this widget class is marked as deprecated
*/
#define GWA_DEPRECATED(obj) \
#define GLADE_WIDGET_ADAPTOR_DEPRECATED(obj) \
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->deprecated : FALSE)
/**
* GWA_VERSION_SINCE_MAJOR:
* GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MAJOR:
* @obj: A #GladeWidgetAdaptor
*
* Checks major version in which this widget was introduced
*/
#define GWA_VERSION_SINCE_MAJOR(obj) \
#define GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MAJOR(obj) \
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->version_since_major : 0)
/**
* GWA_VERSION_SINCE_MINOR:
* GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MINOR:
* @obj: A #GladeWidgetAdaptor
*
* Checks minor version in which this widget was introduced
*/
#define GWA_VERSION_SINCE_MINOR(obj) \
#define GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MINOR(obj) \
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->version_since_minor : 0)
/**
* GWA_VERSION_CHECK:
* GLADE_WIDGET_ADAPTOR_VERSION_CHECK:
* @adaptor: A #GladeWidgetAdaptor
* @major_version: The major version to check
* @minor_version: The minor version to check
......@@ -52,31 +52,31 @@ G_DECLARE_DERIVABLE_TYPE (GladeWidgetAdaptor, glade_widget_adaptor, GLADE, WIDGE
* Evaluates to %TRUE if @adaptor is available in its owning library version-@major_verion.@minor_version.
*
*/
#define GWA_VERSION_CHECK(adaptor, major_version, minor_version) \
((GWA_VERSION_SINCE_MAJOR (adaptor) == major_version) ? \
(GWA_VERSION_SINCE_MINOR (adaptor) <= minor_version) : \
(GWA_VERSION_SINCE_MAJOR (adaptor) <= major_version))
#define GLADE_WIDGET_ADAPTOR_VERSION_CHECK(adaptor, major_version, minor_version) \
((GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MAJOR (adaptor) == major_version) ? \
(GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MINOR (adaptor) <= minor_version) : \
(GLADE_WIDGET_ADAPTOR_VERSION_SINCE_MAJOR (adaptor) <= major_version))
/**
* GWA_DEPRECATED_SINCE_MAJOR:
* GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_MAJOR:
* @obj: A #GladeWidgetAdaptor
*
* Checks major version in which this widget was deprecated
*/
#define GWA_DEPRECATED_SINCE_MAJOR(obj) \
#define GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_MAJOR(obj) \
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->deprecated_since_major : 0)
/**
* GWA_DEPRECATED_SINCE_MINOR:
* GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_MINOR:
* @obj: A #GladeWidgetAdaptor
*
* Checks minor version in which this widget was deprecated
*/
#define GWA_DEPRECATED_SINCE_MINOR(obj) \
#define GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_MINOR(obj) \
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->deprecated_since_minor : 0)
/**
* GWA_DEPRECATED_SINCE_CHECK:
* GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_CHECK:
* @adaptor: A #GladeWidgetAdaptor
* @major_version: The major version to check
* @minor_version: The minor version to check
......@@ -84,87 +84,87 @@ G_DECLARE_DERIVABLE_TYPE (GladeWidgetAdaptor, glade_widget_adaptor, GLADE, WIDGE
* Evaluates to %TRUE if @adaptor is deprecated in its owning library version-@major_verion.@minor_version.
*
*/
#define GWA_DEPRECATED_SINCE_CHECK(adaptor, major_version, minor_version) \
((GWA_DEPRECATED_SINCE_MAJOR (adaptor) || GWA_DEPRECATED_SINCE_MINOR (adaptor)) ? \
((GWA_DEPRECATED_SINCE_MAJOR (adaptor) == major_version) ? \
(GWA_DEPRECATED_SINCE_MINOR (adaptor) <= minor_version) : \
(GWA_DEPRECATED_SINCE_MAJOR (adaptor) <= major_version)) : \
#define GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_CHECK(adaptor, major_version, minor_version) \
((GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_MAJOR (adaptor) || GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_MINOR (adaptor)) ? \
((GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_MAJOR (adaptor) == major_version) ? \
(GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_MINOR (adaptor) <= minor_version) : \
(GLADE_WIDGET_ADAPTOR_DEPRECATED_SINCE_MAJOR (adaptor) <= major_version)) : \
FALSE)
/**
* GWA_IS_TOPLEVEL:
* GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL:
* @obj: A #GladeWidgetAdaptor
*
* Checks whether this widget class has been marked as
* a toplevel one.
*/
#define GWA_IS_TOPLEVEL(obj) \
#define GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL(obj) \
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->toplevel : FALSE)
/**
* GWA_USE_PLACEHOLDERS:
* GLADE_WIDGET_ADAPTOR_USE_PLACEHOLDERS:
* @obj: A #GladeWidgetAdaptor
*
* Checks whether this widget class has been marked to
* use placeholders in child widget operations
*/
#define GWA_USE_PLACEHOLDERS(obj) \
#define GLADE_WIDGET_ADAPTOR_USE_PLACEHOLDERS(obj) \
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->use_placeholders : FALSE)
/**
* GWA_DEFAULT_WIDTH:
* GLADE_WIDGET_ADAPTOR_DEFAULT_WIDTH:
* @obj: A #GladeWidgetAdaptor
*
* Returns: the default width to be used when this widget
* is toplevel in the GladeDesignLayout
*/
#define GWA_DEFAULT_WIDTH(obj) \
#define GLADE_WIDGET_ADAPTOR_DEFAULT_WIDTH(obj) \
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->default_width : -1)
/**
* GWA_DEFAULT_HEIGHT:
* GLADE_WIDGET_ADAPTOR_DEFAULT_HEIGHT:
* @obj: A #GladeWidgetAdaptor
*
* Returns: the default width to be used when this widget
* is toplevel in the GladeDesignLayout
*/
#define GWA_DEFAULT_HEIGHT(obj) \
#define GLADE_WIDGET_ADAPTOR_DEFAULT_HEIGHT(obj) \
((obj) ? GLADE_WIDGET_ADAPTOR_GET_CLASS(obj)->default_height : -1)
/**
* GWA_SCROLLABLE_WIDGET:
* GLADE_WIDGET_ADAPTOR_SCROLLABLE_WIDGET:
* @obj: A #GladeWidgetAdaptor
*
* Checks whether this is a GtkWidgetClass with scrolling capabilities.
*/
#define GWA_SCROLLABLE_WIDGET(obj) \
#define GLADE_WIDGET_ADAPTOR_SCROLLABLE_WIDGET(obj) \
((obj) ? \
g_type_is_a (glade_widget_adaptor_get_object_type \
(GLADE_WIDGET_ADAPTOR (obj)), \
GTK_TYPE_SCROLLABLE) : FALSE)
/**
* GWA_GET_CLASS:
* GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS:
* @type: A #GType
*
* Shorthand for referencing glade adaptor classes from
* the plugin eg. GWA_GET_CLASS (GTK_TYPE_CONTAINER)->post_create (adaptor...
* the plugin eg. GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->post_create (adaptor...
*/
#define GWA_GET_CLASS(type) \
#define GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS(type) \
(((type) == G_TYPE_OBJECT) ? \
(GladeWidgetAdaptorClass *)g_type_class_peek (GLADE_TYPE_WIDGET_ADAPTOR) : \
GLADE_WIDGET_ADAPTOR_GET_CLASS (glade_widget_adaptor_get_by_type(type)))
/**
* GWA_GET_OCLASS:
* GLADE_WIDGET_ADAPTOR_GET_OCLASS:
* @type: A #GType.
*
* Same as GWA_GET_CLASS but casted to GObjectClass
* Same as GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS but casted to GObjectClass
*/
#define GWA_GET_OCLASS(type) ((GObjectClass*)GWA_GET_CLASS(type))
#define GLADE_WIDGET_ADAPTOR_GET_OCLASS(type) ((GObjectClass*)GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS(type))
#define GLADE_VALID_CREATE_REASON(reason) (reason >= 0 && reason < GLADE_CREATE_REASONS)
......
......@@ -911,8 +911,8 @@ glade_widget_constructor (GType type,
}
/* Setup width/height */
gwidget->priv->width = GWA_DEFAULT_WIDTH (gwidget->priv->adaptor);
gwidget->priv->height = GWA_DEFAULT_HEIGHT (gwidget->priv->adaptor);
gwidget->priv->width = GLADE_WIDGET_ADAPTOR_DEFAULT_WIDTH (gwidget->priv->adaptor);
gwidget->priv->height = GLADE_WIDGET_ADAPTOR_DEFAULT_HEIGHT (gwidget->priv->adaptor);
/* Introspect object properties before passing it to post_create,
* but only when its freshly created (depend on glade file at
......@@ -1257,7 +1257,7 @@ glade_widget_drag_can_drop (_GladeDrag *dest, gint x, gint y, GObject *data)
{
GType otype = glade_widget_adaptor_get_object_type (GLADE_WIDGET_ADAPTOR (data));
if (g_type_is_a (otype, GTK_TYPE_WIDGET) && !GWA_IS_TOPLEVEL (data))
if (g_type_is_a (otype, GTK_TYPE_WIDGET) && !GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (data))
return TRUE;
}
else
......@@ -1764,7 +1764,7 @@ glade_widget_dup_internal (GladeWidget *main_target,
for (l = gwidget->priv->properties; l; l = l->next)
glade_property_load (GLADE_PROPERTY (l->data));
if (GWA_IS_TOPLEVEL (gwidget->priv->adaptor) && GTK_IS_WIDGET (gwidget->priv->object))
if (GLADE_WIDGET_ADAPTOR_IS_TOPLEVEL (gwidget->priv->adaptor) && GTK_IS_WIDGET (gwidget->priv->object))
g_object_set (gwidget,
"toplevel-width", template_widget->priv->width,
"toplevel-height", template_widget->priv->height, NULL);
......@@ -4588,7 +4588,7 @@ glade_widget_placeholder_relation (GladeWidget *parent, GladeWidget *widget)
return (GTK_IS_CONTAINER (parent->priv->object) &&
GTK_IS_WIDGET (widget->priv->object) &&
GWA_USE_PLACEHOLDERS (parent->priv->adaptor));
GLADE_WIDGET_ADAPTOR_USE_PLACEHOLDERS (parent->priv->adaptor));
}
static GladeWidgetAction *
......
......@@ -37,7 +37,7 @@ glade_glade_editor_skeleton_read_widget (GladeWidgetAdaptor *adaptor,
GladeProperty *property;
gchar *string = NULL;
GWA_GET_CLASS (GTK_TYPE_BOX)->read_widget (adaptor, widget, node);
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_BOX)->read_widget (adaptor, widget, node);
if ((editors_node =
glade_xml_search_child (node, GLADE_TAG_SKELETON_EDITORS)) != NULL)
......@@ -91,7 +91,7 @@ glade_glade_editor_skeleton_write_widget_after (GladeWidgetAdaptor *adaptor,
GList *editors = NULL, *list;
GladeWidget *awidget;
GWA_GET_CLASS (GTK_TYPE_BOX)->write_widget_after (adaptor, widget, context, node);
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_BOX)->write_widget_after (adaptor, widget, context, node);
widgets_node = glade_xml_node_new (context, GLADE_TAG_SKELETON_EDITORS);
......
......@@ -970,7 +970,7 @@ glade_fixed_event (GladeWidget *gwidget_fixed, GdkEvent *event)
}
/* If the container uses placeholder adding widget is already taken care of */
if (GWA_USE_PLACEHOLDERS (glade_widget_get_adaptor (gwidget_fixed)))
if (GLADE_WIDGET_ADAPTOR_USE_PLACEHOLDERS (glade_widget_get_adaptor (gwidget_fixed)))
return FALSE;
switch (event->type)
......
......@@ -64,7 +64,7 @@ glade_gtk_about_dialog_construct_object (GladeWidgetAdaptor *adaptor,
g_value_set_int (&use_header->value, 0);
}
retval = GWA_GET_CLASS (GTK_TYPE_DIALOG)->construct_object (adaptor, n_parameters, new_params);
retval = GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_DIALOG)->construct_object (adaptor, n_parameters, new_params);
g_free (new_params);
return retval;
}
......@@ -80,7 +80,7 @@ glade_gtk_about_dialog_read_widget (GladeWidgetAdaptor *adaptor,
return;
/* First chain up and read in all the normal properties.. */
GWA_GET_CLASS (GTK_TYPE_WIDGET)->read_widget (adaptor, widget, node);
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_WIDGET)->read_widget (adaptor, widget, node);
/* Sync the logo icon mode */
if (glade_widget_property_original_default (widget, "logo") == FALSE)
......@@ -109,5 +109,5 @@ glade_gtk_about_dialog_set_property (GladeWidgetAdaptor *adaptor,
glade_property_set_enabled (logo, as_file);
}
else
GWA_GET_CLASS (GTK_TYPE_DIALOG)->set_property (adaptor, object, id, value);
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_DIALOG)->set_property (adaptor, object, id, value);
}
......@@ -39,7 +39,7 @@ glade_gtk_action_bar_create_editable (GladeWidgetAdaptor * adaptor,
if (type == GLADE_PAGE_GENERAL)
return (GladeEditable *) glade_action_bar_editor_new ();
return GWA_GET_CLASS (GTK_TYPE_CONTAINER)->create_editable (adaptor, type);
return GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->create_editable (adaptor, type);
}
static void
......@@ -107,7 +107,7 @@ glade_gtk_action_bar_get_children (GladeWidgetAdaptor * adaptor,
{
GList *children;
children = GWA_GET_CLASS (GTK_TYPE_CONTAINER)->get_children (adaptor, container);
children = GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->get_children (adaptor, container);
return g_list_sort_with_data (children, (GCompareDataFunc) sort_children, container);
}
......@@ -176,7 +176,7 @@ glade_gtk_action_bar_set_child_property (GladeWidgetAdaptor * adaptor,
else if (!strcmp (id, "pack-type"))
glade_gtk_action_bar_set_child_pack_type (container, child, value);
else
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->child_set_property (adaptor, container,
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->child_set_property (adaptor, container,
child, id, value);
gtk_container_check_resize (GTK_CONTAINER (container));
......@@ -210,7 +210,7 @@ glade_gtk_action_bar_get_property (GladeWidgetAdaptor * adaptor,
g_value_set_int (value, glade_gtk_action_bar_get_num_children (object));
}
else
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->get_property (adaptor, object, id, value);
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->get_property (adaptor, object, id, value);
}
static gint
......@@ -333,7 +333,7 @@ glade_gtk_action_bar_set_property (GladeWidgetAdaptor * adaptor,
else if (!strcmp (id, "size"))
glade_gtk_action_bar_set_size (object, value);
else
GWA_GET_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->set_property (adaptor, object, id, value);
}
static gboolean
......@@ -371,8 +371,8 @@ glade_gtk_action_bar_verify_property (GladeWidgetAdaptor * adaptor,
{
if (!strcmp (id, "size"))
return glade_gtk_action_bar_verify_size (object, value);
else if (GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property)
return GWA_GET_CLASS (GTK_TYPE_CONTAINER)->verify_property (adaptor, object, id, value);
else if (GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->verify_property)
return GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->verify_property (adaptor, object, id, value);
return TRUE;
}
......
......@@ -70,7 +70,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
editable = (GladeEditable *) glade_action_editor_new ();
}
else
editable = GWA_GET_CLASS (G_TYPE_OBJECT)->create_editable (adaptor, type);
editable = GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (G_TYPE_OBJECT)->create_editable (adaptor, type);
return editable;
}
......@@ -47,7 +47,7 @@ glade_gtk_adjustment_write_widget (GladeWidgetAdaptor *adaptor,
prop = glade_widget_get_property (widget, "value");
glade_property_write (prop, context, node);
GWA_GET_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (G_TYPE_OBJECT)->write_widget (adaptor, widget, context, node);
}
static gint
......@@ -109,7 +109,7 @@ glade_gtk_adjustment_read_widget (GladeWidgetAdaptor *adaptor,
return;
/* First chain up and read in all the normal properties.. */
GWA_GET_CLASS (GTK_TYPE_WIDGET)->read_widget (adaptor, widget, node);
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_WIDGET)->read_widget (adaptor, widget, node);
glade_widget_property_set (widget, "glade-digits", get_digits (widget), NULL);
}
......@@ -139,7 +139,7 @@ glade_gtk_adjustment_set_property (GladeWidgetAdaptor *adaptor,
"precision", digits, NULL);
}
else
GWA_GET_CLASS (G_TYPE_OBJECT)->set_property (adaptor, object,
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (G_TYPE_OBJECT)->set_property (adaptor, object,
property_name, value);
}
......
......@@ -35,7 +35,7 @@ glade_gtk_app_chooser_button_post_create (GladeWidgetAdaptor *adaptor,
GladeWidget *gwidget;
/* Chain Up */
GWA_GET_CLASS (GTK_TYPE_COMBO_BOX)->post_create (adaptor, object, reason);
GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_COMBO_BOX)->post_create (adaptor, object, reason);
/* No customization of the cell renderers on a GtkAppChooserButton. */
gwidget = glade_widget_get_from_gobject (object);
......@@ -51,5 +51,5 @@ glade_gtk_app_chooser_button_create_editable (GladeWidgetAdaptor *adaptor,
return (GladeEditable *) glade_app_chooser_button_editor_new ();
}
return GWA_GET_CLASS (GTK_TYPE_CONTAINER)->create_editable (adaptor, type);
return GLADE_WIDGET_ADAPTOR_GET_ADAPTOR_CLASS (GTK_TYPE_CONTAINER)->create_editable (adaptor, type);
}
......@@ -36,5 +36,5 @@ glade_gtk_app_chooser_widget_create_editable (GladeWidgetAdaptor *adaptor,
return (GladeEditable *) glade_app_chooser_widget_editor_new ();
}
return GWA_GET_CLASS (GTK_TYPE_CONTAINER)->create_editable (adaptor, type);