aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@mandriva.com>2006-07-17 16:23:08 +0000
committerFrederic Crozat <fcrozat@mandriva.com>2006-07-17 16:23:08 +0000
commit2f8f568b3d483a12f4aa52ceb879d8c9d604beae (patch)
tree1dae702e41cecb5119ac24fbf883395599fd49dd
parenta4c379c42879ad7c457a7f5890117e08b2de6de2 (diff)
downloadcommon-data-2f8f568b3d483a12f4aa52ceb879d8c9d604beae.tar
common-data-2f8f568b3d483a12f4aa52ceb879d8c9d604beae.tar.gz
common-data-2f8f568b3d483a12f4aa52ceb879d8c9d604beae.tar.bz2
common-data-2f8f568b3d483a12f4aa52ceb879d8c9d604beae.tar.xz
common-data-2f8f568b3d483a12f4aa52ceb879d8c9d604beae.zip
final switch to XDG menu
-rw-r--r--desktop-common-data.spec5
-rw-r--r--menu/applications-mdk.menu1
-rwxr-xr-xxinit.d/menu30
3 files changed, 29 insertions, 7 deletions
diff --git a/desktop-common-data.spec b/desktop-common-data.spec
index 51e9635..26aaa7a 100644
--- a/desktop-common-data.spec
+++ b/desktop-common-data.spec
@@ -24,7 +24,8 @@ Provides: mandrake_desk
Conflicts: kdebase-kdm-config-file < 1:3.2-62mdk
Obsoletes: menu
Obsoletes: menu-xdg
-Provides: menu
+Provides: menu-xdg
+Provides: menu = 2.1.24
Requires: xinitrc >= 2.4.12
Requires: mdk-menu-messages >= 10.2-7mdk
@@ -141,8 +142,6 @@ fi
[ $(ls %_datadir/wallpapers/ | wc -l) -eq 0 ] && rm -fr %_datadir/wallpapers/
%clean_menus
-
-
%clean
rm -fr %buildroot
diff --git a/menu/applications-mdk.menu b/menu/applications-mdk.menu
index deaa64c..b3afac6 100644
--- a/menu/applications-mdk.menu
+++ b/menu/applications-mdk.menu
@@ -18,7 +18,6 @@
</DefaultLayout>
<DefaultMergeDirs/>
- <AppDir>/var/lib/menu-xdg/applications</AppDir>
<KDELegacyDirs/>
<DefaultAppDirs/>
<DefaultDirectoryDirs/>
diff --git a/xinit.d/menu b/xinit.d/menu
index c28d6e2..5f05376 100755
--- a/xinit.d/menu
+++ b/xinit.d/menu
@@ -1,15 +1,39 @@
#!/bin/sh
+# move old menus if still existing
+if [ ! -f $HOME/.mdk-menu-migrated ]; then
+if [ -f $HOME/.config/menus/applications-mdk.menu ]; then
+ mv $HOME/.config/menus/applications-mdk.menu $HOME/.config/menus/applications-mdk.menu.obsolete
+ if [ -L $HOME/.config/menus/applications.menu ]; then
+ mv $HOME/.config/menus/applications.menu $HOME/.config/menus/applications.menu.obsolete
+ fi
+fi
+
+if [ -d $HOME/.local/share/applications/Mandrakelinux ]; then
+ mkdir -p $HOME/.local/share/applications-obsolete/ 2> /dev/null
+ mv $HOME/.local/share/applications/Mandrakelinux $HOME/.local/share/applications-obsolete/Mandrakelinux
+fi
+
+if [ -d $HOME/.local/share/applications/MandrivaLinux ]; then
+ mkdir -p $HOME/.local/share/applications-obsolete/ 2> /dev/null
+ mv $HOME/.local/share/applications/MandrivaLinux $HOME/.local/share/applications-obsolete/MandrivaLinux
+fi
+
+if [ -d $HOME/.local/share/desktop-directories ]; then
+ mkdir -p $HOME/.local/share/desktop-directories-obsolete
+ mv $HOME/.local/share/desktop-directories/mandrake* $HOME/.local/share/desktop-directories-obsolete/ 2> /dev/null
+fi
+touch $HOME/.mdk-menu-migrated
+fi
+
USER_STAMP=$HOME/.xdg-menu-updates.stamp
USER_MENU=$HOME/.local/
RETVAL=0
-if [ -d $USER_MENU -o -f $USER_STAMP -a -f $SYSTEM_STAMP ]; then
+if [ -d $USER_MENU -o -f $USER_STAMP ]; then
if [ ! -f $USER_STAMP ]; then
RETVAL=1;
- elif [ $SYSTEM_STAMP -nt $USER_STAMP ]; then
- RETVAL=1;
fi
if [ $RETVAL -eq 1 ]; then
echo -n "Running update-menus..."