GtkDialog - tips

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#451 Post by disciple »

Hi guys,
I just wanted to confirm: as far as we know it is not possible with gtkdialog to create a program which does something with text as you enter it into a text entry box. Is that correct?
Does anyone know of anything similar to gtkdialog (something that is used to build a gui for a shell script) that this is possible with?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#452 Post by big_bass »

removed answer solved
Last edited by big_bass on Sat 26 Mar 2011, 14:33, edited 1 time in total.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#453 Post by seaside »

disciple wrote:gtkdialog to create a program which does something with text as you enter it into a text entry box. Is that correct?
disciple,

You might use this coding-

Code: Select all

<action signal="key-press-event"> 
so that anything keyed into a text box would be tied to an action event every time a key was pressed.

Cheers,
s

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#454 Post by zigbert »

disciple,

You might use this coding-

Code: Select all

<action signal="key-press-event"> 
so that anything keyed into a text box would be tied to an action event every time a key was pressed.

Cheers,
s
Pmusic uses this technique to search while typing

Code: Select all

 <entry activates-default=\"true\" tooltip-text=\"$LOC406\" is-focus=\"true\">
  <variable>SEARCH</variable>
  <input>cat $WORKDIR/filebrowser_dir</input>
  <width>200</width><height>30</height>
  <action signal=\"key-release-event\">$APPDIR/func -search &</action>
 </entry>
You might miss a 'refresh' command, but this is done via a <progressbar>


Sigmund

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#455 Post by disciple »

disciple,

You might use this coding-

Code: Select all

<action signal="key-press-event"> 
so that anything keyed into a text box would be tied to an action event every time a key was pressed.

Cheers,
s
Pmusic uses this technique to search while typing
Yes, that's what I wanted. Thanks.

Code: Select all

 <entry activates-default=\"true\" tooltip-text=\"$LOC406\" is-focus=\"true\">
  <variable>SEARCH</variable>
  <input>cat $WORKDIR/filebrowser_dir</input>
  <width>200</width><height>30</height>
  <action signal=\"key-release-event\">$APPDIR/func -search &</action>
 </entry>
You might miss a 'refresh' command, but this is done via a <progressbar>
I don't quite understand what you're saying there. I guess if it affects me I'll notice it :)

Another thing:
Drag'n drop
>> Gtkdialog supports drag'n drop from filebrowser (rox) to <entry> widget.

Code: Select all

export test="
<entry accept=\"directory\" width-request=\"300\">
 <default>Drag a directory from Rox</default>
</entry>"
gtkdialog3 -p test
Again I don't think this is possible, but maybe I'm wrong: can we make it perform an action when something is dragged into the <entry> widget? (This is not essential for the program I want to make, but it would be nice :))
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

gtk-stock button images

#456 Post by mcewanw »

Does anyone know where to get a complete list of gtk-stock button image names for use in gtkdialog3? I once had a list but can't remember where I found it.

EDIT: Okay, the following list gave me what I wanted:

http://gtk.php.net/manual/en/gtk.enum.stockitems.php
github mcewanw

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

Re: gtk-stock button images

#457 Post by Dougal »

mcewanw wrote:Does anyone know where to get a complete list of gtk-stock button image names for use in gtkdialog3? I once had a list but can't remember where I found it.

EDIT: Okay, the following list gave me what I wanted:

http://gtk.php.net/manual/en/gtk.enum.stockitems.php
One of the gtkdialog example scripts also shows all of them.
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

Re: gtk-stock button images

#458 Post by technosaurus »

mcewanw wrote:Does anyone know where to get a complete list of gtk-stock button image names for use in gtkdialog3? I once had a list but can't remember where I found it.

EDIT: Okay, the following list gave me what I wanted:

http://gtk.php.net/manual/en/gtk.enum.stockitems.php
I posted a gtkdialog example that shows them with the name in a tooltip ... several pages back.
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

Re: GtkDialog - tips

#459 Post by Moose On The Loose »

zigbert wrote:GtkDialog
GtkDialog lets your bash script run in gui.
Here's some tips for learning more about gtkdialog.

This info is based on input from many people. I'm trying to throw it all together. Please share your knowledge.

Patriot has released his Patriot-edition of the latest gtkdialog. - See chapter 'Gtkdialog - Patriot edition'.
There is a silly little bug in the current version. I saw some indication that others may be working on an improved version so I figured I would tell anyone in that situation about it so that the correction can be in the next version.

gtkdialog won't take its input from stdin. The copy of main.c here shows where the error is. Search for "Moose:" to see the change.
Attachments
main.zip
(3.64 KiB) Downloaded 556 times

wiak
Posts: 2040
Joined: Tue 11 Dec 2007, 05:12
Location: not Bulgaria

Re: GtkDialog - tips

#460 Post by wiak »

zigbert wrote: 11.) Useful Puppy scripts - Others might have invented the wheel for you
--> Tailbox
--> Program chooser
--> Alternative browser widget
--> Audio player
--> Volume level
--> File finder
. . .
http://www.murga-linux.com/puppy/viewto ... 732#143732
zigbert wrote:Here is the collection of ziggys fresh meat.
A minimalistic way of coding and a tribute to bash and gtkdialog.
Do you want to learn more about gtkdialog, check this.
Thanks to russoodle for hosting my code

Sigmund Berglund
. . .

GtkDialog widgets
More info | Download | External menus (1 kb) Allow right-click menus in gtkdialog
More info | Download | Audio player (1 kb) Supports most common audioformats like mp3, ogg, wav, ...
More info | Download | Browser (1 kb) Alternative to the builtin browser widget
More info | Download | Tail box (1 kb) Gtkdialog misses a tailbox widget
More info | Download | Vertical slider (1 kb) Volume level
Sigmund, some of your tutorial example download links seem to be dead. Some, because puppyasia repository is now gone, but your Stardust resources page also has dead download links. For example, the following example code downloads, amongst others listed there, are not available:

gtkdialog_widget_browser.tar.gz
gtkdialog_widget_tailbox.tar.gz

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#461 Post by big_bass »

wiak

@zigbert
all those missing files are very small 1kb

so if someone has copies please post them in this thread
I will help out and up load any larger files to the server I am using (complements to Raffy)
if someone emails me them

Joe

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#462 Post by Geoffrey »

Hi everybody,
I was wondering if anyone had the code for the audio player that was at http://puppylinux.asia/tpp/zigbert/gtkd ... yer.tar.gz.

I've searched for it but no luck, I'm in need of some simple audio player code with all the controls for a project that I'm working on.

thanks.
Geoffrey

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#463 Post by zigbert »

I have uploaded the widgets to http://www.meownplanet.net, but I could not find the tail-box...... I made a new one based on the code in Pburn

Links in main post are updated

Sigmund

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#464 Post by zigbert »

Geoffrey wrote:Hi everybody,
I was wondering if anyone had the code for the audio player that was at http://puppylinux.asia/tpp/zigbert/gtkd ... yer.tar.gz.

I've searched for it but no luck, I'm in need of some simple audio player code with all the controls for a project that I'm working on.

thanks.
Geoffrey
audioplayer widget is available, but this is very old code, so you probably find more tricks if you look into /usr/local/pmusic/func_player


Sigmund

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#465 Post by thunor »

Hi

I use various emulators that don't include a GUI. In the past I developed a front-end + trainer for visualboyadvance-1.7.2 using REALbasic but I want to liberate my code from this proprietary language (good though it is) and create a universal emulator front-end instead.

I fiddled with Gtkdialog using the excellent information within this thread and started to assemble a prototype, but displaying a screenshot of the selected game/ROM is a requirement and pixmap doesn't refresh, so instead of ditching this wonderfully rapid RAD tool I downloaded gtkdialog-0.7.20 and added the pixmap refresh code.

[EDIT] 20110618-22:01 Gtkdialog is now in a repository (see this post).

Gtkdialog is a popular tool but the original developer appears to have abandoned it, so why doesn't somebody create a new Gtkdialog2 Sourceforge project, import gtkdialog-0.7.20 into SVN and invite everybody to add their patches? Additionally the project can include a wiki to properly document it; just a thought.

Regards,
Thunor
Last edited by thunor on Sat 18 Jun 2011, 20:49, edited 8 times in total.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#466 Post by disciple »

Yes, we should do that. But not sourceforge - it always seems to be slow and unreliable for me.
What does anyone else think?
I have a project on google code and I think it is faster and more reliable. But it is also rather stupid in some ways...
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#467 Post by abushcrafter »

disciple wrote:What does anyone else think?
http://savannah.gnu.org/
http://gna.org/
http://puszcza.gnu.org.ua/
[url=http://www.adobe.com/flashplatform/]adobe flash is rubbish![/url]
My Quote:"Humans are stupid, though some are clever but stupid." http://www.dependent.de/media/audio/mp3/System_Syn_Heres_to_You.zip http://www.systemsyn.com/

User avatar
thunor
Posts: 350
Joined: Thu 14 Oct 2010, 15:24
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings
Contact:

#468 Post by thunor »

http://en.wikipedia.org/wiki/Comparison_of_open_source_software_hosting_facilities

I looked at Google Project Hosting and it appears to tick the necessary boxes. It supports a wiki which would certainly make maintaining the documentation easier and more fun.

I sent the Gtkdialog author an email and he stated that he doesn't have time for the project anymore but would be happy for development to continue, so you can register "gtkdialog" as the project name :)

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#469 Post by disciple »

abushcrafter wrote:
disciple wrote:What does anyone else think?
http://savannah.gnu.org/
http://gna.org/
http://puszcza.gnu.org.ua/
Yes, but do you have any feedback on what they are like to use.

e.g. Sourceforge seems to be slow and unreliable (for me).

Google code is not... but they seem to lack attention to detail. There is a list of little bugs as long as your arm.
e.g. you can't save the "source" settings page without entering a path for branches (which IIRC means that your repository must already include the folder to enter the path to... but what if you don't want branches?), and if you don't save the "source" settings page then it displays the wrong url for users to checkout the code... and IIRC it doesn't even tell you that the page did not save, and why. Perhaps that is why projects often display the wrong url :roll:

Also, presumably people would be happy with svn, rather than something more advanced like Git? Personally I think svn will be fine, as I doubt there will be a huge amount of activity.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#470 Post by zigbert »

Wonderful !!!

My coding-fingers are trembling when hearing about dynamic pixmap rendering :D
I hope we get a pet with all patches.

The latest gtkdialog with patriots patches can be found here

- Moose On The Loose offered a fix here
- thunors very exiting patch is here


Barry's blog
http://bkhome.org/blog/?viewDetailed=01264
http://bkhome.org/blog/?viewDetailed=01279


Sigmund

Post Reply