Commit c1fabcc8 authored by Tristan Van Berkom's avatar Tristan Van Berkom

src/glade-base-editor.c src/glade-clipboard-view.c src/glade-command.c


	* src/glade-base-editor.c src/glade-clipboard-view.c src/glade-command.c
	src/glade-command.h src/glade-design-layout.c src/glade-design-view.c
	src/glade-editor-property.c src/glade-editor-property.h
	src/glade-editor.c src/glade-gnome.c src/glade-gtk.c
	src/glade-palette-box.c src/glade-palette-item.c src/glade-palette.c
	src/glade-project-view.c src/glade-project-window.c
	src/glade-project.c src/glade-property-class.c
	src/glade-property-class.h src/glade-property.c src/glade-property.h
	src/glade-python-gwa.c src/glade-python.c src/glade-utils.c
	src/glade-utils.h src/glade-widget-adaptor.c
	src/glade-widget-adaptor.h src/glade-widget.c src/glade-widget.h

	Renamed reserved C++ keywords "new", "class", "virtual", "template" and "this"
	as a prerequisite for adding gtkmm bindings
parent 2af18678
2006-12-12 Oliver Nittka <oly@nittka.com>
* src/glade-base-editor.c src/glade-clipboard-view.c src/glade-command.c
src/glade-command.h src/glade-design-layout.c src/glade-design-view.c
src/glade-editor-property.c src/glade-editor-property.h
src/glade-editor.c src/glade-gnome.c src/glade-gtk.c
src/glade-palette-box.c src/glade-palette-item.c src/glade-palette.c
src/glade-project-view.c src/glade-project-window.c
src/glade-project.c src/glade-property-class.c
src/glade-property-class.h src/glade-property.c src/glade-property.h
src/glade-python-gwa.c src/glade-python.c src/glade-utils.c
src/glade-utils.h src/glade-widget-adaptor.c
src/glade-widget-adaptor.h src/glade-widget.c src/glade-widget.h
Renamed reserved C++ keywords "new", "class", "virtual", "template" and "this"
as a prerequisite for adding gtkmm bindings
2006-12-12 Tristan Van Berkom <tvb@gnome.org>
* configure.in, NEWS: Merged changeset 'GLADE3_3_0_BRANCHPOINT_1' --> 'GLADE3_3_0_MERGEPOINT_2'
......
......@@ -1117,7 +1117,7 @@ glade_base_editor_change_type (GladeBaseEditor *editor,
{
GladeProperty *orig_prop = (GladeProperty *) l->data;
GladeProperty *dup_prop = glade_widget_get_property (gchild_new,
orig_prop->class->id);
orig_prop->klass->id);
glade_property_set_value (dup_prop, orig_prop->value);
l = g_list_next (l);
}
......
......@@ -40,7 +40,7 @@ const gint GLADE_CLIPBOARD_VIEW_WIDTH = 230;
const gint GLADE_CLIPBOARD_VIEW_HEIGHT = 200;
static void
glade_clipboard_view_class_init (GladeClipboardViewClass *class)
glade_clipboard_view_class_init (GladeClipboardViewClass *klass)
{
}
......
......@@ -115,13 +115,13 @@ glade_command_finalize (GObject *obj)
}
static gboolean
glade_command_unifies_impl (GladeCommand *this, GladeCommand *other)
glade_command_unifies_impl (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
return FALSE;
}
static void
glade_command_collapse_impl (GladeCommand *this, GladeCommand *other)
glade_command_collapse_impl (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
g_return_if_reached ();
}
......@@ -154,9 +154,9 @@ func ## _execute (GladeCommand *me); \
static void \
func ## _finalize (GObject *object); \
static gboolean \
func ## _unifies (GladeCommand *this, GladeCommand *other); \
func ## _unifies (GladeCommand *this_cmd, GladeCommand *other_cmd); \
static void \
func ## _collapse (GladeCommand *this, GladeCommand *other); \
func ## _collapse (GladeCommand *this_cmd, GladeCommand *other_cmd); \
static void \
func ## _class_init (gpointer parent_tmp, gpointer notused) \
{ \
......@@ -357,10 +357,10 @@ glade_command_set_property_execute (GladeCommand *cmd)
{
gchar *str =
glade_property_class_make_string_from_gvalue
(sdata->property->class, &new_value);
(sdata->property->klass, &new_value);
g_print ("Setting %s property of %s to %s (sumode: %d)\n",
sdata->property->class->id,
sdata->property->klass->id,
sdata->property->widget->name,
str, glade_property_superuser ());
......@@ -371,12 +371,12 @@ glade_command_set_property_execute (GladeCommand *cmd)
/* Packing properties need to be refreshed here since
* they are reset when they get added to containers.
*/
if (sdata->property->class->packing)
if (sdata->property->klass->packing)
{
GladeProperty *tmp_prop;
tmp_prop = glade_widget_get_pack_property
(sdata->property->widget, sdata->property->class->id);
(sdata->property->widget, sdata->property->klass->id);
if (sdata->property != tmp_prop)
{
......@@ -443,17 +443,17 @@ glade_command_set_property_finalize (GObject *obj)
}
static gboolean
glade_command_set_property_unifies (GladeCommand *this, GladeCommand *other)
glade_command_set_property_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
GladeCommandSetProperty *cmd1, *cmd2;
GCSetPropData *pdata1, *pdata2;
GList *list, *l;
if (GLADE_IS_COMMAND_SET_PROPERTY (this) &&
GLADE_IS_COMMAND_SET_PROPERTY (other))
if (GLADE_IS_COMMAND_SET_PROPERTY (this_cmd) &&
GLADE_IS_COMMAND_SET_PROPERTY (other_cmd))
{
cmd1 = (GladeCommandSetProperty*) this;
cmd2 = (GladeCommandSetProperty*) other;
cmd1 = (GladeCommandSetProperty*) this_cmd;
cmd2 = (GladeCommandSetProperty*) other_cmd;
if (g_list_length (cmd1->sdata) !=
g_list_length (cmd2->sdata))
......@@ -467,8 +467,8 @@ glade_command_set_property_unifies (GladeCommand *this, GladeCommand *other)
pdata2 = l->data;
if (pdata1->property->widget == pdata2->property->widget &&
glade_property_class_match (pdata1->property->class,
pdata2->property->class))
glade_property_class_match (pdata1->property->klass,
pdata2->property->klass))
break;
}
......@@ -486,17 +486,17 @@ glade_command_set_property_unifies (GladeCommand *this, GladeCommand *other)
}
static void
glade_command_set_property_collapse (GladeCommand *this, GladeCommand *other)
glade_command_set_property_collapse (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
GladeCommandSetProperty *cmd1, *cmd2;
GCSetPropData *pdata1, *pdata2;
GList *list, *l;
g_return_if_fail (GLADE_IS_COMMAND_SET_PROPERTY (this) &&
GLADE_IS_COMMAND_SET_PROPERTY (other));
g_return_if_fail (GLADE_IS_COMMAND_SET_PROPERTY (this_cmd) &&
GLADE_IS_COMMAND_SET_PROPERTY (other_cmd));
cmd1 = (GladeCommandSetProperty*) this;
cmd2 = (GladeCommandSetProperty*) other;
cmd1 = (GladeCommandSetProperty*) this_cmd;
cmd2 = (GladeCommandSetProperty*) other_cmd;
for (list = cmd1->sdata; list; list = list->next)
......@@ -506,8 +506,8 @@ glade_command_set_property_collapse (GladeCommand *this, GladeCommand *other)
{
pdata2 = l->data;
if (glade_property_class_match (pdata1->property->class,
pdata2->property->class))
if (glade_property_class_match (pdata1->property->klass,
pdata2->property->klass))
{
/* Merge the GCSetPropData structs manually here
*/
......@@ -519,9 +519,9 @@ glade_command_set_property_collapse (GladeCommand *this, GladeCommand *other)
/* Set the description
*/
g_free (this->description);
this->description = other->description;
other->description = NULL;
g_free (this_cmd->description);
this_cmd->description = other_cmd->description;
other_cmd->description = NULL;
glade_app_update_ui ();
}
......@@ -542,16 +542,16 @@ glade_command_set_property_description (GladeCommandSetProperty *me)
else
{
sdata = me->sdata->data;
value_name = glade_property_class_make_string_from_gvalue (sdata->property->class,
value_name = glade_property_class_make_string_from_gvalue (sdata->property->klass,
sdata->new_value);
if (!value_name || strlen (value_name) > MAX_UNDO_MENU_ITEM_VALUE_LEN
|| strchr (value_name, '_')) {
description = g_strdup_printf (_("Setting %s of %s"),
sdata->property->class->name,
sdata->property->klass->name,
sdata->property->widget->name);
} else {
description = g_strdup_printf (_("Setting %s of %s to %s"),
sdata->property->class->name,
sdata->property->klass->name,
sdata->property->widget->name, value_name);
}
g_free (value_name);
......@@ -665,7 +665,7 @@ glade_command_set_property (GladeProperty *property, ...)
g_return_if_fail (GLADE_IS_PROPERTY (property));
va_start (args, property);
value = glade_property_class_make_gvalue_from_vl (property->class, args);
value = glade_property_class_make_gvalue_from_vl (property->klass, args);
va_end (args);
glade_command_set_property_value (property, value);
......@@ -739,15 +739,15 @@ glade_command_set_name_finalize (GObject *obj)
}
static gboolean
glade_command_set_name_unifies (GladeCommand *this, GladeCommand *other)
glade_command_set_name_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
GladeCommandSetName *cmd1;
GladeCommandSetName *cmd2;
if (GLADE_IS_COMMAND_SET_NAME (this) && GLADE_IS_COMMAND_SET_NAME (other))
if (GLADE_IS_COMMAND_SET_NAME (this_cmd) && GLADE_IS_COMMAND_SET_NAME (other_cmd))
{
cmd1 = GLADE_COMMAND_SET_NAME (this);
cmd2 = GLADE_COMMAND_SET_NAME (other);
cmd1 = GLADE_COMMAND_SET_NAME (this_cmd);
cmd2 = GLADE_COMMAND_SET_NAME (other_cmd);
return (cmd1->widget == cmd2->widget);
}
......@@ -756,19 +756,19 @@ glade_command_set_name_unifies (GladeCommand *this, GladeCommand *other)
}
static void
glade_command_set_name_collapse (GladeCommand *this, GladeCommand *other)
glade_command_set_name_collapse (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
GladeCommandSetName *nthis = GLADE_COMMAND_SET_NAME (this);
GladeCommandSetName *nother = GLADE_COMMAND_SET_NAME (other);
GladeCommandSetName *nthis = GLADE_COMMAND_SET_NAME (this_cmd);
GladeCommandSetName *nother = GLADE_COMMAND_SET_NAME (other_cmd);
g_return_if_fail (GLADE_IS_COMMAND_SET_NAME (this) && GLADE_IS_COMMAND_SET_NAME (other));
g_return_if_fail (GLADE_IS_COMMAND_SET_NAME (this_cmd) && GLADE_IS_COMMAND_SET_NAME (other_cmd));
g_free (nthis->old_name);
nthis->old_name = nother->old_name;
nother->old_name = NULL;
g_free (this->description);
this->description = g_strdup_printf (_("Renaming %s to %s"), nthis->name, nthis->old_name);
g_free (this_cmd->description);
this_cmd->description = g_strdup_printf (_("Renaming %s to %s"), nthis->name, nthis->old_name);
glade_app_update_ui ();
}
......@@ -885,7 +885,7 @@ glade_command_create_execute (GladeCommandCreateDelete *me)
GladeProperty *saved_prop = l->data;
GladeProperty *widget_prop =
glade_widget_get_pack_property (cdata->widget,
saved_prop->class->id);
saved_prop->klass->id);
glade_property_get_value (saved_prop, &value);
glade_property_set_value (widget_prop, &value);
......@@ -1033,13 +1033,13 @@ glade_command_create_delete_finalize (GObject *obj)
}
static gboolean
glade_command_create_delete_unifies (GladeCommand *this, GladeCommand *other)
glade_command_create_delete_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
return FALSE;
}
static void
glade_command_create_delete_collapse (GladeCommand *this, GladeCommand *other)
glade_command_create_delete_collapse (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
g_return_if_reached ();
}
......@@ -1213,10 +1213,10 @@ glade_command_transfer_props (GladeWidget *gnew, GList *saved_props)
{
GladeProperty *prop, *sprop = l->data;
prop = glade_widget_get_pack_property (gnew, sprop->class->id);
prop = glade_widget_get_pack_property (gnew, sprop->klass->id);
if (prop && sprop->class->transfer_on_paste &&
glade_property_class_match (prop->class, sprop->class))
if (prop && sprop->klass->transfer_on_paste &&
glade_property_class_match (prop->klass, sprop->klass))
glade_property_set_value (prop, sprop->value);
}
}
......@@ -1319,7 +1319,7 @@ glade_command_paste_execute (GladeCommandCutCopyPaste *me)
GladeProperty *saved_prop = l->data;
GladeProperty *widget_prop =
glade_widget_get_pack_property (cdata->widget,
saved_prop->class->id);
saved_prop->klass->id);
glade_property_get_value (saved_prop, &value);
glade_property_set_value (widget_prop, &value);
......@@ -1555,13 +1555,13 @@ glade_command_cut_copy_paste_finalize (GObject *obj)
}
static gboolean
glade_command_cut_copy_paste_unifies (GladeCommand *this, GladeCommand *other)
glade_command_cut_copy_paste_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
return FALSE;
}
static void
glade_command_cut_copy_paste_collapse (GladeCommand *this, GladeCommand *other)
glade_command_cut_copy_paste_collapse (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
g_return_if_reached ();
}
......@@ -1826,15 +1826,15 @@ glade_command_add_signal_finalize (GObject *obj)
}
static gboolean
glade_command_add_signal_undo (GladeCommand *this)
glade_command_add_signal_undo (GladeCommand *this_cmd)
{
return glade_command_add_signal_execute (this);
return glade_command_add_signal_execute (this_cmd);
}
static gboolean
glade_command_add_signal_execute (GladeCommand *this)
glade_command_add_signal_execute (GladeCommand *this_cmd)
{
GladeCommandAddSignal *cmd = GLADE_COMMAND_ADD_SIGNAL (this);
GladeCommandAddSignal *cmd = GLADE_COMMAND_ADD_SIGNAL (this_cmd);
GladeSignal *temp;
switch (cmd->type)
......@@ -1862,13 +1862,13 @@ glade_command_add_signal_execute (GladeCommand *this)
}
static gboolean
glade_command_add_signal_unifies (GladeCommand *this, GladeCommand *other)
glade_command_add_signal_unifies (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
return FALSE;
}
static void
glade_command_add_signal_collapse (GladeCommand *this, GladeCommand *other)
glade_command_add_signal_collapse (GladeCommand *this_cmd, GladeCommand *other_cmd)
{
g_return_if_reached ();
}
......@@ -1946,8 +1946,8 @@ glade_command_remove_signal (GladeWidget *glade_widget, const GladeSignal *signa
void
glade_command_change_signal (GladeWidget *glade_widget,
const GladeSignal *old,
const GladeSignal *new)
const GladeSignal *new_signal)
{
glade_command_add_remove_change_signal
(glade_widget, old, new, GLADE_CHANGE);
(glade_widget, old, new_signal, GLADE_CHANGE);
}
......@@ -47,10 +47,10 @@ struct _GladeCommandClass
{
GObjectClass parent_class;
gboolean (* execute) (GladeCommand *this);
gboolean (* undo) (GladeCommand *this);
gboolean (* unifies) (GladeCommand *this, GladeCommand *other);
void (* collapse) (GladeCommand *this, GladeCommand *other);
gboolean (* execute) (GladeCommand *this_cmd);
gboolean (* undo) (GladeCommand *this_cmd);
gboolean (* unifies) (GladeCommand *this_cmd, GladeCommand *other_cmd);
void (* collapse) (GladeCommand *this_cmd, GladeCommand *other_cmd);
};
......@@ -123,7 +123,7 @@ void glade_command_remove_signal (GladeWidget *glade_widget,
LIBGLADEUI_API
void glade_command_change_signal (GladeWidget *glade_widget,
const GladeSignal *old,
const GladeSignal *new);
const GladeSignal *new_signal);
G_END_DECLS
......
......@@ -723,16 +723,16 @@ glade_design_layout_init (GladeDesignLayout *layout)
}
static void
glade_design_layout_class_init (GladeDesignLayoutClass *class)
glade_design_layout_class_init (GladeDesignLayoutClass *klass)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkContainerClass *container_class;
object_class = G_OBJECT_CLASS (class);
parent_class = g_type_class_peek_parent (class);
widget_class = GTK_WIDGET_CLASS (class);
container_class = GTK_CONTAINER_CLASS (class);
object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
widget_class = GTK_WIDGET_CLASS (klass);
container_class = GTK_CONTAINER_CLASS (klass);
object_class->dispose = glade_design_layout_dispose;
object_class->finalize = glade_design_layout_finalize;
......
......@@ -128,14 +128,14 @@ glade_design_view_init (GladeDesignView *view)
}
static void
glade_design_view_class_init (GladeDesignViewClass *class)
glade_design_view_class_init (GladeDesignViewClass *klass)
{
GObjectClass *object_class;
GtkWidgetClass *widget_class;
parent_class = g_type_class_peek_parent (class);
object_class = G_OBJECT_CLASS (class);
widget_class = GTK_WIDGET_CLASS (class);
parent_class = g_type_class_peek_parent (klass);
object_class = G_OBJECT_CLASS (klass);
widget_class = GTK_WIDGET_CLASS (klass);
object_class->get_property = glade_design_view_get_property;
object_class->set_property = glade_design_view_set_property;
......
This diff is collapsed.
......@@ -17,7 +17,7 @@ typedef struct _GladeEditorPropertyClass GladeEditorPropertyClass;
struct _GladeEditorProperty {
GtkHBox parent_instance;
GladePropertyClass *class; /* The property class this GladeEditorProperty was created for
GladePropertyClass *klass; /* The property class this GladeEditorProperty was created for
*/
GladeProperty *property; /* The currently loaded property
*/
......@@ -80,7 +80,7 @@ struct _GladeEditorPropertyClass {
LIBGLADEUI_API
GType glade_editor_property_get_type (void);
LIBGLADEUI_API
GladeEditorProperty *glade_editor_property_new (GladePropertyClass *class,
GladeEditorProperty *glade_editor_property_new (GladePropertyClass *klass,
gboolean use_command);
LIBGLADEUI_API
GladeEditorProperty *glade_editor_property_new_from_widget (GladeWidget *widget,
......
......@@ -127,17 +127,17 @@ glade_editor_get_property (GObject *object,
static void
glade_editor_class_init (GladeEditorClass *class)
glade_editor_class_init (GladeEditorClass *klass)
{
GObjectClass *object_class;
parent_class = g_type_class_peek_parent (class);
object_class = G_OBJECT_CLASS (class);
parent_class = g_type_class_peek_parent (klass);
object_class = G_OBJECT_CLASS (klass);
object_class->set_property = glade_editor_set_property;
object_class->get_property = glade_editor_get_property;
class->gtk_doc_search = NULL;
klass->gtk_doc_search = NULL;
/* Properties */
g_object_class_install_property
......@@ -448,12 +448,12 @@ glade_editor_table_attach (GtkWidget *table, GtkWidget *child, gint pos, gint ro
static GladeEditorProperty *
glade_editor_table_append_item (GladeEditorTable *table,
GladePropertyClass *class,
GladePropertyClass *klass,
gboolean from_query_dialog)
{
GladeEditorProperty *property;
property = glade_editor_property_new (class, from_query_dialog == FALSE);
property = glade_editor_property_new (klass, from_query_dialog == FALSE);
gtk_widget_show (GTK_WIDGET (property));
gtk_widget_show_all (property->eventbox);
......@@ -549,12 +549,12 @@ glade_editor_get_sorted_properties (GladeWidgetAdaptor *adaptor)
for (l = adaptor->properties; l && l->data; l = g_list_next (l))
{
GladePropertyClass *class = l->data;
GladePropertyClass *klass = l->data;
if (class->common || class->packing)
a = g_list_prepend (a, class);
if (klass->common || klass->packing)
a = g_list_prepend (a, klass);
else
b = g_list_prepend (b, class);
b = g_list_prepend (b, klass);
}
a = g_list_sort (a, glade_editor_property_class_comp);
......@@ -792,7 +792,7 @@ static gint
glade_editor_property_comp (gconstpointer a, gconstpointer b)
{
const GladeProperty *prop_a = a, *prop_b = b;
return glade_editor_property_class_comp (prop_a->class, prop_b->class);
return glade_editor_property_class_comp (prop_a->klass, prop_b->klass);
}
static void
......@@ -836,11 +836,11 @@ glade_editor_load_packing_page (GladeEditor *editor, GladeWidget *widget)
{
property = GLADE_PROPERTY (list->data);
if (glade_property_class_is_visible (property->class) == FALSE)
if (glade_property_class_is_visible (property->klass) == FALSE)
continue;
editor_property = glade_editor_table_append_item (editor->packing_etable,
property->class, FALSE);
property->klass, FALSE);
editor->packing_eprops = g_list_prepend (editor->packing_eprops, editor_property);
glade_editor_property_load (editor_property, property);
}
......@@ -1188,13 +1188,13 @@ glade_editor_populate_reset_view (GladeEditor *editor,
{
property = list->data;
if (glade_property_class_is_visible (property->class) == FALSE)
if (glade_property_class_is_visible (property->klass) == FALSE)
continue;
if (property->class->type != GPC_NORMAL &&
property->class->type != GPC_ACCEL_PROPERTY)
if (property->klass->type != GPC_NORMAL &&
property->klass->type != GPC_ACCEL_PROPERTY)
iter = &atk_iter;
else if (property->class->common)
else if (property->klass->common)
iter = &common_iter;
else
iter = &general_iter;
......@@ -1204,7 +1204,7 @@ glade_editor_populate_reset_view (GladeEditor *editor,
gtk_tree_store_append (model, &property_iter, iter);
gtk_tree_store_set (model, &property_iter,
COLUMN_ENABLED, !def,
COLUMN_PROP_NAME, property->class->name,
COLUMN_PROP_NAME, property->klass->name,
COLUMN_PROPERTY, property,
COLUMN_PARENT, FALSE,
COLUMN_CHILD, TRUE,
......
......@@ -596,7 +596,7 @@ glade_gnome_dps_set_color_common (GObject *object,
prop = glade_widget_get_property (glade_widget_get_from_gobject (object),
property_name);
color = glade_property_class_make_gvalue_from_string (prop->class,
color = glade_property_class_make_gvalue_from_string (prop->klass,
color_str, NULL);
if (color) glade_property_set_value (prop, color);
}
......@@ -1270,9 +1270,9 @@ void GLADEGNOME_API
glade_gnome_font_picker_replace_child (GladeWidgetAdaptor *adaptor,
GtkWidget *container,
GtkWidget *current,
GtkWidget *new)
GtkWidget *new_widget)
{
gnome_font_picker_uw_set_widget (GNOME_FONT_PICKER (container), new);
gnome_font_picker_uw_set_widget (GNOME_FONT_PICKER (container), new_widget);
}
/* GnomeIconList */
......@@ -1352,7 +1352,7 @@ glade_gnome_pixmap_set_filename_common (GObject *object)
{
GladeProperty *property = glade_widget_get_property (gp, "filename");
gchar *file = glade_property_class_make_string_from_gvalue
(property->class, property->value);
(property->klass, property->value);
if (file)
{
gnome_pixmap_load_file_at_size (GNOME_PIXMAP (object),
......@@ -1585,9 +1585,9 @@ void GLADEGNOME_API
glade_gnome_bonobodock_replace_child (GladeWidgetAdaptor *adaptor,
GtkWidget *container,
GtkWidget *current,
GtkWidget *new)
GtkWidget *new_widget)
{
bonobo_dock_set_client_area (BONOBO_DOCK (container), new);
bonobo_dock_set_client_area (BONOBO_DOCK (container), new_widget);
}
static gboolean
......
......@@ -307,7 +307,7 @@ void GLADEGTK_API
glade_gtk_container_replace_child (GladeWidgetAdaptor *adaptor,
GtkWidget *container,
GtkWidget *current,
GtkWidget *new)
GtkWidget *new_widget)
{
GParamSpec **param_spec;
GValue *value;
......@@ -328,11 +328,11 @@ glade_gtk_container_replace_child (GladeWidgetAdaptor *adaptor,
}
gtk_container_remove (GTK_CONTAINER (container), current);
gtk_container_add (GTK_CONTAINER (container), new);
gtk_container_add (GTK_CONTAINER (container), new_widget);
for (i = 0; i < nproperties; i++) {
gtk_container_child_set_property
(GTK_CONTAINER (container), new, param_spec[i]->name, &value[i]);
(GTK_CONTAINER (container), new_widget, param_spec[i]->name, &value[i]);
}
for (i = 0; i < nproperties; i++)
......@@ -1355,19 +1355,19 @@ glade_gtk_table_configure_end (GladeFixed *fixed,
GladeWidget *child,
GtkWidget *table)
{
GladeGtkTableChild new = { child, };
GladeGtkTableChild new_child = { child, };
glade_widget_pack_property_get (child, "left-attach",
&new.left_attach);
&new_child.left_attach);
glade_widget_pack_property_get (child, "right-attach",
&new.right_attach);
&new_child.right_attach);
glade_widget_pack_property_get (child, "top-attach",
&new.top_attach);
&new_child.top_attach);
glade_widget_pack_property_get (child, "bottom-attach",
&new.bottom_attach);
&new_child.bottom_attach);
/* Compare the meaningfull part of the current edit. */
if (memcmp (&new, &table_edit, TABLE_CHILD_CMP_SIZE) != 0)
if (memcmp (&new_child, &table_edit, TABLE_CHILD_CMP_SIZE) != 0)
{
GValue left_attach_value = { 0, };
GValue right_attach_value = { 0, };
......@@ -1545,18 +1545,18 @@ void GLADEGTK_API
glade_gtk_table_replace_child (GladeWidgetAdaptor *adaptor,
GtkWidget *container,
GtkWidget *current,
GtkWidget *new)
GtkWidget *new_widget)
{
g_return_if_fail (GTK_IS_TABLE (container));
g_return_if_fail (GTK_IS_WIDGET (current));
g_return_if_fail (GTK_IS_WIDGET (new));
g_return_if_fail (GTK_IS_WIDGET (new_widget));
/* Chain Up */
GWA_GET_CLASS
(GTK_TYPE_CONTAINER)->replace_child (adaptor,
G_OBJECT (container),
G_OBJECT (current),
G_OBJECT (new));
G_OBJECT (new_widget));
/* If we are replacing a GladeWidget, we must refresh placeholders
* because the widget may have spanned multiple rows/columns, we must
......@@ -1565,7 +1565,7 @@ glade_gtk_table_replace_child (GladeWidgetAdaptor *adaptor,
* (since the remaining placeholder templates no longer exist, only the
* first pasted widget would have proper packing properties).
*/
if (glade_widget_get_from_gobject (new) == FALSE)
if (glade_widget_get_from_gobject (new_widget) == FALSE)
glade_gtk_table_refresh_placeholders (GTK_TABLE (container));
}
......@@ -1888,7 +1888,7 @@ void GLADEGTK_API
glade_gtk_frame_replace_child (GladeWidgetAdaptor *adaptor,
GtkWidget *container,
GtkWidget *current,
GtkWidget *new)
GtkWidget *new_widget)
{
gchar *special_child_type;
......@@ -1897,8 +1897,8 @@ glade_gtk_frame_replace_child (GladeWidgetAdaptor *adaptor,
if (special_child_type && !strcmp (special_child_type, "label_item"))
{
g_object_set_data (G_OBJECT (new), "special-child-type", "label_item");
gtk_frame_set_label_widget (GTK_FRAME (container), new);
g_object_set_data (G_OBJECT (new_widget), "special-child-type", "label_item");
gtk_frame_set_label_widget (GTK_FRAME (container), new_widget);
return;
}
......@@ -1907,7 +1907,7 @@ glade_gtk_frame_replace_child (GladeWidgetAdaptor *adaptor,
(GTK_TYPE_CONTAINER)->replace_child (adaptor,
G_OBJECT (container),
G_OBJECT (current),
G_OBJECT (new));
G_OBJECT (new_widget));
}
void GLADEGTK_API
......@@ -2490,7 +2490,7 @@ void GLADEGTK_API
glade_gtk_notebook_replace_child (GladeWidgetAdaptor *adaptor,
GtkWidget *container,
GtkWidget *current,
GtkWidget *new)
GtkWidget *new_widget)
{
GtkNotebook *notebook;
GladeWidget *gcurrent, *gnew;
......@@ -2512,25 +2512,25 @@ glade_gtk_notebook_replace_child (GladeWidgetAdaptor *adaptor,
}
if (g_object_get_data (G_OBJECT (current), "special-child-type"))
g_object_set_data (G_OBJECT (new), "special-child-type", "tab");
g_object_set_data (G_OBJECT (new_widget), "special-child-type", "tab");
glade_gtk_notebook_remove_child (adaptor,
G_OBJECT (container),
G_OBJECT (current));
if (GLADE_IS_PLACEHOLDER (new) == FALSE)
if (GLADE_IS_PLACEHOLDER (new_widget) == FALSE)
{
gnew = glade_widget_get_from_gobject (new);
gnew = glade_widget_get_from_gobject (new_widget);
glade_gtk_notebook_add_child (adaptor,
G_OBJECT (container),
G_OBJECT (new));
G_OBJECT (new_widget));
if (glade_widget_pack_property_set (gnew, "position", position) == FALSE)
g_critical ("No position property found on new widget");
}