gtkdialog1-1.4

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#106 Post by jpeps »

Required configuring --with-gtk=2.0 (since 2.0 uses a different configuration system re glib-config). I installed to a /tmp folder and tried it out.

Code: Select all

/tmp/gtkdialog1-1.0/usr/local/bin/gtkdialog1: unrecognized option '-G'
Probably DESTDIR didn't get all the needed files ?

edit: Oh....I see...still testing....

Seems like I'd have to rewrite all the scripts to even test it out. No geometry,
etc.,etc.,

Code: Select all

Error in line 2, near token 'window title=': syntax error

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#107 Post by goingnuts »

jpeps: Thanks for testing! Its puppy gktdialog2...

Geometry is supported - use "-g" - ex.:

Code: Select all

-g +400+200
Maybe try the examples to get an idea of what is running?

I will add that to the printout of gtkdialog1 --help in next update.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#108 Post by jpeps »

gtkdialog geometry requires -G to run.

next:

Code: Select all

Error in line 2, near token 'window icon-name=': syntax error
Removed icon-name, then

Code: Select all

Error in line 2, near token '<window>': Unknown tag.
removed <window> blocks, then

Code: Select all

Error in line 24, near token 'fs-action=': syntax error
I was more interested in how it works with the present scripts.

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

#109 Post by amigo »

You will no doubt find many, many things that do not work if trying it with recent gtkdialog(3) or gtkdialog(4) scripts. gtkdialog3 (thats from 0.7.0 to 0.7.20 adds a few widgets and subtly uses extra attributes which are not supported by this version. gtkdialog4 (thunor's work) adds widgets *by the dozens*. We will porbably never catch up with that, although we are planning to backport fetures adn fixes from the 0.7.x series, at least.

The point of this tool is to be able to use the same scripts with either the gtk1 or gtk2 toolkit -without needing to make any changes to the scripts. Probably only the earliest puppy gtkdialog scripts will work unchanged with this tool as it is now. As goingnuts said, see the included examples to see what should be working -there is lots of room for improvement in the examples and documents which we are working on.

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#110 Post by jpeps »

gotcha....thanks

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

#111 Post by disciple »

goingnuts wrote:disciple: Thanks for pointing at gwhere - seems to be a gently modded fileselect - but without trees and icons.
What is that thing on the left hand side then? http://www.gwhere.org/screenshots/screenshot02.png
Am I misunderstanding something?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#112 Post by goingnuts »

disciple: No - I am. I thought you meant the fileselect - thanks for pointing that out! I will look again - just haven't fully understood the purpose of gwhere (or did not find documentation that could enlighten me) :oops:
Attachments
snap0009.png
(58.12 KiB) Downloaded 592 times

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

#113 Post by disciple »

Gwhere is basically for cataloging the contents of removable disks. Put a disk in and mount it then run Gwhere and use the "Management" tab to add the disk to the catalogue.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

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

#114 Post by technosaurus »

As we progress toward gtkdialog4, we should have a todo list for each unsupported tag and its associated properties. The previously mentioned <window title="..." etc...> can be fixed with a sed script to be <wtitle>...</wtitle>... Other tags could be added and ignored similar to amigo's comment tag ... In fact printf tag:property to stderr could be the default for unrecognized tags. Does someone have a list of unsupported tags/properties BTW?

@goingnuts - any thought on a swallow example that would turn rxvt into mrxvt+ using notebook tabs.
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].

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#115 Post by jpeps »

technosaurus wrote: @goingnuts - any thought on a swallow example that would turn rxvt into mrxvt+ using notebook tabs.
note on mrxvt...it's great, as long as you have a script to keep closing out orphaned processes.

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

#116 Post by technosaurus »

jpeps wrote:note on mrxvt...it's great, as long as you have a script to keep closing out orphaned processes.
yes, mrxvt has a few annoying bugs like that - thus my interest in swallowing rxvt/urxvt/xvt/st instead... it may be worth it to instead make a standalone gtk enhanced version of tabbed ... though I would like to implement geany-like close buttons into the notebook tabs - that has been missing in gtkdialog afaik. If I could just wedge a flat button in with the label, all it would need is a callback with a widget_hide (I may do some experimenting with minimum profit text editor, to see if I could add it there as a practice excercise first)
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].

jpeps
Posts: 3179
Joined: Sat 31 May 2008, 19:00

#117 Post by jpeps »


goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#118 Post by goingnuts »

technosaurus wrote:As we progress toward gtkdialog4, we should have a todo list for each unsupported tag and its associated properties. The previously mentioned <window title="..." etc...> can be fixed with a sed script to be <wtitle>...</wtitle>... Other tags could be added and ignored similar to amigo's comment tag ... In fact printf tag:property to stderr could be the default for unrecognized tags. Does someone have a list of unsupported tags/properties BTW?

@goingnuts - any thought on a swallow example that would turn rxvt into mrxvt+ using notebook tabs.
I have no list but it would be handy to have...I have tried to add lexer rules from 0.7.20 to gtkdialog1 rules but until now without success.

The present swallow-widget is very dependent on the window name and it seems that a lot of programs alter the window name so it does not reflect the program name. rxvt only have one window with a name it seems - several instances of rxvt seems to be children with no name.

If the swallow widget should make it into gtkdialog1 I think it should be recoded to act on a windowID which the gtkdialog-script is responsible for finding (could be via xwininfo or other apps able of identifying windowID). That would also eliminate the problem of parsing window-names containing spaces...
I still lack to prove that it actually can be part of the GUI in gtkdialog1 as it is a standalone pop-up atm.

A second thought: The steal-socket depends on the client window being present to work - this might give initial windows flowing around before they are captured. So if the swallow widget could be responsible for both launching and stealing the client program...and we could the use the socket-plug/unplug gtk-mechanism (just like the gvim) in gtkdialog1..then the swallow-widget could stay as a standalone program...

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

#119 Post by amigo »

I'm sticking to some low-hanging fruit I see.

0.7.20 only implements 3 new tags as far as I can see. They are <separator>, <progressbar> and <window>
Just this morning I've back-ported the separator tag from 0.7.20. It's just for use as a menuitem though. So, I implemented an hseparator and vseparator which can be used between vbox/hbox/frame tags.
For the separator tag, I did it the 'cheap' way by 'downgrading' from the GTK2-only 'gtk_separator_menu_item_new' to the dual-use
'gtk_hseparator_new', although and ifdef could be used there to
preserve the original GTK2 call if it maes a difference.

We've talked about the progressbar before, and I agree it is low-priority. The <window> tag is a little more involved because of the attributes allowed. But it should be easy to back-port that too, rather than try to sed-out stuff rom later scripts.

I'm pretty sure there are other usage cases in modern gtkdiaog scripts which cause problems under gtk1 -similar to what was happening with the 'max-length' attribute when invoking an 'entry' widget -the gtk1 version of GtkEntry doesn't recognize the option.

Anyway, there are a few other things that can be backported, like the integration of the gtklauncher in to the main program. There are some items in the TODO list already -some GTK1 implementations are still incomplete...

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#120 Post by goingnuts »

The 'max-length' in entry is supported in gtk1 - forgot to tell you...
Cool with the additions! Just tested some of the examples from 0.7.20: A great deal of the syntax is accepted by gtkdialog1 but might not be supported though.
How to coordinate? I have a few modifications lying around too and if we start making syntax from 0.7.20 acceptable (but maybe not responsive), we need to keep things updated...

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

#121 Post by amigo »

goingnuts wrote:The 'max-length' in entry is supported in gtk1 - forgot to tell you...
Cool with the additions! Just tested some of the examples from 0.7.20: A great deal of the syntax is accepted by gtkdialog1 but might not be supported though.
How to coordinate? I have a few modifications lying around too and if we start making syntax from 0.7.20 acceptable (but maybe not responsive), we need to keep things updated...
I know that max-length is now supported. What I meant was that there are other gtk widgets, where the official gtk2 version accepts some attributes/arguments (like 'max-length' in GtkEntry), which are not supported by the official gtk1 widget.

I was having a go at the <window> tag, but I think the tag_attr stuff needs to be reworked to the new scheme to support the new window attributes (like 'center' and the new window-naming syntax), There's two new files tag_attributes.c/h and new syntax is used throughout for all widgets which use tag attributes (s.widgets, Widget_Type stuff) -it's a bit beyond me. I think the tag_attr stuff should be translated first, because there are also new attributes and signals supported by several widgets (see note in ChangeLog for 0.7.1). I'll PM you a copy of the diff with the changes as far as I got.

Also, there is the rest of the pip_malloc stuff which should be fixed - I think I can handle that -it's all in the diff from 0.59.8-to-0.7.4.

If you have any small changes that are already done, create patches of each one (or all together, if you must) and send them to me. I'll merge them with mine into a new interim working version. The sooner they get merged the easier. I think the window tag/attributes is pretty important for having later syntax work. As I said, most of the later syntax changes are not new tags, but new actions, attributes and signals which are mostly handled as part/options of existing tags.

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#122 Post by goingnuts »

Maybe easyer to use lexer.l and parser.y from 0.7.20 and fix what might be missing? I think 0.7.20 accepts most 0.59.8 syntax...
I revised the "gtk_image_menu_item_new_from_stock" gtk1-wrapper to show stockicons - still mis code to capitalize first letter of the label though...
Attachments
menu_img.png
(60 KiB) Downloaded 840 times

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#123 Post by goingnuts »

20120403: New release: GtkDialog1-1.1 uploaded

goingnuts
Posts: 932
Joined: Sun 07 Dec 2008, 13:33
Contact:

#124 Post by goingnuts »

A small application using gtkdialog1 - collection of system information and tools.
Attachments
snap0002.png
stats-0.1 in the gtk1 version
(23.07 KiB) Downloaded 790 times
stats-0.1.pet
System information tool using gtkdialog1
(5.97 KiB) Downloaded 521 times

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

#125 Post by technosaurus »

I put together a Wary pet (the only listed dependency is libgdk_pixbuf - which it is as long as there is a sane dependency base, but there is not - so I have a gtk-all package that works on wary)
Attachments
GtkDialog1-1.1-i486.pet
(36.44 KiB) Downloaded 478 times
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].

Post Reply