Page 1 of 1

Buttondialog - nicer than xmessage

Posted: Fri 20 Jun 2008, 19:13
by MU
Buttondialog is a utility written in Freebasic.
So it easily can be extended.
The binary itself is only 31 kb in size, or 15 kb compressed with upx.
You can run it from shellscripts, if you want more options than xmessage offers.

It is run like this:
buttondialog rcfolder

rcfolder can be a folder of your choice, that contains configurationfiles.
These files define the texts, pictures, actions and some options (e.g. buttons can be arranged vertically).

A demo is included, just type in a consolewindow:
buttondialogdemo

hint for programmers:
it does not use a Gladefile, as shown here:
http://murga-linux.com/puppy/viewtopic.php?t=30525
Instead, the elements are created using native Gtk functions.
So this approach is quite flexible.
You could use /tmp/myfolder as rcfolder, and create the rcfiles in it generated by a script.

If the first button is clicked, the dialog prints
#1
to stdout, and so on.

The PET includes the files for the Demo, and the Basic-Code (GPL).
If you want to add it to a pupplett for own purposes, you need only the binary "buttondialog".

Mark

Posted: Fri 20 Jun 2008, 21:44
by MU
buttondialogdemo was missing this line:
cd /usr/local/Buttondialog
So you could no see the pictures.
I updated the PET with it.
Mark

Posted: Sat 21 Jun 2008, 02:24
by BarryK
That's great! I'm downloading it right now...

Posted: Sat 21 Jun 2008, 03:57
by Lobster
So you could not see the pictures.
wot no pics?
thanks Mark - will download again :)

linked here . . .
http://tmxxine.com/wik/wikka.php?wakka=FreeBasic

FreeBasic
F. A. B.

Posted: Sun 22 Jun 2008, 16:21
by Lobster
Mark - I am using it as a simple front end for pjsua (a VOIP app)

this is the buttons.rc part

Code: Select all

Puppy Sip VOIP
resource/voice-support.png
rxvt /usr/bin/pjsua &
Pjsip commands
resource/nis24.xpm
defaultbrowser http://www.opensourcesociety.org/2008/01/20/pjsip-command-line-voip-client-for-linux/ &
exit
resource/stock_exit.png
EXIT
this line should open rxvt and run pjsua . . . (a command line app)
rxvt /usr/bin/pjsua &
It don't :cry:
Any help appreciated ;)

Posted: Sun 22 Jun 2008, 16:24
by MU
rxvt -e /usr/bin/pjsua &

Mark

Posted: Sun 22 Jun 2008, 16:31
by Lobster
:oops:

works
so easy . . . I always forget - thanks for 3 minute response time . . .