Sophie

Sophie

distrib > Mandriva > cs4.0 > i586 > by-pkgid > 6f96ffda8b8309fb9c58db5e0ddbde2c > files > 60

kdebase-3.5.4-2.1.20060mlcs4.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::mandriva_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();
 		}
     }