summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2014-01-26 09:42:27 +0100
committerlouis <louis.braun@gmx.de>2014-01-26 09:42:27 +0100
commitba90eeecb93ceeff123b33b2cbe27c4e3fcec787 (patch)
treeebc86c1b326f64122c1d979538e5b0d8750c8049 /tools.c
parent2a3eecd99e9d7d8a138543ebdb892347f68aeaa2 (diff)
downloadvdr-plugin-tvguide-ba90eeecb93ceeff123b33b2cbe27c4e3fcec787.tar.gz
vdr-plugin-tvguide-ba90eeecb93ceeff123b33b2cbe27c4e3fcec787.tar.bz2
directories for timers and searchtimers can be edited
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools.c b/tools.c
index 555ba29..18adeba 100644
--- a/tools.c
+++ b/tools.c
@@ -1,6 +1,7 @@
#include <string>
#include <vector>
#include <sstream>
+#include <algorithm>
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
@@ -53,6 +54,20 @@ std::string StrToLowerCase(std::string str) {
}
/****************************************************************************************
+* GetDirectoryFromTimer
+****************************************************************************************/
+std::string GetDirectoryFromTimer(std::string file) {
+ std::string dir = "";
+ size_t found = file.find_last_of('~');
+ if (found != std::string::npos) {
+ dir = file.substr(0, found);
+ std::replace(dir.begin(), dir.end(), '~', '/');
+ }
+ return dir;
+}
+
+
+/****************************************************************************************
* DrawRoundedCorners
****************************************************************************************/
void DrawRoundedCorners(cPixmap *p, int posX, int posY, int width, int height, int radius, int borderWidth, tColor borderColor) {