Commit f51751d2 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Use g_value_set_static_string() where appropriate. (#515042, Christian

2008-02-12  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkfilesystemmodel.c:
        * gtk/gtkprinter.c:
        * gtk/gtkwidget.c: Use g_value_set_static_string() where
        appropriate.  (#515042, Christian Persch)


svn path=/trunk/; revision=19527
parent 9499a656
2008-02-12 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilesystemmodel.c:
* gtk/gtkprinter.c:
* gtk/gtkwidget.c: Use g_value_set_static_string() where
appropriate. (#515042, Christian Persch)
2008-02-12 Matthias Clasen <mclasen@redhat.com> 2008-02-12 Matthias Clasen <mclasen@redhat.com>
* tests/prop-editor.c: Fix a memory leak (#515039, Christian Persch) * tests/prop-editor.c: Fix a memory leak (#515039, Christian Persch)
......
...@@ -376,7 +376,7 @@ gtk_file_system_model_get_value (GtkTreeModel *tree_model, ...@@ -376,7 +376,7 @@ gtk_file_system_model_get_value (GtkTreeModel *tree_model,
g_value_init (value, G_TYPE_STRING); g_value_init (value, G_TYPE_STRING);
if (model->has_editable && node == model->roots) if (model->has_editable && node == model->roots)
g_value_set_string (value, ""); g_value_set_static_string (value, "");
else else
{ {
const GtkFileInfo *info = file_model_node_get_info (model, node); const GtkFileInfo *info = file_model_node_get_info (model, node);
......
...@@ -292,7 +292,7 @@ gtk_printer_get_property (GObject *object, ...@@ -292,7 +292,7 @@ gtk_printer_get_property (GObject *object,
if (priv->name) if (priv->name)
g_value_set_string (value, priv->name); g_value_set_string (value, priv->name);
else else
g_value_set_string (value, ""); g_value_set_static_string (value, "");
break; break;
case PROP_BACKEND: case PROP_BACKEND:
g_value_set_object (value, priv->backend); g_value_set_object (value, priv->backend);
...@@ -301,19 +301,19 @@ gtk_printer_get_property (GObject *object, ...@@ -301,19 +301,19 @@ gtk_printer_get_property (GObject *object,
if (priv->state_message) if (priv->state_message)
g_value_set_string (value, priv->state_message); g_value_set_string (value, priv->state_message);
else else
g_value_set_string (value, ""); g_value_set_static_string (value, "");
break; break;
case PROP_LOCATION: case PROP_LOCATION:
if (priv->location) if (priv->location)
g_value_set_string (value, priv->location); g_value_set_string (value, priv->location);
else else
g_value_set_string (value, ""); g_value_set_static_string (value, "");
break; break;
case PROP_ICON_NAME: case PROP_ICON_NAME:
if (priv->icon_name) if (priv->icon_name)
g_value_set_string (value, priv->icon_name); g_value_set_string (value, priv->icon_name);
else else
g_value_set_string (value, ""); g_value_set_static_string (value, "");
break; break;
case PROP_JOB_COUNT: case PROP_JOB_COUNT:
g_value_set_int (value, priv->job_count); g_value_set_int (value, priv->job_count);
......
...@@ -2478,7 +2478,7 @@ gtk_widget_get_property (GObject *object, ...@@ -2478,7 +2478,7 @@ gtk_widget_get_property (GObject *object,
if (widget->name) if (widget->name)
g_value_set_string (value, widget->name); g_value_set_string (value, widget->name);
else else
g_value_set_string (value, ""); g_value_set_static_string (value, "");
break; break;
case PROP_PARENT: case PROP_PARENT:
if (widget->parent) if (widget->parent)
......
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