summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2019-04-05 15:44:03 +0200
committerAlberto Fanjul <albertofanjul@gmail.com>2019-06-09 20:16:27 +0200
commitb108afa29b2b4d26c124920e7c71f716c2c201e4 (patch)
tree406b67124a9694e83317fc8780af076ebdcec4dc
parent4c280cce032c760d03996018c34d69b0579d09fe (diff)
downloadglade-b108afa29b2b4d26c124920e7c71f716c2c201e4.tar.gz
Fix several compiler warnings
-rw-r--r--gladeui/glade-command.c6
-rw-r--r--gladeui/glade-editor-property.c10
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);