Sophie

Sophie

distrib > Mageia > 3 > x86_64 > media > core-release-src > by-pkgid > 1ee5f1aa2fd7c0e31e81a3a4f6853c16 > files > 1

lxde-common-0.5.5-13.mga3.src.rpm

diff -Naur a/startlxde.in b/startlxde.in
--- a/startlxde.in	2011-07-29 17:04:03.000000000 +0300
+++ b/startlxde.in	2013-04-14 02:55:29.530541633 +0300
@@ -4,6 +4,23 @@
 	export XDG_CONFIG_HOME="$HOME/.config"
 fi
 
+# Ensure the existance of the 'Desktop' folder
+if [ -e "$XDG_CONFIG_HOME/user-dirs.dirs" ]; then
+	. "$XDG_CONFIG_HOME/user-dirs.dirs"
+else
+	XDG_DESKTOP_DIR="$HOME/Desktop"
+fi
+mkdir -p "$XDG_DESKTOP_DIR"
+
+# Ensure the existance of Mageia Desktop icons at first run
+if [ -d @localstatedir@/lib/mageia/lxde-profiles/Desktop-icons ]; then
+  if [ ! -f "$OPENBOX_CONF_DIR/lxde-rc.xml" ]; then
+      xdg-desktop-icon install --novendor @localstatedir@/lib/mageia/lxde-profiles/Desktop-icons/trash.desktop
+      xdg-desktop-icon install --novendor @localstatedir@/lib/mageia/lxde-profiles/Desktop-icons/home.desktop
+      xdg-desktop-icon install --novendor @localstatedir@/lib/mageia/lxde-profiles/Desktop-icons/register.desktop
+  fi
+fi
+
 # Ensure the existance of pcmanfm config file
 PCMANFM_CONF_DIR="$XDG_CONFIG_HOME/pcmanfm/LXDE"
 if [ ! -f "$PCMANFM_CONF_DIR/pcmanfm.conf" ]; then
@@ -18,14 +35,6 @@
 	cp @prefix@/share/lxde/openbox/rc.xml "$OPENBOX_CONF_DIR/lxde-rc.xml"
 fi
 
-# Ensure the existance of the 'Desktop' folder
-if [ -e "$XDG_CONFIG_HOME/user-dirs.dirs" ]; then
-	. "$XDG_CONFIG_HOME/user-dirs.dirs"
-else
-	XDG_DESKTOP_DIR="$HOME/Desktop"
-fi
-mkdir -p "$XDG_DESKTOP_DIR"
-
 # Clean up after GDM (GDM sets the number of desktops to one)
 xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null