diff options
author | Frederic Crozat <fcrozat@mandriva.com> | 2006-08-17 17:56:38 +0000 |
---|---|---|
committer | Frederic Crozat <fcrozat@mandriva.com> | 2006-08-17 17:56:38 +0000 |
commit | c1c7ef8546baca79f5f6a9363b3a4561324a9d54 (patch) | |
tree | 5e9a3192fd78b046c1038c94f170be958ae41dcc /menu | |
parent | 6f449f71241016e78eefe398489df594321fa3fc (diff) | |
download | common-data-c1c7ef8546baca79f5f6a9363b3a4561324a9d54.tar common-data-c1c7ef8546baca79f5f6a9363b3a4561324a9d54.tar.gz common-data-c1c7ef8546baca79f5f6a9363b3a4561324a9d54.tar.bz2 common-data-c1c7ef8546baca79f5f6a9363b3a4561324a9d54.tar.xz common-data-c1c7ef8546baca79f5f6a9363b3a4561324a9d54.zip |
- Add discovery menu and script to support MDV_MENU_STYLE
Diffstat (limited to 'menu')
-rw-r--r-- | menu/applications-discovery.menu | 205 | ||||
-rwxr-xr-x | menu/menustyle.csh | 18 | ||||
-rwxr-xr-x | menu/menustyle.sh | 17 |
3 files changed, 240 insertions, 0 deletions
diff --git a/menu/applications-discovery.menu b/menu/applications-discovery.menu new file mode 100644 index 0000000..7998215 --- /dev/null +++ b/menu/applications-discovery.menu @@ -0,0 +1,205 @@ +<?xml version="1.0"?> +<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" "http://standards.freedesktop.org/menu-spec/menu-1.0.dtd"> +<Menu> + <Name>Mandriva Linux</Name> + <Layout> + <Menuname>Games</Menuname> + <Menuname>Graphics</Menuname> + <Menuname>Internet</Menuname> + <Menuname>Multimedia</Menuname> + <Menuname>Office</Menuname> + <Menuname>System</Menuname> + <Menuname>Help</Menuname> + <Menuname>More Applications</Menuname> + <Merge type="menus"/> + <Merge type="files"/> + </Layout> + <DefaultLayout inline="true" inline_limit="1" inline_header="false"> + <Merge type="menus"/> + <Merge type="files"/> + </DefaultLayout> + + <DefaultMergeDirs/> + <KDELegacyDirs/> + <DefaultAppDirs/> + <DefaultDirectoryDirs/> + <Directory>mandrivalinux.directory</Directory> + <Include> + <Or> + <Category>X-MandrivaLinux</Category> + <Category>X-MandrivaLinux-Other</Category> + </Or> + </Include> + <Menu> + <Name>Games</Name> + <Directory>mandriva-moreapplications-games.directory</Directory> + <Include> + <Or> + <Category>X-MandrivaLinux-MoreApplications-Games</Category> + <Category>X-MandrivaLinux-MoreApplications-Games-Adventure</Category> + <Category>X-MandrivaLinux-MoreApplications-Games-Arcade</Category> + <Category>X-MandrivaLinux-MoreApplications-Games-Boards</Category> + <Category>X-MandrivaLinux-MoreApplications-Games-Cards</Category> + <Category>X-MandrivaLinux-MoreApplications-Games-Puzzles</Category> + <Category>X-MandrivaLinux-MoreApplications-Games-Sports</Category> + <Category>X-MandrivaLinux-MoreApplications-Games-Strategy</Category> + <Category>X-MandrivaLinux-MoreApplications-Games-Other</Category> + <Category>X-MandrivaLinux-MoreApplications-Games-Toys</Category> + </Or> + </Include> + </Menu> + <Menu> + <Name>Graphics</Name> + <Directory>mandriva-multimedia-graphics.directory</Directory> + <Include> + <Or> + <Category>X-MandrivaLinux-Multimedia-Graphics</Category> + </Or> + </Include> + </Menu> + <Menu> + <Name>Internet</Name> + <Directory>mandriva-internet.directory</Directory> + <Include> + <Or> + <Category>X-MandrivaLinux-Internet</Category> + <Category>X-MandrivaLinux-Internet-Chat</Category> + <Category>X-MandrivaLinux-Internet-FileTransfer</Category> + <Category>X-MandrivaLinux-Internet-InstantMessaging</Category> + <Category>X-MandrivaLinux-Internet-Mail</Category> + <Category>X-MandrivaLinux-Internet-News</Category> + <Category>X-MandrivaLinux-Internet-VideoConference</Category> + <Category>X-MandrivaLinux-Internet-Other</Category> + <Category>X-MandrivaLinux-Internet-RemoteAccess</Category> + <Category>X-MandrivaLinux-Internet-WebBrowsers</Category> + <Category>X-MandrivaLinux-Internet-WebEditors</Category> + </Or> + </Include> + </Menu> + <Menu> + <Name>Multimedia</Name> + <Layout> + <Menuname>Sound</Menuname> + <Menuname>Video</Menuname> + <Menuname>Other</Menuname> + <Merge type="menus"/> + <Merge type="files"/> + </Layout> + <Directory>mandriva-multimedia.directory</Directory> + <Include> + <Or> + <Category>X-MandrivaLinux-Multimedia</Category> + <Category>X-MandrivaLinux-Multimedia-Sound</Category> + <Category>X-MandrivaLinux-Multimedia-Video</Category> + <Category>X-MandrivaLinux-Multimedia-Other</Category> + </Or> + </Include> + </Menu> + <Menu> + <Name>Office</Name> + <Directory>mandriva-office.directory</Directory> + <Include> + <Or> + <Category>X-MandrivaLinux-MoreApplications-Editors</Category> + <Category>X-MandrivaLinux-Office</Category> + <Category>X-MandrivaLinux-Office-Accessories</Category> + <Category>X-MandrivaLinux-Office-AddressBooks</Category> + <Category>X-MandrivaLinux-Office-Communications</Category> + <Category>X-MandrivaLinux-Office-Communications-Fax</Category> + <Category>X-MandrivaLinux-Office-Communications-PDA</Category> + <Category>X-MandrivaLinux-Office-Communications-Phone</Category> + <Category>X-MandrivaLinux-Office-Communications-Other</Category> + <Category>X-MandrivaLinux-Office-Drawing</Category> + <Category>X-MandrivaLinux-Office-Graphs</Category> + <Category>X-MandrivaLinux-Office-Presentations</Category> + <Category>X-MandrivaLinux-Office-Publishing</Category> + <Category>X-MandrivaLinux-Office-Spreadsheets</Category> + <Category>X-MandrivaLinux-Office-TasksManagement</Category> + <Category>X-MandrivaLinux-Office-TimeManagement</Category> + <Category>X-MandrivaLinux-Office-Other</Category> + <Category>X-MandrivaLinux-Office-WordProcessors</Category> + </Or> + </Include> + </Menu> + <Menu> + <Name>System</Name> + <Directory>mandriva-system.directory</Directory> + <Include> + <Or> + <Category>X-MandrivaLinux-System</Category> + <Category>X-MandrivaLinux-System-Archiving</Category> + <Category>X-MandrivaLinux-System-Archiving-Backup</Category> + <Category>X-MandrivaLinux-System-Archiving-CDBurning</Category> + <Category>X-MandrivaLinux-System-Archiving-Compression</Category> + <Category>X-MandrivaLinux-System-Archiving-Other</Category> + <Category>X-MandrivaLinux-System-FileTools</Category> + <Category>X-MandrivaLinux-System-Monitoring</Category> + <Category>X-MandrivaLinux-System-Session</Category> + <Category>X-MandrivaLinux-System-Session-Windowmanagers</Category> + <Category>X-MandrivaLinux-System-Terminals</Category> + <Category>X-MandrivaLinux-System-TextTools</Category> + <Category>X-MandrivaLinux-System-Configuration</Category> + <Category>X-MandrivaLinux-System-Configuration-BootandInit</Category> + <Category>X-MandrivaLinux-System-Configuration-Hardware</Category> + <Category>X-MandrivaLinux-System-Configuration-Networking</Category> + <Category>X-MandrivaLinux-System-Configuration-Packaging</Category> + <Category>X-MandrivaLinux-System-Configuration-Printing</Category> + <Category>X-MandrivaLinux-System-Configuration-Users</Category> + <Category>X-MandrivaLinux-System-Configuration-Other</Category> + </Or> + </Include> + </Menu> + <Menu> + <Name>Documentation</Name> + <Directory>mandriva-moreapplications-documentation.directory</Directory> + <Include> + <Or> + <Category>X-MandrivaLinux-MoreApplications-Documentation</Category> + </Or> + </Include> + </Menu> + <Menu> + <Name>More Applications</Name> + <Directory>mandriva-moreapplications.directory</Directory> + <Include> + <Or> + <Category>X-MandrivaLinux-MoreApplications</Category> + <Category>X-MandrivaLinux-MoreApplications-Accessibility</Category> + <Category>X-MandrivaLinux-MoreApplications-Communications</Category> + <Category>X-MandrivaLinux-MoreApplications-Finances</Category> + <Category>X-MandrivaLinux-MoreApplications-Databases</Category> + <Category>X-MandrivaLinux-MoreApplications-Development</Category> + <Category>X-MandrivaLinux-MoreApplications-Development-DevelopmentEnvironments</Category> + <Category>X-MandrivaLinux-MoreApplications-Development-Interpreters</Category> + <Category>X-MandrivaLinux-MoreApplications-Development-Tools</Category> + <Category>X-MandrivaLinux-MoreApplications-Development-Other</Category> + <Category>X-MandrivaLinux-MoreApplications-Other</Category> + <Category>X-MandrivaLinux-MoreApplications-Education</Category> + <Category>X-MandrivaLinux-MoreApplications-Education-Economy</Category> + <Category>X-MandrivaLinux-MoreApplications-Education-Geography</Category> + <Category>X-MandrivaLinux-MoreApplications-Education-History</Category> + <Category>X-MandrivaLinux-MoreApplications-Education-Languages</Category> + <Category>X-MandrivaLinux-MoreApplications-Education-Literature</Category> + <Category>X-MandrivaLinux-MoreApplications-Education-Sciences</Category> + <Category>X-MandrivaLinux-MoreApplications-Education-Sports</Category> + <Category>X-MandrivaLinux-MoreApplications-Education-Other</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-ArtificialIntelligence</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-Astronomy</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-Biology</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-Chemistry</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-ComputerScience</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-DataVisualization</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-Electricity</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-Geosciences</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-ImageProcessing</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-Mathematics</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-NumericAnalysis</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-ParallelComptuting</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-Physics</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-Robotics</Category> + <Category>X-MandrivaLinux-MoreApplications-Sciences-Other</Category> + </Or> + </Include> + </Menu> +</Menu> diff --git a/menu/menustyle.csh b/menu/menustyle.csh new file mode 100755 index 0000000..d2c6502 --- /dev/null +++ b/menu/menustyle.csh @@ -0,0 +1,18 @@ +#!/bin/csh +if ($META_CLASS == desktop ) then + set MDV_MENU_STYLE=discovery +else + set MDV_MENU_STYLE=mandriva +endif + +foreach file (/etc/sysconfig/menustyle $HOME/.menustyle) + if ( -f $file ) then + eval `sed 's|^#.*||' $file | sed 's|\([^=]*\)=\([^=]*\)|set \1=\2|g' | sed 's|$|;|' ` + endif +end + +if ($MDV_MENU_STYLE == discovery ) then + setenv XDG_CONFIG_DIRS /etc/xdg/discovery:/etc/xdg +endif + +setenv MDV_MENU_STYLE $MDV_MENU_STYLE diff --git a/menu/menustyle.sh b/menu/menustyle.sh new file mode 100755 index 0000000..d9788ab --- /dev/null +++ b/menu/menustyle.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +if [ "$META_CLASS" = "desktop" ]; then + MDV_MENU_STYLE=discovery +else + MDV_MENU_STYLE=mandriva +fi + +[ -r /etc/sysconfig/menustyle ] && source /etc/sysconfig/menustyle +[ -r $HOME/.menustyle ] && source $HOME/.menustyle + +if [ "$MDV_MENU_STYLE" = "discovery" ]; then + XDG_CONFIG_DIRS=/etc/xdg/discovery:/etc/xdg + export XDG_CONFIG_DIRS +fi + +export MDV_MENU_STYLE |