Revision history for gtkdialogDocTips9.15


Revision [33345]

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


Revision [32965]

Edited on 2020-08-04 21:40:32 by zigbert
Additions:
====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>
<hbox>
<button ok></button>
</hbox>
</vbox>
<action signal="show">echo 100 > /tmp/splash</action>
</window>'
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 ❱❱❱]]#%**@@
Deletions:
====9.14 Checkbox with image====
This example shows how to add an image beside the label of a checkbox. Be aware that this technique only works for gtk stock-items.
<checkbox use-stock="true" label="gtk-fullscreen" image-position="1" tooltip-text="checkbox derives from button ...">
</checkbox>
<button use-stock="true" label="gtk-quit">
</button>
@@**#%[[gtkdialogDocTips9.13|❰❰❰ Previous]]#% #%[[gtkdialogDocTips|Index]]#% #%[[gtkdialogDocTips9.15|Next ❱❱❱]]#%**@@


Revision [32964]

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