rimmed pushed a commit to branch master.

http://git.enlightenment.org/tools/eflete.git/commit/?id=1b2afed41945124c441ad810551efcc4ee82561f

commit 1b2afed41945124c441ad810551efcc4ee82561f
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Jan 5 11:22:00 2016 +0200

    property_group: show "None" instead of dummy image name
---
 src/bin/ui/property_group.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/bin/ui/property_group.c b/src/bin/ui/property_group.c
index b2f5803..5372775 100644
--- a/src/bin/ui/property_group.c
+++ b/src/bin/ui/property_group.c
@@ -3293,8 +3293,22 @@ prop_##SUB##_##VALUE##_add(Evas_Object *box, 
Group_Prop_Data *pd) \
 ATTR_4SPINNERS(_("border"), state_image, border, state_image, NULL, STATE_ARGS,
                _("border changed to [%d %d %d %d]"))
 
-STATE_ATTR_1ENTRY(_("image"), state, image, state_image, NULL, NULL,
-                  _("image changed to %s"))
+STATE_ATTR_1ENTRY_CALLBACK(state, image, NULL, _("image changed to %s"))
+static void
+prop_state_image_update(Group_Prop_Data *pd)
+{
+   const char *value;
+   value = edje_edit_state_image_get(pd->group->edit_object STATE_ARGS);
+   if (!strcmp(value, EFLETE_DUMMY_IMAGE_NAME))
+     value = _("None");
+   char *text = elm_entry_utf8_to_markup(value);
+   if (strcmp(text, elm_entry_entry_get(pd->attributes.state_image.image)))
+     elm_entry_entry_set(pd->attributes.state_image.image, text);
+   edje_edit_string_free(value);
+   free(text);
+}
+STATE_ATTR_1ENTRY_ADD("image", state, image, state_image, NULL, NULL)
+
 STATE_ATTR_1COMBOBOX_LIST(_("border fill"), state_image, border_fill, 
state_image,\
                           edje_middle_type, NULL, unsigned char,
                           _("border fill changed to %s"))

-- 


Reply via email to