diff options
-rw-r--r-- | gladeui/glade-command.c | 6 | ||||
-rw-r--r-- | gladeui/glade-editor-property.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/gladeui/glade-command.c b/gladeui/glade-command.c index 8b02ae09..b92db245 100644 --- a/gladeui/glade-command.c +++ b/gladeui/glade-command.c @@ -926,7 +926,7 @@ glade_command_set_properties (GladeProperty *property, g_assert (G_IS_VALUE (nvalue)); sdata = g_new (GCSetPropData, 1); - sdata->property = g_object_ref (prop); + sdata->property = g_object_ref (GLADE_PROPERTY (prop)); sdata->old_value = g_new0 (GValue, 1); sdata->new_value = g_new0 (GValue, 1); g_value_init (sdata->old_value, G_VALUE_TYPE (ovalue)); @@ -1260,7 +1260,7 @@ glade_command_add (GList *widgets, adaptor = glade_widget_get_adaptor (widget); /* Widget */ - cdata->widget = g_object_ref (widget); + cdata->widget = g_object_ref (GLADE_WIDGET (widget)); /* Parentless ref */ if ((cdata->reffed = @@ -1426,7 +1426,7 @@ glade_command_remove (GList *widgets) widget = list->data; cdata = g_new0 (CommandData, 1); - cdata->widget = g_object_ref (widget); + cdata->widget = g_object_ref (GLADE_WIDGET (widget)); cdata->parent = glade_widget_get_parent (widget); if ((cdata->reffed = diff --git a/gladeui/glade-editor-property.c b/gladeui/glade-editor-property.c index 981220c0..c7203e6e 100644 --- a/gladeui/glade-editor-property.c +++ b/gladeui/glade-editor-property.c @@ -1662,9 +1662,9 @@ glade_eprop_named_icon_changed_common (GladeEditorProperty *eprop, /* Here we try not to modify the project state by not * modifying a null value for an unchanged property. */ - if (prop_text == NULL && text && text[0] == '\0') + if (prop_text == NULL && text && *text == '\0') g_value_set_string (val, NULL); - else if (text == NULL && prop_text && prop_text[0] == '\0') + else if (text == NULL && prop_text && *prop_text == '\0') g_value_set_string (val, ""); else g_value_set_string (val, text); @@ -1842,7 +1842,7 @@ text_buffer_get_text (GtkTextBuffer *buffer) gtk_text_buffer_get_bounds (buffer, &start, &end); retval = gtk_text_buffer_get_text (buffer, &start, &end, FALSE); - if (retval && retval[0] == '\0') + if (retval && *retval == '\0') { g_free (retval); return NULL; @@ -1985,9 +1985,9 @@ glade_eprop_text_changed_common (GladeEditorProperty *eprop, /* Here we try not to modify the project state by not * modifying a null value for an unchanged property. */ - if (prop_text == NULL && text && text[0] == '\0') + if (prop_text == NULL && text && *text == '\0') g_value_set_string (val, NULL); - else if (text == NULL && prop_text && prop_text[0] == '\0') + else if (text == NULL && prop_text && *prop_text == '\0') g_value_set_string (val, ""); else g_value_set_string (val, text); |