diff options
author | Nick Schermer <nick@xfce.org> | 2010-02-26 14:08:34 +0100 |
---|---|---|
committer | Nick Schermer <nick@xfce.org> | 2010-02-26 14:11:57 +0100 |
commit | 1db06b0c657dd03d1cda75435ef67551bfd21cdb (patch) | |
tree | 3187c5bb9236bba4ace3d197d9d5691f49f42002 /plugins/windowmenu | |
parent | 08a1cbde14bfed2ac48405a7273ca91d9a213c92 (diff) | |
download | xfce4-panel-1db06b0c657dd03d1cda75435ef67551bfd21cdb.tar.gz |
Add help option to the popup shell scripts.
Diffstat (limited to 'plugins/windowmenu')
-rw-r--r-- | plugins/windowmenu/Makefile.am | 7 | ||||
-rw-r--r-- | plugins/windowmenu/xfce4-popup-windowmenu.sh (renamed from plugins/windowmenu/xfce4-popup-windowmenu.in) | 21 |
2 files changed, 24 insertions, 4 deletions
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.sh index a477228c..067ec85e 100644 --- a/plugins/windowmenu/xfce4-popup-windowmenu.in +++ b/plugins/windowmenu/xfce4-popup-windowmenu.sh @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2009 Nick Schermer <nick@xfce.org> +# Copyright (C) 2010 Nick Schermer <nick@xfce.org> # # 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 @@ -17,6 +17,25 @@ # 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: |