4-02-29 Joaquin Cuenca Abela <e98cuenc@yahoo.com>

* pixmaps/dialog.png: fix some pixels in the shadow that didn't have
	the right gray shade.
	* src/glade-property.c: don't write properties that have the default
	value.
This commit is contained in:
Joaquín Cuenca Abela 2004-02-29 10:48:59 +00:00
parent c7bc69b923
commit e24a0efdc7
4 changed files with 25 additions and 3 deletions

View File

@ -1,3 +1,10 @@
2004-02-29 Joaquin Cuenca Abela <e98cuenc@yahoo.com>
* pixmaps/dialog.png: fix some pixels in the shadow that didn't have
the right gray shade.
* src/glade-property.c: don't write properties that have the default
value.
2004-02-28 Joaquin Cuenca Abela <e98cuenc@yahoo.com>
* widgets/gtkdialog.xml: comment out "response-id" as a ChildProperty

Binary file not shown.

Before

Width:  |  Height:  |  Size: 686 B

After

Width:  |  Height:  |  Size: 671 B

View File

@ -177,6 +177,7 @@ glade_property_write (GladeXmlContext *context, GladeProperty *property)
{
GladeXmlNode *node;
gchar *tmp;
gchar *default_str = NULL;
if (!property->enabled)
return NULL;
@ -203,15 +204,28 @@ glade_property_write (GladeXmlContext *context, GladeProperty *property)
* the openning and the closing of the property tag */
tmp = glade_property_class_make_string_from_gvalue (property->class,
property->value);
if (!tmp)
{
glade_xml_node_delete (node);
return NULL;
}
if (property->class->def)
{
default_str = glade_property_class_make_string_from_gvalue (property->class,
property->class->def);
if (!default_str || strcmp (tmp, default_str) == 0)
{
g_free (tmp);
g_free (default_str);
glade_xml_node_delete (node);
return NULL;
}
}
glade_xml_set_content (node, tmp);
g_free (tmp);
g_free (default_str);
return node;
}

View File

@ -1232,10 +1232,11 @@ glade_widget_write (GladeXmlContext *context, GladeWidget *widget)
GladeProperty *property = list->data;
if (property->class->packing)
continue;
child = glade_property_write (context, property);
if (!child) {
if (!child)
continue;
}
glade_xml_node_append_child (node, child);
}