The time now is Mon 23 Apr 2018, 02:14
All times are UTC - 4 |
Page 11 of 35 [517 Posts] |
Goto page: Previous 1, 2, 3, ..., 9, 10, 11, 12, 13, ..., 33, 34, 35 Next |
Author |
Message |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Tue 05 May 2009, 11:11 Post subject:
|
|
I attach picturebrowser v0.4.
Massive internal changes.
The whole treeclass was cleaned up, and is easier to use.
I think it now has reached the "final" structure, so the method names will not change in future.
I just might add some more, or enhance some. what might require more parameters.
Old code:
Code: | treeclass1 = new treeclass()
treeclass1.mode = "filebrowser"
mytree1 = treeclass1.treeview()
treeclass1.column.set_title("Folders")
get_scrolledwindow("scrolledwindow1" ).add (mytree1)
var iter = treeclass2.get_first_iter(mytree2)
if treeclass2.store.iter_is_valid(iter)
treeclass2.select_iter(treeclass2, iter)
tree2_row_click() |
New code:
Code: | tree1 = new treeclass()
tree1.mode = "filebrowser"
tree1.init()
tree1.column.set_title("Folders")
var sw1 = (ScrolledWindow)get_widget("scrolledwindow1")
sw1.add(tree1.tree)
tree2.select_first_item()
tree2_row_click() |
Please note, that also the libglade.gs changed.
old:
Code: | get_scrolledwindow("scrolledwindow1" ).add (mytree1) |
This used a method, that had to be defined "by hand", like this:
Code: | //-- HELPER method: this method returns a SCROLLEDWINDOW ! --
def get_scrolledwindow(name : string) : ScrolledWindow
b : Gtk.ScrolledWindow*
var w = xml.get_widget(name)
b = (ScrolledWindow) w
return b
|
This is no longer needed!
You only need these 2 lines:
Code: | var sw1 = (ScrolledWindow) get_widget("scrolledwindow1")
sw1.add(tree1.tree) |
I think this is one of the enhancements in Vala 0.7.1, if I remember well, it did not work in 0.5.7, so I had written those helper methods.
The Windows binary is included again.
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.
And bookmarks now also work with special characters in the filenames.
A PET for Puppy 4.12 follows later.
Mark
_________________ my recommended links
Last edited by MU on Tue 05 May 2009, 16:18; edited 1 time in total
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Tue 05 May 2009, 16:16 Post subject:
|
|
version 0.5, see:
http://www.murga-linux.com/puppy/viewtopic.php?p=302432#302432
Mark
_________________ my recommended links
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Wed 06 May 2009, 18:06 Post subject:
|
|
I seperated the code to display the pictures in a own class now.
So it can easily embedded in own programs.
The class even manages to download pictures, that are dropped on the viewer (it uses wget).
I attach the source of a seperate small example application, that is described here:
http://www.murga-linux.com/puppy/viewtopic.php?p=302769#302769
As no tree is included, this example is extremely short
The source for the picturebrowser is not adapted yet.
Mark
Description |
|

Download |
Filename |
Class-Pictureview-0.1b.zip |
Filesize |
44.15 KB |
Downloaded |
647 Time(s) |
_________________ my recommended links
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Thu 07 May 2009, 03:45 Post subject:
|
|
there was a bug in the load_picture() method in the pictureview class.
There 3 methods were called with a leading "picview.", so it did not work, if your instance of the class had a different name.
Uploaded 0.1b.
Mark
_________________ my recommended links
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Thu 07 May 2009, 15:08 Post subject:
|
|
I updated the pictureviewer class, it can display PDF files now.
On Windows, you also need:
http://dotpups.de/puppy4/dotpups/Programming/Vala/Vala-for-Windows/Class-Pictureview-0.2-Windowslibs.zip
http://dotpups.de/puppy4/dotpups/Programming/Vala/Vala-for-Windows/readme-Class-Pictureview-0.2-Windowslibs.txt
Mark
Description |
|

Download |
Filename |
Class-Pictureview-0.2.zip |
Filesize |
48.82 KB |
Downloaded |
579 Time(s) |
_________________ my recommended links
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Fri 08 May 2009, 11:39 Post subject:
|
|
new update, see:
http://www.murga-linux.com/puppy/viewtopic.php?p=303348#303348
Windows binary included again, see previous messages for dependencies on Windows.
Mark
Description |
|

Download |
Filename |
Class-Pictureview-0.3.zip |
Filesize |
54.19 KB |
Downloaded |
609 Time(s) |
_________________ my recommended links
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Thu 14 May 2009, 21:57 Post subject:
|
|
here is a small interface for Mplayer.
The GIT version no longer supports an own grafical interface as far as I see.
So I hacked together this simple "playbar" , it allows to pause or switch fullscreen.
The cursor keys work too, to jump forward/backward.
In jwm, the playbar is covered in fullscreen mode, hit "f" to turn of fullscreen again.
The playbar has no fileselector, so you must pass a movie as commandline argument, or add the "genie-mplayer" script with full path as run-action to rox-filer (set the correct path in that script, too).
In the current state, it is not really recommended for average users, I just post it as small coding example.
Compiled in Puppy 412.
Mark
Description |
|

Download |
Filename |
GenieMplayer-0.2.tar.gz |
Filesize |
17.09 KB |
Downloaded |
612 Time(s) |
Description |
|
Filesize |
32.96 KB |
Viewed |
1355 Time(s) |

|
_________________ my recommended links
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Fri 15 May 2009, 04:33 Post subject:
|
|
the Genie mplayer did not compile in Puppy 4.12, I added some changes, so now it works.
Mark
_________________ my recommended links
|
Back to top
|
|
 |
caleb72
Joined: 15 May 2009 Posts: 57
|
Posted: Fri 15 May 2009, 08:49 Post subject:
|
|
Can anyone play here?
I like developing in Python (Windows refugee) and am wondering if I should have a go at Genie.
I'm very fond of the Python syntax and style which makes me think Genie is the more logical choice for me rather than Vala for example.
I can't really find a huge amount of info - Barry's page with the examples is about all. Just wondering how to go about diving into Genie.
Regards
Caleb
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15238 Location: Paradox Realm
|
Posted: Fri 15 May 2009, 11:17 Post subject:
|
|
Quote: | am wondering if I should have a go at Genie |
Yes. This thread and Barrys page is about all there is in Genie (it is very new)
Valide and Genie are part of the devx for the latest Woof alphas.
Marks examples (go through this thread) and my paltry efforts are a good place to begin.
Genie is faster (being compiled) than Python and works on both Windows and Linux, creating standalone efficient code.
Mark is very supportive and Barry will be providing more work in the future
Be a Pioneer Puppy
_________________ YinYana AI Buddhism
Last edited by Lobster on Fri 15 May 2009, 22:04; edited 1 time in total
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Fri 15 May 2009, 11:30 Post subject:
|
|
there are not many Genie examples.
But once you wrote some small programs, using our examples as template, you will find a meanwhile quite huge collection of other examples: those from Vala.
A genie program has a simpler syntax.
So it is pretty easy, to "translate" vala code to genie.
This is especially valid for Gtk based examples.
Both languages use external libraries, and their call are almost identical.
Vala
Code: | if ( a == 10){
window.set_title("test");
} |
Genie:
Code: | if a is 10
window.set_title("test") |
So translating parts of code basically means to remove some "{ }" , some ";" and rename some keywords ("is" instead of "==").
I currently collect small examples, and will upload them in 3 weeks or so, after I cleaned them up.
It will be a collection of those posted in this thread, and maybe some simple others.
They can be browsed using a treeview, and you then can run them, or open them in the Vala-Ide.
But first I need to clean them, as especially my first Glade examples were too complicated, they can be simplified like the last ones.
Mark
_________________ my recommended links
|
Back to top
|
|
 |
caleb72
Joined: 15 May 2009 Posts: 57
|
Posted: Fri 15 May 2009, 19:09 Post subject:
|
|
Good to know.
I will try to jump in when I can.
I'm currently swamped with Perl coding commitments for work - but I'll keep an eye on this for personal programming projects.
Great to see it can compile to Windows executable as well if the need arrives. With a windows executable will there be any dependencies or are they all built into the binary?
Regards
Caleb
|
Back to top
|
|
 |
gpnet
Joined: 09 May 2009 Posts: 56 Location: Ivrea ,Italy
|
Posted: Sat 16 May 2009, 10:29 Post subject:
|
|
Hi to all , Guys
I need help.
I have puppy 4.20 and devx_420.sfs installed.
I usually program in win c# and I would like to try vala in puppy. So I have download these packages from a deb repository:
valac_0.7.2-1_i386.deb
libvala0_0.7.2-1_i386.deb
vala-utils_0.3.4-1_i386.deb
libcairo2_1.4.14-1_i386.deb
.. because I wanted to try the last version with last fixed bugs.
.. converted to pet and installed
and gtksourceview-2.0.2-i486.pet from this thread
and valide-0.4-1-i686-svn-2009-03-27.pet from this site : http://dotpups.de/puppy4/dotpups/Programming/Vala/
Next step i compile by hand the hello.vala pgm example, and all gone well
so i tried to create a new project in valaide and I have got these errors:
1. when I try to create a new project :
valide_project_manager_copy_template: assertion `path != NULL' failed
2. so i create a project by hand copying from glade1.vide in this thread and than open the project and tried to compile. but I have got this error:
PCRE library is compiled without UTF8 properties support.
Coul any one help me to understand what's wrog !
thanks
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13648 Location: Karlsruhe, Germany
|
Posted: Sat 16 May 2009, 18:00 Post subject:
|
|
gpnet,
Please use this gtksourceview, the other one works erratic:
http://dotpups.de/puppy4/dotpups/Programming/Vala/gtksourceview-2.4.2.pet
I also attach the pcre-libraries I use in newyearspup.
Maybe those work for you.
Caleb,
no, the libs are not built into the binary.
There are 2 ways to deliver them:
1.) the user installs vala, a 10 MB download.
2.) you add the required libs in the same folder, where your binary is located.
I made a 5 MB (12 MB extracted) example package including required Wiindows libs:
http://www.murga-linux.com/puppy/viewtopic.php?t=40193
It is a pet, so easy to install, then it can be run with Wine.
Mark
Description |
|

Download |
Filename |
libpcre.tar.gz |
Filesize |
161.09 KB |
Downloaded |
606 Time(s) |
_________________ my recommended links
|
Back to top
|
|
 |
gpnet
Joined: 09 May 2009 Posts: 56 Location: Ivrea ,Italy
|
Posted: Sat 16 May 2009, 18:36 Post subject:
|
|
Hi Mu,
Thanks for replay,
No, I can't use the gtksourceview 2.4.2 with valaide because if I do that (i tried ) I lost syntax Highlight ( almost in vala ). So I had to come back to previous version.
Thank you for the pcre libraries , I presume I have to replace the older one?
And what about the creation of a new project :assertion `path != NULL' failed
have you any suggestion?.
Also I notice that to work with vala / glade would be necessary the 3.6.x version because with this version you can save the xml UI in proper way for Gtk.Builder("xxxxx");
Have you any news about a new release or could I install it from deb packages ?.
Tanks a lot.
|
Back to top
|
|
 |
|
Page 11 of 35 [517 Posts] |
Goto page: Previous 1, 2, 3, ..., 9, 10, 11, 12, 13, ..., 33, 34, 35 Next |
|
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
|