From 1db06b0c657dd03d1cda75435ef67551bfd21cdb Mon Sep 17 00:00:00 2001 From: Nick Schermer Date: Fri, 26 Feb 2010 14:08:34 +0100 Subject: Add help option to the popup shell scripts. --- plugins/windowmenu/Makefile.am | 7 +++-- plugins/windowmenu/xfce4-popup-windowmenu.in | 22 --------------- plugins/windowmenu/xfce4-popup-windowmenu.sh | 41 ++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 25 deletions(-) delete mode 100644 plugins/windowmenu/xfce4-popup-windowmenu.in create mode 100644 plugins/windowmenu/xfce4-popup-windowmenu.sh (limited to 'plugins/windowmenu') diff --git a/plugins/windowmenu/Makefile.am b/plugins/windowmenu/Makefile.am index 6ba845ca..728a8fd7 100644 --- a/plugins/windowmenu/Makefile.am +++ b/plugins/windowmenu/Makefile.am @@ -54,8 +54,9 @@ libwindowmenu_la_DEPENDENCIES = \ bin_SCRIPTS = \ xfce4-popup-windowmenu -xfce4-popup-windowmenu: xfce4-popup-windowmenu.in Makefile - $(AM_V_GEN) sed -e "s,\@bindir\@,$(bindir),g" $< >$@ +xfce4-popup-windowmenu: xfce4-popup-windowmenu.sh Makefile + $(AM_V_GEN) sed -e "s,\@bindir\@,$(bindir),g" \ + -e "s,\@localedir\@,$(localedir),g" $< >$@ # # .desktop file @@ -67,7 +68,7 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop) EXTRA_DIST = \ windowmenu-dialog.glade \ - xfce4-popup-windowmenu.in \ + xfce4-popup-windowmenu.sh \ $(desktop_in_files) DISTCLEANFILES = \ diff --git a/plugins/windowmenu/xfce4-popup-windowmenu.in b/plugins/windowmenu/xfce4-popup-windowmenu.in deleted file mode 100644 index a477228c..00000000 --- a/plugins/windowmenu/xfce4-popup-windowmenu.in +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2009 Nick Schermer -# -# This library is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the Free -# Software Foundation; either version 2 of the License, or (at your option) -# any later version. -# -# This library is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for -# more details. -# -# You should have received a copy of the GNU Library General Public License -# along with this library; if not, write to the Free Software Foundation, -# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA -# - -exec @bindir@/xfce4-panel --plugin-event=windowmenu:popup - -# vim:set ts=2 sw=2 et ai: diff --git a/plugins/windowmenu/xfce4-popup-windowmenu.sh b/plugins/windowmenu/xfce4-popup-windowmenu.sh new file mode 100644 index 00000000..067ec85e --- /dev/null +++ b/plugins/windowmenu/xfce4-popup-windowmenu.sh @@ -0,0 +1,41 @@ +#!/bin/sh +# +# Copyright (C) 2010 Nick Schermer +# +# This library is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# This library is distributed in the hope that it will be useful, but WITHOUT +# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +# more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this library; if not, write to the Free Software Foundation, +# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA +# + +export TEXTDOMAIN="xfce4-panel" +export TEXTDOMAINDIR="@localedir@" + +case "$1" in + -h|--help) + echo "$(gettext "Usage:")" + echo " $(basename $0) [$(gettext "OPTION")...]" + echo + echo "$(gettext "Options:")" + echo " -h, --help $(gettext "Show help options")" + echo " -V, --version $(gettext "Print version information and exit")" + exit 0 + ;; + -V|--version) + exec @bindir@/xfce4-panel -V "$(basename $0)" + exit 0 + ;; +esac + +exec @bindir@/xfce4-panel --plugin-event=windowmenu:popup + +# vim:set ts=2 sw=2 et ai: -- cgit v1.2.1