Can gtkDialog GUI refresh another GUI in same script?
Posted: Thu 08 Apr 2010, 00:18
Look below at script code...
READ-ONLY Archive
https://oldforum.puppylinux.com/
Code: Select all
#! /bin/sh
. $1/guiinfo
menu() {
echo '### '$1 $2
POS=`$1/driveman guiPOS DM`
X=echo $POS |sed 's/,.*$//' ; Y=echo $POS |sed 's/^.*,//'
export DM_MENU="
<window title=\"\" skip_taskbar_hint=\"true\" window_position=\"2\">
<vbox>
<tree hover-selection=\"true\" headers-visible=\"false\">
<variable>POPMENU</variable><label>$2</label>
<item>ROX_Filer</item><item>Mt-UnMt</item>
<item>Set_Boot</item><item>Settings</item>
<item>-------------</item>
<item>Exit_DM</item><item>Exit_Menu</item>
<action signal=\"button-release-event\" type=\"clear\">DRIVES</action>
<action signal=\"button-release-event\" type=\"refresh\">DRIVES</action>
<action signal=\"button-release-event\">$1/driveman clkMENU \$POPMENU $2</action>
</tree>
</vbox>
</window>"
gtkdialog3 -p DM_MENU -G +"$X"+"$Y" &
}
export -f menu
export DRIVEMAN="
<window title=\"DM\"><vbox>
<table><variable>DRIVES</variable><label>Drives|M|B</label><input>cat /tmp/drvinfo</input>
<action signal=\"button-release-event\">menu $1 \$DRIVES</action></table>
</vbox></window>"
gtkdialog3 -p DRIVEMAN --class DM -G "$2"x"$3"+"$X"+"$Y" &
Code: Select all
gtkdialog3 -ref DRIVEMAN # refresh ALL the controls on the DriveMan GUI
gtkdialog3 -ref DRIVEMAN DRIVES # refresh just the control with the Variable: DRIVES
gtkdialog3 -ref DRIVEMAN Exit # refresh the control text of the Label: Exit
Code: Select all
FileList.Visible=true
FileList.Width=200
FileList.Font=Ariel