GtkDialog - tips

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#421 Post by big_bass »

Download gtk-theme-switch2 from 3 posts above. You missed a attachment Smile


Sigmund

Thanks Sigmund

now its working :D



*about two years ago I was working on an image viewer using imagelib and urxvt
yours is much better and lighter you may get some more formats to view with this
lib http://www.afterstep.org/afterimage/

I made an image viewer using the using the terminal
http://www.murga-linux.com/puppy/viewtopic.php?t=31254

I was looking for a light way to do this
thanks for posting your code

Joe

ken geometrics
Posts: 76
Joined: Fri 23 Jan 2009, 14:59
Location: California

Re: GtkDialog - tips

#422 Post by ken geometrics »

zigbert wrote:GtkDialog
Patriot has released his Patriot-edition of the latest gtkdialog. - See chapter 'Gtkdialog - Patriot edition'.
What should I see if I say:
gtkdialog3 --version

I currently see
gtkdialog version 0.7.20 (C) 2004, 2005, 2006, 2007 by Laszlo Pere


I have found a handful of very serious bugs in it and want to be sure that I am using the latest version.

In the copy I have, the list_actions example does not work.

User avatar
Aitch
Posts: 6518
Joined: Wed 04 Apr 2007, 15:57
Location: Chatham, Kent, UK

#423 Post by Aitch »

Ken

From the gtkdialog website,

http://linux.pte.hu/~pipas/gtkdialog/

the version you have IS the latest, though it was posted in April 2007, and development seems to have stopped, though the dev's email is on the site
As I understand it Patriot has made some changes for Puppy users adding *buntu patches

http://www.murga-linux.com/puppy/viewto ... 081#355081

Aitch :)

ken geometrics
Posts: 76
Joined: Fri 23 Jan 2009, 14:59
Location: California

#424 Post by ken geometrics »

Aitch wrote:Ken

From the gtkdialog website,

http://linux.pte.hu/~pipas/gtkdialog/

the version you have IS the latest, though it was posted in April 2007, and development seems to have stopped, though the dev's email is on the site
As I understand it Patriot has made some changes for Puppy users adding *buntu patches

http://www.murga-linux.com/puppy/viewto ... 081#355081

Aitch :)
I think I must be running the Patriot version because I downloaded the pet for it and installed it.

Is there any interest in a less buggy version? I am trying to work up enough motivation to attack the problem.

The main bug I have found is that some valid descriptions involving the "<list>" construct do not display. They don't report an error but no dialog box comes up. The program hangs at that point until you ^C tp break out of it.

There are a few improvements that I am thinking of adding too.
One is to all things like this to work:

Code: Select all

<text>
<variable>TEXT</variable>
<input>SomeScript</input>
</text>
....somewhere else..
<action>refresh:TEXT</action>


If the <text> was an entry instead, the TEXT variable would get changed so the script could know what it generated last time.
As it is <text> seems to allow a <variable> but not ever update
its contents.

I figure this would be a matter to looking at how an entry did it and making the text one do the same.

One other change is to make the xalign="0" construct work for all widgets.

The other would be to make the parser generate a warning on unrecognized attributes. This would help to catch typos.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#425 Post by 8-bit »

I too would like to see the list option work right and have the same problem with it as you described.
But I am not enough of a programmer to troubleshoot it.
I do know that it fails even using the example in the gtkdialog3 examples.
So any help in improvements of gtkdialog3 would be most welcome.
The main thing is that a lot of scripts have been written for Puppy using it and any changes should be made so as to not break existing scripts.

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

#426 Post by technosaurus »

It is a new feature, not a bug... If I recall the previous method couldn't use items with spaces unless you used quotes and then it caused other problems.

VAR1="<combobox><variable>COMBO1</variable>"
for x in `ls ./*.pet`; do VAR1=$VAR1"<item>"$x"</item>"; done
VAR1=$VAR1"</combobox>"

this one will list all pets in the current directory

A similar method also works for checkbox and radiobox, except that you need to have a variable for each entry ... there is an example of this in bbgui (I posted it earlier in the thread)... it uses eval to set up a series of variable names from 1 to N and has templates for most input types.
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
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#427 Post by zigbert »

ken geometrics
Improvements of gtkdialog is very welcomed. :)
You find Patriots gtkdialog-source in the main post.


Sigmund

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

#428 Post by disciple »

ken geometrics wrote:Is there any interest in a less buggy version? I am trying to work up enough motivation to attack the problem.
Yes, any improvements to gtkdialog would be fantastic, as Puppy uses it so much :)
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:

#429 Post by zigbert »

This example especially shows 3 features of gtkdialog
- progressbars with fixed size
- right click menu
- change an icon in <tree> widget without re-render gui.

Updating icons in tree requires gtk-theme-switch (attached). This could replace gtk-chtheme with this
Image
Attachments
example.tar.gz
(3.39 KiB) Downloaded 593 times
gtk-theme-switch-i386.pet
(11.57 KiB) Downloaded 568 times

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

#430 Post by technosaurus »

Very Nice!
- I think a parted frontend has been on the back burner of many puppy devs for a while (myself include), just waiting for a starting point.
- great work, I can't wait to test it out.
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
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#431 Post by zigbert »

technosaurus wrote:Very Nice!
- I think a parted frontend has been on the back burner of many puppy devs for a while (myself include), just waiting for a starting point.
- great work, I can't wait to test it out.
Be aware!
This is not a frontend for parted. - Just a silly try to see if gtkdialog is capable to show a proper gui for a gparted-clone.


Sigmund

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

#432 Post by technosaurus »

It looks like you have succeeded in that - If you write the stubs for the functions your GUI needs, I'd be happy to help with writing them

Code: Select all

some_function() { #what you want it to do 
}
it could stay as inline documentation... but ...umm that would be backwards from almost every other open source project - writing the documentation first (or at all) - setting up an api and writing the code to achieve its goals - unheard of ... I must have momentarily stepped into an alternate dimension
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
abushcrafter
Posts: 1418
Joined: Fri 30 Oct 2009, 16:57
Location: England
Contact:

#433 Post by abushcrafter »

technosaurus wrote:it could stay as inline documentation... but ...umm that would be backwards from almost every other open source project - writing the documentation first (or at all) - setting up an api and writing the code to achieve its goals - unheard of ... I must have momentarily stepped into an alternate dimension
Sounds interesting...
[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
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#434 Post by zigbert »

technosaurus wrote:It looks like you have succeeded in that - If you write the stubs for the functions your GUI needs, I'd be happy to help with writing them

Code: Select all

some_function() { #what you want it to do 
}
it could stay as inline documentation... but ...umm that would be backwards from almost every other open source project - writing the documentation first (or at all) - setting up an api and writing the code to achieve its goals - unheard of ... I must have momentarily stepped into an alternate dimension
Thanks for the invite........here is the status
- Barry suggested that bacon might be a better alternative for such a gui. I f he or anyone intend to build it, I think that is a wonderful idea. His words just inspired me to check out how gtkdialog could handle such a task (with our knowledge today).
- I am in a hectic period at the moment..... things will slow down after Christmas. I hardly write command-lines these days.
- I don't know anything about parted nor partitions, so help would be required if we say 'go'.
- If you or anyone want to build further on the gui, it's yours.


Sigmund

PaulBx1
Posts: 2312
Joined: Sat 17 Jun 2006, 03:11
Location: Wyoming, USA

#435 Post by PaulBx1 »

As long as a <tree>, <table>, <list> or <edit> widget is enclosed ONLY by a <hbox> OR <vbox>, the widget will remain scalable both horizontally and vertically.
Zigbert, I must confess I have not read all 29 pages of this thread, but the above comment in your OP got my attention.

I have been looking at PPM, specifically the file /usr/local/petget/pkg_chooser.sh. If you run PPM, only the installed packages list is stretchable horizontally, and neither list is vertically. Yet it seems to conform to your condition above.

This has been bugging me because it makes PPM more difficult to use. When you can get a little time, if you could look at the code I'd appreciate it.

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

#436 Post by zigbert »

Paul

Some months ago, I sent Barry an example of a scalable ppm-gui. He did not respond, so it looks like you and me finds ppm more irritating than Barry :)
As long as a <tree>, <table>, <list> or <edit> widget is enclosed ONLY by a <hbox> OR <vbox>, the widget will remain scalable both horizontally and vertically.
This means the complete xml-code, - not only the specific widget.


Sigmund

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

link out of date

#437 Post by don570 »

Your link on first page
http://forum.goblinx.com.br/viewtopic.php?p=3418#3418
for goblinX forum is out of date.

__________________________________

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

Re: link out of date

#438 Post by zigbert »

don570 wrote:Your link on first page
http://forum.goblinx.com.br/viewtopic.php?p=3418#3418
for goblinX forum is out of date.
Have anyone seen a mirror of this?


Sigmund

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#439 Post by BarryK »

zigbert wrote:Paul

Some months ago, I sent Barry an example of a scalable ppm-gui. He did not respond, so it looks like you and me finds ppm more irritating than Barry :)
As long as a <tree>, <table>, <list> or <edit> widget is enclosed ONLY by a <hbox> OR <vbox>, the widget will remain scalable both horizontally and vertically.
This means the complete xml-code, - not only the specific widget.


Sigmund
Sigmund,
That must have fallen off my radar, I have no recollection of it. Was it a pm that you sent me? Could you send it again?
[url]https://bkhome.org/news/[/url]

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

#440 Post by zigbert »

Barry
I have only touched the gtkdialog code (I hope). In addition it writes a unique gtk-theme to show the category icons (the code is below the gtkdialog code). As the image shows, these icons are the same as the menu-icons.

Image

If anyone else want to try it you must replace the attached file with /usr/local/petget/pkg_chooser.sh. Remember to change the attribute to executable.

I grabbed the pkg_chooser.sh script from Luci 517, since I could not find the woof repo ?


Sigmund
Attachments
pkg_chooser.sh.gz
(4.57 KiB) Downloaded 867 times

Post Reply