summaryrefslogtreecommitdiffstats
path: root/ubuntu/maverick/applications/kiosktool/debian/patches
diff options
context:
space:
mode:
Diffstat (limited to 'ubuntu/maverick/applications/kiosktool/debian/patches')
-rw-r--r--ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_01_kdepot.diff12
-rw-r--r--ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_02_kmenu.diff13
-rw-r--r--ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_03_sudo_support.diff157
3 files changed, 182 insertions, 0 deletions
diff --git a/ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_01_kdepot.diff b/ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_01_kdepot.diff
new file mode 100644
index 000000000..8e3c20a1a
--- /dev/null
+++ b/ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_01_kdepot.diff
@@ -0,0 +1,12 @@
+--- a/admin/cvs.sh~ 2005-12-14 11:33:41.000000000 +0000
++++ b/admin/cvs.sh 2005-12-14 11:34:28.000000000 +0000
+@@ -562,7 +562,8 @@
+ fi
+ perl -e '$mes=0; while (<STDIN>) { next if (/^(if\s|else\s|endif)/); if (/^messages:/) { $mes=1; print $_; next; } if ($mes) { if (/$\\(XGETTEXT\)/ && / -o/) { s/ -o \$\(podir\)/ _translatorinfo.cpp -o \$\(podir\)/ } print $_; } else { print $_; } }' < Makefile.am | egrep -v '^include ' > _transMakefile
+
+- kdepotpath=${includedir:-${KDEDIR:-`kde-config --prefix`}/include}/kde.pot
++ #kdepotpath=${includedir:-${KDEDIR:-`kde-config --prefix`}/include}/kde.pot
++ kdepotpath=/usr/include/kde/kde.pot
+
+ $MAKE -s -f _transMakefile podir=$podir EXTRACTRC="$EXTRACTRC" PREPARETIPS="$PREPARETIPS" srcdir=. \
+ XGETTEXT="${XGETTEXT:-xgettext} -C -ki18n -ktr2i18n -kI18N_NOOP -kaliasLocale -x $kdepotpath" messages
diff --git a/ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_02_kmenu.diff b/ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_02_kmenu.diff
new file mode 100644
index 000000000..bcc94635e
--- /dev/null
+++ b/ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_02_kmenu.diff
@@ -0,0 +1,13 @@
+--- kiosktool/kiosktool/menueditComponent.cpp 2005-04-25 09:46:33.000000000 +0000
++++ kiosktool/kiosktool/menueditComponent.cpp 2005-12-18 14:45:26.000000000 +0000
+@@ -104,8 +104,8 @@
+ {
+ bool result;
+ QString menuEditFile = KioskRun::self()->locateLocal("xdgconf-menu", "applications-kmenuedit.menu");
+- QString menuFile = KioskRun::self()->locate("xdgconf-menu", "applications.menu");
+- QString menuFileSave = KioskRun::self()->locateSave("xdgconf-menu", "applications.menu");
++ QString menuFile = KioskRun::self()->locate("xdgconf-menu", "kde-applications.menu");
++ QString menuFileSave = KioskRun::self()->locateSave("xdgconf-menu", "kde-applications.menu");
+
+ kdDebug() << "MenuEditComponent: menuEditFile = " << menuEditFile << endl;
+ kdDebug() << "MenuEditComponent: menuFile = " << menuFile << endl;
diff --git a/ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_03_sudo_support.diff b/ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_03_sudo_support.diff
new file mode 100644
index 000000000..c5d52d8c2
--- /dev/null
+++ b/ubuntu/maverick/applications/kiosktool/debian/patches/kubuntu_03_sudo_support.diff
@@ -0,0 +1,157 @@
+--- kiosktool/kiosktool/kioskrun.h 2005-04-25 10:46:33.000000000 +0100
++++ kiosktool/kiosktool/kioskrun.h 2007-07-18 17:47:04.000000000 +0100
+@@ -37,6 +37,18 @@
+
+ class KioskGui;
+
++class NETACCESS {
++ public:
++ static bool exists(const KURL &url, bool source, QWidget *window);
++ static bool mkdir(const KURL &url, QWidget *window, int permissions=-1);
++ static QString lastErrorString();
++ static int lastError();
++ static bool file_copy (const KURL &src, const KURL &dest, int permissions=-1, bool overwrite=false, bool resume=false, QWidget *window=0L);
++ static bool del(const KURL &url, QWidget *window);
++ static bool file_move(const KURL &src, const KURL &target, int permissions=-1, bool overwrite=false, bool resume=false, QWidget *window=0L);
++ static bool copy(const KURL &src, const KURL &target, QWidget *window);
++};
++
+ class KioskRun : public QObject
+ {
+ friend class KioskGui;
+--- kiosktool/kiosktool/kioskrun.cpp 2005-04-25 10:46:33.000000000 +0100
++++ kiosktool/kiosktool/kioskrun.cpp 2007-07-20 16:56:07.000000000 +0100
+@@ -28,6 +28,7 @@
+
+ #include <qdir.h>
+ #include <qfile.h>
++#include <qprocess.h>
+
+ #include <kapplication.h>
+ #include <kcmdlineargs.h>
+@@ -45,10 +46,124 @@
+ #include "kiosksync.h"
+
+ #include <kio/netaccess.h>
+-#define NETACCESS KIO::NetAccess
++// Kiosktool wants to use fish://root@localhost/... which won't work on Kubuntu because we don't run ssh by default, we don't allow ssh to do root logins and root doesn't even have a password, so implement the functions here for local copies using kdesu instead
++// #define NETACCESS KIO::NetAccess
+
+ #undef DEBUG_ENTRIES
+
++bool NETACCESS::exists(const KURL &url, bool source, QWidget *window)
++{
++ if (url.protocol() == "fish" && url.host() == "localhost") {
++ bool exists = QFile::exists(url.path());
++ return exists;
++ } else {
++ bool result = KIO::NetAccess::exists(url, source, window);
++ return result;
++ }
++}
++
++bool NETACCESS::mkdir(const KURL &url, QWidget *window, int permissions)
++{
++ if (url.protocol() == "fish" && url.host() == "localhost") {
++ QProcess proc;
++ proc.addArgument("kdesudo");
++ proc.addArgument("mkdir " + url.path());
++ QByteArray buffer;
++ proc.launch(buffer);
++ while (!proc.normalExit()) {
++ KApplication::kapp->processEvents();
++ }
++ bool exists = QFile::exists(url.path());
++ return exists;
++ } else {
++ bool result = KIO::NetAccess::mkdir(url, window, permissions);
++ return result;
++ }
++}
++
++QString NETACCESS::lastErrorString()
++{
++ return "Error in Kiosktool Kubuntu modifications";
++}
++
++int NETACCESS::lastError()
++{
++ return 0;
++}
++
++bool NETACCESS::file_copy(const KURL &src, const KURL &dest, int permissions, bool overwrite, bool resume, QWidget *window)
++{
++ if (dest.protocol() == "fish" && dest.host() == "localhost") {
++ QProcess proc;
++ proc.addArgument("kdesudo");
++ proc.addArgument("cp " + src.path() + " " + dest.path());
++ QByteArray buffer;
++ proc.launch(buffer);
++ while (!proc.normalExit()) {
++ KApplication::kapp->processEvents();
++ }
++
++ QProcess proc2;
++ proc2.addArgument("kdesudo");
++ proc2.addArgument("chmod 0644 " + dest.path());
++ proc2.launch(buffer);
++ while (!proc2.normalExit()) {
++ KApplication::kapp->processEvents();
++ }
++
++ bool exists = QFile::exists(dest.path());
++ return exists;
++ } else {
++ bool result = KIO::NetAccess::file_copy(src, dest, permissions, overwrite, resume, window);
++ return result;
++ }
++}
++
++bool NETACCESS::del(const KURL &url, QWidget *window)
++{
++ if (url.protocol() == "fish" && url.host() == "localhost") {
++ QProcess proc;
++ proc.addArgument("kdesudo");
++ proc.addArgument("rm " + url.path());
++ QByteArray buffer;
++ proc.launch(buffer);
++ while (!proc.normalExit()) {
++ KApplication::kapp->processEvents();
++ }
++ bool exists = !QFile::exists(url.path());
++ return exists;
++ } else {
++ bool result = KIO::NetAccess::del(url, window);
++ return result;
++ }
++}
++
++bool NETACCESS::file_move(const KURL &src, const KURL &target, int permissions, bool overwrite, bool resume, QWidget *window)
++{
++ if (target.protocol() == "fish" && target.host() == "localhost") {
++ QProcess proc;
++ proc.addArgument("kdesudo");
++ proc.addArgument("mv " + src.path() + " " + target.path());
++ QByteArray buffer;
++ proc.launch(buffer);
++ while (!proc.normalExit()) {
++ KApplication::kapp->processEvents();
++ }
++
++ bool exists = QFile::exists(target.path());
++ return exists;
++ } else {
++ bool result = KIO::NetAccess::file_move(src, target, permissions, overwrite, resume, window);
++ return result;
++ }
++}
++
++//only used for local files
++bool NETACCESS::copy(const KURL &src, const KURL &target, QWidget *window)
++{
++ return KIO::NetAccess::copy(src, target, window);
++}
++
+ KioskRun *KioskRun::s_self = 0;
+
+ KioskRun::KioskRun( QObject* parent, const char* name)