[Pkg-owncloud-commits] [owncloud-client] 01/02: add patch to respect XDG_CONFIG_HOME-env-variable
Sandro Knauß
hefee-guest at moszumanska.debian.org
Mon Dec 30 22:15:08 UTC 2013
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit ac64aa92a8beede57932bca7b1698927d0d9c0ef
Author: Sandro Knauß <bugs at sandroknauss.de>
Date: Mon Dec 30 21:58:16 2013 +0100
add patch to respect XDG_CONFIG_HOME-env-variable
---
...echeck.patch => 0001-disable-updatecheck.patch} | 0
...ate-manpage.patch => 0002-create-manpage.patch} | 0
...-respect-the-XDG_CONFIG_HOME-env-variable.patch | 46 ++++++++++++++++++++++
debian/patches/series | 5 ++-
4 files changed, 49 insertions(+), 2 deletions(-)
diff --git a/debian/patches/disable-updatecheck.patch b/debian/patches/0001-disable-updatecheck.patch
similarity index 100%
rename from debian/patches/disable-updatecheck.patch
rename to debian/patches/0001-disable-updatecheck.patch
diff --git a/debian/patches/create-manpage.patch b/debian/patches/0002-create-manpage.patch
similarity index 100%
rename from debian/patches/create-manpage.patch
rename to debian/patches/0002-create-manpage.patch
diff --git a/debian/patches/0003-respect-the-XDG_CONFIG_HOME-env-variable.patch b/debian/patches/0003-respect-the-XDG_CONFIG_HOME-env-variable.patch
new file mode 100644
index 0000000..b1425e1
--- /dev/null
+++ b/debian/patches/0003-respect-the-XDG_CONFIG_HOME-env-variable.patch
@@ -0,0 +1,46 @@
+From: =?utf-8?q?Sandro_Knau=C3=9F?= <bugs at sandroknauss.de>
+Date: Mon, 30 Dec 2013 21:51:44 +0100
+Subject: respect the XDG_CONFIG_HOME env variable
+
+---
+ src/mirall/utility_unix.cpp | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+Index: owncloud-client/src/mirall/utility_unix.cpp
+===================================================================
+--- owncloud-client.orig/src/mirall/utility_unix.cpp 2013-12-30 21:53:33.306904018 +0100
++++ owncloud-client/src/mirall/utility_unix.cpp 2013-12-30 22:08:03.739334896 +0100
+@@ -26,17 +26,30 @@
+ }
+ }
+
++// returns the autostart directory the linux way
++// and respects the XDG_CONFIG_HOME env variable
++// can be replaces for qt5 with QStandardPaths
++QString getUserAutostartDir_private()
++{
++ QString config = QLatin1String(qgetenv("XDG_CONFIG_HOME"));
++
++ if (config.isEmpty()) {
++ config = QDir::homePath()+QLatin1String("/.config");
++ }
++ config += QLatin1String("/autostart/");
++ return config;
++}
++
+ bool hasLaunchOnStartup_private(const QString &appName)
+ {
+- QString userAutoStartPath = QDir::homePath()+QLatin1String("/.config/autostart/");
+- QString desktopFileLocation = userAutoStartPath+appName+QLatin1String(".desktop");
++ QString desktopFileLocation = getUserAutostartDir_private()+appName+QLatin1String(".desktop");
+ return QFile::exists(desktopFileLocation);
+ }
+
+
+ void setLaunchOnStartup_private(const QString &appName, const QString& guiName, bool enable)
+ {
+- QString userAutoStartPath = QDir::homePath()+QLatin1String("/.config/autostart/");
++ QString userAutoStartPath = getUserAutostartDir_private();
+ QString desktopFileLocation = userAutoStartPath+appName+QLatin1String(".desktop");
+ if (enable) {
+ if (!QDir().exists(userAutoStartPath) && !QDir().mkdir(userAutoStartPath)) {
diff --git a/debian/patches/series b/debian/patches/series
index 1599ec1..06e8f77 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
-disable-updatecheck.patch
-create-manpage.patch
+0001-disable-updatecheck.patch
+0002-create-manpage.patch
+0003-respect-the-XDG_CONFIG_HOME-env-variable.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list