Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 17 Jul 2019, 18:43
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Welcome 2 Beginners - GUI menu program
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15439
Location: Paradox Realm

PostPosted: Wed 30 Nov 2005, 07:31    Post subject:  Welcome 2 Beginners - GUI menu program  



This program has been updated and simplified to one file


This is a simple dotpup that creates a simple script text file
The program (that is the runnable text file) can easily be altered to suit your preferences

Below is the LATEST script file and after that how it works and below that is the dotpup

Code:

#!/bin/sh

# Lobster August Dec 2005 Puppy Welcome version 0.1.1
# License GPL
 
export WelcomePuppy="

<vbox>
   <vbox><pixmap><input file>/usr/local/lib/X11/mini-icons/mini-dog.xpm</input></pixmap></vbox>

<frame Offline>

 <hbox>
   <text>
    <label>Welcome</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-happy.xpm</input>
    <action>dillo http://www.zen45800.zen.co.uk/puppy3/index.htm &</action>
   </button>
  </hbox>

  <hbox>
   <text>
    <label>Wizards</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/wizard16.xpm</input>
    <action>/usr/sbin/wizardwizard &</action>
   </button>
  </hbox>

  <hbox>
   <text>
    <label>Help</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-question.xpm</input>
    <action>dillo /usr/share/doc/index.html &</action>
    <action>mozilla http://rhinoweb.us/ &</action>
   </button>
  </hbox>

  <hbox>
   <text>
    <label>Drives</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-fdisk.xpm</input>
    <action>/usr/sbin/mut &</action>
   </button>
  </hbox>

  <hbox>
   <text>
    <label>Paint</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-palette.xpm</input>
    <action>/usr/local/bin/mtpaint &</action>
   </button>
  </hbox>

  <hbox>
   <text>
    <label>Edit</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini.text.xpm</input>
    <action>/usr/local/bin/leafpad &</action>
   </button>
  </hbox>

  <hbox>
   <text>
    <label>Media</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-cdlabel.xpm</input>
    <action>/usr/local/bin/gxine &</action>
   </button>
  </hbox>

 <hbox>
   <text>
    <label>Volume</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-speaker.xpm</input>
    <action>/usr/local/bin/xtmix &</action>
   </button>
  </hbox>

</frame>

<frame Online>

  <hbox>
   <text>
    <label>Software</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-diskette.xpm</input>
    <action>dillo http://www.puppylinux.org/wikka/DotPups &</action>
    <action> /usr/sbin/pupget &</action>
   </button>
  </hbox>

    <hbox>
   <text>
    <label>Forum</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-dog.xpm</input>
    <action>mozilla http://www.murga.org/~puppy/ &</action>
   </button>
  </hbox>

  <hbox>
   <text>
    <label>Chat</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/chat16.xpm</input>
    <action>mozilla http://www.puppylinux.org/wikka/PuppyLinuxIRC &</action>
   </button>
  </hbox>

  <hbox>
   <text>
    <label>News</label>
   </text>
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-news.xpm</input>
    <action>mozilla http://www.puppylinux.org/wikka/LatestNews &</action>
   </button>
  </hbox>

</frame>

  <hbox>
   <button cancel></button>
  </hbox>

  <hbox>
    <text>
     <label>lobster@puppylinux.org</label>
    </text>
  </hbox>

</vbox>

"
gtkdialog --program WelcomePuppy

unset WelcomePuppy


This identifies to Puppy Linux that it is a runnable script
Code:
#!/bin/sh


everything after a # is a comment
Code:
# Lobster August, Nov 2005 Puppy Welcome version 0.0.9
# License GPL



Buttons are created with the gtkdialog widget (See Start / Puppy / Help) and populated by puppys own built in icon set
Programs are called in this instance Mozilla browser - a URL is loaded and the & activates the command

Code:
   <button>
    <input file>/usr/local/lib/X11/mini-icons/mini-dog.xpm</input>
    <action>mozilla http://www.murga.org/~puppy/ &</action>
   </button>


Tips: Cool
Linux is case sensitive
change <vbox> and </vbox> (first and last)
to <hbox> and </hbox> to have a horizontal menu bar
check out a modified version here
http://www.murga.org/~puppy/viewtopic.php?p=26182#26182

Update May 2007
A version of this code is used in my Puppy TV experiments
http://tmxxine.com/tv/
welcome.pup
Description 
pup

 Download 
Filename  welcome.pup 
Filesize  5.09 KB 
Downloaded  579 Time(s) 

_________________
Raspberry Pi 4 to run Puppi
NEW BusterPup Beta - test now

Last edited by Lobster on Sun 13 May 2007, 06:37; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
sunburnt


Joined: 08 Jun 2005
Posts: 5087
Location: Arizona, U.S.A.

PostPosted: Sun 04 Dec 2005, 01:54    Post subject:  

Lobster, any chance of the button bar being capable of translucency?
The code looks HTML, best part of HTML is it's easy to read & understand.
Is there a tutorial on the gtkdialog widget & Puppy's icon set, other than Puppy Help?
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13647
Location: Karlsruhe, Germany

PostPosted: Sun 04 Dec 2005, 02:12    Post subject:  

The source contains several examples:
http://gnu.digitaltrust.it/directory/devel/gtkdialog.html

In the scripts, you must replace "gtkdialog" with "gtkdialog2", as "gtkdialog" in Puppy is an older version for compatibility-reasons.

I wrote the Dotpupdownloader in PuppyBasic with Gtkdialog.
Short tutorial:
http://noforum.de/wxBasicscript-documentation/wxbasicscript/index.htm

Mark
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0429s ][ Queries: 13 (0.0091s) ][ GZIP on ]