Ephoto: If Ephoto is opened with a directory that does not contain images, show the directory overlay.

This commit is contained in:
Stephen okra Houston 2016-05-31 11:48:40 -05:00
parent d885da2419
commit 737fb734a2
2 changed files with 13 additions and 2 deletions

View File

@ -223,6 +223,9 @@ _mouse_up_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED,
Evas_Object *but = evas_object_data_get(ephoto->layout, "folder_button");
Evas_Coord x, y, w, h, bx, by, bw, bh, cx, cy;
if (eina_list_count(ephoto->entries) < 1)
return;
evas_pointer_canvas_xy_get(evas_object_evas_get(ephoto->dir_browser), &cx, &cy);
evas_object_geometry_get(ephoto->dir_browser, &x, &y, &w, &h);
evas_object_geometry_get(but, &bx, &by, &bw, &bh);

View File

@ -914,8 +914,12 @@ ephoto_thumb_browser_update_info_label(Ephoto *ephoto)
if (!tb->totimages)
{
elm_object_text_set(tb->nolabel,
_("No images matched your search"));
if (tb->searching)
elm_object_text_set(tb->nolabel,
_("No images matched your search"));
else
elm_object_text_set(tb->nolabel,
_("There are no images in this directory"));
snprintf(buf, PATH_MAX, "<b>%s:</b> 0 %s <b>%s:</b> 0%s",
_("Total"), ngettext("image", "images", 0), _("Size"),
ngettext("B", "B", 0));
@ -1384,6 +1388,10 @@ _ephoto_thumb_populate_end(void *data, int type EINA_UNUSED,
}
}
tb->entries = tb->ephoto->entries;
if (eina_list_count(tb->entries) < 1)
{
ephoto_show_folders(tb->ephoto, EINA_FALSE);
}
tb->dirs_only = 0;
tb->thumbs_only = 0;