1#!/bin/sh
2#
3# Copyright (C) 2010 Nick Schermer <nick@xfce.org>
4#
5# This library is free software; you can redistribute it and/or modify it
6# under the terms of the GNU General Public License as published by the Free
7# Software Foundation; either version 2 of the License, or (at your option)
8# any later version.
9#
10# This library is distributed in the hope that it will be useful, but WITHOUT
11# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13# more details.
14#
15# You should have received a copy of the GNU Lesser General Public
16# License along with this library; if not, write to the Free Software
17# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18#
19
20export TEXTDOMAIN="xfce4-panel"
21export TEXTDOMAINDIR="@localedir@"
22
23ATPOINTER="false"
24
25case "$1" in
26  -h|--help)
27    echo "$(gettext "Usage:")"
28    echo "  $(basename $0) [$(gettext "OPTION")...]"
29    echo
30    echo "$(gettext "Options:")"
31    echo "  -p, --pointer   $(gettext "Popup menu at current mouse position")"
32    echo "  -h, --help      $(gettext "Show help options")"
33    echo "  -V, --version   $(gettext "Print version information and exit")"
34    exit 0
35    ;;
36  -V|--version)
37    exec @bindir@/xfce4-panel -V "$(basename $0)"
38    exit 0
39    ;;
40  -p|--pointer)
41    ATPOINTER="true"
42    ;;
43esac
44
45# try to open panel menu, if this fails try xfdesktop
46@bindir@/xfce4-panel --plugin-event=applicationsmenu:popup:bool:$ATPOINTER || xfdesktop --menu
47
48# vim:set ts=2 sw=2 et ai:
49