[Pkg-kde-commits] rev 2463 - trunk/packages/kdetoys/debian/patches

Christopher Martin chrsmrtn at costa.debian.org
Wed Nov 30 19:15:02 UTC 2005


Author: chrsmrtn
Date: 2005-11-30 19:14:53 +0000 (Wed, 30 Nov 2005)
New Revision: 2463

Added:
   trunk/packages/kdetoys/debian/patches/01_kdetoys_branch_r484432.diff
Log:
branch pull for kdetoys.


Added: trunk/packages/kdetoys/debian/patches/01_kdetoys_branch_r484432.diff
===================================================================
--- trunk/packages/kdetoys/debian/patches/01_kdetoys_branch_r484432.diff	2005-11-30 18:50:04 UTC (rev 2462)
+++ trunk/packages/kdetoys/debian/patches/01_kdetoys_branch_r484432.diff	2005-11-30 19:14:53 UTC (rev 2463)
@@ -0,0 +1,50 @@
+#DPATCHLEVEL=0
+--- amor/amor.cpp	(.../tags/KDE/3.5.0/kdetoys)	(revision 484432)
++++ amor/amor.cpp	(.../branches/KDE/3.5/kdetoys)	(revision 484432)
+@@ -309,12 +309,15 @@
+     }
+ 
+     // Select a random theme if user requested it
+-	if (mConfig.mRandomTheme)
+-	{
+-		QStringList files(KGlobal::dirs()->findAllResources("appdata", "*rc"));
+-		int randomTheme = kapp->random() % files.count();
+-		mConfig.mTheme = (QString)*files.at(randomTheme);
+-	}
++    if (mConfig.mRandomTheme)
++    {
++        QStringList files;
++        
++        // Store relative paths into files to avoid storing absolute pathnames.
++        KGlobal::dirs()->findAllResources("appdata", "*rc", false, false, files);
++        int randomTheme = kapp->random() % files.count();
++        mConfig.mTheme = (QString)*files.at(randomTheme);
++    }
+ 	
+     // read selected theme
+     if (!mTheme.setTheme(mConfig.mTheme))
+--- amor/amordialog.cpp	(.../tags/KDE/3.5.0/kdetoys)	(revision 484432)
++++ amor/amordialog.cpp	(.../branches/KDE/3.5/kdetoys)	(revision 484432)
+@@ -111,7 +111,12 @@
+ //
+ void AmorDialog::readThemes()
+ {
+-    QStringList files(KGlobal::dirs()->findAllResources("appdata", "*rc"));
++    QStringList files;
++
++    // Non-recursive search for theme files, with the relative paths stored
++    // in files so that absolute paths are not used.
++    KGlobal::dirs()->findAllResources("appdata", "*rc", false, false, files);
++
+     for (QStringList::ConstIterator it = files.begin();
+ 	 it != files.end();
+ 	 it++)
+@@ -124,7 +129,7 @@
+ //
+ void AmorDialog::addTheme(const QString& file)
+ {
+-    KSimpleConfig config(file, true);
++    KSimpleConfig config(locate("appdata", file), true);
+ 
+     config.setGroup("Config");
+ 




More information about the pkg-kde-commits mailing list