Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > a6bc312ce50b5c8d0c51736e58ac32bc > files > 381

kdebase-3.4.2-55mdk.src.rpm

--- kdebase-3.4.2/kdesktop/init.cc--	2005-09-19 20:30:26.000000000 +0200
+++ kdebase-3.4.2/kdesktop/init.cc	2005-09-19 20:39:16.000000000 +0200
@@ -267,8 +267,38 @@ void testLocalInstallation()
 		else if( !cfg.hasGroup( "IconPosition::Trash" ) && !cfg.hasGroup( "IconPosition::trash.desktop" ))
 		{
 			cfg.setGroup( "IconPosition::trash.desktop" );
-			cfg.writeEntry("X", "-30");
-			cfg.writeEntry("Y", "-210");
+			KStandardDirs::distroVersionType type = KStandardDirs::mandrake_distro_version();
+			int posTrashX = 0;
+			int posTrashY = 0;
+			switch (type )
+			{
+					case KStandardDirs::DOWNLOAD:
+					{
+							posTrashX = -30;
+							posTrashY = -230;
+							break;
+					}
+					case KStandardDirs::POWERPACK:
+					{
+                            posTrashX = -30;
+							posTrashY = -220;
+							break;
+					}
+					case KStandardDirs::DISCOVERY:
+					{
+                            posTrashX = -30;
+                            posTrashY = -230;
+							break;
+					}
+					case KStandardDirs::POWERPACKPLUS:
+					{
+                            posTrashX = -30;
+                            posTrashY = -240;
+							break;
+					}
+			}
+			cfg.writeEntry("X", posTrashX);
+			cfg.writeEntry("Y", posTrashY);
 			cfg.sync();
 		}
     }