summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-02-08 11:52:46 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-06 21:03:54 -0500
commit1daabc4f2b963d3d87198249bfa0d827486cb704 (patch)
treefbf826c128ea4e7cc06e08d2b09dc91527bc9b04 /src
parentba50156ec42fb3ed2ebab97f1812b7f1b2890bd9 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/bin/empc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/bin/empc.c b/src/bin/empc.c
index a9df3b8..b03e180 100644
--- a/src/bin/empc.c
+++ b/src/bin/empc.c
@@ -587,7 +587,10 @@ tooltip_create(Evas_Object *tooltip, Elm_Object_Item *item)
587 else 587 else
588 { 588 {
589 elm_object_text_set(name, _("Track:")); 589 elm_object_text_set(name, _("Track:"));
590 snprintf(buf, sizeof(buf), "%d/%u", so->track, elm_genlist_item_subitems_count(it)); 590 if (so->track > (int)elm_genlist_item_subitems_count(it))
591 snprintf(buf, sizeof(buf), "%d", so->track);
592 else
593 snprintf(buf, sizeof(buf), "%d/%u", so->track, elm_genlist_item_subitems_count(it));
591 } 594 }
592 elm_object_text_set(value, buf); 595 elm_object_text_set(value, buf);
593 } 596 }