Ephoto: Add an entry for directories(not functional yet)

This commit is contained in:
Stephen Houston 2015-08-10 14:33:18 -05:00
parent 87f4c655ea
commit 90e819b3b5
3 changed files with 17 additions and 3 deletions

View File

@ -15,7 +15,7 @@ elm_main(int argc, char **argv)
eio_init();
elm_need_efreet();
elm_need_ethumb();
elm_language_set("");
#if HAVE_GETTEXT && ENABLE_NLS
elm_app_compile_locale_set(LOCALEDIR);
bindtextdomain(PACKAGE, elm_app_locale_dir_get());

View File

@ -884,7 +884,7 @@ _failed_save(Ephoto_Single_Browser *sb)
elm_icon_standard_set(ic, "window-close");
button = elm_button_add(box);
elm_object_text_set(button, _("OK"));
elm_object_text_set(button, _("Ok"));
elm_object_part_content_set(button, "icon", ic);
evas_object_smart_callback_add(button, "clicked", _reset_no, win);
elm_box_pack_end(box, button);
@ -1132,7 +1132,7 @@ _save_image_as(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_U
elm_fileselector_expandable_set(fsel, EINA_FALSE);
elm_fileselector_path_set(fsel, sb->ephoto->config->directory);
elm_fileselector_current_name_set(fsel, sb->entry->basename);
elm_fileselector_mime_types_filter_append(fsel, "image/*", "Image Files");
elm_fileselector_mime_types_filter_append(fsel, "image/*", _("Image Files"));
evas_object_size_hint_weight_set(fsel, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(fsel, EVAS_HINT_FILL, EVAS_HINT_FILL);
evas_object_smart_callback_add(fsel, "done", _save_image_as_done, win);

View File

@ -32,6 +32,7 @@ struct _Ephoto_Thumb_Browser
Evas_Object *fsel;
Evas_Object *leftbox;
Evas_Object *bleftbox;
Evas_Object *direntry;
Eio_File *ls;
Eina_List *todo_items;
Eina_List *grid_items;
@ -253,6 +254,7 @@ _ephoto_dir_selected(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
ephoto_directory_set(tb->ephoto, e->path);
ephoto_title_set(tb->ephoto, e->path);
elm_object_text_set(tb->direntry, e->path);
}
static void
@ -262,6 +264,7 @@ _ephoto_dir_go_home(void *data, Evas_Object *obj EINA_UNUSED, void *event_info E
ephoto_directory_set(tb->ephoto, getenv("HOME"));
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
elm_object_text_set(tb->direntry, tb->ephoto->config->directory);
}
static void
@ -275,6 +278,7 @@ _ephoto_dir_go_up(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EIN
snprintf(path, PATH_MAX, "%s", tb->ephoto->config->directory);
ephoto_directory_set(tb->ephoto, dirname(path));
ephoto_title_set(tb->ephoto, tb->ephoto->config->directory);
elm_object_text_set(tb->direntry, tb->ephoto->config->directory);
}
}
@ -823,6 +827,16 @@ ephoto_thumb_browser_add(Ephoto *ephoto, Evas_Object *parent)
elm_box_pack_end(tb->leftbox, sep);
evas_object_show(sep);
tb->direntry = elm_entry_add(tb->leftbox);
elm_entry_single_line_set(tb->direntry, EINA_TRUE);
elm_entry_scrollable_set(tb->direntry, EINA_TRUE);
elm_scroller_policy_set(tb->direntry, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
evas_object_size_hint_weight_set(tb->direntry, EVAS_HINT_EXPAND, EVAS_HINT_FILL);
evas_object_size_hint_align_set(tb->direntry, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_object_text_set(tb->direntry, tb->ephoto->config->directory);
elm_box_pack_end(tb->leftbox, tb->direntry);
evas_object_show(tb->direntry);
hbox = elm_box_add(tb->leftbox);
elm_box_horizontal_set(hbox, EINA_TRUE);
evas_object_size_hint_weight_set(hbox, EVAS_HINT_EXPAND, 0.0);