This pach fixes this two annoying problems
a) pixbuf eprop bug:
glade_eprop_resource_entry_activate() was calling
glade_eprop_resource_entry_activate() with an empty string instead of
NULL so you cant set back a pixbuf prop to NULL and if you do not even
change the value when the focus goes out you get a dot as the filename.
maybe we should check for empty strings
inglade_property_class_make_object_from_string() and return NULL
b) GtkImage:
When you do a paste of a gtkimage that is being edited as filename,
glade-stock reset stock prop to gtk-missing-image :S
greets
Juan Pablo
Index: plugins/gtk+/glade-gtk.c
===================================================================
--- plugins/gtk+/glade-gtk.c (revision 1623)
+++ plugins/gtk+/glade-gtk.c (working copy)
@@ -4440,14 +4440,18 @@ glade_gtk_image_set_glade_stock (GObject
GEnumClass *eclass;
GEnumValue *eval;
gint val;
+ GladeProperty *prop;
g_return_if_fail (GTK_IS_IMAGE (object));
gwidget = glade_widget_get_from_gobject (object);
g_return_if_fail (GLADE_IS_WIDGET (gwidget));
+ prop = glade_widget_get_property (gwidget, "glade-stock");
+ g_return_if_fail (GLADE_IS_PROPERTY (prop));
+
/* This is triggered by glade_widget_sync_custom_props () from glade_widget_new_from_widget_info()
which makes "stock" property to reset */
- if (glade_util_object_is_loading (object)) return;
+ if (prop->syncing) return;
val = g_value_get_enum (value);
eclass = g_type_class_ref (G_VALUE_TYPE (value));
Index: gladeui/glade-editor-property.c
===================================================================
--- gladeui/glade-editor-property.c (revision 1623)
+++ gladeui/glade-editor-property.c (working copy)
@@ -2148,10 +2148,17 @@ glade_eprop_resource_finalize (GObject *
static void
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->klass, gtk_entry_get_text(entry), project);
+ const gchar *text = gtk_entry_get_text (entry);
+ GladeProject *project;
+ GValue *value;
+ if (*text == '\0') text = NULL;
+
+ project = glade_widget_get_project (eprop->property->widget);
+ value = glade_property_class_make_gvalue_from_string (eprop->klass,
+ text,
+ project);
+
/* Set project resource here where we still have the fullpath.
*/
glade_project_set_resource (project, eprop->property,
_______________________________________________
Glade-devel maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/glade-devel