From 5ce8d30439463838f845c78bc926cc9b310a8743 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 27 Jan 2009 17:30:08 +0000 Subject: imported openSUSE.tar.bz2 (from gfxboot-4.1.19-2.1.src.rpm) --- src/dia_about.inc | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 src/dia_about.inc (limited to 'src/dia_about.inc') diff --git a/src/dia_about.inc b/src/dia_about.inc new file mode 100644 index 0000000..2055ea6 --- /dev/null +++ b/src/dia_about.inc @@ -0,0 +1,75 @@ +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% +% Panel 'about' entry. +% +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Show help window. +% +% ( ) => ( ) +% +/panel.about { + panel 0 panel.entry.help put + about.popup +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Return width of 'about' entry. +% +% ( ) => ( width ) +% +/panel.about.width { + "About" strsize pop +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Redraw panel entry. +% +% ( panel ) => ( ) +% +/panel.about.update { + panel.text.moveto + "About" show +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Show 'about' box. +% +% ( ) ==> ( ) +% +/about.popup { + window.dialog + + dup .title "About" put + dup .text about.msg put + dup .buttons [ + button.ok button.default actRedraw button.setaction + ] put + dup window.init + window.show +} def + + +% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +% Return 'about' text, if any. +% +% ( -- obj1 ) +% +% obj1: string with message or .undef +% +/about.msg { + + /about.msg + ptheme { "pabout.txt" } { "about.txt" } ifelse findfile dup .undef ne { + dup length string dup cvp rot dup length memcpy + } if + def + + about.msg + +} def + -- cgit v1.2.1