File webmonx-0.3.3-fix_dir.patch of Package webmonx
Description: Fix program data directory.
Author: Kyrill Detinov <lazy.kent.suse@gmail.com>
Index: src/gui/Icons.cpp
===================================================================
--- src/gui/Icons.cpp.orig 2010-02-22 17:11:29.000000000 +0300
+++ src/gui/Icons.cpp 2010-04-03 19:46:58.000000000 +0400
@@ -33,8 +33,8 @@ Icons::Icons(CoreGUI* core) : QObject(co
QString iconPath;
#if defined Q_WS_X11
- if (QFile::exists(dirPath+"/../share/apps/webmonx/icons")) // linux
- iconPath = dirPath+"/../share/apps/webmonx/icons/";
+ if (QFile::exists(dirPath+"/../share/webmonx/icons")) // linux
+ iconPath = dirPath+"/../share/webmonx/icons/";
#elif defined Q_WS_WIN
if (QFile::exists(dirPath+"/icons/")) // windows
iconPath = dirPath+"/icons/";
Index: src/gui/Sounds.cpp
===================================================================
--- src/gui/Sounds.cpp.orig 2010-02-22 17:29:51.000000000 +0300
+++ src/gui/Sounds.cpp 2010-04-03 19:47:18.000000000 +0400
@@ -34,8 +34,8 @@
Sounds::Sounds(CoreGUI* core) : QObject(core), c(core) {
QString dirPath = QApplication::applicationDirPath();
- if (QFile::exists(dirPath+"/../share/apps/webmonx/sounds")) // linux
- soundPath = dirPath+"/../share/apps/webmonx/sounds/";
+ if (QFile::exists(dirPath+"/../share/webmonx/sounds")) // linux
+ soundPath = dirPath+"/../share/webmonx/sounds/";
else if (QFile::exists(dirPath+"/sounds/")) // windows
soundPath = dirPath+"/sounds/";
else if (QFile::exists(dirPath+"/../share/sounds")) // dev
Index: src/src.pro
===================================================================
--- src/src.pro.orig 2010-02-22 17:11:29.000000000 +0300
+++ src/src.pro 2010-04-03 19:46:29.000000000 +0400
@@ -146,8 +146,8 @@ else:unix {
isEmpty(PREFIX):PREFIX = /usr/local
target.path = $${PREFIX}/bin
- icons.path = $${PREFIX}/share/apps/webmonx/icons
- sounds.path = $${PREFIX}/share/apps/webmonx/sounds
+ icons.path = $${PREFIX}/share/webmonx/icons
+ sounds.path = $${PREFIX}/share/webmonx/sounds
desktop.files = ../share/desktop/*
desktop.path = $${PREFIX}/share/applications/