Genie Picturebrowser 0.6 (also shows PDF files)

Stuff that has yet to be sorted into a category.
Post Reply
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

Genie Picturebrowser 0.6 (also shows PDF files)

#1 Post by MU »

This is a small demo of a Filebrowser written in Genie.
You have 3 "areas", on the left a tree with your folders, in the middle a filelist, and on the right a picture view.

You can change the width of each area with the horizontal dragbars, like this you can hide for example the folders.

It supports the most important graficsformat, and PDF documents.
PDFs can be shown in grafics mode, or as simple text (using leafpad).

The pictures are scaled to the size of the view when you open them, so if you maximize the window, you will see them very large.

Using the buttons, you can open the shown picture in external programs, e.g. to edit or to print them.

It was compiled in Puppy 4.12.

Info concerning the programming of this example:
http://www.murga-linux.com/puppy/viewto ... &start=135

A special version with support to drop pictures from websites is available, too:
http://www.murga-linux.com/puppy/viewto ... 769#302769
*update* these features now are also part of Picturebrowser (0.6).

Mark
Attachments
Picturebrowser-0.6.pet
(48.25 KiB) Downloaded 654 times
picturebrowser05.jpg
(58.2 KiB) Downloaded 1701 times
Last edited by MU on Mon 18 May 2009, 15:19, edited 13 times in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#2 Post by 01micko »

Mark

This is very nice! A testament to the power of Genie. I must learn to use it, since it is the future of Puppy

Thanks
Puppy Linux Blog - contact me for access

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

#3 Post by Lobster »

Micko

The best intro to Genie available is from Barry
http://www.puppylinux.com/genie/
Looking at Marks first code for this yesterday (which I could understand sufficiently to think about hacking) :shock:
http://www.murga-linux.com/puppy/viewto ... 198#301198
I thought this cries out for different auto file viewings
- calling other programs as necessary
A few hours later and Mark is already going that way . . .
Barry too has passed the programming barrier and is now thinking in Genie code.

Meanwhile I am able to report that adding the devxx
for Jaunty Pup (an Alpha build of Puppy 5) allows for a very workable Valide to appear in the Puppy menu

Many thanks to Mark :)
Good luck to Micko 8)
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:

#4 Post by ttuuxxx »

Hey mark excellent start on it :) looks great
Anyway of turning it into a background selector/setter :)
I really do miss seeing the a thumbnail of the background before setting it.
Anyways excellent stuff
ttuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#5 Post by MU »

The best way to get started learning the tree, is this example:
http://www.murga-linux.com/puppy/viewto ... 046#301046

It is pretty short and simple to use.
It has no filebrowsing included.
You can create the tree using some methods from my "treeclass".
So a program can be written with a few lines.

You could for example create a small configuration tool, like this:

+ network
--- firewall
--- connection
+ Desktop
--- wallpaper
--- widgets
--- themes

Each entry would get an own icon.
Once a selection was clicked, you could display in a second pane on the right a short infotext, and a button, to launch the related utility, like the networkwizard.

Such a thing would be possible without very much effort using that example.

The code for the picturebrowser looks more complex, because reading folders and sorting them uses a lot of code.
So I must "hide" (move) this new code into the tree.gs file.
Then your own program, main.gs, can be short again.
I already have some ideas for enhancing the pictureviewer, but before I start it, I need to clean up the classes.
I just found a way to make the treebrowser quicker, it needs only 2 lines in addition :lol:
The released version is a bit slow, if you open /usr/.
I'll release a new version next week.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#6 Post by amigo »

Is this Picturebrowser-0.1, Mark?

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#7 Post by MU »

yes, the next will have a versionnumber.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#8 Post by 01micko »

Thanks Mark and Lobster for the links.

I'm still a learner with bash, but I think learning more and digressing is the key for me. :)

Cheers
Puppy Linux Blog - contact me for access

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#9 Post by MU »

I uploaded version 0.2.

Changes:
- faster navigation in the tree.

- fast navigation in picturelists: click with the mouse on the picture, to see the next one. Use the right mousebutton, to see the previous.

- autoscaling. If you check the "scale" checkbox, pictures are scaled. Autoscaling scales also, if you resize the window. I hope this also works on slower computers. If not, I must add a checkbox to deactivate autoscaling.

- support for bookmarks of the standard Gtk Filechoosers (you cannot edit them, so use the "file open" dialog of leafpad or so to add/remove bookmarks).

- by default, /usr/share/backgrounds/ is opened. This required a lot of complicated code, to expand the tree automatically.

- you also can pass a folder as argument, like:
/usr/local/Picturebrowser/Picturebrowser /mnt/home/photos

- the titlebars of the trees no longer scroll up.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#10 Post by MU »

Uploaded version 0.3.
It has no visible changes, just the internal code was cleaned up and refined.
This version is also available for Windows:
http://www.murga-linux.com/puppy/viewto ... 041#302041

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#11 Post by MU »

uploaded version 0.5.

changes:

- The program no longer uses "Threads" to scale a picture, but a method based on Gdk.Pixbuf.
This works faster, needs less resources (14% cpu-usage instead of 42%), and works in Linux and Windows.

- bookmarks now also work with special characters in the filenames.

- rotate left/right

- zoom 100 to 1000% (you must uncheck the "scale" checkbox to activate it)

- fullscreen mode

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#12 Post by 01micko »

Hehe, now we only need a "Set as Wallpaper" button.... but I've a feeling you are leading up to that!
Puppy Linux Blog - contact me for access

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#13 Post by MU »

micko,

quick workaround:
if you do not have gqview installed, create a script "/usr/bin/gqview".

Code: Select all

#!/bin/bash

/usr/local/apps/Wallpaper/set_bg "$@" &
Then Puppys wallpapersetter is executed with the current picture, if you click on the gqview button.
I also plan to add a button, but want to check, how it behaves in different puplets.
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#14 Post by dejan555 »

can you bind some keyboard keys to change next/previous picture, so you don't have to click on every image, this would be handy for fullscreen too...
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#15 Post by 01micko »

MU wrote:....
I also plan to add a button, but want to check, how it behaves in different puplets.
Mark
Barry's "spup" (built from woof alpha 3.1) it works fine :wink:
Puppy Linux Blog - contact me for access

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#16 Post by MU »

Uploaded version 0.6

Changes:
- now based on the "pictureviewer" class, so it supports PDF documents and has other advantages, like drag'n'drop from the Webbrowser or a filemanager.

- fixed a *masive* memory leak. It was so critical, that I removed the 0.5 pet.

- added support for keyboard navigation.

- added support to pass a filename as commandline argument. The tree will automatically expand to the folder, where the fiile is located, and display it.

- only supported files are shown in the filelist (pictures or PDF).

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#17 Post by dejan555 »

This is great Mark, just few reccomendations:

Shortcut for fullscreen is Alt+F but for leaving fullscreen Alt+L, why not making Alt+F both?
What about looping filelist, e.g. when you reach last picture it reads again from top?
Also I had few images downloaded from web with %20 character in name (I guess converted spaces) that are shown in filelist but it desn't show them in viewer, I guess filename is the cause.

Works good, my vote for default image viewer in next puppy release :)
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#18 Post by MU »

ok, I will have a look in one to two weeks.
I'll finish my C# course on Friday, until then I have no time.
Afterwards, I will try to add your suggestions, and enhance PuppyBrowser, and write a Genie examplebrowser for programmers :)

Thanks for your suggestions :D
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#19 Post by MU »

oops, 0.6 had a small bug, so files could not be passed as commandline arguments.
I uploaded a fixed 0.6 now.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

Dromeno
Posts: 534
Joined: Fri 12 Sep 2008, 07:01

Thumbnail option

#20 Post by Dromeno »

Nice that it also works with PDF's. Is it possible to add a "view as thumnails" option too? Sometimes it is very handy to do that with PDFs and there is no file manage that I am aware of which shows files other than image files as thumbnails.

Post Reply