The time now is Sun 19 May 2013, 02:35
All times are UTC - 4 |
|
Page 10 of 35 [514 Posts] |
Goto page: Previous 1, 2, 3, ..., 8, 9, 10, 11, 12, ..., 33, 34, 35 Next |
| Author |
Message |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Sat 02 May 2009, 09:52 Post subject:
|
|
Whist MU astounds us with real programs
I am attempting to use Valide in Jaunty Pup with the devxx
First of all Valide is now more stable - hooray
I had to go back to basics
Valide seems to be changing
tabs to two indents (this is the default mode, which I will stick with
BUT can be changed in Edit / Preferences from the latest Valide)
Valide is much improved
So I place this on top of programs
and made sure I finished with a tab on a blank line
| Code: | [indent=2]
init
// return a random value from 1 to 9
a:int
a = GLib.Random.int_range(1,10)
print("%d" , a)
|
OK that works
. . . to be continued . . .
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sat 02 May 2009, 13:17 Post subject:
|
|
I attach a next step.
This is a tree, that displays the folders on your computer, and the files in them.
This is far from being finished, but basically works.
I just upload it for people, who might need to look up the one or other command in the code.
The filebrowsing is not yet placed in the treeview class, so the main.gs looks prettty complex, you also could say "messy".
So do not use it as a template for an own program yet.
The trees now are attached to a project.glade, that also includes the 3 buttons.
Mark
| Description |
|
| Filesize |
39.26 KB |
| Viewed |
1077 Time(s) |

|
_________________ my recommended links
Last edited by MU on Sun 03 May 2009, 07:30; edited 4 times in total
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sat 02 May 2009, 13:54 Post subject:
|
|
Lobster,
yes, you can setup in "edit - preferences" the "Tab width".
If you prefer 4 , you can set it there.
I also use this setting now, as the code then is better readable.
Mark
_________________ my recommended links
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sat 02 May 2009, 17:58 Post subject:
|
|
I updated the filebrowser to v0.2, it now sorts the folders and files alphabetiically.
Mark
_________________ my recommended links
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sat 02 May 2009, 20:11 Post subject:
|
|
I have not cleaned up the classes yet, but it was challenging, to add some lines, that turn the filebrowser into a usable application.
So now it is a small pictureviewer
http://www.murga-linux.com/puppy/viewtopic.php?p=301381#301381
I updated the source to v0.3.
Mark
_________________ my recommended links
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sat 02 May 2009, 21:16 Post subject:
|
|
Since vala shares a lot of syntax with C#, maybe these projects that use gtk# would be a good source of "inspiration"
Banshee (http://banshee-project.org/Main_Page) <-replace pmusic,
Beagle (http://beagle-project.org/Main_Page) <-replace pfind
F-spot (http://f-spot.org/Main_Page)
MonoDevelop (http://www.monodevelop.com/Main_Page)
Tomboy (http://www.gnome.org/projects/tomboy)
or maybe even some of the ones here
http://csharp-source.net/
(btw thanks for pointing me to http://mono-project.com/GtkSharp_TreeView_Tutorial)
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sun 03 May 2009, 07:29 Post subject:
|
|
I have completely restructured the pictureviewer.
main.gs is very short again.
You now have additional files like libglade.gs or filebrowser.gs.
They help to keep the code readable.
The tree related filebrowsing methods are now part of the treeclass.
So you do not have to mess around in that code, you simply just use the methods.
The class manages everything automatically.
Just for additional actions, filebrowser.gs is available.
Here you can for example explicitly force to update the file-list in the second tree, when a folder in the first tree was clicked.
I added several comments, so I hope, it is easy to use.
I might add more comments in future, and want to add more methods.
But in the urrent state, it is already a full working template for your own, file tree based programs.
Mark
| Description |
|

Download |
| Filename |
TreeView-Genie-Complex-Dirbrowser04.tar.gz |
| Filesize |
51.76 KB |
| Downloaded |
255 Time(s) |
_________________ my recommended links
Last edited by MU on Sun 03 May 2009, 10:58; edited 2 times in total
|
|
Back to top
|
|
 |
ttuuxxx

Joined: 05 May 2007 Posts: 10720 Location: Ontario Canada,Sydney Australia
|
Posted: Sun 03 May 2009, 08:57 Post subject:
|
|
Have you ever tried to compile Beagle? I have and it gets way blown out of size due to deps, Terrible program, I tried two+ weeks ago when I wanted a Pfind replacement, It looked nice and had great reports, but the size was the downfall, So then I tried Search Monkey and that was perfect 117kb pet and a perfect replacement with better features than Pfind and easy to configure.
Banshee is also nice but uses gstreamer, another large program, BMP is the best replacement for Pmusic thats made with 'C' and its uses winamp2 skins, its about 1/6 the size of banshee and also uses some xmms plugins also. I think the last time I compiled it on 4 series I had it down to 300kb pet.
The only way that banshee could ever make it in with gstreamer, is if we dropped gxine/xinelib for a gstreamer based mediaplayer. Then that could workout to be around the same size.
Good ideas just a bit too large for default puppy.
Hmmmm whats were we talking about here ???
sorry didn't mean to take you off topic.
ttuuxxx
_________________ http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games

|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sun 03 May 2009, 18:37 Post subject:
|
|
| Code: | # valac hello.gs
error: Failed to execute child process "pkg-config" (No such file or directory)
error: Failed to execute child process "pkg-config" (No such file or directory)
error: Failed to execute child process "pkg-config" (No such file or directory)
Compilation failed: 3 error(s), 0 warning(s)
|
Genie noob here This is the error I get when I try to compile "Hello World". Also a file is created called "hello.c", which seems perfectly useless!
What am I doing wrong??? (or what am I missing?)
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sun 03 May 2009, 19:05 Post subject:
|
|
you need devx_420.sfs, that has the compiler and pkgconfig.
------------------------------
I attach a new sourcepackage of the treeview.
It now is renamed to "Picturebrowser-0.2" to allow correct versioning with the Picturebrowser binary pet.
I added more methods to access the trees, you can look up how to use them in the example actions in filebrowser.gs.
Mark
| Description |
|

Download |
| Filename |
Picturebrowser-0.2.tar.gz |
| Filesize |
35.65 KB |
| Downloaded |
239 Time(s) |
_________________ my recommended links
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sun 03 May 2009, 19:16 Post subject:
|
|
strange then
I am running spup from woof I built... devx is loaded. I'll see if I can compile something else ... maybe my devx is broken
Yes... devx seems broken.. I'll try in 412
_________________ keep the faith .. 
Last edited by 01micko on Sun 03 May 2009, 20:02; edited 1 time in total
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Sun 03 May 2009, 19:44 Post subject:
|
|
please type:
gcc
you should see:
gcc: no input files.
If you do not see it, devx is not loaded.
If you see it, you need pkg-config, this would mean it is missing for whatever reason.
I attach it, extract it in /usr/local/bin/.
Mark
| Description |
|

Download |
| Filename |
pkg-config.tar.gz |
| Filesize |
30 KB |
| Downloaded |
227 Time(s) |
_________________ my recommended links
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sun 03 May 2009, 20:14 Post subject:
|
|
Nah good. My devx is definitely broken. It says it is loaded on boot mgr, but the gcc command fails. In 412 now will install valide and load devx and try again!
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sun 03 May 2009, 21:25 Post subject:
|
|
Oooh.. I like the power! Nice. Working fine now. I was able to compile BK's examples... they look nice!
Bit sad that my spup devx is busted but that might be fixed by woof beta.
Thanks for your help Mark.
EDIT: My spup devx is fixed now! (it is my OS of choice ATM..fast)
_________________ keep the faith .. 
Last edited by 01micko on Tue 05 May 2009, 16:09; edited 1 time in total
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Mon 04 May 2009, 14:04 Post subject:
|
|
Picturebrowser 0.3.
A PET is available in the other thread:
http://www.murga-linux.com/puppy/viewtopic.php?t=41919
Here now is the source, it includes a Binary for Windows, and libglade.dll and libxml.dll.
To run it in Windows:
Install:
http://valide.googlecode.com/files/vala-0.7.1.exe
It includes the required Gtk for Windows files.
Then unzip my archive somewhere, and click on Picturebrowser.exe.
To compile, you also had to extract this:
http://dotpups.de/puppy4/dotpups/Programming/Vala/Vala-for-Windows/libglade-libxml-comdialog32.zip
in: C:\vala-0.7.1
The refinements contain some new methods, and a general cleanup, so it is not only from advantage for windows.
In Windows, the new "autoscaling" is disabled (to fit the picture when you resize the window), because the threads do not work as expected (a known issue).
Update: Pet removed, see next messages for updated version.
Mark
| Description |
|
| Filesize |
80.95 KB |
| Viewed |
953 Time(s) |

|
_________________ my recommended links
Last edited by MU on Tue 05 May 2009, 17:30; edited 1 time in total
|
|
Back to top
|
|
 |
|
|
Page 10 of 35 [514 Posts] |
Goto page: Previous 1, 2, 3, ..., 8, 9, 10, 11, 12, ..., 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
|