diff options
author | Juan M. Lasca <juanmlasca@gmail.com> | 2023-05-18 20:48:15 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-05-20 11:17:09 +0700 |
commit | 34526992380a5bd6fc9df96fafcdfe5c0683c1df (patch) | |
tree | 2ea9ad638426e400c37f3ce15e185f82acde1bca /office | |
parent | 453043e9d30671735ec3aad29d25091d4affb336 (diff) |
office/openoffice.org: Add submenu support.
Signed-off-by: bedlam <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office')
-rw-r--r-- | office/openoffice.org/README | 7 | ||||
-rw-r--r-- | office/openoffice.org/openoffice.org.SlackBuild | 19 | ||||
-rw-r--r-- | office/openoffice.org/submenus/openoffice.directory | 4 | ||||
-rw-r--r-- | office/openoffice.org/submenus/openoffice.menu | 23 |
4 files changed, 52 insertions, 1 deletions
diff --git a/office/openoffice.org/README b/office/openoffice.org/README index cb4c2a403a41..a0564c5a34c0 100644 --- a/office/openoffice.org/README +++ b/office/openoffice.org/README @@ -13,3 +13,10 @@ Apache recommends having either jre or jdk installed, but it is not required. See more details here: https://wiki.openoffice.org/wiki/Java_and_OpenOffice.org + +NOTE: submenus +By default, the menu entries grouped in a submenu folder +(multilevel menu entry). If you want to disable this, do: + +SUBMENU="NO" ./openoffice.org.SlackBuild + diff --git a/office/openoffice.org/openoffice.org.SlackBuild b/office/openoffice.org/openoffice.org.SlackBuild index eb0d7f915d73..6a8f8a775009 100644 --- a/office/openoffice.org/openoffice.org.SlackBuild +++ b/office/openoffice.org/openoffice.org.SlackBuild @@ -35,7 +35,7 @@ PRGNAM=openoffice.org SRCNAM=openoffice VERSION=${VERSION:-4.1.14} BUILD_ID=${BUILD_ID:-9811} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} SRCSHORT=$(echo $VERSION | cut -f1 -d.) @@ -156,6 +156,23 @@ done ## menu icons! cp -R $TMP/$SOURCEDIR/RPMS/desktop-integration/usr/share/icons $PKG/usr/share/ +# The following was adapted from a patch submitted by Petar Petrov +# Do we want a submenu? For more info: +# https://slackalaxy.com/2021/08/08/xfce-multilevel-menu/ +SUBMENU=${SUBMENU:-"YES"} +if [ "$SUBMENU" = "YES" ]; then + # Use a separate "OpenOffice" menu entry within "Office" + mkdir -p $PKG/etc/xdg/menus/applications-merged + cp $CWD/submenus/openoffice.menu $PKG/etc/xdg/menus/applications-merged + + # Menu directory structure + mkdir -p $PKG/usr/share/desktop-directories + cp $CWD/submenus/openoffice.directory $PKG/usr/share/desktop-directories + + # The category in the .desktop files is commented out to avoid duplication in menus + sed -i "s:Categories:#Categories:" $PKG/usr/share/applications/*.desktop +fi + ## Move docs to their expected locations mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cd $PKG/opt/${SRCNAM}${SRCSHORT} diff --git a/office/openoffice.org/submenus/openoffice.directory b/office/openoffice.org/submenus/openoffice.directory new file mode 100644 index 000000000000..31834069d282 --- /dev/null +++ b/office/openoffice.org/submenus/openoffice.directory @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Directory +Name=OpenOffice +Icon=openoffice4-main diff --git a/office/openoffice.org/submenus/openoffice.menu b/office/openoffice.org/submenus/openoffice.menu new file mode 100644 index 000000000000..d41adea78bfc --- /dev/null +++ b/office/openoffice.org/submenus/openoffice.menu @@ -0,0 +1,23 @@ +<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN" +"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd"> +<Menu> + <Name>Applications</Name> + <Menu> + <Name>Office</Name> + <Directory>xfce4-office.directory</Directory> + <Menu> + <Name>OpenOffice</Name> + <Directory>openoffice.directory</Directory> + <Include> + <Filename>open-base.desktop</Filename> + <Filename>open-calc.desktop</Filename> + <Filename>open-draw.desktop</Filename> + <Filename>open-impress.desktop</Filename> + <Filename>open-math.desktop</Filename> + <Filename>open-printeradmin.desktop</Filename> + <Filename>open-startcenter.desktop</Filename> + <Filename>open-writer.desktop</Filename> + </Include> + </Menu> + </Menu> +</Menu> |