Ephoto: If Ephoto is opened with a directory that does not contain images, show the directory overlay.
This commit is contained in:
parent
d885da2419
commit
737fb734a2
|
@ -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_Object *but = evas_object_data_get(ephoto->layout, "folder_button");
|
||||||
Evas_Coord x, y, w, h, bx, by, bw, bh, cx, cy;
|
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_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(ephoto->dir_browser, &x, &y, &w, &h);
|
||||||
evas_object_geometry_get(but, &bx, &by, &bw, &bh);
|
evas_object_geometry_get(but, &bx, &by, &bw, &bh);
|
||||||
|
|
|
@ -914,8 +914,12 @@ ephoto_thumb_browser_update_info_label(Ephoto *ephoto)
|
||||||
|
|
||||||
if (!tb->totimages)
|
if (!tb->totimages)
|
||||||
{
|
{
|
||||||
elm_object_text_set(tb->nolabel,
|
if (tb->searching)
|
||||||
_("No images matched your search"));
|
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",
|
snprintf(buf, PATH_MAX, "<b>%s:</b> 0 %s <b>%s:</b> 0%s",
|
||||||
_("Total"), ngettext("image", "images", 0), _("Size"),
|
_("Total"), ngettext("image", "images", 0), _("Size"),
|
||||||
ngettext("B", "B", 0));
|
ngettext("B", "B", 0));
|
||||||
|
@ -1384,6 +1388,10 @@ _ephoto_thumb_populate_end(void *data, int type EINA_UNUSED,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
tb->entries = tb->ephoto->entries;
|
tb->entries = tb->ephoto->entries;
|
||||||
|
if (eina_list_count(tb->entries) < 1)
|
||||||
|
{
|
||||||
|
ephoto_show_folders(tb->ephoto, EINA_FALSE);
|
||||||
|
}
|
||||||
tb->dirs_only = 0;
|
tb->dirs_only = 0;
|
||||||
tb->thumbs_only = 0;
|
tb->thumbs_only = 0;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue