|
|
983249 |
--- orig-1.0.9/wl_reader/bltk_wl_reader.sh 2009-04-10 09:14:20.000000000 +0200
|
|
|
983249 |
+++ curr-1.0.9-1/wl_reader/bltk_wl_reader.sh 2009-07-17 11:03:55.065881503 +0200
|
|
|
983249 |
@@ -38,6 +38,7 @@
|
|
|
983249 |
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
983249 |
#
|
|
|
983249 |
|
|
|
983249 |
+[ -f "$BLTK_CONF" ] && . "$BLTK_CONF"
|
|
|
983249 |
|
|
|
983249 |
source `dirname $0`/../../bin/bltk_wl_common
|
|
|
983249 |
[[ $? != 0 ]] && { echo "bltk tree corrupted"; exit 2; }
|
|
|
983249 |
@@ -48,6 +49,13 @@
|
|
|
983249 |
|
|
|
983249 |
XSE_PROG="bltk_wl_reader_xse"
|
|
|
983249 |
|
|
|
983249 |
+WL_READER_WORKING_DIR=${WL_READER_WORKING_DIR:-"~/.bltk"}
|
|
|
983249 |
+cd $WL_READER_WORKING_DIR
|
|
|
983249 |
+WL_READER_WORKING_DIR=`pwd`
|
|
|
983249 |
+cd $OLDPWD
|
|
|
983249 |
+
|
|
|
983249 |
+export USER_DELAY_TMP=$BLTK_HOME/user_delay.tmp
|
|
|
983249 |
+
|
|
|
983249 |
startup()
|
|
|
983249 |
{
|
|
|
983249 |
trap 'cleanup 1; exit 1' 1 2 3 15
|
|
|
983249 |
@@ -58,35 +66,35 @@
|
|
|
983249 |
### wl_check_install reader
|
|
|
983249 |
### wl_check_error $?
|
|
|
983249 |
|
|
|
983249 |
- if [[ -z $BLTK_WL_PROG ]]
|
|
|
983249 |
+ if [[ -z $BLTK_READER_PROG ]]
|
|
|
983249 |
then
|
|
|
983249 |
- export BLTK_WL_PROG=$DEF_BROWSER
|
|
|
983249 |
- export BLTK_WL_PROG_FLG=
|
|
|
983249 |
+ export BLTK_READER_PROG=$DEF_BROWSER
|
|
|
983249 |
+ export BLTK_READER_PROG_FLG=
|
|
|
983249 |
fi
|
|
|
983249 |
|
|
|
983249 |
- wl_check_prog $BLTK_WL_PROG
|
|
|
983249 |
+ wl_check_prog $BLTK_READER_PROG
|
|
|
983249 |
wl_check_error $?
|
|
|
983249 |
|
|
|
983249 |
- wl_check_run_prog $BLTK_WL_PROG
|
|
|
983249 |
+ wl_check_run_prog $BLTK_READER_PROG
|
|
|
983249 |
wl_check_error $?
|
|
|
983249 |
|
|
|
983249 |
- echo "Browser $BLTK_WL_PROG"
|
|
|
983249 |
+ echo "Browser $BLTK_READER_PROG"
|
|
|
983249 |
|
|
|
983249 |
- wl_check_all_run_prog $BLTK_WL_PROG
|
|
|
983249 |
+ wl_check_all_run_prog $BLTK_READER_PROG
|
|
|
983249 |
wl_check_error $?
|
|
|
983249 |
|
|
|
983249 |
tmp_reader_file=/tmp/$DEF_FILE
|
|
|
983249 |
|
|
|
983249 |
- if [[ $BLTK_WL_FILE = DEBUG ]]
|
|
|
983249 |
+ if [[ $BLTK_READER_FILE = DEBUG ]]
|
|
|
983249 |
then
|
|
|
983249 |
- BLTK_WL_FILE=
|
|
|
983249 |
+ BLTK_READER_FILE=
|
|
|
983249 |
fi
|
|
|
983249 |
|
|
|
983249 |
- if [[ ! -z $BLTK_WL_FILE ]]
|
|
|
983249 |
+ if [[ ! -z $BLTK_READER_FILE ]]
|
|
|
983249 |
then
|
|
|
983249 |
- reader_file=$BLTK_WL_FILE
|
|
|
983249 |
+ reader_file=$BLTK_READER_FILE
|
|
|
983249 |
title="$BLTK_WL_TITLE"
|
|
|
983249 |
- flags="$BLTK_WL_PROG_FLG"
|
|
|
983249 |
+ flags="$BLTK_READER_PROG_FLG"
|
|
|
983249 |
else
|
|
|
983249 |
default_flg=TRUE
|
|
|
983249 |
reader_file=$DEF_FILE
|
|
|
983249 |
@@ -139,13 +147,13 @@
|
|
|
983249 |
{
|
|
|
983249 |
ST_TIME=`$BLTK_TIME_CMD`
|
|
|
983249 |
|
|
|
983249 |
- rm -f ./user_delay.tmp
|
|
|
983249 |
+ rm -f $USER_DELAY_TMP
|
|
|
983249 |
|
|
|
983249 |
- CMD="$BLTK_WL_PROG $BLTK_WL_PROG_FLG $reader_file"
|
|
|
983249 |
+ CMD="$BLTK_READER_PROG $BLTK_WL_PROG_FLG $reader_file"
|
|
|
983249 |
$CMD &
|
|
|
983249 |
wl_check_error $? "$CMD failed"
|
|
|
983249 |
|
|
|
983249 |
- BLTK_WL_ALL_PROC_NAME="$BLTK_WL_ALL_PROC_NAME $BLTK_WL_PROG"
|
|
|
983249 |
+ BLTK_WL_ALL_PROC_NAME="$BLTK_WL_ALL_PROC_NAME $BLTK_READER_PROG"
|
|
|
983249 |
|
|
|
983249 |
windowid=`bltk_winid -S "$title"`
|
|
|
983249 |
wl_check_error $? "Cannot get windowid of $BLTK_WL_PRO"
|
|
|
983249 |
@@ -157,11 +165,17 @@
|
|
|
983249 |
|
|
|
983249 |
CMD="$BLTK_WL_BIN/$XSE_PROG"
|
|
|
983249 |
$CMD
|
|
|
983249 |
+ if [ -f $BLTK_STOP_FNAME ]
|
|
|
983249 |
+ then
|
|
|
983249 |
+ ps -eopid,cmd | grep $BLTK_READER_PROG | sed 's/^ *//' | sed 's/ .*$//' | xargs kill -s SIGKILL
|
|
|
983249 |
+ exit 0
|
|
|
983249 |
+ fi
|
|
|
983249 |
+
|
|
|
983249 |
wl_check_error $? "$CMD failed"
|
|
|
983249 |
|
|
|
983249 |
BLTK_WL_PROC_NAME="$BLTK_WL_PROC_NAME $XSE_PROG"
|
|
|
983249 |
|
|
|
983249 |
- CMD="cat ./user_delay.tmp"
|
|
|
983249 |
+ CMD="cat $USER_DELAY_TMP"
|
|
|
983249 |
DELAY_TIME=`$CMD`
|
|
|
983249 |
wl_check_error $? "$CMD failed"
|
|
|
983249 |
|
|
|
983249 |
@@ -200,7 +214,12 @@
|
|
|
983249 |
exit $1
|
|
|
983249 |
}
|
|
|
983249 |
|
|
|
983249 |
-startup
|
|
|
983249 |
-run
|
|
|
983249 |
-cleanup 0
|
|
|
983249 |
+if [ "$WL_READER_ENABLED" = "YES" ]
|
|
|
983249 |
+then
|
|
|
983249 |
+ startup
|
|
|
983249 |
+ run
|
|
|
983249 |
+ cleanup 0
|
|
|
983249 |
+else
|
|
|
983249 |
+ exit 0
|
|
|
983249 |
+fi
|
|
|
983249 |
|
|
|
983249 |
--- orig-1.0.9/wl_reader/bltk_wl_reader_xse.c 2009-04-10 09:14:20.000000000 +0200
|
|
|
983249 |
+++ curr-1.0.9-1/wl_reader/bltk_wl_reader_xse.c 2009-07-17 11:03:55.065881503 +0200
|
|
|
983249 |
@@ -108,7 +108,7 @@
|
|
|
983249 |
}
|
|
|
983249 |
}
|
|
|
983249 |
|
|
|
983249 |
- env = getenv("BLTK_WL_PROG");
|
|
|
983249 |
+ env = getenv("BLTK_READER_PROG");
|
|
|
983249 |
if (env && strcmp(env, "konqueror") == 0) {
|
|
|
983249 |
scen[LINE_QUIT].string = "Q";
|
|
|
983249 |
}
|