#!/bin/sh

GTKDIALOG=gtkdialog

#export TMPDIR=/tmp/gtkdialog/examples/"`basename $0`"
#mkdir -p "$TMPDIR"

export DL=/usr/local/quickpet/downloader
export DL2=/usr/local/quickpet/downloader2
export ANYDESK=anydesk-4.0.1-1_x86_64.pet
export AVIDEMUX=avidemux-2.7.1_x86_64.pet
export BASILISK=basilisk-2018.09.05.pet
export BROADCOMWL=broadcom_sta-6.30.223.271_k4.19.23_amd.pet
export CHROMIUM=chromium-browser_73.0.3683.86-x86_64.pet
export CONKY=conky-1.10.8-x86_64.pet
# use pkg export COREBIRD=corebird-0.9-x86_64.pet
export FACETIME=facetimehd_bionic64_4.19.23-1.pet
export FIREFOX=firefox-62.0.2-x86_64.pet
export FSEARCH=fsearch-1.1-x86_64.pet
export GIMP=gimp-2.10.8-x86_64_bionic.pet
export GOGGLESMM=gogglesmm-1.1.9-x86_64.pet
export GOOGLECHROME=google-chrome-70.0.3538.77-1-x86_64.pet
export GOOGLEEARTH=google-earth-pro-stable_7.1.8.3036-r0_amd64.pet
export GOOGLEMUSIC=googlemusic_x86_64.pet
export HOTSHOTS=HotShots-2.2.0-x86_64_bionic.pet
export KRITA=krita-3.1.1-x86_64.pet
export MUMBLE=mumble-1.3.0-x86_64.pet
#export MUSESCORE=musescore-2.0.3-x86_64.pet
export NVIDIA340=nvidia-340.107_K4.19.23_x86_64.pet 
export NVIDIA410=nvidia-410.93_K4.19.23_x86_64.pet
export NVIDIA440=nvidia-440.36_K4.19.23_x86_64.pet
#export OPENSHOT=openshot-v2.4.1-x86_64.pet
export ODRIVE=odrive-0.2.1_x86_64.pet
export OPENHEXAGON=OpenHexagonV1.92-x86_64.pet
export OPERA=opera-58.0.3135.90-x86_64.pet
export PIDGIN=pidgin-2.13.0-x86_64.pet
export QCAD=qcad-3.15.3-x86_64.pet
#export RAMME=ramme-2.3.0-x86_64.pet
export RAMBOX=rambox-0.5.17-x86_64.pet
export RTL8188FU=rtl8188fu-bionicpup64-4.19.23.pet
export RTL8192EU=rtl8192eu-bionicpup64-4.19.23.pet
export RTL8821CE=rtl8821ce-wireless-driver.pet
#export SCRIBUS=scribus-1.5.3-x86_64.pet
export SEAMONKEY=seamonkey-2.49.4-x86_64.pet 
export SKYPE=skypeforlinux-64.deb
export SPOTIFY=spotify-client_1.0.89.313_x86_64.pet
export STEAM=steam-bionicpup.pet
export TEAMVIEWER=teamviewer_14.1-x86_64.pet
export TELEGRAM=telegram-2.0.1-x86_64.pet
export THUNDERBIRD=thunderbird-60.0.0-x86_64.pet
export TOR=tor-browser-8.0-x86_64.pet
export VIVALDI=vivaldi-2.3.1440.61-x86_64.pet
export WINE=wine64-3.15_v4.1.pet
export YOUTUBEDLG=youtube_dl_GUI-0.4_x86_64.pet
export ZOOM=zoom-x86_64.pet

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

MAIN_DIALOG='
<window title="Quickpet Bionic64" icon-name="distributor-logo-puppy" window-position="1">
	<vbox>
	<menubar> 
  <menu>
    <menuitem tooltip-text="'"$(gettext "visit the puppy forum")"'">
         <label>"'"$(gettext "puppy forum")"'"</label>
         <action>defaultbrowser https://puppylinux.rockedge.org/index.php &</action>
    </menuitem>
    <menuitem tooltip-text="'"$(gettext "visit the Bionicpup64 page on forum")"'">
         <label>"'"$(gettext "Bionicpup help")"'"</label>
         <action>defaultbrowser https://puppylinux.rockedge.org/viewtopic.php?f=40&t=99 &</action>
    </menuitem>
    <menuitem tooltip-text="'"$(gettext "search the forum for answers")"'">
         <label>"'"$(gettext "puppylinux search")"'"</label>
         <action>defaultbrowser https://rockedge.org/psearch/ &</action>
    </menuitem>
    <menuitem tooltip-text="'"$(gettext "see bug fixes so far")"'">
         <label>"'"$(gettext "installed bugfixes")"'"</label>
         <action>/usr/local/quickpet/bugfixes &</action>
    </menuitem>
    <menuitem>
         <label>"'"$(gettext "woof-woof")"'"</label>
         <action>aplay /usr/share/audio/2barks.wav &</action>
    </menuitem>
    <label>"'"$(gettext "help")"'"</label>
    </menu>
         <menu>
    <menuitem tooltip-text="'"$(gettext "open the puppy package manager")"'">
         <label>"'"$(gettext "puppy package manager")"'"</label>
         <action>ppm &</action>
    </menuitem>
    <label>"'"$(gettext "ppm")"'"</label>
    </menu>
         <menu>
    <menuitem tooltip-text="'"$(gettext "make a bootable usb of another distro")"'">
         <label>"'"$(gettext "isobooter")"'"</label>
         <action>defaultbrowser  https://web.archive.org/web/20181222045417/http://murga-linux.com/puppy/viewtopic.php?t=67235 &</action>
    </menuitem>
    <label>"'"$(gettext "isobooter")"'"</label>
    </menu>
    </menubar>
		<notebook labels="'"$(gettext "Info|Browsers|Net|office|A&V|Fun|Useful|Drivers")"'">
			<vbox>
         <text><label>"'"$(gettext "Welcome to Quickpet")"'"</label></text>
         <text><label>-------------------</label></text>
         	<text><label>"'"$(gettext "Quickpet enables you to install popular apps quickly.")"'"</label></text>
			<text><label>"'"$(gettext "more apps can be found in the puppy package manager")"'"</label></text>
			<text><label>-------------------</label></text>
			<button tooltip-text="'"$(gettext "install the latest updates & bug fixes")"'">
		        <label>"'"$(gettext "Bionicpup updates")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="puppylogo48"></input>
				<action>/usr/local/quickpet/bionicupdate &</action>
				<action>exit:Exit</action>
			</button>
			<button tooltip-text="'"$(gettext "bionicpup allows easy changing of 
kernels")"'">
		        <label>"'"$(gettext "change kernel")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="application-kernel"></input>
				<action>change_kernels &</action>
			</button>
			<button tooltip-text="'"$(gettext "search the forum for answers")"'">
		        <label>"'"$(gettext "puppy search engine")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="find"></input>
				<action>defaultbrowser https://rockedge.org/psearch/ &</action>
			</button>
			<button tooltip-text="'"$(gettext "chat live with other users")"'">
		        <label>"'"$(gettext "live puppy chat")"'"</label>
		        <height>32</height>
		        <width>32</width>
		        <input file icon="chat"></input>
				<action>exec defaultchat &</action>
			</button>
		    <text><label>-------------------</label></text>
            <text><label>"'"$(gettext "BionicPup64")"'"</label></text>
			</vbox>
			<vbox>
		     <button tooltip-text="'"$(gettext "install")"' firefox">
		        <label>firefox</label>
				<input file icon="firefox"></input>
				<action>$DL2 $FIREFOX &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' seamonkey">
		        <label>seamonkey</label>
				<input file icon="seamonkey"></input>
				<action>$DL2 $SEAMONKEY &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' opera">
		        <label>opera</label>
				<input file icon="qopera"></input>
				<action>$DL2 $OPERA &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' google-chrome">
		        <label>google-chrome</label>
				<input file icon="chrome"></input>
				<action>$DL2 $GOOGLECHROME &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' vivaldi browser">
		        <label>vivaldi</label>
				<input file icon="qvivaldi"></input>
				<action>$DL2 $VIVALDI &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' a patched chromium that has hardware acceleration">
		        <label>chromium</label>
				<input file icon="qchromium"></input>
				<action>$DL2 $CHROMIUM &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' tor-browser">
		        <label>tor</label>
				<input file icon="qtor"></input>
				<action>$DL2 $TOR &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' basilisk">
		        <label>basilisk</label>
				<input file icon="qbasilisk"></input>
				<action>$DL2 $BASILISK &</action>
			</button>
			<frame>
			<pixmap>
			<height>75</height>
			<width>75</width>
         <input file>/usr/share/icons/qpuppylogo48.png</input>
         </pixmap>
         </frame>
			</vbox>
			<vbox>
		     <button tooltip-text="'"$(gettext "install java")"'">
		        <label>java</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qjava"></input>
				<action>sfsget &</action>
			</button>
			<button tooltip-text="flash installer">
		        <label>flash</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qflash"></input>
				<action>getflash &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' skype">
		        <label>skype</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qskype"></input>
				<action>$DL2 $SKYPE &</action>
			</button>
			<button tooltip-text="download google-earth">
		        <label>googleearth</label>
				<input file icon="qgoogle_earth"></input>
				<action>$DL $GOOGLEEARTH &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' pidgin chat client">
		        <label>pidgin</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qpidgin"></input>
				<action>$DL2 $PIDGIN &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' twitter desktop client">
		        <label>chirp</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qchirp"></input>
				<action>sfsget &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' tixati torrent client">
		        <label>tixati</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qtixati"></input>
				<action>defaultbrowser https://www.tixati.com/download/linux.html &</action>
			</button>
			<button tooltip-text="'"$(gettext "keep track of your broadband & network date usage")"'">
		        <label>bitmeter OS</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qbitmeter"></input>
				<action>/usr/local/quickpet/bitmeter &</action>
			</button>
			<button tooltip-text="'"$(gettext "low latency voice chat")"'">
		        <label>mumble</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qmumble"></input>
				<action>$DL $MUMBLE &</action>
			</button>
			<button tooltip-text="'"$(gettext "multi protocol chat client")"'">
		        <label>rambox</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qrambox"></input>
				<action>$DL2 $RAMBOX &</action>
			</button>
			<button tooltip-text="'"$(gettext "telegram messenger")"'">
		        <label>telegram</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qtelegram"></input>
				<action>$DL2 $TELEGRAM &</action>
			</button>
			</vbox>
			<vbox>
			<button tooltip-text="'"$(gettext "office suite")"'">
		        <label>libreoffice</label>
				<input file icon="qlibreoffice"></input>
				<action>sfsget &</action>
			</button>
			<button tooltip-text="'"$(gettext "office suite")"'">
		        <label>openoffice</label>
				<input file icon="qopenoffice"></input>
				<action>sfsget &</action>
			</button>
			<button tooltip-text="'"$(gettext "office suite")"'">
		        <label>wps-office</label>
				<input file icon="qwpsoffice"></input>
				<action>sfsget &</action>
			</button>						
			<button tooltip-text="'"$(gettext "install")"' thunderbird email">
		        <label>thunderbird</label>
				<input file icon="qthunderbird"></input>
				<action>$DL2 $THUNDERBIRD &</action>
			</button>
			<button tooltip-text="'"$(gettext "install the latest calibre ebook reader")"'">
		        <label>calibre</label>
				<input file icon="qcalibre"></input>
				<action>/usr/local/quickpet/calibre &</action>
			</button>
			<button tooltip-text="'"$(gettext "2D computer aided design")"'">
		        <label>qcad</label>
				<input file icon="qqcad"></input>
				<action>$DL $QCAD &</action>
			</button>
			<button tooltip-text="'"$(gettext "3D computer aided design")"'">
		        <label>freecad</label>
				<input file icon="qfreecad"></input>
				<action>sfsget &</action>
			</button>
			<button tooltip-text="'"$(gettext "desktop sharing")"'">
		        <label>anydesk</label>
				<input file icon="qanydesk"></input>
				<action>$DL2 $ANYDESK &</action>
			</button>
				<button tooltip-text="'"$(gettext "install")"' dropbox">
		        <label>dropbox installer</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qdropbox"></input>
				<action>/usr/local/quickpet/dropbox &</action>
			</button>
				<button tooltip-text="'"$(gettext "install")"' megasync cloud storage sync">
		        <label>megasync</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qmega"></input>
				<action>defaultbrowser https://mega.nz/sync &</action>
			</button>
				<button tooltip-text="'"$(gettext "install")"' google drive sync">
		        <label>opendrive</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qodrive"></input>
				<action>$DL2 $ODRIVE &</action>
			</button>
				<button tooltip-text="'"$(gettext "install")"' zoom video conferencing">
		        <label>zoom</label>
		        <height>16</height>
		        <width>16</width>
				<input file icon="qzoom"></input>
				<action>$DL2 $ZOOM &</action>
			</button>			
			</vbox>
			<vbox>
			<button tooltip-text="'"$(gettext "googlemusic desktop player & manager")"'">
		        <label>google music</label>
				<input file icon="qgooglemusic"></input>
				<action>$DL2 $GOOGLEMUSIC &</action>
			</button>
			<button tooltip-text="'"$(gettext "install")"' spotify sfs">
		        <label>spotify</label>
				<input file icon="qspotify"></input>
				<action>$DL2 $SPOTIFY &</action>
			</button>
			<button tooltip-text="'"$(gettext "screen shot and annotation tool")"'">
		        <label>hotshots</label>
				<input file icon="qhotshots"></input>
				<action>$DL2 $HOTSHOTS &</action>
			</button>
			<button tooltip-text="'"$(gettext "image creation and editing")"'">
		        <label>krita</label>
				<input file icon="qkrita"></input>
				<action>$DL $KRITA &</action>
			</button>
			<button tooltip-text="'"$(gettext "image creation and editing")"'">
		        <label>gimp</label>
				<input file icon="qgimp"></input>
				<action>$DL2 $GIMP &</action>
			</button>
			<button tooltip-text="'"$(gettext "video editor & vlc media player")"'">
		        <label>kdenlive & vlc</label>
				<input file icon="qkdenlive"></input>
				<action>sfsget &</action>
			</button>
			<button tooltip-text="'"$(gettext "music composition and notation software")"'">
		        <label>musescore</label>
				<input file icon="qmusescore"></input>
				<action>urxvt -e pkg -f repo bionic-universe get musescore &</action>
			</button>
			<button tooltip-text="'"$(gettext "music player/manager")"'">
		        <label>gogglesmm</label>
				<input file icon="qgogglesmm"></input>
				<action>$DL $GOGGLESMM &</action>
			</button>
			<button tooltip-text="'"$(gettext "youtube downloader")"'">
		        <label>youtube-DL-GUI</label>
				<input file icon="qyoutube"></input>
				<action>$DL2 $YOUTUBEDLG &</action>
			</button>
			<button tooltip-text="'"$(gettext "video editor")"'">
		        <label>avidemux</label>
				<input file icon="qavidemux"></input>
				<action>$DL2 $AVIDEMUX &</action>
			</button>
			<button tooltip-text="'"$(gettext "DJ mixing")"'">
		        <label>mixxx</label>
				<input file icon="qmixxx"></input>
				<action>/usr/local/quickpet/mixxx &</action>
			</button>
			<button tooltip-text="'"$(gettext "kodi media centre")"'">
		        <label>kodi</label>
				<input file icon="qkodi"></input>
				<action>sfsget &</action>
			</button>
			</vbox>
			<vbox>
			<button tooltip-text="'"$(gettext "3D turnbased fighting with ragdoll physics")"'">
		        <label>toribash</label>	        
				<input file icon="qtorribash"></input>
				<action>/usr/local/quickpet/toribash &</action>
			</button>
			<button tooltip-text="'"$(gettext "incredibly hard reaction game")"'">
		        <label>open hexagon</label>
				<input file icon="qopenhexagon"></input>
				<action>$DL $OPENHEXAGON &</action>
			</button>
			<button tooltip-text="'"$(gettext "install steam")"'">
		        <label>steam</label>
				<input file icon="qsteam"></input>
				<action>$DL2 $STEAM &</action>
			</button>
			<frame>
			<pixmap>
			<height>100</height>
			<width>100</width>
         <input file>/usr/share/icons/Puppy Standard/scalable/categories/game.svg</input>
         </pixmap>
         </frame>
            </vbox>
			<vbox>
         <button tooltip-text="'"$(gettext "run windows programs")"'">
		        <label>wine</label>
				<input file icon="qwine"></input>
				<action>$DL2 $WINE &</action>
			</button>
			<button tooltip-text="'"$(gettext "install the latest virtualbox")"'">
		        <label>virtualbox</label>
				<input file icon="qvirtualbox"></input>
				<action>/usr/local/quickpet/virtualbox &</action>
			</button>
			<button tooltip-text="'"$(gettext "install the latest vmware player")"'">
		        <label>vmware</label>
				<input file icon="qvmware"></input>
				<action>/usr/local/quickpet/vmware &</action>
			</button>
			<button tooltip-text="'"$(gettext "install conky system monitor")"'">
		        <label>conky</label>
				<input file icon="graph"></input>
				<action>$DL2 $CONKY &</action>
			</button>
			<button tooltip-text="'"$(gettext "very quick search tool")"'">
		        <label>fsearch</label>
				<input file icon="find"></input>
				<action>$DL2 $FSEARCH &</action>
			</button>
				<frame>
			<pixmap>
			<height>60</height>
			<width>60</width>
         <input file>/usr/share/icons/qpupster.png</input>
         </pixmap>
			</frame>
				<button tooltip-text="'"$(gettext "install devx developer package (contains gcc compiler)")"'">
		        <label>devx</label>
		        <input file icon="qsfs"></input>
		        <action>sfsget &</action>
			</button>
			<button tooltip-text="'"$(gettext "install kernel sources ")"'">
		        <label>kernel src</label>
		        <input file icon="qkernel"></input>
		        <action>sfsget &</action>
			</button>
			<button tooltip-text="'"$(gettext "install the 32bit compatibility sfs ")"'">
		        <label>32bit compatibility sfs</label>
		        <input file icon="q32"></input>
		        <action>sfsget &</action>
			</button>
			<button tooltip-text="'"$(gettext "extra firmware ")"'">
		        <label>extra firmware sfs</label>
		        <input file icon="BuildingBlock"></input>
		        <action>defaultbrowser http://www.murga-linux.com/puppy/viewtopic.php?t=97276 &</action>
			</button>
        </vbox>
			<vbox>
			<button tooltip-text="'"$(gettext "Install the proprietory nvidia graphic driver")"'">
		        <label>"'"$(gettext "nvidia 440")"'"</label>
		        <height>16</height>
		        <width>16</width>
		        <input file icon="qnvidia-settings"></input>
				<action>$DL2 $NVIDIA440 &</action>
			</button>
			<button tooltip-text="'"$(gettext "Install the proprietory nvidia graphic driver")"'">
		        <label>"'"$(gettext "nvidia 410")"'"</label>
		        <height>16</height>
		        <width>16</width>
		        <input file icon="qnvidia-settings"></input>
				<action>$DL2 $NVIDIA410 &</action>
			</button>
			<button tooltip-text="'"$(gettext "Install the proprietory nvidia graphic driver")"'">
		        <label>"'"$(gettext "nvidia 340")"'"</label>
		        <height>16</height>
		        <width>16</width>
		        <input file icon="qnvidia-settings"></input>
				<action>$DL2 $NVIDIA340 &</action>
			</button>
			<frame>
			<pixmap>
			<height>70</height>
			<width>70</width>
         <input file>/usr/share/icons/qpupold.png</input>
         </pixmap>
         </frame>
         <button tooltip-text="'"$(gettext "Install the proprietory broadcom wl driver")"'">
		        <label>"'"$(gettext "broadcom wl driver")"'"</label>
		        <height>16</height>
		        <width>16</width>
		        <input file icon="qmodule"></input>
				<action>$DL2 $BROADCOMWL &</action>
			</button>
			 <button tooltip-text="'"$(gettext "Install the rtl8188fu wireless driver")"'">
		        <label>"'"$(gettext "rtl8188fu wireless driver")"'"</label>
		        <height>16</height>
		        <width>16</width>
		        <input file icon="qmodule"></input>
				<action>$DL2 $RTL8188FU &</action>
			</button>
			 <button tooltip-text="'"$(gettext "Install the rtl8192eu wireless driver")"'">
		        <label>"'"$(gettext "rtl8192eu wireless driver")"'"</label>
		        <height>16</height>
		        <width>16</width>
		        <input file icon="qmodule"></input>
				<action>$DL2 $RTL8192EU &</action>
			</button>
			 <button tooltip-text="'"$(gettext "Install the rtl8821ce wireless driver")"'">
		        <label>"'"$(gettext "rtl8821ce wireless driver")"'"</label>
		        <height>16</height>
		        <width>16</width>
		        <input file icon="qmodule"></input>
				<action>$DL2 $RTL8821CE &</action>
			</button>
			<button tooltip-text="'"$(gettext "Install the facetime broadcom 1570 PCIe webcam driver")"'">
		        <label>"'"$(gettext "1570 PCIe webcam driver")"'"</label>
		        <height>16</height>
		        <width>16</width>
		        <input file icon="qmodule"></input>
				<action>$DL2 $FACETIME &</action>
			</button>
			</vbox>
		</notebook>
		<hbox>
			<button cancel></button>
			</hbox>
	</vbox>
</window>'
GUI="
<window>
 <vbox>
  <menubar>
   ...
  </menubar>
 </vbox>
 <action signal=\"hide\">exit:Exit</action>
</window>"
export MAIN_DIALOG

case $1 in
	-d | --dump) echo "$MAIN_DIALOG" ;;
	*) $GTKDIALOG --program=MAIN_DIALOG ;;
esac
