fix genlist item signals on prepend
[framework/uifw/elementary.git] / src / lib / elc_fileselector_entry.c
index b37c19e..7c78e2a 100644 (file)
@@ -8,6 +8,7 @@ struct _Widget_Data
    Evas_Object *edje;
    Evas_Object *button;
    Evas_Object *entry;
+   char *path;
 };
 
 static const char *widtype = NULL;
@@ -71,7 +72,12 @@ _FILE_CHOSEN_fwd(void *data, Evas_Object *obj __UNUSED__, void *event_info)
 {
    Widget_Data *wd = elm_widget_data_get(data);
    const char *file = event_info;
-   elm_object_text_set(wd->entry, file);
+   char *s;
+   
+   s = elm_entry_utf8_to_markup(file);
+   if (!s) return;
+   elm_object_text_set(wd->entry, s);
+   free(s);
    evas_object_smart_callback_call(data, SIG_FILE_CHOSEN, event_info);
 }
 
@@ -99,6 +105,7 @@ static void
 _del_hook(Evas_Object *obj)
 {
    Widget_Data *wd = elm_widget_data_get(obj);
+   if (wd->path) free(wd->path);
    free(wd);
 }
 
@@ -346,18 +353,6 @@ elm_fileselector_entry_add(Evas_Object *parent)
 }
 
 EAPI void
-elm_fileselector_entry_button_label_set(Evas_Object *obj, const char *label)
-{
-   _elm_fileselector_entry_button_label_set(obj, NULL, label);
-}
-
-EAPI const char *
-elm_fileselector_entry_button_label_get(const Evas_Object *obj)
-{
-   return _elm_fileselector_entry_button_label_get(obj, NULL);
-}
-
-EAPI void
 elm_fileselector_entry_selected_set(Evas_Object *obj, const char *path)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
@@ -416,9 +411,16 @@ elm_fileselector_entry_path_set(Evas_Object *obj, const char *path)
 {
    ELM_CHECK_WIDTYPE(obj, widtype);
    Widget_Data *wd = elm_widget_data_get(obj);
+   char *s;
+   
    if (!wd) return;
    elm_fileselector_button_path_set(wd->button, path);
-   elm_object_text_set(wd->entry, path);
+   s = elm_entry_utf8_to_markup(path);
+   if (s)
+     {
+        elm_object_text_set(wd->entry, s);
+        free(s);
+     }
 }
 
 EAPI const char *
@@ -426,8 +428,11 @@ elm_fileselector_entry_path_get(const Evas_Object *obj)
 {
    ELM_CHECK_WIDTYPE(obj, widtype) NULL;
    Widget_Data *wd = elm_widget_data_get(obj);
+   
    if (!wd) return NULL;
-   return elm_object_text_get(wd->entry);
+   if (wd->path) free(wd->path);
+   wd->path = elm_entry_markup_to_utf8(elm_object_text_get(wd->entry));
+   return wd->path;
 }
 
 EAPI void
@@ -501,21 +506,3 @@ elm_fileselector_entry_inwin_mode_get(const Evas_Object *obj)
    if (!wd) return EINA_FALSE;
    return elm_fileselector_button_inwin_mode_get(wd->button);
 }
-
-EAPI void
-elm_fileselector_entry_button_icon_set(Evas_Object *obj, Evas_Object *icon)
-{
-   _content_set_hook(obj, NULL, icon);
-}
-
-EAPI Evas_Object *
-elm_fileselector_entry_button_icon_get(const Evas_Object *obj)
-{
-   return _content_get_hook(obj, NULL);
-}
-
-EAPI Evas_Object *
-elm_fileselector_entry_button_icon_unset(Evas_Object *obj)
-{
-   return _content_unset_hook(obj, NULL);
-}