mirror of
https://gitlab.gnome.org/GNOME/glade.git
synced 2025-09-24 00:04:33 -04:00
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
This commit is contained in:
parent
2af1867826
commit
c1fabcc84d
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
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;
|
||||
|
@ -140,7 +140,7 @@ glade_editor_property_commit (GladeEditorProperty *eprop,
|
||||
/* If the value was denied by a verify function, we'll have to
|
||||
* reload the real value.
|
||||
*/
|
||||
if (g_param_values_cmp (eprop->property->class->pspec,
|
||||
if (g_param_values_cmp (eprop->property->klass->pspec,
|
||||
eprop->property->value, value) != 0)
|
||||
GLADE_EDITOR_PROPERTY_GET_CLASS (eprop)->load (eprop, eprop->property);
|
||||
}
|
||||
@ -215,7 +215,7 @@ glade_editor_property_enabled_cb (GladeProperty *property,
|
||||
gboolean enabled;
|
||||
g_assert (eprop->property == property);
|
||||
|
||||
if (eprop->class->optional)
|
||||
if (eprop->klass->optional)
|
||||
{
|
||||
enabled = glade_property_get_enabled (property);
|
||||
|
||||
@ -244,15 +244,15 @@ glade_editor_property_info_clicked_cb (GtkWidget *info,
|
||||
GladeWidgetAdaptor *adaptor;
|
||||
gchar *search, *book;
|
||||
|
||||
adaptor = glade_widget_adaptor_from_pclass (eprop->class);
|
||||
search = g_strdup_printf ("The %s property", eprop->class->id);
|
||||
adaptor = glade_widget_adaptor_from_pclass (eprop->klass);
|
||||
search = g_strdup_printf ("The %s property", eprop->klass->id);
|
||||
|
||||
g_object_get (adaptor, "book", &book, NULL);
|
||||
|
||||
g_signal_emit (G_OBJECT (eprop),
|
||||
glade_editor_property_signals[GTK_DOC_SEARCH],
|
||||
0, book,
|
||||
g_type_name (eprop->class->pspec->owner_type), search);
|
||||
g_type_name (eprop->klass->pspec->owner_type), search);
|
||||
|
||||
g_free (book);
|
||||
g_free (search);
|
||||
@ -285,14 +285,14 @@ glade_editor_property_constructor (GType type,
|
||||
GladeEditorProperty *eprop;
|
||||
gchar *text;
|
||||
|
||||
/* Invoke parent constructor (eprop->class should be resolved by this point) . */
|
||||
/* Invoke parent constructor (eprop->klass should be resolved by this point) . */
|
||||
obj = G_OBJECT_CLASS (table_class)->constructor
|
||||
(type, n_construct_properties, construct_properties);
|
||||
|
||||
eprop = GLADE_EDITOR_PROPERTY (obj);
|
||||
|
||||
/* Create label (make label visible but not the eventbox) */
|
||||
text = g_strdup_printf ("%s:", eprop->class->name);
|
||||
text = g_strdup_printf ("%s:", eprop->klass->name);
|
||||
eprop->item_label = gtk_label_new (text);
|
||||
eprop->eventbox = gtk_event_box_new ();
|
||||
g_free (text);
|
||||
@ -311,7 +311,7 @@ glade_editor_property_constructor (GType type,
|
||||
|
||||
/* Create hbox and possibly check button
|
||||
*/
|
||||
if (eprop->class->optional)
|
||||
if (eprop->klass->optional)
|
||||
{
|
||||
eprop->check = gtk_check_button_new ();
|
||||
gtk_widget_show (eprop->check);
|
||||
@ -364,7 +364,7 @@ glade_editor_property_set_property (GObject *object,
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_PROPERTY_CLASS:
|
||||
eprop->class = g_value_get_pointer (value);
|
||||
eprop->klass = g_value_get_pointer (value);
|
||||
break;
|
||||
case PROP_USE_COMMAND:
|
||||
eprop->use_command = g_value_get_boolean (value);
|
||||
@ -392,7 +392,7 @@ glade_editor_property_get_property (GObject *object,
|
||||
switch (prop_id)
|
||||
{
|
||||
case PROP_PROPERTY_CLASS:
|
||||
g_value_set_pointer (value, eprop->class);
|
||||
g_value_set_pointer (value, eprop->klass);
|
||||
break;
|
||||
case PROP_USE_COMMAND:
|
||||
g_value_set_boolean (value, eprop->use_command);
|
||||
@ -655,25 +655,25 @@ glade_eprop_numeric_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
|
||||
if (property)
|
||||
{
|
||||
if (G_IS_PARAM_SPEC_INT(eprop->class->pspec))
|
||||
if (G_IS_PARAM_SPEC_INT(eprop->klass->pspec))
|
||||
val = (gfloat) g_value_get_int (property->value);
|
||||
else if (G_IS_PARAM_SPEC_UINT(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UINT(eprop->klass->pspec))
|
||||
val = (gfloat) g_value_get_uint (property->value);
|
||||
else if (G_IS_PARAM_SPEC_LONG(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_LONG(eprop->klass->pspec))
|
||||
val = (gfloat) g_value_get_long (property->value);
|
||||
else if (G_IS_PARAM_SPEC_ULONG(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_ULONG(eprop->klass->pspec))
|
||||
val = (gfloat) g_value_get_ulong (property->value);
|
||||
else if (G_IS_PARAM_SPEC_INT64(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_INT64(eprop->klass->pspec))
|
||||
val = (gfloat) g_value_get_int64 (property->value);
|
||||
else if (G_IS_PARAM_SPEC_UINT64(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UINT64(eprop->klass->pspec))
|
||||
val = (gfloat) g_value_get_uint64 (property->value);
|
||||
else if (G_IS_PARAM_SPEC_DOUBLE(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_DOUBLE(eprop->klass->pspec))
|
||||
val = (gfloat) g_value_get_double (property->value);
|
||||
else if (G_IS_PARAM_SPEC_FLOAT(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_FLOAT(eprop->klass->pspec))
|
||||
val = g_value_get_float (property->value);
|
||||
else
|
||||
g_warning ("Unsupported type %s\n",
|
||||
g_type_name(G_PARAM_SPEC_TYPE (eprop->class->pspec)));
|
||||
g_type_name(G_PARAM_SPEC_TYPE (eprop->klass->pspec)));
|
||||
gtk_spin_button_set_value (GTK_SPIN_BUTTON (eprop_numeric->spin), val);
|
||||
}
|
||||
}
|
||||
@ -687,35 +687,35 @@ glade_eprop_numeric_changed (GtkWidget *spin,
|
||||
|
||||
if (eprop->loading) return;
|
||||
|
||||
g_value_init (&val, eprop->class->pspec->value_type);
|
||||
g_value_init (&val, eprop->klass->pspec->value_type);
|
||||
|
||||
if (G_IS_PARAM_SPEC_INT(eprop->class->pspec))
|
||||
if (G_IS_PARAM_SPEC_INT(eprop->klass->pspec))
|
||||
g_value_set_int (&val, gtk_spin_button_get_value_as_int
|
||||
(GTK_SPIN_BUTTON (spin)));
|
||||
else if (G_IS_PARAM_SPEC_UINT(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UINT(eprop->klass->pspec))
|
||||
g_value_set_uint (&val, gtk_spin_button_get_value_as_int
|
||||
(GTK_SPIN_BUTTON (spin)));
|
||||
else if (G_IS_PARAM_SPEC_LONG(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_LONG(eprop->klass->pspec))
|
||||
g_value_set_long (&val, (glong)gtk_spin_button_get_value_as_int
|
||||
(GTK_SPIN_BUTTON (spin)));
|
||||
else if (G_IS_PARAM_SPEC_ULONG(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_ULONG(eprop->klass->pspec))
|
||||
g_value_set_ulong (&val, (gulong)gtk_spin_button_get_value_as_int
|
||||
(GTK_SPIN_BUTTON (spin)));
|
||||
else if (G_IS_PARAM_SPEC_INT64(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_INT64(eprop->klass->pspec))
|
||||
g_value_set_int64 (&val, (gint64)gtk_spin_button_get_value_as_int
|
||||
(GTK_SPIN_BUTTON (spin)));
|
||||
else if (G_IS_PARAM_SPEC_UINT64(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UINT64(eprop->klass->pspec))
|
||||
g_value_set_uint64 (&val, (guint64)gtk_spin_button_get_value_as_int
|
||||
(GTK_SPIN_BUTTON (spin)));
|
||||
else if (G_IS_PARAM_SPEC_FLOAT(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_FLOAT(eprop->klass->pspec))
|
||||
g_value_set_float (&val, (gfloat) gtk_spin_button_get_value
|
||||
(GTK_SPIN_BUTTON (spin)));
|
||||
else if (G_IS_PARAM_SPEC_DOUBLE(eprop->class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_DOUBLE(eprop->klass->pspec))
|
||||
g_value_set_double (&val, gtk_spin_button_get_value
|
||||
(GTK_SPIN_BUTTON (spin)));
|
||||
else
|
||||
g_warning ("Unsupported type %s\n",
|
||||
g_type_name(G_PARAM_SPEC_TYPE (eprop->class->pspec)));
|
||||
g_type_name(G_PARAM_SPEC_TYPE (eprop->klass->pspec)));
|
||||
|
||||
glade_editor_property_commit (eprop, &val);
|
||||
g_value_unset (&val);
|
||||
@ -727,10 +727,10 @@ glade_eprop_numeric_create_input (GladeEditorProperty *eprop)
|
||||
GladeEPropNumeric *eprop_numeric = GLADE_EPROP_NUMERIC (eprop);
|
||||
GtkAdjustment *adjustment;
|
||||
|
||||
adjustment = glade_property_class_make_adjustment (eprop->class);
|
||||
adjustment = glade_property_class_make_adjustment (eprop->klass);
|
||||
eprop_numeric->spin = gtk_spin_button_new (adjustment, 4,
|
||||
G_IS_PARAM_SPEC_FLOAT (eprop->class->pspec) ||
|
||||
G_IS_PARAM_SPEC_DOUBLE (eprop->class->pspec)
|
||||
G_IS_PARAM_SPEC_FLOAT (eprop->klass->pspec) ||
|
||||
G_IS_PARAM_SPEC_DOUBLE (eprop->klass->pspec)
|
||||
? 2 : 0);
|
||||
gtk_widget_show (eprop_numeric->spin);
|
||||
|
||||
@ -779,7 +779,7 @@ glade_eprop_enum_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
|
||||
if (property)
|
||||
{
|
||||
eclass = g_type_class_ref (eprop->class->pspec->value_type);
|
||||
eclass = g_type_class_ref (eprop->klass->pspec->value_type);
|
||||
value = g_value_get_enum (property->value);
|
||||
|
||||
for (i = 0; i < eclass->n_values; i++)
|
||||
@ -806,7 +806,7 @@ glade_eprop_enum_changed (GtkWidget *menu_item,
|
||||
|
||||
property = eprop->property;
|
||||
|
||||
g_value_init (&val, eprop->class->pspec->value_type);
|
||||
g_value_init (&val, eprop->klass->pspec->value_type);
|
||||
g_value_set_enum (&val, ival);
|
||||
|
||||
glade_editor_property_commit (eprop, &val);
|
||||
@ -852,15 +852,15 @@ glade_eprop_enum_create_input (GladeEditorProperty *eprop)
|
||||
{
|
||||
GladeEPropEnum *eprop_enum = GLADE_EPROP_ENUM (eprop);
|
||||
GtkWidget *menu_item, *menu;
|
||||
GladePropertyClass *class;
|
||||
GladePropertyClass *klass;
|
||||
GEnumClass *eclass;
|
||||
gboolean stock;
|
||||
guint i;
|
||||
|
||||
class = eprop->class;
|
||||
eclass = g_type_class_ref (class->pspec->value_type);
|
||||
stock = (class->pspec->value_type == GLADE_TYPE_STOCK) ||
|
||||
(class->pspec->value_type == GLADE_TYPE_STOCK_IMAGE);
|
||||
klass = eprop->klass;
|
||||
eclass = g_type_class_ref (klass->pspec->value_type);
|
||||
stock = (klass->pspec->value_type == GLADE_TYPE_STOCK) ||
|
||||
(klass->pspec->value_type == GLADE_TYPE_STOCK_IMAGE);
|
||||
|
||||
menu = gtk_menu_new ();
|
||||
|
||||
@ -868,7 +868,7 @@ glade_eprop_enum_create_input (GladeEditorProperty *eprop)
|
||||
{
|
||||
const gchar *value_name =
|
||||
glade_property_class_get_displayable_value
|
||||
(class, eclass->values[i].value);
|
||||
(klass, eclass->values[i].value);
|
||||
if (value_name == NULL) value_name = eclass->values[i].value_name;
|
||||
|
||||
if (stock && strcmp (eclass->values[i].value_nick, "glade-none"))
|
||||
@ -927,7 +927,7 @@ static void
|
||||
glade_eprop_flags_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
{
|
||||
GladeEPropFlags *eprop_flags = GLADE_EPROP_FLAGS (eprop);
|
||||
GFlagsClass *class;
|
||||
GFlagsClass *klass;
|
||||
guint flag_num, value;
|
||||
GString *string = g_string_new (NULL);
|
||||
|
||||
@ -939,23 +939,23 @@ glade_eprop_flags_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
if (property)
|
||||
{
|
||||
/* Populate the model with the flags. */
|
||||
class = g_type_class_ref (G_VALUE_TYPE (property->value));
|
||||
klass = g_type_class_ref (G_VALUE_TYPE (property->value));
|
||||
value = g_value_get_flags (property->value);
|
||||
|
||||
/* Step through each of the flags in the class. */
|
||||
for (flag_num = 0; flag_num < class->n_values; flag_num++) {
|
||||
for (flag_num = 0; flag_num < klass->n_values; flag_num++) {
|
||||
GtkTreeIter iter;
|
||||
guint mask;
|
||||
gboolean setting;
|
||||
const gchar *value_name;
|
||||
|
||||
mask = class->values[flag_num].value;
|
||||
mask = klass->values[flag_num].value;
|
||||
setting = ((value & mask) == mask) ? TRUE : FALSE;
|
||||
|
||||
value_name = glade_property_class_get_displayable_value
|
||||
(eprop->class, class->values[flag_num].value);
|
||||
(eprop->klass, klass->values[flag_num].value);
|
||||
|
||||
if (value_name == NULL) value_name = class->values[flag_num].value_name;
|
||||
if (value_name == NULL) value_name = klass->values[flag_num].value_name;
|
||||
|
||||
/* Setup string for property label */
|
||||
if (setting)
|
||||
@ -975,7 +975,7 @@ glade_eprop_flags_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
-1);
|
||||
|
||||
}
|
||||
g_type_class_unref(class);
|
||||
g_type_class_unref(klass);
|
||||
}
|
||||
|
||||
gtk_entry_set_text (GTK_ENTRY (eprop_flags->entry), string->str);
|
||||
@ -995,14 +995,14 @@ flag_toggled_direct (GtkCellRendererToggle *cell,
|
||||
guint value;
|
||||
value = new_value =0;
|
||||
gint flag_num=0;
|
||||
GFlagsClass *class;
|
||||
GFlagsClass *klass;
|
||||
|
||||
GladeEPropFlags *eprop_flags = GLADE_EPROP_FLAGS(eprop);
|
||||
|
||||
if (!eprop->property)
|
||||
return ;
|
||||
|
||||
class = g_type_class_ref (G_VALUE_TYPE (eprop->property->value));
|
||||
klass = g_type_class_ref (G_VALUE_TYPE (eprop->property->value));
|
||||
value = g_value_get_flags (eprop->property->value);
|
||||
|
||||
gtk_tree_model_get_iter_from_string (eprop_flags->model, &iter, path_string);
|
||||
@ -1023,7 +1023,7 @@ flag_toggled_direct (GtkCellRendererToggle *cell,
|
||||
/* Step through each of the flags in the class, checking if
|
||||
the corresponding toggle in the dialog is selected, If it
|
||||
is, OR the flags' mask with the new value. */
|
||||
for (flag_num = 0; flag_num < class->n_values; flag_num++) {
|
||||
for (flag_num = 0; flag_num < klass->n_values; flag_num++) {
|
||||
gboolean setting;
|
||||
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (eprop_flags->model), &iter,
|
||||
@ -1031,7 +1031,7 @@ flag_toggled_direct (GtkCellRendererToggle *cell,
|
||||
-1);
|
||||
|
||||
if (setting)
|
||||
new_value |= class->values[flag_num].value;
|
||||
new_value |= klass->values[flag_num].value;
|
||||
|
||||
gtk_tree_model_iter_next (GTK_TREE_MODEL (eprop_flags->model),
|
||||
&iter);
|
||||
@ -1206,7 +1206,7 @@ glade_eprop_color_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
if (property)
|
||||
{
|
||||
if ((text = glade_property_class_make_string_from_gvalue
|
||||
(eprop->class, property->value)) != NULL)
|
||||
(eprop->klass, property->value)) != NULL)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (eprop_color->entry), text);
|
||||
g_free (text);
|
||||
@ -1327,7 +1327,7 @@ glade_eprop_text_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
G_VALUE_HOLDS (property->value, G_TYPE_VALUE_ARRAY))
|
||||
{
|
||||
gchar *text = glade_property_class_make_string_from_gvalue (
|
||||
property->class, property->value);
|
||||
property->klass, property->value);
|
||||
gtk_text_buffer_set_text (buffer, text ? text : "", -1);
|
||||
g_free (text);
|
||||
}
|
||||
@ -1351,11 +1351,11 @@ glade_eprop_text_changed_common (GladeEditorProperty *eprop,
|
||||
GValue *val;
|
||||
gchar *prop_text;
|
||||
|
||||
if (eprop->property->class->pspec->value_type == G_TYPE_STRV ||
|
||||
eprop->property->class->pspec->value_type == G_TYPE_VALUE_ARRAY)
|
||||
if (eprop->property->klass->pspec->value_type == G_TYPE_STRV ||
|
||||
eprop->property->klass->pspec->value_type == G_TYPE_VALUE_ARRAY)
|
||||
{
|
||||
val = glade_property_class_make_gvalue_from_string
|
||||
(eprop->property->class, text, NULL);
|
||||
(eprop->property->klass, text, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1602,16 +1602,16 @@ static GtkWidget *
|
||||
glade_eprop_text_create_input (GladeEditorProperty *eprop)
|
||||
{
|
||||
GladeEPropText *eprop_text = GLADE_EPROP_TEXT (eprop);
|
||||
GladePropertyClass *class;
|
||||
GladePropertyClass *klass;
|
||||
GtkWidget *hbox;
|
||||
|
||||
class = eprop->class;
|
||||
klass = eprop->klass;
|
||||
|
||||
hbox = gtk_hbox_new (FALSE, 0);
|
||||
|
||||
if (class->visible_lines > 1 ||
|
||||
class->pspec->value_type == G_TYPE_STRV ||
|
||||
class->pspec->value_type == G_TYPE_VALUE_ARRAY)
|
||||
if (klass->visible_lines > 1 ||
|
||||
klass->pspec->value_type == G_TYPE_STRV ||
|
||||
klass->pspec->value_type == G_TYPE_VALUE_ARRAY)
|
||||
{
|
||||
GtkWidget *swindow;
|
||||
|
||||
@ -1646,7 +1646,7 @@ glade_eprop_text_create_input (GladeEditorProperty *eprop)
|
||||
eprop);
|
||||
}
|
||||
|
||||
if (class->translatable) {
|
||||
if (klass->translatable) {
|
||||
GtkWidget *button = gtk_button_new_with_label ("...");
|
||||
gtk_widget_show (button);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
|
||||
@ -1899,7 +1899,7 @@ glade_eprop_resource_entry_activate (GtkEntry *entry, GladeEditorProperty *eprop
|
||||
{
|
||||
GladeProject *project = glade_widget_get_project (eprop->property->widget);
|
||||
GValue *value = glade_property_class_make_gvalue_from_string
|
||||
(eprop->class, gtk_entry_get_text(entry), project);
|
||||
(eprop->klass, gtk_entry_get_text(entry), project);
|
||||
|
||||
/* Set project resource here where we still have the fullpath.
|
||||
*/
|
||||
@ -1941,7 +1941,7 @@ glade_eprop_resource_select_file (GtkButton *button, GladeEditorProperty *eprop)
|
||||
|
||||
gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), TRUE);
|
||||
|
||||
if (eprop->class->pspec->value_type == GDK_TYPE_PIXBUF)
|
||||
if (eprop->klass->pspec->value_type == GDK_TYPE_PIXBUF)
|
||||
{
|
||||
filter = gtk_file_filter_new ();
|
||||
gtk_file_filter_add_pixbuf_formats (filter);
|
||||
@ -1958,7 +1958,7 @@ glade_eprop_resource_select_file (GtkButton *button, GladeEditorProperty *eprop)
|
||||
basename = g_path_get_basename (file);
|
||||
|
||||
value = glade_property_class_make_gvalue_from_string
|
||||
(eprop->class, basename, project);
|
||||
(eprop->klass, basename, project);
|
||||
|
||||
glade_editor_property_commit (eprop, value);
|
||||
|
||||
@ -1982,7 +1982,7 @@ glade_eprop_resource_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
if (property == NULL) return;
|
||||
|
||||
file = glade_property_class_make_string_from_gvalue
|
||||
(eprop->class, property->value);
|
||||
(eprop->klass, property->value);
|
||||
if (file)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (eprop_resource->entry), file);
|
||||
@ -2088,7 +2088,7 @@ glade_eprop_object_is_selected (GladeEditorProperty *eprop,
|
||||
{
|
||||
GList *list;
|
||||
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (eprop->class->pspec))
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (eprop->klass->pspec))
|
||||
{
|
||||
glade_property_get (eprop->property, &list);
|
||||
return g_list_find (list, widget->object) != NULL;
|
||||
@ -2118,25 +2118,25 @@ glade_eprop_object_populate_view_real (GladeEditorProperty *eprop,
|
||||
if ((widget = glade_widget_get_from_gobject (list->data)) != NULL)
|
||||
{
|
||||
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (eprop->class->pspec))
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (eprop->klass->pspec))
|
||||
{
|
||||
has_decendant = glade_widget_has_decendant
|
||||
(widget,
|
||||
glade_param_spec_objects_get_type
|
||||
(GLADE_PARAM_SPEC_OBJECTS(eprop->class->pspec)));
|
||||
(GLADE_PARAM_SPEC_OBJECTS(eprop->klass->pspec)));
|
||||
good_type =
|
||||
glade_util_class_implements_interface
|
||||
(widget->adaptor->type,
|
||||
glade_param_spec_objects_get_type
|
||||
(GLADE_PARAM_SPEC_OBJECTS(eprop->class->pspec)));
|
||||
(GLADE_PARAM_SPEC_OBJECTS(eprop->klass->pspec)));
|
||||
}
|
||||
else
|
||||
{
|
||||
has_decendant = glade_widget_has_decendant
|
||||
(widget, eprop->class->pspec->value_type);
|
||||
(widget, eprop->klass->pspec->value_type);
|
||||
|
||||
good_type = g_type_is_a (widget->adaptor->type,
|
||||
eprop->class->pspec->value_type);
|
||||
eprop->klass->pspec->value_type);
|
||||
|
||||
}
|
||||
|
||||
@ -2344,23 +2344,23 @@ glade_eprop_object_dialog_title (GladeEditorProperty *eprop)
|
||||
{
|
||||
GladeWidgetAdaptor *adaptor;
|
||||
const gchar *format =
|
||||
GLADE_IS_PARAM_SPEC_OBJECTS (eprop->class->pspec) ?
|
||||
GLADE_IS_PARAM_SPEC_OBJECTS (eprop->klass->pspec) ?
|
||||
_("Choose %s implementors") : _("Choose a %s in this project");
|
||||
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (eprop->class->pspec))
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (eprop->klass->pspec))
|
||||
return g_strdup_printf (format, g_type_name
|
||||
(glade_param_spec_objects_get_type
|
||||
(GLADE_PARAM_SPEC_OBJECTS (eprop->class->pspec))));
|
||||
(GLADE_PARAM_SPEC_OBJECTS (eprop->klass->pspec))));
|
||||
else if ((adaptor =
|
||||
glade_widget_adaptor_get_by_type
|
||||
(eprop->class->pspec->value_type)) != NULL)
|
||||
(eprop->klass->pspec->value_type)) != NULL)
|
||||
return g_strdup_printf (format, adaptor->title);
|
||||
|
||||
/* Fallback on type name (which would look like "GtkButton"
|
||||
* instead of "Button" and maybe not translated).
|
||||
*/
|
||||
return g_strdup_printf (format, g_type_name
|
||||
(eprop->class->pspec->value_type));
|
||||
(eprop->klass->pspec->value_type));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -2434,7 +2434,7 @@ glade_eprop_object_show_dialog (GtkWidget *dialog_button,
|
||||
if (selected)
|
||||
{
|
||||
GValue *value = glade_property_class_make_gvalue_from_string
|
||||
(eprop->class, selected->name, project);
|
||||
(eprop->klass, selected->name, project);
|
||||
|
||||
glade_editor_property_commit (eprop, value);
|
||||
|
||||
@ -2445,7 +2445,7 @@ glade_eprop_object_show_dialog (GtkWidget *dialog_button,
|
||||
else if (res == GLADE_RESPONSE_CLEAR)
|
||||
{
|
||||
GValue *value = glade_property_class_make_gvalue_from_string
|
||||
(eprop->class, NULL, project);
|
||||
(eprop->klass, NULL, project);
|
||||
|
||||
glade_editor_property_commit (eprop, value);
|
||||
|
||||
@ -2468,7 +2468,7 @@ glade_eprop_object_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
if (property == NULL) return;
|
||||
|
||||
if ((obj_name = glade_property_class_make_string_from_gvalue
|
||||
(eprop->class, property->value)) != NULL)
|
||||
(eprop->klass, property->value)) != NULL)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (eprop_object->entry), obj_name);
|
||||
g_free (obj_name);
|
||||
@ -2539,7 +2539,7 @@ glade_eprop_objects_load (GladeEditorProperty *eprop, GladeProperty *property)
|
||||
if (property == NULL) return;
|
||||
|
||||
if ((obj_name = glade_property_class_make_string_from_gvalue
|
||||
(eprop->class, property->value)) != NULL)
|
||||
(eprop->klass, property->value)) != NULL)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (eprop_objects->entry), obj_name);
|
||||
g_free (obj_name);
|
||||
@ -2636,7 +2636,7 @@ glade_eprop_objects_show_dialog (GtkWidget *dialog_button,
|
||||
glade_eprop_objects_selected_widget, &selected);
|
||||
|
||||
value = glade_property_class_make_gvalue
|
||||
(eprop->class, selected);
|
||||
(eprop->klass, selected);
|
||||
|
||||
glade_editor_property_commit (eprop, value);
|
||||
|
||||
@ -2646,7 +2646,7 @@ glade_eprop_objects_show_dialog (GtkWidget *dialog_button,
|
||||
else if (res == GLADE_RESPONSE_CLEAR)
|
||||
{
|
||||
GValue *value = glade_property_class_make_gvalue
|
||||
(eprop->class, NULL);
|
||||
(eprop->klass, NULL);
|
||||
|
||||
glade_editor_property_commit (eprop, value);
|
||||
|
||||
@ -3073,7 +3073,7 @@ glade_eprop_accel_load (GladeEditorProperty *eprop,
|
||||
if (property == NULL) return;
|
||||
|
||||
if ((accels = glade_property_class_make_string_from_gvalue
|
||||
(eprop->class, property->value)) != NULL)
|
||||
(eprop->klass, property->value)) != NULL)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (eprop_accel->entry), accels);
|
||||
g_free (accels);
|
||||
@ -3103,7 +3103,7 @@ glade_eprop_accel_populate_view (GladeEditorProperty *eprop,
|
||||
{
|
||||
GladeEPropAccel *eprop_accel = GLADE_EPROP_ACCEL (eprop);
|
||||
GladeSignalClass *sclass;
|
||||
GladeWidgetAdaptor *adaptor = glade_widget_adaptor_from_pclass (eprop->class);
|
||||
GladeWidgetAdaptor *adaptor = glade_widget_adaptor_from_pclass (eprop->klass);
|
||||
GtkTreeStore *model = (GtkTreeStore *)gtk_tree_view_get_model (view);
|
||||
GtkTreeIter iter;
|
||||
GladeEpropIterTab *parent_tab;
|
||||
@ -3667,7 +3667,7 @@ glade_editor_property_type (GParamSpec *pspec)
|
||||
|
||||
/**
|
||||
* glade_editor_property_new:
|
||||
* @class: A #GladePropertyClass
|
||||
* @klass: A #GladePropertyClass
|
||||
* @use_command: Whether the undo/redo stack applies here.
|
||||
*
|
||||
* This is a factory function to create the correct type of
|
||||
@ -3676,7 +3676,7 @@ glade_editor_property_type (GParamSpec *pspec)
|
||||
* Returns: A newly created GladeEditorProperty of the correct type
|
||||
*/
|
||||
GladeEditorProperty *
|
||||
glade_editor_property_new (GladePropertyClass *class,
|
||||
glade_editor_property_new (GladePropertyClass *klass,
|
||||
gboolean use_command)
|
||||
{
|
||||
GladeEditorProperty *eprop;
|
||||
@ -3685,19 +3685,19 @@ glade_editor_property_new (GladePropertyClass *class,
|
||||
/* Find the right type of GladeEditorProperty for this
|
||||
* GladePropertyClass.
|
||||
*/
|
||||
if ((type = glade_editor_property_type (class->pspec)) == 0)
|
||||
if ((type = glade_editor_property_type (klass->pspec)) == 0)
|
||||
g_error ("%s : pspec '%s' type '%s' not implemented (%s)\n",
|
||||
G_GNUC_PRETTY_FUNCTION,
|
||||
class->name,
|
||||
g_type_name (G_PARAM_SPEC_TYPE (class->pspec)),
|
||||
g_type_name (class->pspec->value_type));
|
||||
klass->name,
|
||||
g_type_name (G_PARAM_SPEC_TYPE (klass->pspec)),
|
||||
g_type_name (klass->pspec->value_type));
|
||||
|
||||
/* special case for resource specs which are hand specified in the catalog. */
|
||||
if (class->resource) type = GLADE_TYPE_EPROP_RESOURCE;
|
||||
if (klass->resource) type = GLADE_TYPE_EPROP_RESOURCE;
|
||||
|
||||
/* Create and return the correct type of GladeEditorProperty */
|
||||
eprop = g_object_new (type,
|
||||
"property-class", class,
|
||||
"property-class", klass,
|
||||
"use-command", use_command,
|
||||
NULL);
|
||||
|
||||
@ -3726,7 +3726,7 @@ glade_editor_property_new_from_widget (GladeWidget *widget,
|
||||
p = glade_widget_get_property (widget, property);
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY (p), NULL);
|
||||
|
||||
eprop = glade_editor_property_new (p->class, use_command);
|
||||
eprop = glade_editor_property_new (p->klass, use_command);
|
||||
glade_editor_property_load (eprop, p);
|
||||
|
||||
return eprop;
|
||||
@ -3784,7 +3784,7 @@ glade_editor_property_load_by_widget (GladeEditorProperty *eprop,
|
||||
|
||||
if (widget)
|
||||
/* properties are allowed to be missing on some internal widgets */
|
||||
property = glade_widget_get_property (widget, eprop->class->id);
|
||||
property = glade_widget_get_property (widget, eprop->klass->id);
|
||||
|
||||
glade_editor_property_load (eprop, property);
|
||||
}
|
||||
@ -3803,11 +3803,11 @@ glade_editor_property_show_info (GladeEditorProperty *eprop)
|
||||
|
||||
g_return_if_fail (GLADE_IS_EDITOR_PROPERTY (eprop));
|
||||
|
||||
adaptor = glade_widget_adaptor_from_pclass (eprop->class);
|
||||
adaptor = glade_widget_adaptor_from_pclass (eprop->klass);
|
||||
|
||||
g_object_get (adaptor, "book", &book, NULL);
|
||||
|
||||
if (eprop->class->virtual == FALSE &&
|
||||
if (eprop->klass->virt == FALSE &&
|
||||
book != NULL)
|
||||
gtk_widget_show (eprop->info);
|
||||
else
|
||||
|
@ -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");
|
||||
}
|
||||
else
|
||||
gtk_widget_destroy (GTK_WIDGET (new));
|
||||
gtk_widget_destroy (GTK_WIDGET (new_widget));
|
||||
}
|
||||
|
||||
gboolean GLADEGTK_API
|
||||
@ -2800,7 +2800,7 @@ void GLADEGTK_API
|
||||
glade_gtk_expander_replace_child (GladeWidgetAdaptor *adaptor,
|
||||
GtkWidget *container,
|
||||
GtkWidget *current,
|
||||
GtkWidget *new)
|
||||
GtkWidget *new_widget)
|
||||
{
|
||||
gchar *special_child_type;
|
||||
|
||||
@ -2809,8 +2809,8 @@ glade_gtk_expander_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_expander_set_label_widget (GTK_EXPANDER (container), new);
|
||||
g_object_set_data (G_OBJECT (new_widget), "special-child-type", "label_item");
|
||||
gtk_expander_set_label_widget (GTK_EXPANDER (container), new_widget);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2819,7 +2819,7 @@ glade_gtk_expander_replace_child (GladeWidgetAdaptor *adaptor,
|
||||
(GTK_TYPE_CONTAINER)->replace_child (adaptor,
|
||||
G_OBJECT (container),
|
||||
G_OBJECT (current),
|
||||
G_OBJECT (new));
|
||||
G_OBJECT (new_widget));
|
||||
}
|
||||
|
||||
|
||||
@ -3513,7 +3513,7 @@ void GLADEGTK_API
|
||||
glade_gtk_button_replace_child (GladeWidgetAdaptor *adaptor,
|
||||
GtkWidget *container,
|
||||
GtkWidget *current,
|
||||
GtkWidget *new)
|
||||
GtkWidget *new_widget)
|
||||
{
|
||||
GladeWidget *gbutton = glade_widget_get_from_gobject (container);
|
||||
|
||||
@ -3523,9 +3523,9 @@ glade_gtk_button_replace_child (GladeWidgetAdaptor *adaptor,
|
||||
(GTK_TYPE_CONTAINER)->replace_child (adaptor,
|
||||
G_OBJECT (container),
|
||||
G_OBJECT (current),
|
||||
G_OBJECT (new));
|
||||
G_OBJECT (new_widget));
|
||||
|
||||
if (GLADE_IS_PLACEHOLDER (new))
|
||||
if (GLADE_IS_PLACEHOLDER (new_widget))
|
||||
glade_widget_property_set_sensitive (gbutton, "glade-type", TRUE, NULL);
|
||||
else
|
||||
glade_widget_property_set_sensitive (gbutton, "glade-type", FALSE,
|
||||
@ -5704,10 +5704,10 @@ void GLADEGTK_API
|
||||
glade_gtk_assistant_replace_child (GladeWidgetAdaptor *adaptor,
|
||||
GObject *container,
|
||||
GObject *current,
|
||||
GObject *new)
|
||||
GObject *new_object)
|
||||
{
|
||||
GtkAssistant *assistant = GTK_ASSISTANT (container);
|
||||
GtkWidget *page = GTK_WIDGET (new), *old_page = GTK_WIDGET (current);
|
||||
GtkWidget *page = GTK_WIDGET (new_object), *old_page = GTK_WIDGET (current);
|
||||
gint pos = glade_gtk_assistant_get_page (assistant, old_page);
|
||||
gboolean set_current = gtk_assistant_get_current_page (assistant) == pos;
|
||||
|
||||
|
@ -113,19 +113,19 @@ glade_palette_box_get_type (void)
|
||||
}
|
||||
|
||||
static void
|
||||
glade_palette_box_class_init (GladePaletteBoxClass *class)
|
||||
glade_palette_box_class_init (GladePaletteBoxClass *klass)
|
||||
{
|
||||
GObjectClass *gobject_class;
|
||||
GtkWidgetClass *widget_class;
|
||||
GtkContainerClass *container_class;
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
gobject_class = G_OBJECT_CLASS (class);
|
||||
gobject_class = G_OBJECT_CLASS (klass);
|
||||
gobject_class->set_property = glade_palette_box_set_property;
|
||||
gobject_class->get_property = glade_palette_box_get_property;
|
||||
|
||||
container_class = GTK_CONTAINER_CLASS (class);
|
||||
container_class = GTK_CONTAINER_CLASS (klass);
|
||||
container_class->add = glade_palette_box_add;
|
||||
container_class->remove = glade_palette_box_remove;
|
||||
container_class->forall = glade_palette_box_forall;
|
||||
@ -133,7 +133,7 @@ glade_palette_box_class_init (GladePaletteBoxClass *class)
|
||||
container_class->set_child_property = glade_palette_box_set_child_property;
|
||||
container_class->get_child_property = glade_palette_box_get_child_property;
|
||||
|
||||
widget_class = GTK_WIDGET_CLASS (class);
|
||||
widget_class = GTK_WIDGET_CLASS (klass);
|
||||
widget_class->size_request = glade_palette_box_size_request;
|
||||
widget_class->size_allocate = glade_palette_box_size_allocate;
|
||||
|
||||
|
@ -235,12 +235,12 @@ glade_palette_item_dispose (GObject *object)
|
||||
}
|
||||
|
||||
static void
|
||||
glade_palette_item_class_init (GladePaletteItemClass *class)
|
||||
glade_palette_item_class_init (GladePaletteItemClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (class);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
|
||||
object_class->get_property = glade_palette_item_get_property;
|
||||
|
@ -312,14 +312,14 @@ glade_palette_finalize (GObject *object)
|
||||
}
|
||||
|
||||
static void
|
||||
glade_palette_class_init (GladePaletteClass *class)
|
||||
glade_palette_class_init (GladePaletteClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (class);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
class->toggled = NULL;
|
||||
klass->toggled = NULL;
|
||||
|
||||
object_class->get_property = glade_palette_get_property;
|
||||
object_class->set_property = glade_palette_set_property;
|
||||
|
@ -660,17 +660,17 @@ glade_project_view_cell_function (GtkTreeViewColumn *tree_column,
|
||||
}
|
||||
|
||||
static void
|
||||
glade_project_view_class_init (GladeProjectViewClass *class)
|
||||
glade_project_view_class_init (GladeProjectViewClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (class);
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
class->add_item = glade_project_view_add_item;
|
||||
class->remove_item = glade_project_view_remove_item;
|
||||
class->widget_name_changed = glade_project_view_widget_name_changed;
|
||||
class->selection_update = glade_project_view_selection_update;
|
||||
klass->add_item = glade_project_view_add_item;
|
||||
klass->remove_item = glade_project_view_remove_item;
|
||||
klass->widget_name_changed = glade_project_view_widget_name_changed;
|
||||
klass->selection_update = glade_project_view_selection_update;
|
||||
|
||||
/**
|
||||
* GladeProjectView::item-activated:
|
||||
|
@ -2260,15 +2260,15 @@ glade_project_window_finalize (GObject *object)
|
||||
}
|
||||
|
||||
static void
|
||||
glade_project_window_class_init (GladeProjectWindowClass * class)
|
||||
glade_project_window_class_init (GladeProjectWindowClass * klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
GladeAppClass *app_class;
|
||||
g_return_if_fail (class != NULL);
|
||||
g_return_if_fail (klass != NULL);
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
object_class = G_OBJECT_CLASS (class);
|
||||
app_class = GLADE_APP_CLASS (class);
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
app_class = GLADE_APP_CLASS (klass);
|
||||
|
||||
object_class->finalize = glade_project_window_finalize;
|
||||
|
||||
|
@ -364,32 +364,32 @@ glade_project_init (GladeProject *project)
|
||||
}
|
||||
|
||||
static void
|
||||
glade_project_class_init (GladeProjectClass *class)
|
||||
glade_project_class_init (GladeProjectClass *klass)
|
||||
{
|
||||
GObjectClass *object_class;
|
||||
|
||||
object_class = G_OBJECT_CLASS (class);
|
||||
object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
object_class->get_property = glade_project_get_property;
|
||||
object_class->finalize = glade_project_finalize;
|
||||
object_class->dispose = glade_project_dispose;
|
||||
|
||||
class->add_object = NULL;
|
||||
class->remove_object = NULL;
|
||||
class->undo = glade_project_undo_impl;
|
||||
class->redo = glade_project_redo_impl;
|
||||
class->next_undo_item = glade_project_next_undo_item_impl;
|
||||
class->next_redo_item = glade_project_next_redo_item_impl;
|
||||
class->push_undo = glade_project_push_undo_impl;
|
||||
klass->add_object = NULL;
|
||||
klass->remove_object = NULL;
|
||||
klass->undo = glade_project_undo_impl;
|
||||
klass->redo = glade_project_redo_impl;
|
||||
klass->next_undo_item = glade_project_next_undo_item_impl;
|
||||
klass->next_redo_item = glade_project_next_redo_item_impl;
|
||||
klass->push_undo = glade_project_push_undo_impl;
|
||||
|
||||
class->widget_name_changed = NULL;
|
||||
class->selection_changed = NULL;
|
||||
class->close = NULL;
|
||||
class->resource_added = NULL;
|
||||
class->resource_removed = NULL;
|
||||
class->changed = glade_project_changed_impl;
|
||||
klass->widget_name_changed = NULL;
|
||||
klass->selection_changed = NULL;
|
||||
klass->close = NULL;
|
||||
klass->resource_added = NULL;
|
||||
klass->resource_removed = NULL;
|
||||
klass->changed = glade_project_changed_impl;
|
||||
|
||||
/**
|
||||
* GladeProject::add-widget:
|
||||
@ -744,7 +744,7 @@ gp_sync_resources (GladeProject *project,
|
||||
for (l = prop_list; l; l = l->next)
|
||||
{
|
||||
property = l->data;
|
||||
if (property->class->resource)
|
||||
if (property->klass->resource)
|
||||
{
|
||||
GValue value = { 0, };
|
||||
|
||||
@ -757,7 +757,7 @@ gp_sync_resources (GladeProject *project,
|
||||
glade_property_get_value (property, &value);
|
||||
|
||||
if ((resource = glade_property_class_make_string_from_gvalue
|
||||
(property->class, &value)) != NULL)
|
||||
(property->klass, &value)) != NULL)
|
||||
{
|
||||
full_resource = glade_project_resource_fullpath
|
||||
(prev_project ? prev_project : project, resource);
|
||||
@ -1531,7 +1531,7 @@ glade_project_fix_object_props (GladeProject *project)
|
||||
{
|
||||
property = GLADE_PROPERTY (ll->data);
|
||||
|
||||
if (glade_property_class_is_object (property->class) &&
|
||||
if (glade_property_class_is_object (property->klass) &&
|
||||
(txt = g_object_get_data (G_OBJECT (property),
|
||||
"glade-loaded-object")) != NULL)
|
||||
{
|
||||
@ -1539,7 +1539,7 @@ glade_project_fix_object_props (GladeProject *project)
|
||||
* (this magicly works for both objects & object lists)
|
||||
*/
|
||||
value = glade_property_class_make_gvalue_from_string
|
||||
(property->class, txt, project);
|
||||
(property->klass, txt, project);
|
||||
|
||||
glade_property_set_value (property, value);
|
||||
|
||||
|
@ -166,7 +166,7 @@ glade_property_class_new (gpointer handle)
|
||||
property_class->resource = FALSE;
|
||||
property_class->translatable = FALSE;
|
||||
property_class->type = GPC_NORMAL;
|
||||
property_class->virtual = TRUE;
|
||||
property_class->virt = TRUE;
|
||||
property_class->transfer_on_paste = FALSE;
|
||||
property_class->weight = -1.0;
|
||||
|
||||
@ -250,7 +250,7 @@ glade_property_class_clone (GladePropertyClass *property_class)
|
||||
* glade_property_class_free:
|
||||
* @property_class: a #GladePropertyClass
|
||||
*
|
||||
* Frees @class and its associated memory.
|
||||
* Frees @klass and its associated memory.
|
||||
*/
|
||||
void
|
||||
glade_property_class_free (GladePropertyClass *property_class)
|
||||
@ -336,14 +336,14 @@ glade_property_class_make_string_from_enum (GType etype, gint eval)
|
||||
}
|
||||
|
||||
static gchar *
|
||||
glade_property_class_make_string_from_flags (GladePropertyClass *class, guint fvals, gboolean displayables)
|
||||
glade_property_class_make_string_from_flags (GladePropertyClass *klass, guint fvals, gboolean displayables)
|
||||
{
|
||||
GFlagsClass *fclass;
|
||||
GFlagsValue *fvalue;
|
||||
GString *string;
|
||||
gchar *retval;
|
||||
|
||||
g_return_val_if_fail ((fclass = g_type_class_ref (class->pspec->value_type)) != NULL, NULL);
|
||||
g_return_val_if_fail ((fclass = g_type_class_ref (klass->pspec->value_type)) != NULL, NULL);
|
||||
|
||||
string = g_string_new("");
|
||||
|
||||
@ -354,7 +354,7 @@ glade_property_class_make_string_from_flags (GladePropertyClass *class, guint fv
|
||||
fvals &= ~fvalue->value;
|
||||
|
||||
if (displayables)
|
||||
val_str = glade_property_class_get_displayable_value(class, fvalue->value);
|
||||
val_str = glade_property_class_get_displayable_value(klass, fvalue->value);
|
||||
|
||||
if (string->str[0])
|
||||
g_string_append(string, " | ");
|
||||
@ -953,78 +953,78 @@ glade_property_class_make_gvalue_from_string (GladePropertyClass *property_class
|
||||
* and a @vl arg of the correct type.
|
||||
*/
|
||||
GValue *
|
||||
glade_property_class_make_gvalue_from_vl (GladePropertyClass *class,
|
||||
glade_property_class_make_gvalue_from_vl (GladePropertyClass *klass,
|
||||
va_list vl)
|
||||
{
|
||||
GValue *value;
|
||||
|
||||
g_return_val_if_fail (class != NULL, NULL);
|
||||
g_return_val_if_fail (klass != NULL, NULL);
|
||||
|
||||
value = g_new0 (GValue, 1);
|
||||
g_value_init (value, class->pspec->value_type);
|
||||
g_value_init (value, klass->pspec->value_type);
|
||||
|
||||
if (G_IS_PARAM_SPEC_ENUM(class->pspec))
|
||||
if (G_IS_PARAM_SPEC_ENUM(klass->pspec))
|
||||
g_value_set_enum (value, va_arg (vl, gint));
|
||||
else if (G_IS_PARAM_SPEC_FLAGS(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_FLAGS(klass->pspec))
|
||||
g_value_set_flags (value, va_arg (vl, gint));
|
||||
else if (G_IS_PARAM_SPEC_INT(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_INT(klass->pspec))
|
||||
g_value_set_int (value, va_arg (vl, gint));
|
||||
else if (G_IS_PARAM_SPEC_UINT(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UINT(klass->pspec))
|
||||
g_value_set_uint (value, va_arg (vl, guint));
|
||||
else if (G_IS_PARAM_SPEC_LONG(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_LONG(klass->pspec))
|
||||
g_value_set_long (value, va_arg (vl, glong));
|
||||
else if (G_IS_PARAM_SPEC_ULONG(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_ULONG(klass->pspec))
|
||||
g_value_set_ulong (value, va_arg (vl, gulong));
|
||||
else if (G_IS_PARAM_SPEC_INT64(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_INT64(klass->pspec))
|
||||
g_value_set_int64 (value, va_arg (vl, gint64));
|
||||
else if (G_IS_PARAM_SPEC_UINT64(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UINT64(klass->pspec))
|
||||
g_value_set_uint64 (value, va_arg (vl, guint64));
|
||||
else if (G_IS_PARAM_SPEC_FLOAT(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_FLOAT(klass->pspec))
|
||||
g_value_set_float (value, (gfloat)va_arg (vl, gdouble));
|
||||
else if (G_IS_PARAM_SPEC_DOUBLE(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_DOUBLE(klass->pspec))
|
||||
g_value_set_double (value, va_arg (vl, gdouble));
|
||||
else if (G_IS_PARAM_SPEC_STRING(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_STRING(klass->pspec))
|
||||
g_value_set_string (value, va_arg (vl, gchar *));
|
||||
else if (G_IS_PARAM_SPEC_CHAR(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_CHAR(klass->pspec))
|
||||
g_value_set_char (value, (gchar)va_arg (vl, gint));
|
||||
else if (G_IS_PARAM_SPEC_UCHAR(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UCHAR(klass->pspec))
|
||||
g_value_set_uchar (value, (guchar)va_arg (vl, guint));
|
||||
else if (G_IS_PARAM_SPEC_UNICHAR(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UNICHAR(klass->pspec))
|
||||
g_value_set_uint (value, va_arg (vl, gunichar));
|
||||
else if (G_IS_PARAM_SPEC_BOOLEAN(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_BOOLEAN(klass->pspec))
|
||||
g_value_set_boolean (value, va_arg (vl, gboolean));
|
||||
else if (G_IS_PARAM_SPEC_OBJECT(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_OBJECT(klass->pspec))
|
||||
g_value_set_object (value, va_arg (vl, gpointer));
|
||||
else if (G_IS_PARAM_SPEC_BOXED(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_BOXED(klass->pspec))
|
||||
g_value_set_boxed (value, va_arg (vl, gpointer));
|
||||
else if (GLADE_IS_PARAM_SPEC_OBJECTS(class->pspec))
|
||||
else if (GLADE_IS_PARAM_SPEC_OBJECTS(klass->pspec))
|
||||
g_value_set_boxed (value, va_arg (vl, gpointer));
|
||||
else
|
||||
g_critical ("Unsupported pspec type %s",
|
||||
g_type_name(G_PARAM_SPEC_TYPE (class->pspec)));
|
||||
g_type_name(G_PARAM_SPEC_TYPE (klass->pspec)));
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* glade_property_class_make_gvalue:
|
||||
* @class: A #GladePropertyClass
|
||||
* @klass: A #GladePropertyClass
|
||||
* @...: an argument of the correct type specified by @property_class
|
||||
*
|
||||
* Returns: A #GValue created based on the @property_class
|
||||
* and the provided argument.
|
||||
*/
|
||||
GValue *
|
||||
glade_property_class_make_gvalue (GladePropertyClass *class,
|
||||
glade_property_class_make_gvalue (GladePropertyClass *klass,
|
||||
...)
|
||||
{
|
||||
GValue *value;
|
||||
va_list vl;
|
||||
|
||||
g_return_val_if_fail (class != NULL, NULL);
|
||||
g_return_val_if_fail (klass != NULL, NULL);
|
||||
|
||||
va_start (vl, class);
|
||||
value = glade_property_class_make_gvalue_from_vl (class, vl);
|
||||
va_start (vl, klass);
|
||||
value = glade_property_class_make_gvalue_from_vl (klass, vl);
|
||||
va_end (vl);
|
||||
|
||||
return value;
|
||||
@ -1033,69 +1033,69 @@ glade_property_class_make_gvalue (GladePropertyClass *class,
|
||||
|
||||
/**
|
||||
* glade_property_class_set_vl_from_gvalue:
|
||||
* @class: A #GladePropertyClass
|
||||
* @klass: A #GladePropertyClass
|
||||
* @value: A #GValue to set
|
||||
* @vl: a #va_list holding one argument of the correct type
|
||||
* specified by @class
|
||||
* specified by @klass
|
||||
*
|
||||
*
|
||||
* Sets @vl from @value based on @class criteria.
|
||||
* Sets @vl from @value based on @klass criteria.
|
||||
*/
|
||||
void
|
||||
glade_property_class_set_vl_from_gvalue (GladePropertyClass *class,
|
||||
glade_property_class_set_vl_from_gvalue (GladePropertyClass *klass,
|
||||
GValue *value,
|
||||
va_list vl)
|
||||
{
|
||||
g_return_if_fail (class != NULL);
|
||||
g_return_if_fail (klass != NULL);
|
||||
g_return_if_fail (value != NULL);
|
||||
|
||||
/* The argument is a pointer of the specified type, cast the pointer and assign
|
||||
* the value using the proper g_value_get_ variation.
|
||||
*/
|
||||
if (G_IS_PARAM_SPEC_ENUM(class->pspec))
|
||||
if (G_IS_PARAM_SPEC_ENUM(klass->pspec))
|
||||
*(gint *)(va_arg (vl, gint *)) = g_value_get_enum (value);
|
||||
else if (G_IS_PARAM_SPEC_FLAGS(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_FLAGS(klass->pspec))
|
||||
*(gint *)(va_arg (vl, gint *)) = g_value_get_flags (value);
|
||||
else if (G_IS_PARAM_SPEC_INT(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_INT(klass->pspec))
|
||||
*(gint *)(va_arg (vl, gint *)) = g_value_get_int (value);
|
||||
else if (G_IS_PARAM_SPEC_UINT(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UINT(klass->pspec))
|
||||
*(guint *)(va_arg (vl, guint *)) = g_value_get_uint (value);
|
||||
else if (G_IS_PARAM_SPEC_LONG(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_LONG(klass->pspec))
|
||||
*(glong *)(va_arg (vl, glong *)) = g_value_get_long (value);
|
||||
else if (G_IS_PARAM_SPEC_ULONG(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_ULONG(klass->pspec))
|
||||
*(gulong *)(va_arg (vl, gulong *)) = g_value_get_ulong (value);
|
||||
else if (G_IS_PARAM_SPEC_INT64(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_INT64(klass->pspec))
|
||||
*(gint64 *)(va_arg (vl, gint64 *)) = g_value_get_int64 (value);
|
||||
else if (G_IS_PARAM_SPEC_UINT64(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UINT64(klass->pspec))
|
||||
*(guint64 *)(va_arg (vl, guint64 *)) = g_value_get_uint64 (value);
|
||||
else if (G_IS_PARAM_SPEC_FLOAT(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_FLOAT(klass->pspec))
|
||||
*(gfloat *)(va_arg (vl, gdouble *)) = g_value_get_float (value);
|
||||
else if (G_IS_PARAM_SPEC_DOUBLE(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_DOUBLE(klass->pspec))
|
||||
*(gdouble *)(va_arg (vl, gdouble *)) = g_value_get_double (value);
|
||||
else if (G_IS_PARAM_SPEC_STRING(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_STRING(klass->pspec))
|
||||
*(gchar **)(va_arg (vl, gchar *)) = (gchar *)g_value_get_string (value);
|
||||
else if (G_IS_PARAM_SPEC_CHAR(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_CHAR(klass->pspec))
|
||||
*(gchar *)(va_arg (vl, gint *)) = g_value_get_char (value);
|
||||
else if (G_IS_PARAM_SPEC_UCHAR(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UCHAR(klass->pspec))
|
||||
*(guchar *)(va_arg (vl, guint *)) = g_value_get_uchar (value);
|
||||
else if (G_IS_PARAM_SPEC_UNICHAR(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_UNICHAR(klass->pspec))
|
||||
*(guint *)(va_arg (vl, gunichar *)) = g_value_get_uint (value);
|
||||
else if (G_IS_PARAM_SPEC_BOOLEAN(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_BOOLEAN(klass->pspec))
|
||||
*(gboolean *)(va_arg (vl, gboolean *)) = g_value_get_boolean (value);
|
||||
else if (G_IS_PARAM_SPEC_OBJECT(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_OBJECT(klass->pspec))
|
||||
*(gpointer *)(va_arg (vl, gpointer *)) = g_value_get_object (value);
|
||||
else if (G_IS_PARAM_SPEC_BOXED(class->pspec))
|
||||
else if (G_IS_PARAM_SPEC_BOXED(klass->pspec))
|
||||
*(gpointer *)(va_arg (vl, gpointer *)) = g_value_get_boxed (value);
|
||||
else if (GLADE_IS_PARAM_SPEC_OBJECTS(class->pspec))
|
||||
else if (GLADE_IS_PARAM_SPEC_OBJECTS(klass->pspec))
|
||||
*(gpointer *)(va_arg (vl, gpointer *)) = g_value_get_boxed (value);
|
||||
else
|
||||
g_critical ("Unsupported pspec type %s",
|
||||
g_type_name(G_PARAM_SPEC_TYPE (class->pspec)));
|
||||
g_type_name(G_PARAM_SPEC_TYPE (klass->pspec)));
|
||||
}
|
||||
|
||||
/**
|
||||
* glade_property_class_get_from_gvalue:
|
||||
* @class: A #GladePropertyClass
|
||||
* @klass: A #GladePropertyClass
|
||||
* @value: A #GValue to set
|
||||
* @...: a return location of the correct type
|
||||
*
|
||||
@ -1103,16 +1103,16 @@ glade_property_class_set_vl_from_gvalue (GladePropertyClass *class,
|
||||
* Assignes the provided return location to @value
|
||||
*/
|
||||
void
|
||||
glade_property_class_get_from_gvalue (GladePropertyClass *class,
|
||||
glade_property_class_get_from_gvalue (GladePropertyClass *klass,
|
||||
GValue *value,
|
||||
...)
|
||||
{
|
||||
va_list vl;
|
||||
|
||||
g_return_if_fail (class != NULL);
|
||||
g_return_if_fail (klass != NULL);
|
||||
|
||||
va_start (vl, value);
|
||||
glade_property_class_set_vl_from_gvalue (class, value, vl);
|
||||
glade_property_class_set_vl_from_gvalue (klass, value, vl);
|
||||
va_end (vl);
|
||||
}
|
||||
|
||||
@ -1240,7 +1240,7 @@ glade_property_class_new_from_spec (gpointer handle,
|
||||
* not virtual properties
|
||||
*/
|
||||
property_class = glade_property_class_new (handle);
|
||||
property_class->virtual = FALSE;
|
||||
property_class->virt = FALSE;
|
||||
property_class->pspec = spec;
|
||||
|
||||
/* We only use the writable properties */
|
||||
@ -1306,10 +1306,10 @@ glade_property_class_new_from_spec (gpointer handle,
|
||||
* Returns: whether or not to show this property in the editor
|
||||
*/
|
||||
gboolean
|
||||
glade_property_class_is_visible (GladePropertyClass *class)
|
||||
glade_property_class_is_visible (GladePropertyClass *klass)
|
||||
{
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (class), FALSE);
|
||||
return class->visible;
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (klass), FALSE);
|
||||
return klass->visible;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1321,20 +1321,20 @@ glade_property_class_is_visible (GladePropertyClass *class)
|
||||
* that refers to another object in this project.
|
||||
*/
|
||||
gboolean
|
||||
glade_property_class_is_object (GladePropertyClass *class)
|
||||
glade_property_class_is_object (GladePropertyClass *klass)
|
||||
{
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (class), FALSE);
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (klass), FALSE);
|
||||
|
||||
return (GLADE_IS_PARAM_SPEC_OBJECTS (class->pspec) ||
|
||||
(G_IS_PARAM_SPEC_OBJECT(class->pspec) &&
|
||||
class->pspec->value_type != GDK_TYPE_PIXBUF &&
|
||||
class->pspec->value_type != GTK_TYPE_ADJUSTMENT));
|
||||
return (GLADE_IS_PARAM_SPEC_OBJECTS (klass->pspec) ||
|
||||
(G_IS_PARAM_SPEC_OBJECT(klass->pspec) &&
|
||||
klass->pspec->value_type != GDK_TYPE_PIXBUF &&
|
||||
klass->pspec->value_type != GTK_TYPE_ADJUSTMENT));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* glade_property_class_get_displayable_value:
|
||||
* @class: the property class to search in
|
||||
* @klass: the property class to search in
|
||||
* @value: the value to search
|
||||
*
|
||||
* Search a displayable values for @value in this property class.
|
||||
@ -1342,10 +1342,10 @@ glade_property_class_is_object (GladePropertyClass *class)
|
||||
* Returns: a (gchar *) if a diplayable value was found, otherwise NULL.
|
||||
*/
|
||||
const gchar *
|
||||
glade_property_class_get_displayable_value(GladePropertyClass *class, gint value)
|
||||
glade_property_class_get_displayable_value(GladePropertyClass *klass, gint value)
|
||||
{
|
||||
gint i, len;
|
||||
GArray *disp_val = class->displayable_values;
|
||||
GArray *disp_val = klass->displayable_values;
|
||||
|
||||
if (disp_val == NULL) return NULL;
|
||||
|
||||
@ -1519,16 +1519,16 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
GladePropertyClass **property_class,
|
||||
const gchar *domain)
|
||||
{
|
||||
GladePropertyClass *class;
|
||||
GladePropertyClass *klass;
|
||||
gchar *buff;
|
||||
GladeXmlNode *child;
|
||||
|
||||
g_return_val_if_fail (property_class != NULL, FALSE);
|
||||
|
||||
/* for code cleanliness... */
|
||||
class = *property_class;
|
||||
klass = *property_class;
|
||||
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (class), FALSE);
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (klass), FALSE);
|
||||
g_return_val_if_fail (glade_xml_node_verify (node, GLADE_TAG_PROPERTY), FALSE);
|
||||
|
||||
/* check the id */
|
||||
@ -1543,7 +1543,7 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
*/
|
||||
if (glade_xml_get_property_boolean (node, GLADE_TAG_DISABLED, FALSE))
|
||||
{
|
||||
glade_property_class_free (class);
|
||||
glade_property_class_free (klass);
|
||||
*property_class = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
@ -1553,44 +1553,44 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
if (buff)
|
||||
{
|
||||
/* ... get the tooltip from the pspec ... */
|
||||
if ((class->pspec = glade_utils_get_pspec_from_funcname (buff)) != NULL)
|
||||
if ((klass->pspec = glade_utils_get_pspec_from_funcname (buff)) != NULL)
|
||||
{
|
||||
/* Make sure we can tell properties apart by there
|
||||
* owning class.
|
||||
*/
|
||||
class->pspec->owner_type = object_type;
|
||||
klass->pspec->owner_type = object_type;
|
||||
|
||||
if (class->tooltip) g_free (class->tooltip);
|
||||
if (class->name) g_free (class->name);
|
||||
if (klass->tooltip) g_free (klass->tooltip);
|
||||
if (klass->name) g_free (klass->name);
|
||||
|
||||
class->tooltip = g_strdup (g_param_spec_get_blurb (class->pspec));
|
||||
class->name = g_strdup (g_param_spec_get_nick (class->pspec));
|
||||
klass->tooltip = g_strdup (g_param_spec_get_blurb (klass->pspec));
|
||||
klass->name = g_strdup (g_param_spec_get_nick (klass->pspec));
|
||||
|
||||
if (class->pspec->flags & G_PARAM_CONSTRUCT_ONLY)
|
||||
class->construct_only = TRUE;
|
||||
if (klass->pspec->flags & G_PARAM_CONSTRUCT_ONLY)
|
||||
klass->construct_only = TRUE;
|
||||
|
||||
if (class->def) {
|
||||
g_value_unset (class->def);
|
||||
g_free (class->def);
|
||||
if (klass->def) {
|
||||
g_value_unset (klass->def);
|
||||
g_free (klass->def);
|
||||
}
|
||||
class->def = glade_property_class_get_default_from_spec (class->pspec);
|
||||
klass->def = glade_property_class_get_default_from_spec (klass->pspec);
|
||||
|
||||
if (class->orig_def == NULL)
|
||||
class->orig_def =
|
||||
glade_property_class_get_default_from_spec (class->pspec);
|
||||
if (klass->orig_def == NULL)
|
||||
klass->orig_def =
|
||||
glade_property_class_get_default_from_spec (klass->pspec);
|
||||
|
||||
}
|
||||
|
||||
g_free (buff);
|
||||
}
|
||||
else if (!class->pspec)
|
||||
else if (!klass->pspec)
|
||||
{
|
||||
/* If catalog file didn't specify a pspec function
|
||||
* and this property isn't found by introspection
|
||||
* we simply handle it as a property that has been
|
||||
* disabled.
|
||||
*/
|
||||
glade_property_class_free (class);
|
||||
glade_property_class_free (klass);
|
||||
*property_class = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
@ -1598,97 +1598,97 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
/* Get the default */
|
||||
if ((buff = glade_xml_get_property_string (node, GLADE_TAG_DEFAULT)) != NULL)
|
||||
{
|
||||
if (class->def) {
|
||||
g_value_unset (class->def);
|
||||
g_free (class->def);
|
||||
if (klass->def) {
|
||||
g_value_unset (klass->def);
|
||||
g_free (klass->def);
|
||||
}
|
||||
class->def = glade_property_class_make_gvalue_from_string (class, buff, NULL);
|
||||
klass->def = glade_property_class_make_gvalue_from_string (klass, buff, NULL);
|
||||
g_free (buff);
|
||||
}
|
||||
|
||||
/* If needed, update the name... */
|
||||
if ((buff = glade_xml_get_property_string (node, GLADE_TAG_NAME)) != NULL)
|
||||
{
|
||||
g_free (class->name);
|
||||
class->name = g_strdup (dgettext (domain, buff));
|
||||
g_free (klass->name);
|
||||
klass->name = g_strdup (dgettext (domain, buff));
|
||||
}
|
||||
|
||||
/* ...and the tooltip */
|
||||
if ((buff = glade_xml_get_value_string (node, GLADE_TAG_TOOLTIP)) != NULL)
|
||||
{
|
||||
g_free (class->tooltip);
|
||||
class->tooltip = g_strdup (dgettext (domain, buff));
|
||||
g_free (klass->tooltip);
|
||||
klass->tooltip = g_strdup (dgettext (domain, buff));
|
||||
}
|
||||
|
||||
/* If this property's value is an enumeration then we try to get the displayable values */
|
||||
if (G_IS_PARAM_SPEC_ENUM(class->pspec))
|
||||
if (G_IS_PARAM_SPEC_ENUM(klass->pspec))
|
||||
{
|
||||
GEnumClass *eclass = g_type_class_ref(class->pspec->value_type);
|
||||
GEnumClass *eclass = g_type_class_ref(klass->pspec->value_type);
|
||||
|
||||
child = glade_xml_search_child (node, GLADE_TAG_DISPLAYABLE_VALUES);
|
||||
if (child)
|
||||
class->displayable_values = gpc_get_displayable_values_from_node
|
||||
klass->displayable_values = gpc_get_displayable_values_from_node
|
||||
(child, eclass->values, eclass->n_values, domain);
|
||||
|
||||
g_type_class_unref(eclass);
|
||||
}
|
||||
|
||||
/* the same way if it is a Flags property */
|
||||
if (G_IS_PARAM_SPEC_FLAGS(class->pspec))
|
||||
if (G_IS_PARAM_SPEC_FLAGS(klass->pspec))
|
||||
{
|
||||
GFlagsClass *fclass = g_type_class_ref(class->pspec->value_type);
|
||||
GFlagsClass *fclass = g_type_class_ref(klass->pspec->value_type);
|
||||
|
||||
child = glade_xml_search_child (node, GLADE_TAG_DISPLAYABLE_VALUES);
|
||||
if (child)
|
||||
class->displayable_values = gpc_get_displayable_values_from_node
|
||||
klass->displayable_values = gpc_get_displayable_values_from_node
|
||||
(child, (GEnumValue*)fclass->values, fclass->n_values, domain);
|
||||
|
||||
g_type_class_unref(fclass);
|
||||
}
|
||||
|
||||
/* Visible lines */
|
||||
glade_xml_get_value_int (node, GLADE_TAG_VISIBLE_LINES, &class->visible_lines);
|
||||
glade_xml_get_value_int (node, GLADE_TAG_VISIBLE_LINES, &klass->visible_lines);
|
||||
|
||||
/* Get the Parameters */
|
||||
if ((child = glade_xml_search_child (node, GLADE_TAG_PARAMETERS)) != NULL)
|
||||
class->parameters = glade_parameter_list_new_from_node (class->parameters, child);
|
||||
klass->parameters = glade_parameter_list_new_from_node (klass->parameters, child);
|
||||
|
||||
/* Whether or not the property is translatable. This is only used for
|
||||
* string properties.
|
||||
*/
|
||||
class->translatable = glade_xml_get_property_boolean (node, GLADE_TAG_TRANSLATABLE,
|
||||
class->translatable);
|
||||
klass->translatable = glade_xml_get_property_boolean (node, GLADE_TAG_TRANSLATABLE,
|
||||
klass->translatable);
|
||||
|
||||
/* common, optional, etc */
|
||||
class->common = glade_xml_get_property_boolean (node, GLADE_TAG_COMMON, class->common);
|
||||
class->optional = glade_xml_get_property_boolean (node, GLADE_TAG_OPTIONAL, class->optional);
|
||||
class->query = glade_xml_get_property_boolean (node, GLADE_TAG_QUERY, class->query);
|
||||
class->save = glade_xml_get_property_boolean (node, GLADE_TAG_SAVE, class->save);
|
||||
class->visible = glade_xml_get_property_boolean (node, GLADE_TAG_VISIBLE, class->visible);
|
||||
class->ignore = glade_xml_get_property_boolean (node, GLADE_TAG_IGNORE, class->ignore);
|
||||
class->resource = glade_xml_get_property_boolean (node, GLADE_TAG_RESOURCE, class->resource);
|
||||
class->weight = glade_xml_get_property_double (node, GLADE_TAG_WEIGHT, class->weight);
|
||||
class->transfer_on_paste = glade_xml_get_property_boolean (node, GLADE_TAG_TRANSFER_ON_PASTE, class->transfer_on_paste);
|
||||
klass->common = glade_xml_get_property_boolean (node, GLADE_TAG_COMMON, klass->common);
|
||||
klass->optional = glade_xml_get_property_boolean (node, GLADE_TAG_OPTIONAL, klass->optional);
|
||||
klass->query = glade_xml_get_property_boolean (node, GLADE_TAG_QUERY, klass->query);
|
||||
klass->save = glade_xml_get_property_boolean (node, GLADE_TAG_SAVE, klass->save);
|
||||
klass->visible = glade_xml_get_property_boolean (node, GLADE_TAG_VISIBLE, klass->visible);
|
||||
klass->ignore = glade_xml_get_property_boolean (node, GLADE_TAG_IGNORE, klass->ignore);
|
||||
klass->resource = glade_xml_get_property_boolean (node, GLADE_TAG_RESOURCE, klass->resource);
|
||||
klass->weight = glade_xml_get_property_double (node, GLADE_TAG_WEIGHT, klass->weight);
|
||||
klass->transfer_on_paste = glade_xml_get_property_boolean (node, GLADE_TAG_TRANSFER_ON_PASTE, klass->transfer_on_paste);
|
||||
|
||||
/* No atk introspection here.
|
||||
*/
|
||||
if (glade_xml_get_property_boolean (node, GLADE_TAG_ATK_ACTION, FALSE))
|
||||
class->type = GPC_ATK_ACTION;
|
||||
klass->type = GPC_ATK_ACTION;
|
||||
else if (glade_xml_get_property_boolean (node, GLADE_TAG_ATK_PROPERTY, FALSE))
|
||||
class->type = GPC_ATK_PROPERTY;
|
||||
klass->type = GPC_ATK_PROPERTY;
|
||||
|
||||
/* Special case pixbuf here.
|
||||
*/
|
||||
if (class->pspec->value_type == GDK_TYPE_PIXBUF)
|
||||
class->resource = TRUE;
|
||||
if (klass->pspec->value_type == GDK_TYPE_PIXBUF)
|
||||
klass->resource = TRUE;
|
||||
|
||||
if (class->optional)
|
||||
class->optional_default =
|
||||
if (klass->optional)
|
||||
klass->optional_default =
|
||||
glade_xml_get_property_boolean (node, GLADE_TAG_OPTIONAL_DEFAULT,
|
||||
class->optional_default);
|
||||
klass->optional_default);
|
||||
|
||||
/* notify that we changed the property class */
|
||||
class->is_modified = TRUE;
|
||||
klass->is_modified = TRUE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -1697,43 +1697,43 @@ glade_property_class_update_from_node (GladeXmlNode *node,
|
||||
|
||||
/**
|
||||
* glade_property_class_match:
|
||||
* @class: a #GladePropertyClass
|
||||
* @klass: a #GladePropertyClass
|
||||
* @comp: a #GladePropertyClass
|
||||
*
|
||||
* Returns: whether @class and @comp are a match or not
|
||||
* Returns: whether @klass and @comp are a match or not
|
||||
* (properties in seperate decendant heirarchies that
|
||||
* have the same name are not matches).
|
||||
*/
|
||||
gboolean
|
||||
glade_property_class_match (GladePropertyClass *class,
|
||||
glade_property_class_match (GladePropertyClass *klass,
|
||||
GladePropertyClass *comp)
|
||||
{
|
||||
g_return_val_if_fail (class != NULL, FALSE);
|
||||
g_return_val_if_fail (klass != NULL, FALSE);
|
||||
g_return_val_if_fail (comp != NULL, FALSE);
|
||||
|
||||
return (strcmp (class->id, comp->id) == 0 &&
|
||||
class->packing == comp->packing &&
|
||||
class->pspec->owner_type == comp->pspec->owner_type);
|
||||
return (strcmp (klass->id, comp->id) == 0 &&
|
||||
klass->packing == comp->packing &&
|
||||
klass->pspec->owner_type == comp->pspec->owner_type);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* glade_property_class_void_value:
|
||||
* @class: a #GladePropertyClass
|
||||
* @klass: a #GladePropertyClass
|
||||
*
|
||||
* Returns: Whether @value for this @class is voided; a voided value
|
||||
* Returns: Whether @value for this @klass is voided; a voided value
|
||||
* can be a %NULL value for boxed or object type param specs.
|
||||
*/
|
||||
gboolean
|
||||
glade_property_class_void_value (GladePropertyClass *class,
|
||||
glade_property_class_void_value (GladePropertyClass *klass,
|
||||
GValue *value)
|
||||
{
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (class), FALSE);
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (klass), FALSE);
|
||||
|
||||
if (G_IS_PARAM_SPEC_OBJECT (class->pspec) &&
|
||||
if (G_IS_PARAM_SPEC_OBJECT (klass->pspec) &&
|
||||
g_value_get_object (value) == NULL)
|
||||
return TRUE;
|
||||
else if (G_IS_PARAM_SPEC_BOXED (class->pspec) &&
|
||||
else if (G_IS_PARAM_SPEC_BOXED (klass->pspec) &&
|
||||
g_value_get_boxed (value) == NULL)
|
||||
return TRUE;
|
||||
|
||||
|
@ -55,10 +55,10 @@ struct _GladePropertyClass
|
||||
gchar *tooltip; /* The default tooltip for the property editor rows.
|
||||
*/
|
||||
|
||||
gboolean virtual; /* Whether this is a virtual property with its pspec supplied
|
||||
* via the catalog (or hard code-paths); or FALSE if its a real
|
||||
* GObject introspected property
|
||||
*/
|
||||
gboolean virt; /* Whether this is a virtual property with its pspec supplied
|
||||
* via the catalog (or hard code-paths); or FALSE if its a real
|
||||
* GObject introspected property
|
||||
*/
|
||||
|
||||
GValue *def; /* The default value for this property (this will exist
|
||||
* as a copy of orig_def if not specified by the catalog)
|
||||
@ -176,14 +176,14 @@ LIBGLADEUI_API
|
||||
GValue *glade_property_class_make_gvalue_from_vl (GladePropertyClass *property_class,
|
||||
va_list vl);
|
||||
LIBGLADEUI_API
|
||||
void glade_property_class_set_vl_from_gvalue (GladePropertyClass *class,
|
||||
void glade_property_class_set_vl_from_gvalue (GladePropertyClass *klass,
|
||||
GValue *value,
|
||||
va_list vl);
|
||||
LIBGLADEUI_API
|
||||
GValue *glade_property_class_make_gvalue (GladePropertyClass *class,
|
||||
GValue *glade_property_class_make_gvalue (GladePropertyClass *klass,
|
||||
...);
|
||||
LIBGLADEUI_API
|
||||
void glade_property_class_get_from_gvalue (GladePropertyClass *class,
|
||||
void glade_property_class_get_from_gvalue (GladePropertyClass *klass,
|
||||
GValue *value,
|
||||
...);
|
||||
LIBGLADEUI_API
|
||||
@ -193,15 +193,15 @@ gboolean glade_property_class_update_from_node (GladeXmlNode
|
||||
GladePropertyClass **property_class,
|
||||
const gchar *domain);
|
||||
LIBGLADEUI_API
|
||||
G_CONST_RETURN gchar *glade_property_class_get_displayable_value (GladePropertyClass *class,
|
||||
G_CONST_RETURN gchar *glade_property_class_get_displayable_value (GladePropertyClass *klass,
|
||||
gint value);
|
||||
LIBGLADEUI_API
|
||||
GtkAdjustment *glade_property_class_make_adjustment (GladePropertyClass *property_class);
|
||||
LIBGLADEUI_API
|
||||
gboolean glade_property_class_match (GladePropertyClass *class,
|
||||
gboolean glade_property_class_match (GladePropertyClass *klass,
|
||||
GladePropertyClass *comp);
|
||||
LIBGLADEUI_API
|
||||
gboolean glade_property_class_void_value (GladePropertyClass *class,
|
||||
gboolean glade_property_class_void_value (GladePropertyClass *klass,
|
||||
GValue *value);
|
||||
LIBGLADEUI_API
|
||||
G_CONST_RETURN gchar *glade_property_class_atk_realname (const gchar *atk_name);
|
||||
|
@ -68,27 +68,27 @@ static GObjectClass* parent_class = NULL;
|
||||
GladeProperty class methods
|
||||
*******************************************************************************/
|
||||
static GladeProperty *
|
||||
glade_property_dup_impl (GladeProperty *template, GladeWidget *widget)
|
||||
glade_property_dup_impl (GladeProperty *template_prop, GladeWidget *widget)
|
||||
{
|
||||
GladeProperty *property;
|
||||
|
||||
property = g_object_new (GLADE_TYPE_PROPERTY,
|
||||
"enabled", template->enabled,
|
||||
"sensitive", template->sensitive,
|
||||
"i18n-translatable", template->i18n_translatable,
|
||||
"i18n-has-context", template->i18n_has_context,
|
||||
"i18n-comment", template->i18n_comment,
|
||||
"enabled", template_prop->enabled,
|
||||
"sensitive", template_prop->sensitive,
|
||||
"i18n-translatable", template_prop->i18n_translatable,
|
||||
"i18n-has-context", template_prop->i18n_has_context,
|
||||
"i18n-comment", template_prop->i18n_comment,
|
||||
NULL);
|
||||
property->class = template->class;
|
||||
property->klass = template_prop->klass;
|
||||
property->widget = widget;
|
||||
property->value = g_new0 (GValue, 1);
|
||||
|
||||
property->insensitive_tooltip =
|
||||
template->insensitive_tooltip ?
|
||||
g_strdup (template->insensitive_tooltip) : NULL;
|
||||
template_prop->insensitive_tooltip ?
|
||||
g_strdup (template_prop->insensitive_tooltip) : NULL;
|
||||
|
||||
g_value_init (property->value, template->value->g_type);
|
||||
g_value_copy (template->value, property->value);
|
||||
g_value_init (property->value, template_prop->value->g_type);
|
||||
g_value_copy (template_prop->value, property->value);
|
||||
|
||||
return property;
|
||||
}
|
||||
@ -97,21 +97,21 @@ void
|
||||
glade_property_reset_impl (GladeProperty *property)
|
||||
{
|
||||
GLADE_PROPERTY_GET_KLASS (property)->set_value
|
||||
(property, property->class->def);
|
||||
(property, property->klass->def);
|
||||
}
|
||||
|
||||
gboolean
|
||||
glade_property_default_impl (GladeProperty *property)
|
||||
{
|
||||
return GLADE_PROPERTY_GET_KLASS (property)->equals_value
|
||||
(property, property->class->def);
|
||||
(property, property->klass->def);
|
||||
}
|
||||
|
||||
gboolean
|
||||
glade_property_equals_value_impl (GladeProperty *property,
|
||||
const GValue *value)
|
||||
{
|
||||
if (G_IS_PARAM_SPEC_STRING (property->class->pspec))
|
||||
if (G_IS_PARAM_SPEC_STRING (property->klass->pspec))
|
||||
{
|
||||
const gchar *prop_str, *value_str;
|
||||
|
||||
@ -127,7 +127,7 @@ glade_property_equals_value_impl (GladeProperty *property,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return !g_param_values_cmp (property->class->pspec,
|
||||
return !g_param_values_cmp (property->klass->pspec,
|
||||
property->value, value);
|
||||
}
|
||||
|
||||
@ -141,7 +141,7 @@ glade_property_update_prop_refs (GladeProperty *property,
|
||||
GObject *old_object, *new_object;
|
||||
GList *old_list, *new_list, *list, *removed, *added;
|
||||
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (property->class->pspec))
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (property->klass->pspec))
|
||||
{
|
||||
/* Make our own copies incase we're walking an
|
||||
* unstable list
|
||||
@ -199,9 +199,9 @@ glade_property_set_value_impl (GladeProperty *property, const GValue *value)
|
||||
#if 0
|
||||
{
|
||||
gchar *str = glade_property_class_make_string_from_gvalue
|
||||
(property->class, value);
|
||||
(property->klass, value);
|
||||
g_print ("Setting property %s on %s to %s\n",
|
||||
property->class->id,
|
||||
property->klass->id,
|
||||
property->widget ? property->widget->name : "unknown", str);
|
||||
g_free (str);
|
||||
}
|
||||
@ -210,7 +210,7 @@ glade_property_set_value_impl (GladeProperty *property, const GValue *value)
|
||||
if (!g_value_type_compatible (G_VALUE_TYPE (property->value), G_VALUE_TYPE (value)))
|
||||
{
|
||||
g_warning ("Trying to assign an incompatible value to property %s\n",
|
||||
property->class->id);
|
||||
property->klass->id);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -222,20 +222,20 @@ glade_property_set_value_impl (GladeProperty *property, const GValue *value)
|
||||
project && glade_project_is_loading (project) == FALSE &&
|
||||
glade_widget_adaptor_verify_property (property->widget->adaptor,
|
||||
property->widget->object,
|
||||
property->class->id,
|
||||
property->klass->id,
|
||||
value) == FALSE)
|
||||
return;
|
||||
|
||||
/* save "changed" state.
|
||||
*/
|
||||
changed = g_param_values_cmp (property->class->pspec,
|
||||
changed = g_param_values_cmp (property->klass->pspec,
|
||||
property->value, value) != 0;
|
||||
|
||||
|
||||
/* Add/Remove references from widget ref stacks here
|
||||
* (before assigning the value)
|
||||
*/
|
||||
if (property->widget && changed && glade_property_class_is_object (property->class))
|
||||
if (property->widget && changed && glade_property_class_is_object (property->klass))
|
||||
glade_property_update_prop_refs (property, property->value, value);
|
||||
|
||||
|
||||
@ -265,7 +265,7 @@ static void
|
||||
glade_property_get_value_impl (GladeProperty *property, GValue *value)
|
||||
{
|
||||
|
||||
g_value_init (value, property->class->pspec->value_type);
|
||||
g_value_init (value, property->klass->pspec->value_type);
|
||||
g_value_copy (property->value, value);
|
||||
}
|
||||
|
||||
@ -273,8 +273,8 @@ static void
|
||||
glade_property_get_default_impl (GladeProperty *property, GValue *value)
|
||||
{
|
||||
|
||||
g_value_init (value, property->class->pspec->value_type);
|
||||
g_value_copy (property->class->def, value);
|
||||
g_value_init (value, property->klass->pspec->value_type);
|
||||
g_value_copy (property->klass->def, value);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -286,11 +286,11 @@ glade_property_sync_impl (GladeProperty *property)
|
||||
*/
|
||||
if (/* the class can be NULL during object,
|
||||
* construction this is just a temporary state */
|
||||
property->class == NULL ||
|
||||
property->klass == NULL ||
|
||||
/* optional properties that are disabled */
|
||||
property->enabled == FALSE ||
|
||||
/* explicit "never sync" flag */
|
||||
property->class->ignore ||
|
||||
property->klass->ignore ||
|
||||
/* avoid recursion */
|
||||
property->syncing ||
|
||||
/* No widget owns this property yet */
|
||||
@ -302,16 +302,16 @@ glade_property_sync_impl (GladeProperty *property)
|
||||
/* In the case of construct_only, the widget instance must be rebuilt
|
||||
* to apply the property
|
||||
*/
|
||||
if (property->class->construct_only)
|
||||
if (property->klass->construct_only)
|
||||
glade_widget_rebuild (property->widget);
|
||||
else if (property->class->packing)
|
||||
else if (property->klass->packing)
|
||||
glade_widget_child_set_property (glade_widget_get_parent (property->widget),
|
||||
property->widget,
|
||||
property->class->id,
|
||||
property->klass->id,
|
||||
property->value);
|
||||
else
|
||||
glade_widget_object_set_property (property->widget,
|
||||
property->class->id,
|
||||
property->klass->id,
|
||||
property->value);
|
||||
|
||||
property->syncing = FALSE;
|
||||
@ -324,14 +324,14 @@ glade_property_load_impl (GladeProperty *property)
|
||||
GObjectClass *oclass;
|
||||
|
||||
if (property->widget == NULL ||
|
||||
property->class->packing ||
|
||||
property->class->type != GPC_NORMAL)
|
||||
property->klass->packing ||
|
||||
property->klass->type != GPC_NORMAL)
|
||||
return;
|
||||
object = glade_widget_get_object (property->widget);
|
||||
oclass = G_OBJECT_GET_CLASS (object);
|
||||
|
||||
if (g_object_class_find_property (oclass, property->class->id))
|
||||
g_object_get_property (object, property->class->id, property->value);
|
||||
if (g_object_class_find_property (oclass, property->klass->id))
|
||||
g_object_get_property (object, property->klass->id, property->value);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -345,35 +345,35 @@ glade_property_write_impl (GladeProperty *property,
|
||||
gchar *name, *value, **split, *tmp;
|
||||
gint i;
|
||||
|
||||
if (!property->class->save || !property->enabled)
|
||||
if (!property->klass->save || !property->enabled)
|
||||
return FALSE;
|
||||
|
||||
g_assert (property->class->orig_def);
|
||||
g_assert (property->class->def);
|
||||
g_assert (property->klass->orig_def);
|
||||
g_assert (property->klass->def);
|
||||
|
||||
/* Skip properties that are default
|
||||
* (by original pspec default)
|
||||
*/
|
||||
if (glade_property_equals_value (property, property->class->orig_def))
|
||||
if (glade_property_equals_value (property, property->klass->orig_def))
|
||||
return FALSE;
|
||||
|
||||
/* we should change each '-' by '_' on the name of the property
|
||||
* (<property name="...">) */
|
||||
if (property->class->type != GPC_NORMAL)
|
||||
if (property->klass->type != GPC_NORMAL)
|
||||
{
|
||||
|
||||
tmp = (gchar *)glade_property_class_atk_realname (property->class->id);
|
||||
tmp = (gchar *)glade_property_class_atk_realname (property->klass->id);
|
||||
name = g_strdup (tmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
name = g_strdup (property->class->id);
|
||||
name = g_strdup (property->klass->id);
|
||||
}
|
||||
|
||||
/* convert the value of this property to a string */
|
||||
if (property->class->type == GPC_ACCEL_PROPERTY ||
|
||||
if (property->klass->type == GPC_ACCEL_PROPERTY ||
|
||||
(value = glade_property_class_make_string_from_gvalue
|
||||
(property->class, property->value)) == NULL)
|
||||
(property->klass, property->value)) == NULL)
|
||||
/* make sure we keep the empty string, also... upcomming
|
||||
* funcs that may not like NULL.
|
||||
*/
|
||||
@ -386,7 +386,7 @@ glade_property_write_impl (GladeProperty *property,
|
||||
g_free (tmp);
|
||||
}
|
||||
|
||||
switch (property->class->type)
|
||||
switch (property->klass->type)
|
||||
{
|
||||
case GPC_ATK_PROPERTY:
|
||||
tmp = g_strdup_printf ("AtkObject::%s", name);
|
||||
@ -397,7 +397,7 @@ glade_property_write_impl (GladeProperty *property,
|
||||
info.name = glade_xml_alloc_propname(interface, name);
|
||||
info.value = glade_xml_alloc_string(interface, value);
|
||||
|
||||
if (property->class->translatable)
|
||||
if (property->klass->translatable)
|
||||
{
|
||||
info.translatable = property->i18n_translatable;
|
||||
info.has_context = property->i18n_has_context;
|
||||
@ -456,7 +456,7 @@ glade_property_get_tooltip_impl (GladeProperty *property)
|
||||
if (property->sensitive == FALSE)
|
||||
tooltip = property->insensitive_tooltip;
|
||||
else
|
||||
tooltip = property->class->tooltip;
|
||||
tooltip = property->klass->tooltip;
|
||||
return tooltip;
|
||||
}
|
||||
|
||||
@ -973,7 +973,7 @@ glade_property_read_accel_prop (GladeProperty *property,
|
||||
*******************************************************************************/
|
||||
/**
|
||||
* glade_property_new:
|
||||
* @class: A #GladePropertyClass defining this property
|
||||
* @klass: A #GladePropertyClass defining this property
|
||||
* @widget: The #GladeWidget this property is created for
|
||||
* @value: The initial #GValue of the property or %NULL
|
||||
* (the #GladeProperty will assume ownership of @value)
|
||||
@ -981,7 +981,7 @@ glade_property_read_accel_prop (GladeProperty *property,
|
||||
* by the catalog; otherwise use the introspected default.
|
||||
*
|
||||
*
|
||||
* Creates a #GladeProperty of type @class for @widget with @value; if
|
||||
* Creates a #GladeProperty of type @klass for @widget with @value; if
|
||||
* @value is %NULL, then the introspected default value for that property
|
||||
* will be used; unless otherwise specified by @catalog_default.
|
||||
*
|
||||
@ -994,7 +994,7 @@ glade_property_read_accel_prop (GladeProperty *property,
|
||||
* Returns: The newly created #GladeProperty
|
||||
*/
|
||||
GladeProperty *
|
||||
glade_property_new (GladePropertyClass *class,
|
||||
glade_property_new (GladePropertyClass *klass,
|
||||
GladeWidget *widget,
|
||||
GValue *value,
|
||||
gboolean catalog_default)
|
||||
@ -1002,20 +1002,20 @@ glade_property_new (GladePropertyClass *class,
|
||||
GladeProperty *property;
|
||||
GValue *def;
|
||||
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (class), NULL);
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY_CLASS (klass), NULL);
|
||||
|
||||
property =
|
||||
(GladeProperty *)g_object_new (GLADE_TYPE_PROPERTY, NULL);
|
||||
property->class = class;
|
||||
property->klass = klass;
|
||||
property->widget = widget;
|
||||
property->value = value;
|
||||
|
||||
if (class->optional)
|
||||
property->enabled = class->optional_default;
|
||||
if (klass->optional)
|
||||
property->enabled = klass->optional_default;
|
||||
|
||||
if (property->value == NULL)
|
||||
{
|
||||
def = catalog_default ? class->def : class->orig_def;
|
||||
def = catalog_default ? klass->def : klass->orig_def;
|
||||
g_assert (def);
|
||||
|
||||
property->value = g_new0 (GValue, 1);
|
||||
@ -1027,16 +1027,16 @@ glade_property_new (GladePropertyClass *class,
|
||||
|
||||
/**
|
||||
* glade_property_dup:
|
||||
* @template: A #GladeProperty
|
||||
* @template_prop: A #GladeProperty
|
||||
* @widget: A #GladeWidget
|
||||
*
|
||||
* Returns: A newly duplicated property based on the new widget
|
||||
*/
|
||||
GladeProperty *
|
||||
glade_property_dup (GladeProperty *template, GladeWidget *widget)
|
||||
glade_property_dup (GladeProperty *template_prop, GladeWidget *widget)
|
||||
{
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY (template), NULL);
|
||||
return GLADE_PROPERTY_GET_KLASS (template)->dup (template, widget);
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY (template_prop), NULL);
|
||||
return GLADE_PROPERTY_GET_KLASS (template_prop)->dup (template_prop, widget);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1095,7 +1095,7 @@ glade_property_equals_va_list (GladeProperty *property, va_list vl)
|
||||
|
||||
g_return_val_if_fail (GLADE_IS_PROPERTY (property), FALSE);
|
||||
|
||||
value = glade_property_class_make_gvalue_from_vl (property->class, vl);
|
||||
value = glade_property_class_make_gvalue_from_vl (property->klass, vl);
|
||||
|
||||
ret = GLADE_PROPERTY_GET_KLASS (property)->equals_value (property, value);
|
||||
|
||||
@ -1155,7 +1155,7 @@ glade_property_set_va_list (GladeProperty *property, va_list vl)
|
||||
|
||||
g_return_if_fail (GLADE_IS_PROPERTY (property));
|
||||
|
||||
value = glade_property_class_make_gvalue_from_vl (property->class, vl);
|
||||
value = glade_property_class_make_gvalue_from_vl (property->klass, vl);
|
||||
|
||||
GLADE_PROPERTY_GET_KLASS (property)->set_value (property, value);
|
||||
|
||||
@ -1223,7 +1223,7 @@ void
|
||||
glade_property_get_va_list (GladeProperty *property, va_list vl)
|
||||
{
|
||||
g_return_if_fail (GLADE_IS_PROPERTY (property));
|
||||
glade_property_class_set_vl_from_gvalue (property->class, property->value, vl);
|
||||
glade_property_class_set_vl_from_gvalue (property->klass, property->value, vl);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1371,10 +1371,10 @@ glade_property_add_object (GladeProperty *property,
|
||||
|
||||
g_return_if_fail (GLADE_IS_PROPERTY (property));
|
||||
g_return_if_fail (G_IS_OBJECT (object));
|
||||
g_return_if_fail (GLADE_IS_PARAM_SPEC_OBJECTS (property->class->pspec) ||
|
||||
G_IS_PARAM_SPEC_OBJECT (property->class->pspec));
|
||||
g_return_if_fail (GLADE_IS_PARAM_SPEC_OBJECTS (property->klass->pspec) ||
|
||||
G_IS_PARAM_SPEC_OBJECT (property->klass->pspec));
|
||||
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (property->class->pspec))
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (property->klass->pspec))
|
||||
{
|
||||
glade_property_get (property, &list);
|
||||
new_list = g_list_copy (list);
|
||||
@ -1411,10 +1411,10 @@ glade_property_remove_object (GladeProperty *property,
|
||||
|
||||
g_return_if_fail (GLADE_IS_PROPERTY (property));
|
||||
g_return_if_fail (G_IS_OBJECT (object));
|
||||
g_return_if_fail (GLADE_IS_PARAM_SPEC_OBJECTS (property->class->pspec) ||
|
||||
G_IS_PARAM_SPEC_OBJECT (property->class->pspec));
|
||||
g_return_if_fail (GLADE_IS_PARAM_SPEC_OBJECTS (property->klass->pspec) ||
|
||||
G_IS_PARAM_SPEC_OBJECT (property->klass->pspec));
|
||||
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (property->class->pspec))
|
||||
if (GLADE_IS_PARAM_SPEC_OBJECTS (property->klass->pspec))
|
||||
{
|
||||
/* If object isnt in list; list should stay in tact.
|
||||
* not bothering to check for now.
|
||||
@ -1435,7 +1435,7 @@ glade_property_remove_object (GladeProperty *property,
|
||||
glade_property_set (property, object);
|
||||
}
|
||||
|
||||
glade_property_class_get_from_gvalue (property->class,
|
||||
glade_property_class_get_from_gvalue (property->klass,
|
||||
property->value,
|
||||
&list);
|
||||
|
||||
|
@ -21,7 +21,7 @@ struct _GladeProperty
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
GladePropertyClass *class; /* A pointer to the GladeProperty that this
|
||||
GladePropertyClass *klass; /* A pointer to the GladeProperty that this
|
||||
* setting specifies
|
||||
*/
|
||||
GladeWidget *widget; /* A pointer to the GladeWidget that this
|
||||
@ -82,12 +82,12 @@ struct _GladePropertyKlass
|
||||
LIBGLADEUI_API
|
||||
GType glade_property_get_type (void) G_GNUC_CONST;
|
||||
LIBGLADEUI_API
|
||||
GladeProperty *glade_property_new (GladePropertyClass *class,
|
||||
GladeProperty *glade_property_new (GladePropertyClass *klass,
|
||||
GladeWidget *widget,
|
||||
GValue *value,
|
||||
gboolean catalog_default);
|
||||
LIBGLADEUI_API
|
||||
GladeProperty *glade_property_dup (GladeProperty *template,
|
||||
GladeProperty *glade_property_dup (GladeProperty *template_prop,
|
||||
GladeWidget *widget);
|
||||
LIBGLADEUI_API
|
||||
void glade_property_reset (GladeProperty *property);
|
||||
|
@ -366,13 +366,13 @@ _wrap_GladeWidgetAdaptor__do_replace_child(PyObject *cls, PyObject *args, PyObje
|
||||
{
|
||||
gpointer klass;
|
||||
static char *kwlist[] = { "self", "container", "old", "new", NULL };
|
||||
PyGObject *self, *container, *old, *new;
|
||||
PyGObject *self, *container, *old_obj, *new_obj;
|
||||
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O!O!O!:GladeWidgetAdaptor.replace_child", kwlist, &PyGladeWidgetAdaptor_Type, &self, &PyGObject_Type, &container, &PyGObject_Type, &old, &PyGObject_Type, &new))
|
||||
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O!O!O!:GladeWidgetAdaptor.replace_child", kwlist, &PyGladeWidgetAdaptor_Type, &self, &PyGObject_Type, &container, &PyGObject_Type, &old_obj, &PyGObject_Type, &new_obj))
|
||||
return NULL;
|
||||
klass = g_type_class_ref(pyg_type_from_object(cls));
|
||||
if (GLADE_WIDGET_ADAPTOR_CLASS(klass)->replace_child)
|
||||
GLADE_WIDGET_ADAPTOR_CLASS(klass)->replace_child(GLADE_WIDGET_ADAPTOR(self->obj), G_OBJECT(container->obj), G_OBJECT(old->obj), G_OBJECT(new->obj));
|
||||
GLADE_WIDGET_ADAPTOR_CLASS(klass)->replace_child(GLADE_WIDGET_ADAPTOR(self->obj), G_OBJECT(container->obj), G_OBJECT(old_obj->obj), G_OBJECT(new_obj->obj));
|
||||
else {
|
||||
PyErr_SetString(PyExc_NotImplementedError, "virtual method GladeWidgetAdaptor.replace_child not implemented");
|
||||
g_type_class_unref(klass);
|
||||
@ -1252,7 +1252,7 @@ _wrap_GladeWidgetAdaptor__proxy_do_remove(GladeWidgetAdaptor *self, GObject*pare
|
||||
pyg_gil_state_release(__py_state);
|
||||
}
|
||||
static void
|
||||
_wrap_GladeWidgetAdaptor__proxy_do_replace_child(GladeWidgetAdaptor *self, GObject*container, GObject*old, GObject*new)
|
||||
_wrap_GladeWidgetAdaptor__proxy_do_replace_child(GladeWidgetAdaptor *self, GObject*container, GObject*old_obj, GObject*new_obj)
|
||||
{
|
||||
PyGILState_STATE __py_state;
|
||||
PyObject *py_self;
|
||||
@ -1277,14 +1277,14 @@ _wrap_GladeWidgetAdaptor__proxy_do_replace_child(GladeWidgetAdaptor *self, GObje
|
||||
Py_INCREF(Py_None);
|
||||
py_container = Py_None;
|
||||
}
|
||||
if (old)
|
||||
py_old = pygobject_new((GObject *) old);
|
||||
if (old_obj)
|
||||
py_old = pygobject_new((GObject *) old_obj);
|
||||
else {
|
||||
Py_INCREF(Py_None);
|
||||
py_old = Py_None;
|
||||
}
|
||||
if (new)
|
||||
py_new = pygobject_new((GObject *) new);
|
||||
if (new_obj)
|
||||
py_new = pygobject_new((GObject *) new_obj);
|
||||
else {
|
||||
Py_INCREF(Py_None);
|
||||
py_new = Py_None;
|
||||
|
@ -261,7 +261,7 @@ static PyTypeObject *
|
||||
glade_python_register_class (GType type)
|
||||
{
|
||||
GType parent = g_type_parent (type);
|
||||
PyTypeObject *class, *parent_class;
|
||||
PyTypeObject *klass, *parent_class;
|
||||
|
||||
if (parent == 0 || type == GLADE_TYPE_WIDGET_ADAPTOR)
|
||||
return &PyGladeWidgetAdaptor_Type;
|
||||
@ -271,22 +271,22 @@ glade_python_register_class (GType type)
|
||||
else
|
||||
parent_class = pygobject_lookup_class (parent);
|
||||
|
||||
class = pygobject_lookup_class (type);
|
||||
klass = pygobject_lookup_class (type);
|
||||
|
||||
pygobject_register_class (glade_dict, g_type_name (type), type, class,
|
||||
pygobject_register_class (glade_dict, g_type_name (type), type, klass,
|
||||
Py_BuildValue("(O)", parent_class));
|
||||
pyg_set_object_has_new_constructor (type);
|
||||
|
||||
g_hash_table_insert (registered_classes, GUINT_TO_POINTER (type), class);
|
||||
g_hash_table_insert (registered_classes, GUINT_TO_POINTER (type), klass);
|
||||
|
||||
return class;
|
||||
return klass;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
glade_python_get_adaptor_for_type (PyObject *self, PyObject *args)
|
||||
{
|
||||
GladeWidgetAdaptor *adaptor;
|
||||
PyObject *class;
|
||||
PyObject *klass;
|
||||
gchar *name;
|
||||
|
||||
if (PyArg_ParseTuple(args, "s", &name) &&
|
||||
@ -294,8 +294,8 @@ glade_python_get_adaptor_for_type (PyObject *self, PyObject *args)
|
||||
{
|
||||
GType type = G_TYPE_FROM_INSTANCE (adaptor);
|
||||
|
||||
if ((class = g_hash_table_lookup (registered_classes, GUINT_TO_POINTER (type))))
|
||||
return (PyObject *) class;
|
||||
if ((klass = g_hash_table_lookup (registered_classes, GUINT_TO_POINTER (type))))
|
||||
return (PyObject *) klass;
|
||||
else
|
||||
return (PyObject *) glade_python_register_class (type);
|
||||
}
|
||||
|
@ -1211,14 +1211,14 @@ glade_util_purify_list (GList *list)
|
||||
*
|
||||
*/
|
||||
GList *
|
||||
glade_util_added_in_list (GList *old,
|
||||
GList *new)
|
||||
glade_util_added_in_list (GList *old_list,
|
||||
GList *new_list)
|
||||
{
|
||||
GList *added = NULL, *list;
|
||||
|
||||
for (list = new; list; list = list->next)
|
||||
for (list = new_list; list; list = list->next)
|
||||
{
|
||||
if (!g_list_find (old, list->data))
|
||||
if (!g_list_find (old_list, list->data))
|
||||
added = g_list_prepend (added, list->data);
|
||||
}
|
||||
|
||||
@ -1235,14 +1235,14 @@ glade_util_added_in_list (GList *old,
|
||||
*
|
||||
*/
|
||||
GList *
|
||||
glade_util_removed_from_list (GList *old,
|
||||
GList *new)
|
||||
glade_util_removed_from_list (GList *old_list,
|
||||
GList *new_list)
|
||||
{
|
||||
GList *added = NULL, *list;
|
||||
|
||||
for (list = old; list; list = list->next)
|
||||
for (list = old_list; list; list = list->next)
|
||||
{
|
||||
if (!g_list_find (new, list->data))
|
||||
if (!g_list_find (new_list, list->data))
|
||||
added = g_list_prepend (added, list->data);
|
||||
}
|
||||
|
||||
|
@ -105,11 +105,11 @@ gboolean glade_util_basenames_match (const gchar *path1,
|
||||
LIBGLADEUI_API
|
||||
GList *glade_util_purify_list (GList *list);
|
||||
LIBGLADEUI_API
|
||||
GList *glade_util_added_in_list (GList *old,
|
||||
GList *new);
|
||||
GList *glade_util_added_in_list (GList *old_list,
|
||||
GList *new_list);
|
||||
LIBGLADEUI_API
|
||||
GList *glade_util_removed_from_list (GList *old,
|
||||
GList *new);
|
||||
GList *glade_util_removed_from_list (GList *old_list,
|
||||
GList *new_list);
|
||||
LIBGLADEUI_API
|
||||
gchar *glade_util_canonical_path (const gchar *path);
|
||||
|
||||
|
@ -130,25 +130,25 @@ gwa_properties_set_weight (GList **properties, GType parent)
|
||||
|
||||
for (l = *properties; l && l->data; l = g_list_next (l))
|
||||
{
|
||||
GladePropertyClass *class = l->data;
|
||||
GPCType type = class->type;
|
||||
GladePropertyClass *klass = l->data;
|
||||
GPCType type = klass->type;
|
||||
|
||||
if (class->visible &&
|
||||
(parent) ? parent == class->pspec->owner_type : TRUE &&
|
||||
if (klass->visible &&
|
||||
(parent) ? parent == klass->pspec->owner_type : TRUE &&
|
||||
(type == GPC_NORMAL || type == GPC_ACCEL_PROPERTY))
|
||||
{
|
||||
/* Use a different counter for each tab (common, packing and normal) */
|
||||
if (class->common) common++;
|
||||
else if (class->packing) packing++;
|
||||
if (klass->common) common++;
|
||||
else if (klass->packing) packing++;
|
||||
else normal++;
|
||||
|
||||
/* Skip if it is already set */
|
||||
if (class->weight >= 0.0) continue;
|
||||
if (klass->weight >= 0.0) continue;
|
||||
|
||||
/* Special-casing weight of properties for seperate tabs */
|
||||
if (class->common) class->weight = common;
|
||||
else if (class->packing) class->weight = packing;
|
||||
else class->weight = normal;
|
||||
if (klass->common) klass->weight = common;
|
||||
else if (klass->packing) klass->weight = packing;
|
||||
else klass->weight = normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1948,7 +1948,7 @@ glade_widget_adaptor_default_params (GladeWidgetAdaptor *adaptor,
|
||||
/* Ignore properties based on some criteria
|
||||
*/
|
||||
if (pclass == NULL || /* Unaccounted for in the builder */
|
||||
pclass->virtual || /* should not be set before
|
||||
pclass->virt || /* should not be set before
|
||||
GladeWidget wrapper exists */
|
||||
pclass->ignore) /* Catalog explicitly ignores the object */
|
||||
continue;
|
||||
@ -2374,18 +2374,18 @@ glade_widget_adaptor_child_verify_property (GladeWidgetAdaptor *adaptor,
|
||||
void
|
||||
glade_widget_adaptor_replace_child (GladeWidgetAdaptor *adaptor,
|
||||
GObject *container,
|
||||
GObject *old,
|
||||
GObject *new)
|
||||
GObject *old_obj,
|
||||
GObject *new_obj)
|
||||
{
|
||||
g_return_if_fail (GLADE_IS_WIDGET_ADAPTOR (adaptor));
|
||||
g_return_if_fail (G_IS_OBJECT (container));
|
||||
g_return_if_fail (G_IS_OBJECT (old));
|
||||
g_return_if_fail (G_IS_OBJECT (new));
|
||||
g_return_if_fail (G_IS_OBJECT (old_obj));
|
||||
g_return_if_fail (G_IS_OBJECT (new_obj));
|
||||
g_return_if_fail (g_type_is_a (G_OBJECT_TYPE (container), adaptor->type));
|
||||
|
||||
if (GLADE_WIDGET_ADAPTOR_GET_CLASS (adaptor)->replace_child)
|
||||
GLADE_WIDGET_ADAPTOR_GET_CLASS
|
||||
(adaptor)->replace_child (adaptor, container, old, new);
|
||||
(adaptor)->replace_child (adaptor, container, old_obj, new_obj);
|
||||
else
|
||||
g_critical ("No replace_child() support in adaptor %s", adaptor->name);
|
||||
}
|
||||
|
@ -243,8 +243,8 @@ typedef void (* GladeRemoveChildFunc) (GladeWidgetAdaptor *adaptor,
|
||||
*/
|
||||
typedef void (* GladeReplaceChildFunc) (GladeWidgetAdaptor *adaptor,
|
||||
GObject *container,
|
||||
GObject *old,
|
||||
GObject *new);
|
||||
GObject *old_obj,
|
||||
GObject *new_obj);
|
||||
|
||||
/**
|
||||
* GladePostCreateFunc:
|
||||
@ -526,8 +526,8 @@ gboolean glade_widget_adaptor_child_verify_property (GladeWidgetAdap
|
||||
LIBGLADEUI_API
|
||||
void glade_widget_adaptor_replace_child (GladeWidgetAdaptor *adaptor,
|
||||
GObject *container,
|
||||
GObject *old,
|
||||
GObject *new);
|
||||
GObject *old_obj,
|
||||
GObject *new_obj);
|
||||
LIBGLADEUI_API
|
||||
gboolean glade_widget_adaptor_contains_extra (GladeWidgetAdaptor *adaptor);
|
||||
LIBGLADEUI_API
|
||||
|
@ -579,12 +579,12 @@ glade_widget_template_params (GladeWidget *widget,
|
||||
glade_widget_get_property (widget, pspec[i]->name)) == NULL)
|
||||
continue;
|
||||
|
||||
pclass = glade_property->class;
|
||||
pclass = glade_property->klass;
|
||||
|
||||
/* Ignore properties based on some criteria
|
||||
*/
|
||||
if (pclass == NULL || /* Unaccounted for in the builder */
|
||||
pclass->virtual || /* should not be set before
|
||||
pclass->virt || /* should not be set before
|
||||
GladeWidget wrapper exists */
|
||||
pclass->ignore) /* Catalog explicitly ignores the object */
|
||||
continue;
|
||||
@ -690,7 +690,7 @@ glade_widget_dup_properties (GList *template_props, gboolean as_load)
|
||||
{
|
||||
GladeProperty *prop = list->data;
|
||||
|
||||
if (prop->class->save == FALSE && as_load)
|
||||
if (prop->klass->save == FALSE && as_load)
|
||||
continue;
|
||||
|
||||
properties = g_list_prepend (properties, glade_property_dup (prop, NULL));
|
||||
@ -1321,7 +1321,7 @@ glade_widget_get_type (void)
|
||||
static void
|
||||
glade_widget_copy_packing_props (GladeWidget *parent,
|
||||
GladeWidget *child,
|
||||
GladeWidget *template)
|
||||
GladeWidget *template_widget)
|
||||
{
|
||||
GladeProperty *dup_prop, *orig_prop;
|
||||
GList *l;
|
||||
@ -1334,7 +1334,7 @@ glade_widget_copy_packing_props (GladeWidget *parent,
|
||||
{
|
||||
dup_prop = GLADE_PROPERTY(l->data);
|
||||
orig_prop =
|
||||
glade_widget_get_property (template, dup_prop->class->id);
|
||||
glade_widget_get_property (template_widget, dup_prop->klass->id);
|
||||
glade_property_set_value (dup_prop, orig_prop->value);
|
||||
}
|
||||
}
|
||||
@ -1417,7 +1417,7 @@ glade_widget_get_internal_func (GladeWidget *parent, GladeWidget **parent_ret)
|
||||
|
||||
|
||||
static GladeWidget *
|
||||
glade_widget_dup_internal (GladeWidget *parent, GladeWidget *template)
|
||||
glade_widget_dup_internal (GladeWidget *parent, GladeWidget *template_widget)
|
||||
{
|
||||
GladeGetInternalFunc get_internal;
|
||||
GladeWidget *gwidget = NULL, *internal_parent;
|
||||
@ -1425,11 +1425,11 @@ glade_widget_dup_internal (GladeWidget *parent, GladeWidget *template)
|
||||
GtkWidget *placeholder;
|
||||
gchar *child_type;
|
||||
|
||||
g_return_val_if_fail (template != NULL && GLADE_IS_WIDGET(template), NULL);
|
||||
g_return_val_if_fail (template_widget != NULL && GLADE_IS_WIDGET(template_widget), NULL);
|
||||
g_return_val_if_fail (parent == NULL || GLADE_IS_WIDGET (parent), NULL);
|
||||
|
||||
/* Dont actually duplicate internal widgets, but recurse through them anyway. */
|
||||
if (template->internal)
|
||||
if (template_widget->internal)
|
||||
{
|
||||
GObject *internal_object = NULL;
|
||||
|
||||
@ -1443,7 +1443,7 @@ glade_widget_dup_internal (GladeWidget *parent, GladeWidget *template)
|
||||
*/
|
||||
internal_object = get_internal (internal_parent->adaptor,
|
||||
internal_parent->object,
|
||||
template->internal);
|
||||
template_widget->internal);
|
||||
g_assert (internal_object);
|
||||
|
||||
gwidget = glade_widget_get_from_gobject (internal_object);
|
||||
@ -1452,20 +1452,20 @@ glade_widget_dup_internal (GladeWidget *parent, GladeWidget *template)
|
||||
}
|
||||
else
|
||||
{
|
||||
gchar *name = glade_project_new_widget_name (template->project, template->name);
|
||||
gchar *name = glade_project_new_widget_name (template_widget->project, template_widget->name);
|
||||
gwidget = glade_widget_adaptor_create_widget
|
||||
(template->adaptor, FALSE,
|
||||
(template_widget->adaptor, FALSE,
|
||||
"name", name,
|
||||
"parent", parent,
|
||||
"project", template->project,
|
||||
"template", template,
|
||||
"project", template_widget->project,
|
||||
"template", template_widget,
|
||||
"reason", GLADE_CREATE_COPY, NULL);
|
||||
g_free (name);
|
||||
}
|
||||
|
||||
if ((children =
|
||||
glade_widget_adaptor_get_children (template->adaptor,
|
||||
template->object)) != NULL)
|
||||
glade_widget_adaptor_get_children (template_widget->adaptor,
|
||||
template_widget->object)) != NULL)
|
||||
{
|
||||
for (list = children; list && list->data; list = list->next)
|
||||
{
|
||||
@ -1523,10 +1523,10 @@ glade_widget_dup_internal (GladeWidget *parent, GladeWidget *template)
|
||||
}
|
||||
|
||||
if (gwidget->internal)
|
||||
glade_widget_copy_properties (gwidget, template);
|
||||
glade_widget_copy_properties (gwidget, template_widget);
|
||||
|
||||
if (gwidget->packing_properties == NULL)
|
||||
gwidget->packing_properties = glade_widget_dup_properties (template->packing_properties , FALSE);
|
||||
gwidget->packing_properties = glade_widget_dup_properties (template_widget->packing_properties , FALSE);
|
||||
|
||||
/* If custom properties are still at thier
|
||||
* default value, they need to be synced.
|
||||
@ -1539,9 +1539,9 @@ glade_widget_dup_internal (GladeWidget *parent, GladeWidget *template)
|
||||
if (GTK_IS_WINDOW (gwidget->object))
|
||||
{
|
||||
gint width, height;
|
||||
g_assert (GTK_IS_WINDOW (template->object));
|
||||
g_assert (GTK_IS_WINDOW (template_widget->object));
|
||||
|
||||
gtk_window_get_size (GTK_WINDOW (template->object),
|
||||
gtk_window_get_size (GTK_WINDOW (template_widget->object),
|
||||
&width, &height);
|
||||
gtk_window_resize (GTK_WINDOW (gwidget->object),
|
||||
width, height);
|
||||
@ -1668,7 +1668,7 @@ glade_widget_insert_children (GladeWidget *gwidget, GList *children)
|
||||
GladeProperty *saved_prop = l->data;
|
||||
GladeProperty *widget_prop =
|
||||
glade_widget_get_property (gchild,
|
||||
saved_prop->class->id);
|
||||
saved_prop->klass->id);
|
||||
|
||||
glade_property_get_value (saved_prop, &value);
|
||||
glade_property_set_value (widget_prop, &value);
|
||||
@ -1694,7 +1694,7 @@ glade_widget_insert_children (GladeWidget *gwidget, GList *children)
|
||||
GladeProperty *saved_prop = l->data;
|
||||
GladeProperty *widget_prop =
|
||||
glade_widget_get_pack_property (extract->widget,
|
||||
saved_prop->class->id);
|
||||
saved_prop->klass->id);
|
||||
|
||||
glade_property_get_value (saved_prop, &value);
|
||||
glade_property_set_value (widget_prop, &value);
|
||||
@ -1947,7 +1947,7 @@ glade_widget_new_child_from_child_info (GladeChildInfo *info,
|
||||
for (list = child->packing_properties; list; list = list->next)
|
||||
{
|
||||
GladeProperty *property = list->data;
|
||||
glade_property_read (property, property->class,
|
||||
glade_property_read (property, property->klass,
|
||||
loading_project, info, TRUE);
|
||||
}
|
||||
return TRUE;
|
||||
@ -1999,7 +1999,7 @@ glade_widget_fill_from_widget_info (GladeWidgetInfo *info,
|
||||
for (list = widget->properties; list; list = list->next)
|
||||
{
|
||||
property = list->data;
|
||||
glade_property_read (property, property->class,
|
||||
glade_property_read (property, property->klass,
|
||||
loading_project, info, TRUE);
|
||||
}
|
||||
}
|
||||
@ -2008,12 +2008,12 @@ glade_widget_fill_from_widget_info (GladeWidgetInfo *info,
|
||||
|
||||
|
||||
static GList *
|
||||
glade_widget_properties_from_widget_info (GladeWidgetAdaptor *class,
|
||||
glade_widget_properties_from_widget_info (GladeWidgetAdaptor *klass,
|
||||
GladeWidgetInfo *info)
|
||||
{
|
||||
GList *properties = NULL, *list;
|
||||
|
||||
for (list = class->properties; list && list->data; list = list->next)
|
||||
for (list = klass->properties; list && list->data; list = list->next)
|
||||
{
|
||||
GladePropertyClass *pclass = list->data;
|
||||
GladeProperty *property;
|
||||
@ -2023,7 +2023,7 @@ glade_widget_properties_from_widget_info (GladeWidgetAdaptor *class,
|
||||
*/
|
||||
property = glade_property_new (pclass, NULL, NULL, FALSE);
|
||||
|
||||
glade_property_read (property, property->class,
|
||||
glade_property_read (property, property->klass,
|
||||
loading_project, info, TRUE);
|
||||
|
||||
properties = g_list_prepend (properties, property);
|
||||
@ -2103,7 +2103,7 @@ glade_widget_info_params (GladeWidgetAdaptor *adaptor,
|
||||
glade_widget_adaptor_get_property_class (adaptor,
|
||||
pspec[i]->name);
|
||||
if (glade_property_class == NULL ||
|
||||
glade_property_class->virtual ||
|
||||
glade_property_class->virt ||
|
||||
glade_property_class->ignore)
|
||||
continue;
|
||||
|
||||
@ -2336,14 +2336,14 @@ glade_widget_project_notify (GladeWidget *widget, GladeProject *project)
|
||||
/**
|
||||
* glade_widget_copy_properties:
|
||||
* @widget: a 'dest' #GladeWidget
|
||||
* @template: a 'src' #GladeWidget
|
||||
* @template_widget: a 'src' #GladeWidget
|
||||
*
|
||||
* Sets properties in @widget based on the values of
|
||||
* matching properties in @template
|
||||
* matching properties in @template_widget
|
||||
*/
|
||||
void
|
||||
glade_widget_copy_properties (GladeWidget *widget,
|
||||
GladeWidget *template)
|
||||
GladeWidget *template_widget)
|
||||
{
|
||||
GList *l;
|
||||
for (l = widget->properties; l && l->data; l = l->next)
|
||||
@ -2357,9 +2357,9 @@ glade_widget_copy_properties (GladeWidget *widget,
|
||||
* classes, like GtkImageMenuItem --> GtkCheckMenuItem).
|
||||
*/
|
||||
if ((template_prop =
|
||||
glade_widget_get_property (template,
|
||||
widget_prop->class->id)) != NULL &&
|
||||
glade_property_class_match (template_prop->class, widget_prop->class))
|
||||
glade_widget_get_property (template_prop,
|
||||
widget_prop->klass->id)) != NULL &&
|
||||
glade_property_class_match (template_prop->klass, widget_prop->klass))
|
||||
glade_property_set_value (widget_prop, template_prop->value);
|
||||
}
|
||||
}
|
||||
@ -2403,21 +2403,21 @@ glade_widget_remove_child (GladeWidget *parent,
|
||||
|
||||
/**
|
||||
* glade_widget_dup:
|
||||
* @template: a #GladeWidget
|
||||
* @template_widget: a #GladeWidget
|
||||
*
|
||||
* Creates a deep copy of #GladeWidget.
|
||||
*
|
||||
* Returns: The newly created #GladeWidget
|
||||
*/
|
||||
GladeWidget *
|
||||
glade_widget_dup (GladeWidget *template)
|
||||
glade_widget_dup (GladeWidget *template_widget)
|
||||
{
|
||||
GladeWidget *widget;
|
||||
|
||||
g_return_val_if_fail (GLADE_IS_WIDGET (template), NULL);
|
||||
g_return_val_if_fail (GLADE_IS_WIDGET (template_widget), NULL);
|
||||
|
||||
glade_widget_push_superuser ();
|
||||
widget = glade_widget_dup_internal (NULL, template);
|
||||
widget = glade_widget_dup_internal (NULL, template_widget);
|
||||
glade_widget_pop_superuser ();
|
||||
|
||||
return widget;
|
||||
@ -2720,7 +2720,7 @@ glade_widget_get_property (GladeWidget *widget, const gchar *id_property)
|
||||
|
||||
for (list = widget->properties; list; list = list->next) {
|
||||
property = list->data;
|
||||
if (strcmp (property->class->id, id_buffer) == 0)
|
||||
if (strcmp (property->klass->id, id_buffer) == 0)
|
||||
return property;
|
||||
}
|
||||
return glade_widget_get_pack_property (widget, id_property);
|
||||
@ -2749,7 +2749,7 @@ glade_widget_get_pack_property (GladeWidget *widget, const gchar *id_property)
|
||||
|
||||
for (list = widget->packing_properties; list; list = list->next) {
|
||||
property = list->data;
|
||||
if (strcmp (property->class->id, id_buffer) == 0)
|
||||
if (strcmp (property->klass->id, id_buffer) == 0)
|
||||
return property;
|
||||
}
|
||||
return NULL;
|
||||
@ -3361,7 +3361,7 @@ glade_widget_set_packing_properties (GladeWidget *widget,
|
||||
g_value_reset (property->value);
|
||||
glade_widget_child_get_property
|
||||
(container,
|
||||
widget, property->class->id, property->value);
|
||||
widget, property->klass->id, property->value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3507,10 +3507,10 @@ glade_widget_write (GladeWidget *widget, GladeInterface *interface)
|
||||
GladeProperty *property = list->data;
|
||||
|
||||
/* This should never happen */
|
||||
if (property->class->packing)
|
||||
if (property->klass->packing)
|
||||
continue;
|
||||
|
||||
switch (property->class->type)
|
||||
switch (property->klass->type)
|
||||
{
|
||||
case GPC_NORMAL:
|
||||
glade_property_write (property, interface, props);
|
||||
@ -3678,7 +3678,7 @@ glade_widget_write_child (GArray *children,
|
||||
GladeProperty *property;
|
||||
|
||||
property = list->data;
|
||||
g_assert (property->class->packing != FALSE);
|
||||
g_assert (property->klass->packing != FALSE);
|
||||
glade_property_write (property, interface, props);
|
||||
}
|
||||
}
|
||||
@ -3866,21 +3866,21 @@ static GtkBinClass*
|
||||
get_bin_class_ancestor (gpointer descendant_class)
|
||||
{
|
||||
gpointer parent_class;
|
||||
gpointer class;
|
||||
gpointer klass;
|
||||
|
||||
class = descendant_class;
|
||||
klass = descendant_class;
|
||||
|
||||
if (!GTK_IS_BIN_CLASS (class))
|
||||
if (!GTK_IS_BIN_CLASS (klass))
|
||||
return NULL;
|
||||
|
||||
while (GTK_IS_BIN_CLASS (parent_class = g_type_class_peek_parent (class)))
|
||||
while (GTK_IS_BIN_CLASS (parent_class = g_type_class_peek_parent (klass)))
|
||||
{
|
||||
class = parent_class;
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
klass = parent_class;
|
||||
parent_class = g_type_class_peek_parent (klass);
|
||||
|
||||
}
|
||||
|
||||
return GTK_BIN_CLASS (class);
|
||||
return GTK_BIN_CLASS (klass);
|
||||
}
|
||||
|
||||
static GladeOriginalHandlers*
|
||||
|
@ -140,10 +140,10 @@ void glade_widget_replace (GladeWidget *p
|
||||
LIBGLADEUI_API
|
||||
void glade_widget_rebuild (GladeWidget *glade_widget);
|
||||
LIBGLADEUI_API
|
||||
GladeWidget *glade_widget_dup (GladeWidget *template);
|
||||
GladeWidget *glade_widget_dup (GladeWidget *template_widget);
|
||||
LIBGLADEUI_API
|
||||
void glade_widget_copy_properties (GladeWidget *widget,
|
||||
GladeWidget *template);
|
||||
GladeWidget *template_widget);
|
||||
LIBGLADEUI_API
|
||||
void glade_widget_set_packing_properties (GladeWidget *widget,
|
||||
GladeWidget *container);
|
||||
|
Loading…
x
Reference in New Issue
Block a user