talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit de3dd5decdb16c3957d91dbb3efacad5bc45bee3
parent 970e9fdaaee75aeeb81041aa7c15626d39937a4b
Author: Tristan Chabredier <wwp@claws-mail.org>
Date:   Thu, 13 Nov 2008 10:30:32 +0000

2008-11-13 [wwp]	3.6.1cvs24

	* tools/popfile-link.sh
		Add support for reusing existing POPFile session ID.

Diffstat:
MChangeLog | 5+++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Mtools/popfile-link.sh | 21++++++++++++++++++---
4 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-13 [wwp] 3.6.1cvs24 + + * tools/popfile-link.sh + Add support for reusing existing POPFile session ID. + 2008-11-12 [colin] 3.6.1cvs23 * src/prefs_gtk.h diff --git a/PATCHSETS b/PATCHSETS @@ -3605,3 +3605,4 @@ ( cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/autofaces.c; cvs diff -u -r 1.2.2.5 -r 1.2.2.6 src/common/md5.c; cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/common/md5.h; ) > 3.6.1cvs21.patchset ( cvs diff -u -r 1.395.2.398 -r 1.395.2.399 src/summaryview.c; ) > 3.6.1cvs22.patchset ( cvs diff -u -r 1.5.2.17 -r 1.5.2.18 src/prefs_gtk.h; ) > 3.6.1cvs23.patchset +( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 tools/popfile-link.sh; ) > 3.6.1cvs24.patchset diff --git a/configure.ac b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=6 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=23 +EXTRA_VERSION=24 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/tools/popfile-link.sh b/tools/popfile-link.sh @@ -26,11 +26,21 @@ function open_page() { - TMPCMD=$(echo $OPEN_CMD | sed "s:%s:$1:") + TMPCMD=$(echo $OPEN_CMD | sed "s|\"%s\"|$1|") $TMPCMD & } +SESSION_ID="" +if [ "$1" == "--ask-session-id" ] +then + shift + SESSION_ID=$(gxmessage -entry -center -wrap -buttons "OK:0,Cancel:1" -default "OK" \ + -name "popfile-link" -title "POPFile session ID" "Type in the ID of a running POPFile session to use") + test -z "$SESSION_ID" -o $? -ne 0 && \ + exit 0 +fi + test -z "$1" && \ exit 1 @@ -39,7 +49,7 @@ test -z "$CM_DIR" -o ! -d "$HOME/$CM_DIR" && \ exit 1 OPEN_CMD=$(grep -Em 1 "^uri_open_command=" "$HOME/$CM_DIR/clawsrc" | cut -d '=' -f 2-) -test -z "$OPEN_CMD" || \ +test -z "$OPEN_CMD" && \ exit 1 while [ -n "$1" ] @@ -48,7 +58,12 @@ do if [ -n "$LINK" ] then LINK=${LINK:16} - open_page "$LINK" + if [ -n "$SESSION_ID" ] + then + open_page "${LINK}\\&session=$SESSION_ID" + else + open_page "$LINK" + fi fi shift done