Evas_Object *obj __UNUSED__,
const char *source __UNUSED__)
{
- return strdup(ecore_file_file_get(data)); /* NOTE this will be
- * free() by the
- * caller */
+ return elm_entry_utf8_to_markup(ecore_file_file_get(data)); /* NOTE this will be
+ * free() by the
+ * caller */
}
static Evas_Object *
}
else /* navigating through folders only or file is not a dir. */
{
+ char *s;
+
if (wd->expand && wd->mode == ELM_FILESELECTOR_LIST)
_do_anchors(sd->fs, path);
else if (wd->only_folder)
_populate(sd->fs, p, NULL);
eina_stringshare_del(p);
}
- elm_object_text_set(wd->filename_entry,
- ecore_file_file_get(path));
+ s = elm_entry_utf8_to_markup(ecore_file_file_get(path));
+ if (s)
+ {
+ elm_object_text_set(wd->filename_entry, s);
+ free(s);
+ }
+ else
+ elm_object_text_set(wd->filename_entry, "");
}
evas_object_smart_callback_call(sd->fs, SIG_SELECTED, (void *)path);
const char *path)
{
Widget_Data *wd = elm_widget_data_get(obj);
- char **tok, buf[PATH_MAX * 3];
+ char **tok, buf[PATH_MAX * 3], *s;
int i, j;
+
if (!wd) return;
+ s = elm_entry_utf8_to_markup(path);
+ if (!s) return;
buf[0] = '\0';
- tok = eina_str_split(path, "/", 0);
+ tok = eina_str_split(s, "/", 0);
+ free(s);
eina_strlcat(buf, "<a href=/>root</a>", sizeof(buf));
for (i = 0; tok[i]; i++)
{
elm_genlist_item_sorted_insert(wr->wd->files_list, eio_file_associate_find(handler, "type/list"),
eina_stringshare_ref(eio_file_associate_find(handler, "filename")),
- wr->parent, wr->wd->expand && is_dir ? ELM_GENLIST_ITEM_SUBITEMS : ELM_GENLIST_ITEM_NONE,
+ wr->parent, wr->wd->expand && is_dir ? ELM_GENLIST_ITEM_TREE : ELM_GENLIST_ITEM_NONE,
_file_list_cmp, NULL, NULL);
}
else if (wr->wd->mode == ELM_FILESELECTOR_GRID)
elm_genlist_item_append(wd->files_list, list_itc[ELM_DIRECTORY],
real, /* item data */
parent,
- wd->expand ? ELM_GENLIST_ITEM_SUBITEMS :
+ wd->expand ? ELM_GENLIST_ITEM_TREE :
ELM_GENLIST_ITEM_NONE,
NULL, NULL);
else if (wd->mode == ELM_FILESELECTOR_GRID)
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
+ if (!wd->path) return NULL;
+
if (wd->filename_entry)
{
const char *name;
char buf[PATH_MAX];
- char *dir;
+ char *dir, *s;
dir = wd->only_folder ? ecore_file_dir_get(wd->path) : strdup(wd->path);
name = elm_object_text_get(wd->filename_entry);
- snprintf(buf, sizeof(buf), "%s/%s",
- dir, name);
+ if (name)
+ {
+ s = elm_entry_markup_to_utf8(name);
+ if (s)
+ {
+ snprintf(buf, sizeof(buf), "%s/%s", dir, s);
+ free(s);
+ }
+ else
+ snprintf(buf, sizeof(buf), "%s", dir);
+ }
+ else
+ {
+ snprintf(buf, sizeof(buf), "%s", dir);
+ }
if (wd->only_folder && !ecore_file_is_dir(buf))
eina_stringshare_replace(&wd->selection, ecore_file_dir_get(buf));
else
_populate(obj, ecore_file_dir_get(path), NULL);
if (wd->filename_entry)
{
- elm_object_text_set(wd->filename_entry,
- ecore_file_file_get(path));
+ char *s;
+
+ s = elm_entry_utf8_to_markup(ecore_file_file_get(path));
+ if (s)
+ {
+ elm_object_text_set(wd->filename_entry, s);
+ free(s);
+ }
+ else
+ elm_object_text_set(wd->filename_entry, "");
eina_stringshare_replace(&wd->selection, path);
}
}