#!/bin/bash
export TEXTDOMAIN=pfilesearch #for gettext

if [ -z "$IMG" ]; then IMG="dialog-error"; fi
if [ -z "$FRAME" ]; then FRAME="$(gettext 'Error')"; fi

case $TXT1 in
	LOC0313) TXT1=$(gettext "To define an exact search, you can use the terms:

<b>[OR]</b> Filename/content must contain either 'this [OR] that'. This will give more results.

<b>[AND]</b> Filename/content must contain both 'this [AND] that'. This will give less results.

<b>*</b> Means anything. 'pup*back' finds both 'PuppyBackup' and 'Puppies are back'.

<b>?</b> Means any char. 'pup??back' finds only 'PuppyBackup'. '??' represent only two chars.")
	;;
	LOC0317) TXT1=$(gettext "If wanted, there can be several searchpaths.
Separate paths with <b>[OR]</b>: '/mnt/ [OR] /root/'.
You can use './' to specify current path.")
	;;
	LOC0318) TXT1=$(gettext 'Define a directory, and it will NOT be in the searchpath. Setting works recursively.')
	;;
esac


export ok_box="
<window title=\"pfilesearch\" icon-name=\"gtk-find\">
 <vbox>
  <frame $FRAME>
   <pixmap icon_size=\"6\"><input file stock=\"gtk-$IMG\"></input></pixmap>
   <text use-markup=\"true\"><label>\"$TXT1\"</label></text>
   <text><label>\"$TXT2\"</label></text>
  </frame>
  <hbox>
   <button can-default=\"true\" has-default=\"true\" use-stock=\"true\">
    <input file icon=\"gtk-apply\"></input>
    <label>$(gettext 'Ok')</label>
   </button>
  </hbox>
 </vbox>
</window>"
gtkdialog -p ok_box --center
TXT1=""; TXT2=""; IMG=""; FRAME="" #reset to avoid alien values in next box