[Xfce4-commits] [panel-plugins/xfce4-statusnotifier-plugin] 02/04: Don't use g_free for const pointers
noreply at xfce.org
noreply at xfce.org
Thu Sep 7 09:24:07 CEST 2017
This is an automated email from the git hooks/post-receive script.
n i n e t l s p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-statusnotifier-plugin.
commit 8f4ad1c3d4972a5b02d79b818ff756cea4f589d6
Author: Viktor Odintsev <ninetls at xfce.org>
Date: Thu Sep 7 10:16:22 2017 +0300
Don't use g_free for const pointers
---
panel-plugin/sn-item.c | 41 +++++++++++++++++++++--------------------
1 file changed, 21 insertions(+), 20 deletions(-)
diff --git a/panel-plugin/sn-item.c b/panel-plugin/sn-item.c
index fb04955..918758c 100644
--- a/panel-plugin/sn-item.c
+++ b/panel-plugin/sn-item.c
@@ -687,8 +687,9 @@ sn_item_get_all_properties_result (GObject *source_object,
const gchar *name;
GVariant *value;
- const gchar *str_val1;
- const gchar *str_val2;
+ const gchar *cstr_val1;
+ gchar *str_val1;
+ gchar *str_val2;
gboolean bool_val1;
GdkPixbuf *pb_val1;
@@ -735,8 +736,8 @@ sn_item_get_all_properties_result (GObject *source_object,
}
else if (!g_strcmp0 (name, "Status"))
{
- str_val1 = g_variant_get_string (value, NULL);
- bool_val1 = sn_item_status_is_exposed (str_val1);
+ cstr_val1 = g_variant_get_string (value, NULL);
+ bool_val1 = sn_item_status_is_exposed (cstr_val1);
if (bool_val1 != item->exposed)
{
item->exposed = bool_val1;
@@ -745,8 +746,8 @@ sn_item_get_all_properties_result (GObject *source_object,
}
else if (!g_strcmp0 (name, "Title"))
{
- str_val1 = g_variant_get_string (value, NULL);
- update_new_string (str_val1, title, update_tooltip);
+ cstr_val1 = g_variant_get_string (value, NULL);
+ update_new_string (cstr_val1, title, update_tooltip);
}
else if (!g_strcmp0 (name, "ToolTip"))
{
@@ -767,18 +768,18 @@ sn_item_get_all_properties_result (GObject *source_object,
}
else if (!g_strcmp0 (name, "Menu"))
{
- str_val1 = g_variant_get_string (value, NULL);
- update_new_string (str_val1, menu_object_path, update_menu);
+ cstr_val1 = g_variant_get_string (value, NULL);
+ update_new_string (cstr_val1, menu_object_path, update_menu);
}
else if (!g_strcmp0 (name, "IconThemePath"))
{
- str_val1 = g_variant_get_string (value, NULL);
- update_new_string (str_val1, icon_theme_path, update_icon);
+ cstr_val1 = g_variant_get_string (value, NULL);
+ update_new_string (cstr_val1, icon_theme_path, update_icon);
}
else if (!g_strcmp0 (name, "IconName"))
{
- str_val1 = g_variant_get_string (value, NULL);
- update_new_string (str_val1, icon_name, update_icon);
+ cstr_val1 = g_variant_get_string (value, NULL);
+ update_new_string (cstr_val1, icon_name, update_icon);
}
else if (!g_strcmp0 (name, "IconPixmap"))
{
@@ -787,13 +788,13 @@ sn_item_get_all_properties_result (GObject *source_object,
}
else if (!g_strcmp0 (name, "IconAccessibleDesc"))
{
- str_val1 = g_variant_get_string (value, NULL);
- update_new_string (str_val1, icon_desc, update_tooltip);
+ cstr_val1 = g_variant_get_string (value, NULL);
+ update_new_string (cstr_val1, icon_desc, update_tooltip);
}
else if (!g_strcmp0 (name, "AttentionIconName"))
{
- str_val1 = g_variant_get_string (value, NULL);
- update_new_string (str_val1, attention_icon_name, update_icon);
+ cstr_val1 = g_variant_get_string (value, NULL);
+ update_new_string (cstr_val1, attention_icon_name, update_icon);
}
else if (!g_strcmp0 (name, "AttentionIconPixmap"))
{
@@ -802,13 +803,13 @@ sn_item_get_all_properties_result (GObject *source_object,
}
else if (!g_strcmp0 (name, "AttentionAccessibleDesc"))
{
- str_val1 = g_variant_get_string (value, NULL);
- update_new_string (str_val1, attention_desc, update_tooltip);
+ cstr_val1 = g_variant_get_string (value, NULL);
+ update_new_string (cstr_val1, attention_desc, update_tooltip);
}
else if (!g_strcmp0 (name, "OverlayIconName"))
{
- str_val1 = g_variant_get_string (value, NULL);
- update_new_string (str_val1, overlay_icon_name, update_icon);
+ cstr_val1 = g_variant_get_string (value, NULL);
+ update_new_string (cstr_val1, overlay_icon_name, update_icon);
}
else if (!g_strcmp0 (name, "OverlayIconPixmap"))
{
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list