summaryrefslogtreecommitdiffstats
path: root/mandriva/2010.2/kdebase/kdebase-3.3.2-fix-kdm-theme-mdk.patch
blob: 08deeb0326365f7fbca9bca594868cef53e4944a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- kdebase-3.3.2/kdm/kfrontend/themer/kdmthemer.cpp--	2005-02-28 15:16:19.881739297 +0100
+++ kdebase-3.3.2/kdm/kfrontend/themer/kdmthemer.cpp	2005-02-28 15:17:37.816468727 +0100
@@ -57,11 +57,23 @@ KdmThemer::KdmThemer( const QString &_fi
 
 	// read the XML file and create DOM tree
 	TQString filename = _filename;
-	if (!::access( TQFile::encodeName( filename + "/GdmGreeterTheme.desktop" ), R_OK )) {
+        if ( _filename.startsWith("/usr/share/mdk/dm") )
+        {
+            if (!::access( TQFile::encodeName( filename + "/KdmGreeterTheme.desktop" ), R_OK )) {
+		KSimpleConfig cfg( filename + "/KdmGreeterTheme.desktop" );
+		cfg.setGroup( "GdmGreeterTheme" );
+		filename += '/' + cfg.readEntry( "Greeter" );
+            }
+        }
+        else
+        {
+            if (!::access( TQFile::encodeName( filename + "/GdmGreeterTheme.desktop" ), R_OK )) {
 		KSimpleConfig cfg( filename + "/GdmGreeterTheme.desktop" );
 		cfg.setGroup( "GdmGreeterTheme" );
 		filename += '/' + cfg.readEntry( "Greeter" );
-	}
+            }
+        }
+
 	TQFile opmlFile( filename );
 	if (!opmlFile.open( IO_ReadOnly )) {
 		FDialog::box( widget(), errorbox, i18n( "Cannot open theme file %1" ).arg(filename) );