GtkDialog - tips

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#521 Post by zigbert »

Hello thunor
It is amazing to see that you are improving the gtkdialog source.
I want to share some thoughts for further improvements.
I don't want to nag about new widgets or heavy new features.
I don't want to focus on 'the look' - like widget-placement, scaling, alignment....
I see it as more important to improve some weak functions. I think some of these thoughts could be easy to add, and give great new developer tools.

1.)
Today gtkdialog supports drag'n drop as explained in my main post.
To build drag'n drop support between <tree> widgets, they must be set to <tree hover-selection="true">. Most common, and most flexible is to use a normal selection mode. The reason why normal selection doesn't support drag'n drop is because <action signal="button-press-event"> is executed before item is selected. If it was the other way around, drag'n drop would be possible.

2.)
Would it be hard to add a right-click-menu:
- First we need the fix mentioned above.
- The <menu> widget must be loadable without a <menubar>.
- Now we could launch a new gui with a <menu> if user right-clicks.
- The launched gui must use <window decorated="false" skip_taskbar_hint="true" window_position="2">.
- This will work, though the window_position=2 (at mouse position) places the mouse-pointer in the middle of the gui, rather than up-left which is normal.

3.)
Click on <table> header doesn't sort.

4.)
I prefer the <tree> widget over the <table> widget because of more options. But it is one thing that <table> does much better than <tree>; rendering of huge lists.
While a gui including a <tree> must load it's content before the gui shows up, a gui with a <table> shows up at once, and _then_ starts rendering the content of the list. If this is possible for the <tree> widget, I see no reason for not doing so.

5.)
Icons in the <tree> widget is working very well as long as these are defined as
<item stock=gtk-open>coloumn1|coloumn2</item>
I wonder if it would be possible to add this feature for an <input file>. With your pixmap-refresh-improvement, I see huge possibilities if icons in <tree> could be refreshed the same way. This requires to work with <input file>, because <items> are statically loaded before gui execution, and can't be refreshed.

6.)
I see on the new gtkdialog homepage that slider widget is on your todo list. Hopefully this includes the possibility to refresh its status, so the slider can move (without user interaction) to show new status in case it has changed.

7.)
I don't know gtk or C, but I find it strange that the existing <menu> widget doesn't support submenus. Not VERY important, but as gtdialog becomes better, we use it for more complex tasks, and then this feature becomes handy.


Best wishes
Sigmund

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

#522 Post by 8-bit »

One thing I am a little concerned about is that Puppy was using gtkdialog3.
And all your scripts show using gtkdialog, which was the starting one and went from it to gtkdialog2 and finally 3.
I realize I can create syslinks for gtkdialog using other version names.
The reason for the syslinks is so existing gtkdialog scripts used in Puppy will still work.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#523 Post by sc0ttman »

zigbert wrote:Hello thunor
It is amazing to see that you are improving the gtkdialog source.
...
I don't want to nag about new widgets or heavy new features.
I would like to see a very high priority put into making backwards compatibility 100% stable..

For example, the IPConfig tool breaks (in Wary, I think) when the new gtkdialog is used, apparently..

I must say, I am not going to try influence this project at all,
as I am not knowledgeable enough about GTKdialog, GTK widgets, etc, etc,...

And Sorry if this is the wrong place to post.. but..

I have heard lots of people prefer Yad to GTK-Dialog..

One reason is that is has mutliple select boxes..
Not sure of any other reasons.. But it got me thinking..

Maybe we could identify (important) things in Yad that are missing in GTKdialog.

Just a thought... I don't know enough to take the thought further - but users on this forum are now creating more and more Yad GUIs, especially Stu90, Vovchik - maybe they could weight in and say what is missing from GTK-Dialog, and why they chose Yad (or even BaCon)..

I'm sure no one would mind if thunor PM'ed a few people with such questions..
And if no one wants to do that, I would be happy to.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

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

#524 Post by zigbert »

sc0ttman
What is wrong with using yad, bacon or xdialog?

regarding backwards compatibility, what is the problem with fixing the xml code in IPConfig or other. The big deal about gtkdialog (as I see it) is that
- it is EXTREMELY easy to set up a gui. Probably much easier than refining the gtkdialog source code to be backward comapatible.
- Using bash, the code is very transparent for the community. When a user got trouble with ie. Pburn, I can ask her/him to change line 245 in /usr/local/pburn/func to ...


Sigmund

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#525 Post by smokey01 »

Hi Thunor, another simple thing that i find annoying is the inability to just press the enter key when entering data. Clicking the OK button works but pressing the enter key is more intuitive.

I'm not suggesting removing the OK button, rather implement the Enter Key = OK button.

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

#526 Post by zigbert »

smokey01
This is already supported

Code: Select all

#!/bin/sh

export ok_box='
<window>
 <vbox> 
  <text><label>press _enter_ to activate OK-button</label></text>
  <hbox>
   <button can-default="true" has-default="true" use-stock="true">
    <input file icon="gtk-ok"></input>
    <label>Ok</label>
   </button>
  </hbox>
 </vbox>
</window>'
gtkdialog3 -p ok_box

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#527 Post by smokey01 »

Thanks Zigbert. I have been trying to find that for ages.

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#528 Post by sc0ttman »

zigbert wrote:sc0ttman
What is wrong with using yad, bacon or xdialog?
Nothing, I wasn't saying people should avoid them - I love Xdialog.. Yad is nice too.. Haven't tried bacon, but I bet it's also nice.. But, for example, Yad requires a fairly new GTK, so GTK Dialog will work on systems where Yad does not..

I just think maybe we could ask others, who prefer Yad, what they think is missing in GTK-Dialog ...
Just a suggestion.
zigbert wrote:regarding backwards compatibility, what is the problem with fixing the xml code in IPConfig or other. The big deal about gtkdialog (as I see it) is that
Would just be nice if all the existing scripts we have in Puppy (many of which are no longer maintained by anyone in particular) still work as they are, that's all.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

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

#529 Post by zigbert »

smokey01 wrote:Thanks Zigbert. I have been trying to find that for ages.
I have added the tip to the main post

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

#530 Post by zigbert »

sc0ttman
Don't get me wrong, I see nothing bad in either extended features or backward compatibility...... But I see thunor in a vulnerable position. He will likely get bombed with requests of new heavy tasks. I think we should motivate and help him instead of asking him to save the world.

I see it often when I ask for help/suggestions that the replies is; 'I would like to see this/that feature'...... instead of actually help out. I don't say that the suggester should implement the feature, but if he really investigated the issue, he probably could be of great help with his new knowledge. Most often, I get a link to a web-page, and the user might think he helped out....... I don't know?


Sigmund

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

#531 Post by 8-bit »

In my case, beside looking at Zigbert's GTKDialog - tips, I assumed and still do to an extent that I can learn of some of the possible additions by examining the GTK and GTK+ source code.

Am I wrong there?

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

#532 Post by thunor »

zigbert, I'll get back to you on your list in the future :)
8-bit wrote:One thing I am a little concerned about is that Puppy was using gtkdialog3.
And all your scripts show using gtkdialog, which was the starting one and went from it to gtkdialog2 and finally 3.
I realize I can create syslinks for gtkdialog using other version names.
The reason for the syslinks is so existing gtkdialog scripts used in Puppy will still work.
I've placed and will place a note atop examples about the version required and how to deal with the possibility of a "gtkdialog" name conflict on Puppy Linux :) Other than that, the binary renaming on Puppy doesn't involve me.
sc0ttman wrote:I would like to see a very high priority put into making backwards compatibility 100% stable..

For example, the IPConfig tool breaks (in Wary, I think) when the new gtkdialog is used, apparently..
...
I have heard lots of people prefer Yad to GTK-Dialog..

...but users on this forum are now creating more and more Yad GUIs...
I'm not aware that I have broken anything. I haven't replaced code, I've added code to support new functionality. I agree that backwards compatibility is important, but equally so is maintaining applications.

I can't comment on "IPConfig" as I'm using lupu-520 and I don't have it (or can't find it). Feel free to use the issue tracking system if you think it's a problem with gtkdialog[-0.7.21 SVN].

I don't want to take over the world! :P Folk can use whatever dev-tools they like.

Regards,
Thunor

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#533 Post by 01micko »

thunor wrote: I've placed and will place a note atop examples about the version required and how to deal with the possibility of a "gtkdialog" name conflict on Puppy Linux :) Other than that, the binary renaming on Puppy doesn't involve me.
Come on 8-bit! We all know this is a dev thread :) (no offence intended)

Gtkdialog is an entire Linux (Unix, BSD too I guess) thing, and as a matter of fact I did a checkout of r10 the other day on Mageia to test a script I produced. No problem.

Code: Select all

#hack for puppylinux
if [ "$(which gtkdialog)" = "" ]; then GTKDIALOG="gtkdialog3"
 else  GTKDIALOG="gtkdialog"
fi
If I make a script meant to be "cross linux" (to coin a phrase :wink: ) I shove that some where near the start.

###

thunor, that tree example you gave should go in the official examples. works well here.
Puppy Linux Blog - contact me for access

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

#534 Post by thunor »

Hi zigbert

I've added a feauture request for your issues.

Regards,
Thunor
Last edited by thunor on Thu 23 Jun 2011, 10:24, edited 1 time in total.

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

#535 Post by 8-bit »

Ok to development.
So I will try to get back on track with this.
In /usr/share/doc/gtkdialog3 there is a short example program called 07.02-list_actions.
It is supposed to let one choose an item in a list and perform an action using it.
But it does not work right and could use some investigation.

Those writing scripts have avoided it because for some reason, it uses lots of processor time and one has to kill the script to exit.

When I first ran that example script, I thought since it was included, it should work.

If this is not a constructive back-on-track suggestion, I will just test scripts and try to keep up with changes to gtkdialog.

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

#536 Post by Dougal »

Folks, I've started a thread for gtkdialog development. Better use that.
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
zigbert
Posts: 6621
Joined: Wed 29 Mar 2006, 18:13
Location: Valåmoen, Norway
Contact:

#537 Post by zigbert »

8-bit wrote:Ok to development.
So I will try to get back on track with this.
In /usr/share/doc/gtkdialog3 there is a short example program called 07.02-list_actions.
It is supposed to let one choose an item in a list and perform an action using it.
But it does not work right and could use some investigation.

Those writing scripts have avoided it because for some reason, it uses lots of processor time and one has to kill the script to exit.

When I first ran that example script, I thought since it was included, it should work.

If this is not a constructive back-on-track suggestion, I will just test scripts and try to keep up with changes to gtkdialog.
I think the <tree> widget will cover all of the <list> functions now that thunor has added the selection-mode option.


Sigmund

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#538 Post by 01micko »

sc0ttman wrote: I don't want to nag about new widgets or heavy new features.
I would like to see a very high priority put into making backwards compatibility 100% stable..

For example, the IPConfig tool breaks (in Wary, I think) when the new gtkdialog is used, apparently...
Hi sc0ttman

if you used the exec I posted then it did break some stuff due to being compiled in a later puppy version. I recompiled in 431 and it seems solid now. You'll find it hidden in the games section :wink: .
Puppy Linux Blog - contact me for access

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

#539 Post by disciple »

sc0ttman wrote:
zigbert wrote:sc0ttman
What is wrong with using yad, bacon or xdialog?
Nothing, I wasn't saying people should avoid them - I love Xdialog.. Yad is nice too.. Haven't tried bacon, but I bet it's also nice.. But, for example, Yad requires a fairly new GTK, so GTK Dialog will work on systems where Yad does not..

I just think maybe we could ask others, who prefer Yad, what they think is missing in GTK-Dialog ...
The guys at Slitaz mention a couple of things they prefer about Yad at http://hg.slitaz.org/slitaz-dev-tools/r ... yad/README. I guess if you look around you'll probably find they had a discussion somewhere where more were mentioned.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

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

#540 Post by disciple »

BTW, Great work thunor!
Thanks
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

Post Reply