summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-03-22 16:45:27 +0100
committerMarcel Hollerbach <marcel-hollerbach@t-online.de>2015-10-05 12:56:26 +0200
commitd560ede3f14fa84855887ca0cbaf256ba109dd4d (patch)
tree19d2227f3aba507751ebe3f50173751cfaf70287
parent0df5632e3d6b137cb036008800009c59aac1f831 (diff)
settingspane: we should use stringshares here
-rw-r--r--src/lib/elc_settingspane.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/elc_settingspane.c b/src/lib/elc_settingspane.c
index ed4239d04..4874aef0a 100644
--- a/src/lib/elc_settingspane.c
+++ b/src/lib/elc_settingspane.c
@@ -1026,8 +1026,13 @@ _elm_settingspane_item_description_set(Eo *obj, Elm_Settingspane_Item_Data *pd,
1026EOLIAN static void 1026EOLIAN static void
1027_elm_settingspane_item_image_set(Eo *obj, Elm_Settingspane_Item_Data *pd, const char *file, const char *group) 1027_elm_settingspane_item_image_set(Eo *obj, Elm_Settingspane_Item_Data *pd, const char *file, const char *group)
1028{ 1028{
1029 pd->file = file; 1029 if (pd->file)
1030 pd->group = group; 1030 eina_stringshare_del(pd->file);
1031 if (pd->group)
1032 eina_stringshare_del(pd->group);
1033
1034 pd->file = eina_stringshare_add(file);
1035 pd->group = eina_stringshare_add(group);
1031 1036
1032 _item_menu_refresh(obj, pd); 1037 _item_menu_refresh(obj, pd);
1033} 1038}
@@ -1042,7 +1047,7 @@ _elm_settingspane_item_image_get(Eo *obj EINA_UNUSED, Elm_Settingspane_Item_Data
1042EOLIAN static Elm_Settingspane_Item * 1047EOLIAN static Elm_Settingspane_Item *
1043_elm_settingspane_item_append(Eo *obj, Elm_Settingspane_Data *pd, void *data, const char *name, Elm_Settingspane_Item *par) 1048_elm_settingspane_item_append(Eo *obj, Elm_Settingspane_Data *pd, void *data, const char *name, Elm_Settingspane_Item *par)
1044{ 1049{
1045 return _elm_settingspane_item_append_full(obj, pd, data, name, par, NULL); 1050 return _elm_settingspane_item_append_full(obj, pd, data, eina_stringshare_add(name), par, NULL);
1046} 1051}
1047 1052
1048EOLIAN static Elm_Settingspane_Item * 1053EOLIAN static Elm_Settingspane_Item *
@@ -1050,7 +1055,7 @@ _elm_settingspane_item_append_relative(Eo *obj, Elm_Settingspane_Data *pd, void
1050{ 1055{
1051 EINA_SAFETY_ON_NULL_RETURN_VAL(rel, NULL); 1056 EINA_SAFETY_ON_NULL_RETURN_VAL(rel, NULL);
1052 Elm_Settingspane_Item_Data *id = eo_data_scope_get(rel, ELM_SETTINGSPANE_ITEM_CLASS); 1057 Elm_Settingspane_Item_Data *id = eo_data_scope_get(rel, ELM_SETTINGSPANE_ITEM_CLASS);
1053 return _elm_settingspane_item_append_full(obj, pd, data, name, id->par, rel); 1058 return _elm_settingspane_item_append_full(obj, pd, data, eina_stringshare_add(name), id->par, rel);
1054} 1059}
1055 1060
1056/* Item implement */ 1061/* Item implement */