Revision history for gtkdialogDocTips9.16


Revision [33346]

Last edited on 2023-02-24 06:58:50 by zigbert
Additions:
[[HomePage]] > [[SoftwareIndex|Software Index]] > [[SoftwareDevelopment|Development]] > [[gtkdialog|gtkdialog]] > [[gtkdialogDocTips|Tips and Tricks]]
===@@**#%[[gtkdialogDocTips9.15|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips10|Next ❱❱❱]]#%**@@===
Deletions:
[[HomePage]] > [[SoftwareIndex Software Index]] > [[SoftwareDevelopment Development]] > [[gtkdialog gtkdialog]] > [[gtkdialogDocTips Tips and Tricks]]
@@**#%[[gtkdialogDocTips9.15|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips10|Next ❱❱❱]]#%**@@


Revision [32967]

Edited on 2020-08-04 21:42:59 by zigbert
Additions:
====9.16 Press 'Enter' instead of clicking the 'Ok' button====
When writing input to the app it is much easier to just press the 'Enter' key to activate ##<action>##.
export ok_box='
<window>
<vbox>
<entry activates_default="true"><default>press _enter_ to activate OK-button</default></entry>
<button can-default="true" has-default="true" use-stock="true">
<input file icon="gtk-ok"></input>
<label>Ok</label>
<action>EXIT:ok</action>
</button>
</vbox>
gtkdialog -p ok_box
@@**#%[[gtkdialogDocTips9.15|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips10|Next ❱❱❱]]#%**@@
Deletions:
====9.15 Use a splash screen====
A splash screen could be useful if the startup time is increasing. The delay may occur for 2 reasons. There are several startup processes, or the gtkdialog code is heavy. The latter case makes it necessary to close the splash-window first when the main window is drawn on screen. We use the ##<window>## signal ##show## to determine when the splash should be closed.
#Splash
echo 0 > /tmp/splash
export SPLASH='
<window title="PCC" icon-name="gtk-preferences" resizable="false" decorated="false">'"
<vbox>
<pixmap><input file>/usr/share/midi-icons/configuration48.png</input></pixmap>
<text height-request=\"50\" use-markup=\"true\"><label>\"<b><span size='"'x-large'"' color='"'orange'"'>Puppy Control Center</span></b>\"</label></text>"'
<progressbar visible="false">
<label>nn</label>
<input>while [ "$M" != "100" ]; do M=`cat /tmp/splash`; echo $M; usleep 500000; done</input>
<action type="exit">Ready</action>
</progressbar>
</vbox></window>'
gtkdialog -p SPLASH --center &
sleep 2 #well, this is to simulate some startup processes....
export GUI='
<window title="PCC" icon-name="gtk-preferences" width-request="800">
<vbox>
<text height-request="200">
<label>Hello, welcome to the Puppy Control Center</label>
</text>
<button ok></button>
</vbox>
<action signal="show">echo 100 > /tmp/splash</action>
gtkdialog -p GUI
Mave has made an attempt to replace yaf-splash using gtkdialog. Yaf-splash doesn't support UTF-8, and has given some issues when translation to some languages. Read more at [[http://www.murga-linux.com/puppy/viewtopic.php?p=422343#422343]]
@@**#%[[gtkdialogDocTips9.14|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.16|Next ❱❱❱]]#%**@@


Revision [32966]

The oldest known version of this page was created on 2020-08-04 21:40:47 by zigbert
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki