Commit 0de9fa5f authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

* gladeui/glade-editor-property.c, gladeui/glade-property.c, gladeui/glade-widget.c,

	  plugins/gtk+/glade-gtk.c: Fixing some discrepincies searching for properties as
	  regular properties or packing properties. Now the conflicting "position" property
	  on a GtkPaned widget packed into a GtkBox widget works properly (bug 637475).
parent cfeb1d78
......@@ -12,6 +12,11 @@
* gladeui/glade-editor.c: Fixed class header of GladeEditor to update when
widgets unload (patch by Marco Diego Aurélio Mesquita, bug 637541).
* gladeui/glade-editor-property.c, gladeui/glade-property.c, gladeui/glade-widget.c,
plugins/gtk+/glade-gtk.c: Fixing some discrepincies searching for properties as
regular properties or packing properties. Now the conflicting "position" property
on a GtkPaned widget packed into a GtkBox widget works properly (bug 637475).
2010-12-19 Tristan Van Berkom <tristanvb@openismus.com>
* plugins/gtk+/glade-gtk.c: Fix alpha_sort_box_children() to give a consistent
......
......@@ -3765,12 +3765,17 @@ 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->klass->id);
if (eprop->klass->packing)
property = glade_widget_get_pack_property (widget, eprop->klass->id);
else
property = glade_widget_get_property (widget, eprop->klass->id);
glade_editor_property_load (eprop, property);
if (property)
{
g_assert (eprop->klass == property->klass);
gtk_widget_show (GTK_WIDGET (eprop));
gtk_widget_show (GTK_WIDGET (eprop->item_label));
}
......
......@@ -245,7 +245,8 @@ glade_property_set_value_impl (GladeProperty *property, const GValue *value)
#if 0
{
g_print ("***************************************************\n");
g_print ("Setting property %s on %s ..\n",
g_print ("Setting %s property %s on %s ..\n",
property->klass->packing ? "packing" : "normal",
property->klass->id,
property->widget ? property->widget->name : "unknown");
......@@ -351,8 +352,8 @@ glade_property_sync_impl (GladeProperty *property)
* (other properties may be used for convenience in the plugin).
*/
if ((property->klass->packing &&
property != glade_widget_get_pack_property (property->widget, property->klass->id)) ||
property != glade_widget_get_property (property->widget, property->klass->id))
!glade_widget_get_pack_property (property->widget, property->klass->id)) ||
!glade_widget_get_property (property->widget, property->klass->id))
return;
property->syncing++;
......
......@@ -1335,8 +1335,7 @@ glade_widget_copy_packing_props (GladeWidget *parent,
for (l = child->packing_properties; l && l->data; l = l->next)
{
dup_prop = GLADE_PROPERTY(l->data);
orig_prop =
glade_widget_get_property (template_widget, dup_prop->klass->id);
orig_prop = glade_widget_get_pack_property (template_widget, dup_prop->klass->id);
glade_property_set_value (dup_prop, orig_prop->value);
}
}
......
......@@ -1744,7 +1744,6 @@ glade_gtk_box_set_child_property (GladeWidgetAdaptor *adaptor,
/* Get the real value */
new_position = g_value_get_int (value);
}
if (is_position && recursion == FALSE)
......@@ -1862,7 +1861,7 @@ glade_gtk_box_get_first_blank (GtkBox *box)
{
gint gwidget_position;
GladeProperty *property =
glade_widget_get_property (gwidget, "position");
glade_widget_get_pack_property (gwidget, "position");
gwidget_position = g_value_get_int (property->value);
if (gwidget_position > position)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment