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 Thu 17 Apr 2014, 11:47
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
pUPnGO - 6Mb ISO - Basic Building Block Puplet
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 39 of 58 [868 Posts]   Goto page: Previous 1, 2, 3, ..., 37, 38, 39, 40, 41, ..., 56, 57, 58 Next
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4133

PostPosted: Mon 30 Jan 2012, 03:52    Post subject:  

I reduced the sizes of some of the danpei xpm icons a bit (enough to save ~20kb in the compiled binary size)

which reminded me - I redid a bunch of the icons for the other gtk apps (png format)
... uploading both

I may as well describe what I did to shrink them

open with mtpaint
Image -> convert to rgb
Image -> convert to indexed
check Min Max Quantize and Floyd Steinberg
change the number at the top to 92 (maybe 93?) or less
save as whatever (works for at least xpm and png, possibly others)

(use your best judgement based on the image - lower number of colors reduces size some, but may end up looking like trash if it gets too low - most small icon pixmaps look ok at 16 colors)

this works because reducing the number of colors below 93 causes the pixels to be represented by a single character ... effectively cutting the size in half (not including the reduction for each color ... ~16B ea. I think)

Note: I have had issues with some versions of mtpaint with this method especially if you do further manipulations of the pallette - it will sometime lose a clear background and need to be edited in a text editor.
pixmaps.tar.gz
Description 
gz

 Download 
Filename  pixmaps.tar.gz 
Filesize  15.11 KB 
Downloaded  151 Time(s) 
danpei_icons.tar.gz
Description 
gz

 Download 
Filename  danpei_icons.tar.gz 
Filesize  9.28 KB 
Downloaded  148 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
wjaguar

Joined: 21 Jun 2006
Posts: 212

PostPosted: Mon 30 Jan 2012, 04:28    Post subject:  

technosaurus wrote:
this works because reducing the number of colors below 93 causes the pixels to be represented by a single character ... effectively cutting the size in half

With mtPaint, it is 64 colors or less.

Quote:
Note: I have had issues with some versions of mtpaint with this method especially if you do further manipulations of the pallette - it will sometime lose a clear background and need to be edited in a text editor.

mtPaint doesn't even try to preserve transparent color when quantizing. It's best to set transparent color's palette slot to some wildly different RGB color (say magenta or green) before converting to RGB - and set transparent index to that palette color (whichever one it is now) after converting back to indexed.
All appearance of transparency being preserved is from when transparent color is at once the most prevalent and at index 0 - then max-min algorithm will place it at index 0 again.
Back to top
View user's profile Send private message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Mon 30 Jan 2012, 09:27    Post subject:  

Hi guys
Something else which may be useful, that I recently stumbled upon - underdog, that used to be in 2 series puppies, and Barry has now brought back

Basically, it is a script which allows a linux partitition to be added to the lower layer, and brought to the top layer so puppy can access it

I stumbled upon info about underdog, dated back to 2006, before I got into using puppy, and Barry picked up on it
He gave a really useful link to a 'How puppy works' page, which I hadn't seen referenced before, also, which people may find useful, bearing in mind, that changes have been made

The underdog bit: In the section on Architecture overview,

Quote:
What the above diagram is intended to convey is that the bottom layer is a partition, not the "underdog.lnx" file itself. File underdog.lnx is just a text file, containing the name of a partition, for example "hda1".
At bootup Puppy will read underdog.lnx and will mount the partition as the bottom layer. If that partition happens to have a Linux distro installed in it, then the entire distro filesystem will "show through" on the top layer of Puppy's unionfs.

It will look like a normal Puppy, running JWM window manager or whatever, same desktop, but everything in the underlying distro is available to be executed. All the applications, compile environment, package manager, etc.


The actual underdog code, as used in early Puppy versions is shown in the Initial ramdisk section, where the code is listed for anyone wanting to try it,
[though the usual caveats apply...don't blame me if you break something]

http://www.murga-linux.com/puppy/viewtopic.php?t=13750

http://puppylinux.com/development/howpuppyworks.html

http://www.murga-linux.com/puppy/viewtopic.php?t=13750

Aitch Smile
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Thu 02 Feb 2012, 15:36    Post subject:  

Attached the first try to backport gktdialog to gtk1. Do not expect everything working but main things should. Included a test-script (gtk_button) demonstrating what seems to work. Only xpm-images supported, edit-widget works but do not catch content yet. Shipped as static build and with images for the "stock"-icons.
If you need the present source code or if you would like to help improving the things further pm me.
snap0000.png
 Description   And the thing running the test script...
 Filesize   68.81 KB
 Viewed   1054 Time(s)

snap0000.png

gtkdialog-0.58.11-static-first-try.tar.gz
Description  static build gtkdialog (gtk1) first try
gz

 Download 
Filename  gtkdialog-0.58.11-static-first-try.tar.gz 
Filesize  370.31 KB 
Downloaded  150 Time(s) 
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4133

PostPosted: Thu 02 Feb 2012, 21:18    Post subject:  

goingnuts wrote:
Attached the first try to backport gktdialog to gtk1.
Excellent! I can work with that.

NOTE: it is extremely faster to use
Code:
echo "$MAIN_DIALOG"|gtkdialog -s

Thunor has corrected this to some extent in gtkdialog4 but here is an example that shows the difference (beginnings of a tar frontend)
Code:
#!/bin/sh
MAIN_DIALOG='<wtitle>Test of backported gtkdialog 0.58.11</wtitle>
<vbox>
<table><variable>TABLE</variable>
   <label>File Name          |Size   |Date</label>
'`busybox tar -tvf $1 | busybox awk '{print "<item>" $6 "|" $3 "|" $4 "</item>"}'`'
   <action>echo You selected $TABLE</action>
</table>
<hbox>
   <button ok></button>
   <button cancel></button>
</hbox>
</vbox>'
echo "$MAIN_DIALOG"|gtkdialog -s
#now see with VAR
export MAIN_DIALOG
gtkdialog --program MAIN_DIALOG


we get gdk warnings for the xpms, but a fix is suggested here:
http://mail.gnome.org/archives/gtk-list/1999-August/msg00270.html
... but maybe we can just ifdef warnings from the sources altogether

should we call it gtkdlg1 (or whatever) to avoid name conflicts in case others want to use it?

I got some weird characters at the beginning of usage, but other than that, seems to be working nicely.

to handle the messages etc... this template should work

Code:
gtkdialog --program MAIN | while read LINE || [ "$LINE" ] ; do
case "$LINE" in
#custom parameters here
  *=*)eval $LINE
  *)echo "$LINE"
esac
done


Edit more notes: it doesn't try to use pixmap path (I wondered why you specified the full paths)
this and others can be set in the gtkrc file (I am attaching the full gtk1 tutorial since it is hard to find these days) which has this in section 21
Quote:
When your application starts, you should include a call to:

void gtk_rc_parse( char *filename );
GTK-1.2-tutorial.tar.gz
Description 
gz

 Download 
Filename  GTK-1.2-tutorial.tar.gz 
Filesize  151.14 KB 
Downloaded  157 Time(s) 

_________________
Web Programming - Pet Packaging 100 & 101

Last edited by technosaurus on Fri 03 Feb 2012, 01:06; edited 2 times in total
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Fri 03 Feb 2012, 00:58    Post subject:  

I have started a new thread for the gtkdlg1 backport...here
Back to top
View user's profile Send private message Visit poster's website 
antiloquax


Joined: 27 Jan 2012
Posts: 405

PostPosted: Fri 10 Feb 2012, 04:26    Post subject:  

This may be a stupid question, sorry.
I can boot into PupNGo. I've loaded the GUI sfs. But what command do I issue to start the GUI?
I've had a look using defaultfilemanager, but couldn't see anything that worked!
thanks,
mark

_________________
My System:Arch-Arm on RPi!
"RacyPy" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
RaspberryPy: Lobster and I blog about the RPi.
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Fri 10 Feb 2012, 14:51    Post subject:  

Try "xwin" - depending on which version you use - but if you loaded the GUI-sfs via the firstboot script I guess it states
"If you have just installed the GUI_412.sfs type 'xwin' to start the graphical user interface" .. or something like that.
If it is one of the very first versions it might be 'startx'...
Hope you succeed.
Back to top
View user's profile Send private message Visit poster's website 
antiloquax


Joined: 27 Jan 2012
Posts: 405

PostPosted: Fri 10 Feb 2012, 15:58    Post subject:  

Many thanks! I must have missed that message ... Embarassed
_________________
My System:Arch-Arm on RPi!
"RacyPy" puplet on Toshiba Tecra 8200. PIII, 256 MB RAM.
RaspberryPy: Lobster and I blog about the RPi.
Back to top
View user's profile Send private message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Tue 21 Feb 2012, 16:09    Post subject:  

goingnuts/techno

I just came across a window manager called awesome

Any use for this project? it uses C and Lua, AFAIK

http://awesome.naquadah.org/

Aitch Smile
Back to top
View user's profile Send private message 
goingnuts

Joined: 07 Dec 2008
Posts: 777

PostPosted: Thu 23 Feb 2012, 14:48    Post subject:  

Aitch wrote:
goingnuts/techno

I just came across a window manager called awesome

Any use for this project? it uses C and Lua, AFAIK

http://awesome.naquadah.org/

Aitch Smile

Thanks for the link - I will look into that. atm I am full time on gtkdlg1...
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4133

PostPosted: Thu 23 Feb 2012, 19:10    Post subject:  

I wouldn't bother
Quote:
128 pkg_check_modules(AWESOME_COMMON_REQUIRED REQUIRED
129 xcb>=1.6)
130
131 pkg_check_modules(AWESOME_REQUIRED REQUIRED
132 glib-2.0
133 cairo
134 x11
135 oocairo
136 oopango
137 xcb-randr
138 xcb-xtest
139 xcb-xinerama
140 xcb-util>=0.3.8
141 xcb-keysyms>=0.3.4
142 xcb-icccm>=0.3.8
143 xcb-image>=0.3.0
144 cairo-xcb
145 libstartup-notification-1.0>=0.10
146 xproto>=7.0.15
147 imlib2
148 libxdg-basedir>=1.0.0)

with dependencies like that we may as well use compiz and lots of plugins

e16 would be a much nicer (smaller/simpler) choice, it uses its own eesh instead of lua and it has a more permissive license, a lot of the tools will work with gtk1 and I even found a hack to do desktop icons with it ... best of all it can look really nice with the right themes
though it will need to be patched for static builds because it uses dlopen to try and grab calls to libX11 (doesn't seem too complicated though)

...until someone makes "fpwm" that is ... a window manager in the style of a first person shooter (i've been mulling it over for a while)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Thu 23 Feb 2012, 19:46    Post subject:  

Quote:
a window manager in the style of a first person shooter


sounds neat

thanks for checking the other wm - shame about that

Aitch Smile
Back to top
View user's profile Send private message 
Keef


Joined: 20 Dec 2007
Posts: 562
Location: Staffordshire

PostPosted: Fri 24 Feb 2012, 19:38    Post subject: Another window manager...  

I found this one on Giles Orr's window manager site:
AHWM
It hasn't been touched in 10 years, but has a lot of documentation, and only relies on xlib, libc and some POSIX functions, Does not rely on any toolkit libraries.
It compiles ok, but had to make the minor alterations that Giles Orr mentions in his notes.
It is ancient, I know, but may be useful.
I'll upload the pet I made if anyone wants a dabble (best if I tested it a bit more first...)
Back to top
View user's profile Send private message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Sat 25 Feb 2012, 12:47    Post subject:  

Wow, Giles Orr's site is amazing, hadn't seen that before....

AHWM looks interesting, Keef Very Happy

I'd never considered focus to be broken, though it may have changed since 2002?
I'm just used to windows auto focus if on top, and backgrounded windows being in bottom taskbar, unless clicked in - maybe just habits?

Aitch Smile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 39 of 58 [868 Posts]   Goto page: Previous 1, 2, 3, ..., 37, 38, 39, 40, 41, ..., 56, 57, 58 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
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.0912s ][ Queries: 12 (0.0117s) ][ GZIP on ]