don't show total track count in tooltip if track number is larger than total

this isn't a totally accurate method of showing the track count, so at least
be less obvious about it in cases where it's flagrantly wrong
This commit is contained in:
Mike Blumenkrantz 2016-02-08 11:52:46 -05:00
parent ba50156ec4
commit 1daabc4f2b
1 changed files with 4 additions and 1 deletions

View File

@ -587,7 +587,10 @@ tooltip_create(Evas_Object *tooltip, Elm_Object_Item *item)
else
{
elm_object_text_set(name, _("Track:"));
snprintf(buf, sizeof(buf), "%d/%u", so->track, elm_genlist_item_subitems_count(it));
if (so->track > (int)elm_genlist_item_subitems_count(it))
snprintf(buf, sizeof(buf), "%d", so->track);
else
snprintf(buf, sizeof(buf), "%d/%u", so->track, elm_genlist_item_subitems_count(it));
}
elm_object_text_set(value, buf);
}