Page 6 of 11

Posted: Tue 27 Mar 2012, 16:36
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

Posted: Tue 27 Mar 2012, 16:52
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.

Posted: Tue 27 Mar 2012, 17:23
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.

Posted: Tue 27 Mar 2012, 17:41
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.

Posted: Tue 27 Mar 2012, 18:00
by jpeps
gotcha....thanks

Posted: Tue 27 Mar 2012, 21:12
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?

Posted: Tue 27 Mar 2012, 21:34
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:

Posted: Tue 27 Mar 2012, 21:38
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.

Posted: Tue 27 Mar 2012, 22:56
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.

Posted: Tue 27 Mar 2012, 23:59
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.

Posted: Wed 28 Mar 2012, 01:44
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)

Posted: Wed 28 Mar 2012, 04:12
by jpeps

Posted: Wed 28 Mar 2012, 05:18
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...

Posted: Wed 28 Mar 2012, 11:07
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...

Posted: Wed 28 Mar 2012, 14:32
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...

Posted: Wed 28 Mar 2012, 15:51
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.

Posted: Thu 29 Mar 2012, 07:36
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...

Posted: Tue 03 Apr 2012, 18:43
by goingnuts
20120403: New release: GtkDialog1-1.1 uploaded

Posted: Sun 22 Apr 2012, 20:04
by goingnuts
A small application using gtkdialog1 - collection of system information and tools.

Posted: Sun 22 Apr 2012, 21:34
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)