~mil/nominatim-gui-scripts

e7c852867a2fdb067042e9eff45d76665ff10603 — Miles Alan 1 year, 5 months ago 54417c2 master
Use kill $$ to terminate program rather then killing gtk-server-gtk3

Seems like for some reason killing gtk-server-gtk3 kills the parent process
in anycase and is interfering with printing the picked item.
1 files changed, 6 insertions(+), 3 deletions(-)

M nominatim.sh
M nominatim.sh => nominatim.sh +6 -3
@@ 152,22 152,25 @@ run() {
    esac        
  done

  PRINT=""

  ITER="$(gtke "gtk_server_opaque")"
  SEL="$(gtk "gtk_tree_view_get_selection $SEARCHA_TREE")"
  HASSEL="$(gtk "gtk_tree_selection_get_selected $SEL NULL $ITER")"
  ROWN="$(gtke "gtk_tree_model_get_string_from_iter $SEARCHA_LIST $ITER" | xargs -IN echo N + 1 | bc)"
  echo "$SEARCHA_RESULTS" | sed -n ${ROWN}p
  PRINT="${PRINT}$(echo "$SEARCHA_RESULTS" | sed -n ${ROWN}p)"

  if [ $NENTRIES = 2 ]; then
    ITER="$(gtke "gtk_server_opaque")"
    SEL="$(gtk "gtk_tree_view_get_selection $SEARCHB_TREE")"
    HASSEL="$(gtk "gtk_tree_selection_get_selected $SEL NULL $ITER")"
    ROWN="$(gtke "gtk_tree_model_get_string_from_iter $SEARCHB_LIST $ITER" | xargs -IN echo N + 1 | bc)"
    echo "$SEARCHB_RESULTS" | sed -n ${ROWN}p
    PRINT="${PRINT}\n$(echo "$SEARCHB_RESULTS" | sed -n ${ROWN}p)"
  fi

  gtkq "gtk_server_exit"
  pkill gtk-server-gtk3
  printf %b "$PRINT"
  kill $$
}

run $1