From c8824640f2a8d4e0a9645723d8501ffbc21539d0 Mon Sep 17 00:00:00 2001 From: Robert Bieber Date: Mon, 2 Aug 2010 22:23:39 +0000 Subject: Theme Editor: Fixed rendering of %ca tag git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27671 a1c6a512-1295-4272-9138-f99709370657 --- utils/themeeditor/gui/devicestate.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'utils/themeeditor') diff --git a/utils/themeeditor/gui/devicestate.cpp b/utils/themeeditor/gui/devicestate.cpp index e766a64835..a62c6862b4 100644 --- a/utils/themeeditor/gui/devicestate.cpp +++ b/utils/themeeditor/gui/devicestate.cpp @@ -362,8 +362,17 @@ QVariant DeviceState::data(QString tag, int paramCount, } else if(tag == "ca") { - QString day = data("cw").toString(); - return day.left(3); + switch(data("cw").toInt()) + { + case 0: return "Sun"; + case 1: return "Mon"; + case 2: return "Tue"; + case 3: return "Wed"; + case 4: return "Thu"; + case 5: return "Fri"; + case 6: return "Sat"; + case 7: return tr("Error, invalid weekday number"); + } } else if(tag == "cb") { -- cgit