Little projects for people who know how to code :)

A home for all kinds of Puppy related projects
Message
Author
User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

Little projects for people who know how to code :)

#1 Post by ttuuxxx »

Ok I was looking for a cursor selector viewer type app and came across a gnome one, well it had a few gnome deps and So I removed the main ones and it compiled, Basically its a C and glade based application,.
currently your able to view the cursors in usr/share/icons and select them, but the 'Install theme' and 'go to folder' button doesn't work and someone with some better C/glade understanding could probably fix the sources and we could have a nice cursor viewer/selector application.
It also would be nice to have it set the desktop background, because the 4 series background setter doesn't have a built in preview. and as this does have built in previewer it would make sense to use part of the code and make it a 2 purpose application.

Anyways this is the almost working application on 2.14X
http://murga-linux.com/puppy/viewtopic. ... h&id=20664
and this is the altered sources
http://murga-linux.com/puppy/viewtopic. ... h&id=20665
and here's a image of it almost working.
So if anyone wants a little project to get this working, here ya go :)
ttuuxxx

ps for it to work it should take a theme selected in usr/share/icons or in root/icons and copy and then rename the folder copied to default and restart jwm
Attachments
test.jpg
(22.07 KiB) Downloaded 1756 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#2 Post by ttuuxxx »

Here another application that could work better on puppy, Its call Cwallpaper.
Basically its a gtk2 wallpaper setter built in C and its almost works.
The part which has to be altered on it is that right now each wallpaper you have to list in /root/.config/cwallpaper/wallpapers
where it should just automatically look in usr/share/backgrounds and load all the wallpapers. and when you set the wallpaper it doesn't set, probably just needs to be configured for rox.
here's what it looks like on 2.14x, having a actual real-time preview in the main window is what we need in 4+ series, we used to have one in 3 series and but it was gtk1.2 and when we switched to gtk2 only we lost the built in preview option, this could bring it back :) The bin once compiled is only 14kb, now thats worth fixing :)
way smaller than the cursor selector above and doesn't use glade.
ttuuxxx
below is a screenshot and sources
Attachments
cwallpaper-0.3.tar.gz
(70.84 KiB) Downloaded 871 times
wall.jpg
(36.6 KiB) Downloaded 2940 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#3 Post by gposil »

I'll take the wallpaper setter ttuuxxx....back to you soon
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#4 Post by gposil »

Here's what we've got so far...
Attachments
pwallset-0.2.pet
Update with dir sort and bin stripping
(6.46 KiB) Downloaded 556 times
ss-pws.jpg
Screenshot
(44.72 KiB) Downloaded 1757 times
Last edited by gposil on Fri 07 Aug 2009, 08:16, edited 1 time in total.
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#5 Post by ttuuxxx »

cool gposil you have it automatically displaying the backgrounds :) on 2.14X now just the set function, and I see that you didn't strip the bin, when I strip it, it resorts back to the 14KB from 45kb so that's great no extra weight yet. :) By the looks of things its your little script that's doings the work for the list, nice, so you probably haven't altered the sources yet :) keep up the great work :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#6 Post by gposil »

I had to change the source, it uses the FluxBox background setter so I reset it to pupp's own /usr/local/apps/Wallpaper/set_bg and add writing to the pup bg files...still a little work to do but it should be very Puppy.
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#7 Post by ttuuxxx »

Yes it just needs to change the settings in /root/.config/rox.sourceforge.net/ROX-Filer/pb_Default
and then it should be great for 4&5 series
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#8 Post by gposil »

It already does that ttuuxxx... :D

BTW a little update with dir alpha sort and stripping...see above

The setting works already in 4 & 5, I don't have 2.14x so i'll have to have a look at what is different
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#9 Post by ttuuxxx »

it wasn't working on 2.14x because 2.14X uses the older but better than 4 series setter that did display thumbnails, So when I copied /usr/local/apps/Wallpaper from 4 series over to 2.14X it worked perfect, thats a great achievement for 4&5 series that I really hated about since 4 series was released. great to have it now :) below is what it used to look like in 2-3 series gtk1.2 version before they went to the newer non-preview one currently being used, this one you just fixed really will be a nice step forward :) thanks
I bet it will be default in dpup also :)
hmmm you might even want to bundle up the sources maybe and give it Rox-Filer developer to add to his page, I'm sure a lot of other Rox distros would like to have it also, just remember the missing /usr/local/apps/Wallpaper stuff, maybe that file could be thinned out if most of it isn't in use. or maybe your script could be place inside it :)
ttuuxxx
Attachments
wall-gtk1.2.jpg
(43.89 KiB) Downloaded 1671 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#10 Post by Lobster »

Mark (MU) created the earlier version I believe. Lately we had all sorts of options (edit in mtpaint and inkscape for example) but the most essential feature is the image previewer. Good to see its return.

Thanks Guys :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#11 Post by ttuuxxx »

Lobster wrote:Mark (MU) created the earlier version I believe. Lately we had all sorts of options (edit in mtpaint and inkscape for example) but the most essential feature is the image previewer. Good to see its return.

Thanks Guys :)
Yes it is Lobster and did you see the size of the pet 6.46 KB :) man thats good :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#12 Post by ttuuxxx »

Hi Gposil below is a repackage that has the needed files for 2&3 series to work, plus I changed the .desktop icon name only to the one that works with 2,3,4,5 series so everybody gets a icon now, and I moved the setter pwallset script to /usr/local/apps/Wallpaper/pwallset so it can be with the others. Actually the way its packaged its would work with 4&5 series also without the extras in /usr/local/apps/Wallpaper/pwallset, its a slimmed down version, the only thing not working is the stretch/tile feature on 2.14X it looks like it goes by the image size, like if the image can fit the background, it goes with that and if it can't then it tiles.
Anyways its a great start :)
ttuuxxx
Attachments
pwallset-0.2.1.pet
(12.27 KiB) Downloaded 520 times
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#13 Post by gposil »

ttuuxxx,

Does 2 & 3 have /root/.config/wallpaper/backgroundmode file, if it does let me know and i'll fix the stretch/tile option in a jiffy...

Cheers
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#14 Post by gposil »

Ok...here's version 1.0 with all the bugs for 4 & 5 ironed out, could you test it now ttuuxxx and see if the tiling and centre work in Puppy 2 & 3. If they do, it's a done deal unless you want any other changes.... :D

Cheers
Guy
Attachments
pws-v1.jpg
Screenshot
(45.6 KiB) Downloaded 1617 times
pwallset-1.0.pet
Latest Version 1.0
(12.48 KiB) Downloaded 565 times
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#15 Post by ttuuxxx »

Sorry I didn't answer sooner, I'm at a all day church conference from 9am-9:30PM, I came home for my 3hr supper break :)
Yes It now works perfect on 2.14X :) great Job, and hats off to you gposil, very good work :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#16 Post by ttuuxxx »

Hi gposil Barry mentioned in his blog that he altered the current one to fit widescreen monitors, did you read his response? I don't have a widescreen just 2x 19" Square LCD, I like square Lcd's over widescreens :) so its perfect for my desktops but here's the thread where he started changes for widescreen. http://www.puppylinux.com/blog/?viewDetailed=00864
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#17 Post by gposil »

I'm using a 19" widescreen and it works perfectly...well looks fine to me... :?
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

User avatar
trio
Posts: 2076
Joined: Sun 21 Dec 2008, 15:50
Location: अनà¥￾मोदना

#18 Post by trio »

Gposil,

4 points if I may:

1. /usr/local/apps/Walpaper/set_bg :

from

Code: Select all

if [ "$1" = "-clear" ];then
  IMAGE=""
fi

MODE="`cat $HOME/.config/wallpaper/backgroundmode`"
[ "$MODE" = "" ] && MODE="Stretch"
[ "$MODE" = "Centred" ] && MODE="Centre"
[ "$MODE" = "Scaled" ] && MODE="Scale"
to this:

Code: Select all

if [ "$1" = "-clear" ];then
  IMAGE=""
fi

MODE="`cat $HOME/.config/wallpaper/backgroundmode`"
[ "$MODE" = "" ] && MODE="Scale"
[ "$MODE" = "Centred" ] && MODE="Centre"
[ "$MODE" = "Scaled" ] && MODE="Scale"

#w482 BK now have script that truncates an image vertically so that it has the right dimensions
#for a widescreen...
if [ "$MODE" = "Stretch" ];then
 /usr/sbin/background_reshape ${1}
fi
to be compatible with 430

Edit: aah, yours doesn't have the strech option, so the tweak may no be necessary

2. Not to list all the ORIGINAL-xxx.jpg produced by background_reshape
3. can you list the images not with full path?
4. Current wallpaper text

Thanks

User avatar
gposil
Posts: 1300
Joined: Mon 06 Apr 2009, 10:00
Location: Stanthorpe (The Granite Belt), QLD, Australia
Contact:

#19 Post by gposil »

Trio,

1.) I don't get the problem with widescreen or the need to use the background_reshape script, I have 2 widescreens, 19" an 22" and works fine without it...

2.) No reshaping, so no need to worry about files produced.

3.) Yes, I will change wallpaper list to not include path.

4.) Yes, will rewrite code to show current background on startup.

Hope that helps.
[img]http://gposil.netne.net/images/tlp80.gif[/img] [url=http://www.dpup.org][b]Dpup Home[/b][/url]

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#20 Post by ttuuxxx »

Hi gposil I was thinking maybe a "Open Folder" button to open the wall the wallpaper folder up in rox? So like a 3 in the row button
"Apply" "Open Folder" "Cancel".
Its just an idea, makes add/delete wallpapers easier :)
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

Post Reply