aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@mandriva.com>2006-07-17 09:01:55 +0000
committerFrederic Crozat <fcrozat@mandriva.com>2006-07-17 09:01:55 +0000
commita4c379c42879ad7c457a7f5890117e08b2de6de2 (patch)
tree85d434ab44709167b30858f7abd672ab2228c619
parent9fe99e6538e4538a5a1458fabf6eb58821f8e43a (diff)
downloadcommon-data-a4c379c42879ad7c457a7f5890117e08b2de6de2.tar
common-data-a4c379c42879ad7c457a7f5890117e08b2de6de2.tar.gz
common-data-a4c379c42879ad7c457a7f5890117e08b2de6de2.tar.bz2
common-data-a4c379c42879ad7c457a7f5890117e08b2de6de2.tar.xz
common-data-a4c379c42879ad7c457a7f5890117e08b2de6de2.zip
Final switch to XDG menu
-rw-r--r--desktop-common-data.spec33
-rwxr-xr-xxinit.d/menu22
2 files changed, 33 insertions, 22 deletions
diff --git a/desktop-common-data.spec b/desktop-common-data.spec
index 3122b15..51e9635 100644
--- a/desktop-common-data.spec
+++ b/desktop-common-data.spec
@@ -2,8 +2,8 @@
Summary: Desktop common files
Name: desktop-common-data
-Version: 2006
-Release: %mkrel 12
+Version: 2007
+Release: %mkrel 1
License: GPL
URL: http://www.mandrivalinux.com/
Group: System/Configuration/Other
@@ -22,7 +22,9 @@ Requires: mandrake_theme
Obsoletes: mandrake_desk
Provides: mandrake_desk
Conflicts: kdebase-kdm-config-file < 1:3.2-62mdk
-Conflicts: menu <= 2.1.12-10mdk
+Obsoletes: menu
+Obsoletes: menu-xdg
+Provides: menu
Requires: xinitrc >= 2.4.12
Requires: mdk-menu-messages >= 10.2-7mdk
@@ -90,28 +92,19 @@ install -m 0644 kde/kdm-mdk-logo.png %buildroot/%_datadir/apps/kdm/pics/
-## menu
-install -d -m 0755 %buildroot/%_menudir/simplified/ %buildroot/%_sysconfdir/menu-methods/simplified
-install -m 0644 menu/desktop-common-data %buildroot/%_menudir/simplified/
-install -m 0644 menu/menu-simplified %buildroot/%_menudir/simplified/
-install -m 0644 menu/menu %buildroot/%_menudir/
-install -m 0644 menu/translate_menus %buildroot/%_sysconfdir/menu-methods/
-install -m 0644 menu/translate_menus-simplified %buildroot/%_sysconfdir/menu-methods/simplified/translate_menus
+## icons
install -d -m 0755 %buildroot/%_miconsdir %buildroot/%_liconsdir
install -m 0644 menu/icons/*.png %buildroot/%_iconsdir
install -m 0644 menu/icons/large/*.png %buildroot/%_liconsdir
install -m 0644 menu/icons/mini/*.png %buildroot/%_miconsdir
-install -d -m 0755 %buildroot/%_localstatedir/menu-xdg/menus/applications-mdk-merged %buildroot/%_localstatedir/menu-xdg/menus/applications-simplified-merged
-#install -m 0644 menu/defaultlayout.menu %buildroot/%_localstatedir/menu-xdg/menus/applications-mdk-merged
-install -m 0644 menu/defaultlayout-simplified.menu %buildroot/%_localstatedir/menu-xdg/menus/applications-simplified-merged
# XDG menus
install -d -m 0755 %buildroot/%_sysconfdir/xdg/menus/applications-merged
install -d -m 0755 %buildroot/%_sysconfdir/menu.d
-install -m 0644 menu/applications-mdk.menu %buildroot/%_sysconfdir/xdg/menus
+install -m 0644 menu/applications-mdk.menu %buildroot/%_sysconfdir/xdg/menus/applications.menu
install -m 0755 menu/xdg_menu %buildroot/%_bindir
#temporary name
-install -m 0755 menu/update-menus %buildroot/%_bindir/update-menus-xdg
+install -m 0755 menu/update-menus %buildroot/%_bindir/update-menus
install -d -m 0755 %buildroot/%_datadir/desktop-directories
mkdir tmp-l10n
@@ -187,13 +180,6 @@ rm -fr %buildroot
%_datadir/mdk/dm
#
-%_localstatedir/menu-xdg/menus/applications-mdk-merged
-%_localstatedir/menu-xdg/menus/applications-simplified-merged
-
-%config(noreplace) %_sysconfdir/menu-methods/translate_menus
-%config(noreplace) %_sysconfdir/menu-methods/simplified/translate_menus
-%_menudir/menu
-%_menudir/simplified/*
%_iconsdir/*.png
%_liconsdir/*.png
%_miconsdir/*.png
@@ -202,6 +188,9 @@ rm -fr %buildroot
%changelog
+* Mon Jul 17 2006 Frederic Crozat <fcrozat@mandriva.com> 2007-1mdv2007.0
+- Drop old menu system completely
+
* Tue Jul 11 2006 Frederic Crozat <fcrozat@mandriva.com> 2006-12mdv2007.0
- Add missing .directory (Mdv bug #23614)
- fix translations for some .directories (Mdv bug #23641)
diff --git a/xinit.d/menu b/xinit.d/menu
new file mode 100755
index 0000000..c28d6e2
--- /dev/null
+++ b/xinit.d/menu
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+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 [ ! -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..."
+ update-menus -u
+ echo done
+ fi
+fi
+
+
+# menu ends here