autostart from XDG_CONFIG_DIRS

This commit is contained in:
Than Ngo 2008-02-01 12:57:29 +00:00
parent 5d02d707f0
commit 41fe3abcb3
2 changed files with 22 additions and 3 deletions

View File

@ -0,0 +1,16 @@
diff -up kdelibs-4.0.1/kinit/autostart.cpp.orig kdelibs-4.0.1/kinit/autostart.cpp
--- kdelibs-4.0.1/kinit/autostart.cpp.orig 2008-02-01 12:37:47.000000000 +0100
+++ kdelibs-4.0.1/kinit/autostart.cpp 2008-02-01 13:52:38.000000000 +0100
@@ -39,6 +39,12 @@ AutoStart::AutoStart()
{
m_startList = new AutoStartList;
KGlobal::dirs()->addResourceType("autostart", 0, "share/autostart");
+ QString xdgconf_dirs = KGlobal::dirs()->kfsstnd_xdg_conf_prefixes();
+ if (xdgconf_dirs.isEmpty())
+ xdgconf_dirs = "/etc/xdg";
+ QStringList xdgconf_dirslist = QString(xdgconf_dirs).split(':');
+ for ( QStringList::Iterator d = xdgconf_dirslist.begin(); d != xdgconf_dirslist.end(); ++d )
+ KGlobal::dirs()->addResourceDir("autostart", (*d) + "/autostart");
}
AutoStart::~AutoStart()

View File

@ -4,7 +4,7 @@
Summary: K Desktop Environment 4 - Libraries
Version: 4.0.1
Release: 1%{?dist}
Release: 2%{?dist}
%if 0%{?fedora} > 8
Name: kdelibs
@ -60,7 +60,7 @@ Patch4: kdelibs-3.97.0-alsa-default-device.patch
Patch5: kdelibs-4.0.0-k3spell-hunspell.patch
# openssl's SHLIB_VERSION_NUMBER macro can't be used/trusted
Patch6: kdelibs-4.0.0-openssl.patch
Patch7: kdelibs-4.0.1-autostart.patch
BuildRequires: qt4-devel >= 4.3.0
Requires: qt4 >= %{_qt4_version}
@ -145,7 +145,7 @@ applications for KDE 4.
# shouldn't be needed f9+, we'll see -- Rex
%patch6 -p1 -b .openssl
%endif
%patch7 -p1 -b .xdg-autostart
%build
@ -274,6 +274,9 @@ rm -rf %{buildroot}
%changelog
* Fri Feb 01 2008 Than Ngo <than@redhat.com> 4.0.1-2
- autostart from XDG_CONFIG_DIRS
* Wed Jan 30 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.1-1
- 4.0.1