#!/bin/sh
#based on the original jwmConfigMgr developed by 'thoughtjourney' 2005.
#removed gtktheme section for lupu 01micko 20101212
# 01.03.11 rodin.s i18n

export TEXTDOMAIN=puppy 
export OUTPUT_CHARSET=UTF-8
. gettext.sh



##--------variables---------->>
SCRIPT_DIR="/usr/local/jwmconfig2"
#MINI_ICONS_DIR="/usr/local/lib/X11/mini-icons"
MINI_ICONS_DIR=/usr/share/pixmaps/puppy
HOME_DIR="$HOME/.jwm"
echo "SCRIPT_DIR='${SCRIPT_DIR}'" > /tmp/JWMCONFIGVARS
echo "MINI_ICONS_DIR='${MINI_ICONS_DIR}'" >> /tmp/JWMCONFIGVARS
echo "HOME_DIR='${HOME_DIR}'" >> /tmp/JWMCONFIGVARS


export JWM_Display="
<window title=\"$(gettext 'JWM Configuration Manager')\" icon-name=\"gtk-preferences\" window-position=\"1\">
 <vbox>
  <frame \"$(gettext 'JWM Configuration')\">
    <hbox spacing=\"10\" homogeneous=\"true\" space-expand=\"true\" space-fill=\"true\">
       "`/usr/lib/gtkdialog/xml_info scale windows.svg 60 "$(gettext 'Please choose from the options below which aspect of the appearance of the windows and taskbar you would like to change.')"`"        
      
    </hbox>
  </frame>
  <frame>
   <vbox>
    <hbox>
     <text>
      <label>$(gettext 'Choose a JWM theme')</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/wm_restart.svg</input>
      <height>24</height>
      <action>$SCRIPT_DIR/theme_switcher &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>$(gettext 'Tray management')</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/desktop.svg</input>
      <height>24</height>
      <action>$SCRIPT_DIR/taskbar &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>$(gettext 'Window Settings')</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/windows.svg</input>
      <height>24</height>
      <action>$SCRIPT_DIR/window &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>$(gettext 'Keyboard Shortcuts')</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/keyboard_shortcut.svg</input>
      <height>24</height>
      <action>$SCRIPT_DIR/keyboard &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>$(gettext 'Application launch buttons in tray')</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/execute.svg</input>
      <height>24</height>
      <action>$SCRIPT_DIR/panel-buttons &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>$(gettext 'Clock')</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/clock.svg</input>
      <height>24</height>
      <action>$SCRIPT_DIR/clock &</action>
     </button>
    </hbox>
    <hbox>
     <text>
      <label>$(gettext 'Title Bar Window Button Theming')</label>
     </text>
     <button>
      <input file>$MINI_ICONS_DIR/close.svg</input>
      <height>24</height>
      <action>$SCRIPT_DIR/window_buttons &</action>
     </button>
    </hbox>
    </vbox>
   </frame>
  <hbox>
   <button help>
    <action>xmessage -buttons $(gettext 'Exit') -bg black -fg green -name 'jwmConfigMgr `gettext \"HELP\"`' -center $(gettext 'JWM is a Window Manager. It controls the behaviour and appearance of the windows and the tray.') &</action>
   </button>
   <button>
    <label>$(gettext 'Exit')</label>
    <input file stock=\"gtk-quit\"></input>
    <action>EXIT:ok</action>
   </button>
  </hbox>
 </vbox>
</window>
"
##------------run------------->>
gtkdialog --program JWM_Display

##----------cleanup------------>>
unset JWM_Display

#clear
exit 0

