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
This commit is contained in:
Matthias Clasen 2008-02-12 15:41:30 +00:00 committed by Matthias Clasen
parent 9499a65646
commit f51751d2d8
4 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,10 @@
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>
* tests/prop-editor.c: Fix a memory leak (#515039, Christian Persch)

View File

@ -376,7 +376,7 @@ gtk_file_system_model_get_value (GtkTreeModel *tree_model,
g_value_init (value, G_TYPE_STRING);
if (model->has_editable && node == model->roots)
g_value_set_string (value, "");
g_value_set_static_string (value, "");
else
{
const GtkFileInfo *info = file_model_node_get_info (model, node);

View File

@ -292,7 +292,7 @@ gtk_printer_get_property (GObject *object,
if (priv->name)
g_value_set_string (value, priv->name);
else
g_value_set_string (value, "");
g_value_set_static_string (value, "");
break;
case PROP_BACKEND:
g_value_set_object (value, priv->backend);
@ -301,19 +301,19 @@ gtk_printer_get_property (GObject *object,
if (priv->state_message)
g_value_set_string (value, priv->state_message);
else
g_value_set_string (value, "");
g_value_set_static_string (value, "");
break;
case PROP_LOCATION:
if (priv->location)
g_value_set_string (value, priv->location);
else
g_value_set_string (value, "");
g_value_set_static_string (value, "");
break;
case PROP_ICON_NAME:
if (priv->icon_name)
g_value_set_string (value, priv->icon_name);
else
g_value_set_string (value, "");
g_value_set_static_string (value, "");
break;
case PROP_JOB_COUNT:
g_value_set_int (value, priv->job_count);

View File

@ -2478,7 +2478,7 @@ gtk_widget_get_property (GObject *object,
if (widget->name)
g_value_set_string (value, widget->name);
else
g_value_set_string (value, "");
g_value_set_static_string (value, "");
break;
case PROP_PARENT:
if (widget->parent)