2008-11-13 [wwp] 3.6.1cvs24
authorTristan Chabredier <wwp@claws-mail.org>
Thu, 13 Nov 2008 10:30:32 +0000 (10:30 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Thu, 13 Nov 2008 10:30:32 +0000 (10:30 +0000)
* tools/popfile-link.sh
Add support for reusing existing POPFile session ID.

ChangeLog
PATCHSETS
configure.ac
tools/popfile-link.sh

index 7f25e2c..4444cbf 100644 (file)
--- 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
index a6e4bb0..beb72e0 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index fc77a9a..6a14a40 100644 (file)
@@ -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=
 
index b1ff1ae..a647424 100644 (file)
 
 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