summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-11-15 15:49:51 +0100
committerMartin Schirrmacher <vdr.skinflatplus@schirrmacher.eu>2014-11-15 15:49:51 +0100
commitff62c44e6cfdf5b015d04256341e950de76c6b92 (patch)
tree47b7bc2b3648a02878574f69b874cbf47b60beb1 /config.c
parent21e71933917740417e2c51286cb65a586f981a1e (diff)
downloadskin-flatplus-ff62c44e6cfdf5b015d04256341e950de76c6b92.tar.gz
skin-flatplus-ff62c44e6cfdf5b015d04256341e950de76c6b92.tar.bz2
add weather widget
Diffstat (limited to 'config.c')
-rw-r--r--config.c35
1 files changed, 27 insertions, 8 deletions
diff --git a/config.c b/config.c
index acd27cfe..71a393ea 100644
--- a/config.c
+++ b/config.c
@@ -79,33 +79,38 @@ cFlatConfig::cFlatConfig(void) {
MainMenuItemScale = 0.5;
MainMenuWidgetDVBDevicesShow = true;
- MainMenuWidgetDVBDevicesPosition = 1;
+ MainMenuWidgetDVBDevicesPosition = 2;
MainMenuWidgetActiveTimerShow = true;
- MainMenuWidgetActiveTimerPosition = 2;
+ MainMenuWidgetActiveTimerPosition = 3;
MainMenuWidgetActiveTimerMaxCount = 2;
MainMenuWidgetActiveTimerHideEmpty = false;
MainMenuWidgetLastRecShow = false;
- MainMenuWidgetLastRecPosition = 3;
+ MainMenuWidgetLastRecPosition = 4;
MainMenuWidgetLastRecMaxCount = 3;
MainMenuWidgetTimerConflictsShow = false;
- MainMenuWidgetTimerConflictsPosition = 4;
+ MainMenuWidgetTimerConflictsPosition = 5;
MainMenuWidgetTimerConflictsHideEmpty = false;
MainMenuWidgetSystemInfoShow = true;
- MainMenuWidgetSystemInfoPosition = 5;
+ MainMenuWidgetSystemInfoPosition = 6;
MainMenuWidgetSystemUpdatesShow = true;
- MainMenuWidgetSystemUpdatesPosition = 6;
+ MainMenuWidgetSystemUpdatesPosition = 7;
MainMenuWidgetSystemUpdatesHideIfZero = 0;
MainMenuWidgetTemperaturesShow = true;
- MainMenuWidgetTemperaturesPosition = 7;
+ MainMenuWidgetTemperaturesPosition = 8;
MainMenuWidgetCommandShow = true;
- MainMenuWidgetCommandPosition = 8;
+ MainMenuWidgetCommandPosition = 9;
+
+ MainMenuWidgetWeatherShow = true;
+ MainMenuWidgetWeatherPosition = 1;
+ MainMenuWidgetWeatherDays = 5;
+ MainMenuWidgetWeatherType = 0;
TopBarFontClockScale = 0.01;
TopBarHideClockText = 0;
@@ -327,6 +332,10 @@ bool cFlatConfig::SetupParse(const char *Name, const char *Value) {
else if (strcmp(Name, "MainMenuWidgetTemperaturesPosition") == 0) MainMenuWidgetTemperaturesPosition = atoi(Value);
else if (strcmp(Name, "MainMenuWidgetCommandShow") == 0) MainMenuWidgetCommandShow = atoi(Value);
else if (strcmp(Name, "MainMenuWidgetCommandPosition") == 0) MainMenuWidgetCommandPosition = atoi(Value);
+ else if (strcmp(Name, "MainMenuWidgetWeatherShow") == 0) MainMenuWidgetWeatherShow = atoi(Value);
+ else if (strcmp(Name, "MainMenuWidgetWeatherPosition") == 0) MainMenuWidgetWeatherPosition = atoi(Value);
+ else if (strcmp(Name, "MainMenuWidgetWeatherDays") == 0) MainMenuWidgetWeatherDays = atoi(Value);
+ else if (strcmp(Name, "MainMenuWidgetWeatherType") == 0) MainMenuWidgetWeatherType = atoi(Value);
else return false;
@@ -607,6 +616,16 @@ bool pairCompareIntString(const std::pair<int, std::string>&i, const std::pair<i
return i.first > j.first;
}
+int roundUp(int numToRound, int multiple)
+{
+ if(multiple == 0)
+ return numToRound;
+ int remainder = numToRound % multiple;
+ if (remainder == 0)
+ return numToRound;
+ return numToRound + multiple - remainder;
+}
+
void cFlatConfig::DecorDescriptions(cStringList &Decors) {
cString decorPath = cString::sprintf("%s/decors", PLUGINRESOURCEPATH);
std::vector<std::string> files;