Gtkdialog Development

Under development: PCMCIA, wireless, etc.
Message
Author
disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#281 Post by disciple »

Is there a list somewhere of the changes to gtkdialog which require existing code to be updated?
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

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

#282 Post by 01micko »

Barry, Sigmund, Thunor (et al)

The way I see it is that Pere Laszlo's s original gtkdialog is quite buggy and we have been used to coding to suit the bugs. Thankfully we have someone with the ability to fix the bugs and provide us the correct syntax to improve and enhance gtkdialog.

Sure, there is a transitional period where some things may not work as expected. We have been assured that backward compatibility is not broken.. I believe this.. it's our bad ways that are broken :wink: .

It's our responsibility as coders to fix what's not right!

I think that it's really important for Puppy's future that gtkdiaog is fixed and further developed.

This is absolutely wonderful work... and who knows (Johnny?), what (Willy?), else (Matty?) might come of it? [subliminal message intended :P ]

Cheers :)
Puppy Linux Blog - contact me for access

User avatar
frafa
Posts: 10
Joined: Thu 04 Aug 2011, 14:48
Location: MONTPELIER
Contact:

#283 Post by frafa »

Hello,
Just a quick note to thank for all the work Thunor
that it is to debug and develop gtkdialog
Through his work we have a tool that will help make advanced interfaces

Miles thank you for all that work:)
and sorry for my broken English ...
François

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

#284 Post by BarryK »

zigbert wrote:
BarryK wrote:yesterday I discovered that Pfind is broken, as the directory-select dialog is broken.
Very important. The directory-select dialog is not broken. In fact it is now working.
You are playing with words here. Pfind was broken, full stop. The fact that it relied on quirks in an earlier release of gtkdialog is a different matter.

From what I read awhile back, I think that thunor stated that existing scripts would be supported. So, in good faith I started to use the gtkdialog versions from SVN.

Then I got into some pressure to keep upgrading from SVN. It was not just your Pprocess, but also latest Pnethood and Wallpaper that use the new features of gtkdialog. Then I went to revision 224 when it was reported to have fixed a bug introduced in an earlier revision.

I really didn't have much choice but to use the "development version", given that app coders, not just yourself are embracing it.

Yes, I am keen to encourage thunor also, but we have so many scripts out there that use gtkdialog, and we don't know now which of them are now broken. We have only tested some apps. More changes are coming to gtkdialog at a rapid pace, so what else is going to get broken?
That is why I am stopping at revision 224.
[url]https://bkhome.org/news/[/url]

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

#285 Post by jpeps »

BarryK wrote:
zigbert wrote:Very important. The directory-select dialog is not broken. In fact it is now working.
You are playing with words here. Pfind was broken, full stop. The fact that it relied on quirks in an earlier release of gtkdialog is a different matter.
--tough bind for a developer! Recent improvements by Thunor are making gtkdialog FAR more useful in developing new apps. Hopefully it's not too difficult to update apps that relied on bugs.

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

#286 Post by zigbert »

BarryK wrote:You are playing with words here......
I am speechless.

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

#287 Post by 8-bit »

BK,
I am not speechless.
You just got carried away as did the rest of us excited by the updates to gtkdialog and the possibilities it presented.
Everyone knew when thunor started updating gtkdialog, that it could be classified as an alpha or beta version.
This normally means that testing is required.
It is also why Puppy builds normally do not include applications or utilities in their development phase.
It is also a reason why we have an older version of GTK+.
A later version from what I have heard, breaks things Puppy.

No one told you you had to use a version of gtkdialog that is under development or any of the applications that make use of the new features.

So do not jump all over everyone when something does not work right.
It is no different that posting a beta/test ISO and asking for bug feedback.
That is what is being done with gtkdialog and you also have to remember that the changes to it are not solely for Puppy's benefit as other linux OSes also use it.

I now have said my piece and will return you to the normal forum.

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

#288 Post by BarryK »

Ok, I have implemented a solution. I certainly don't want to dampen thunor's enthusiasm. See blog post:

http://bkhome.org/blog/?viewDetailed=02455

It is easy enough for developers to call either 'gtkdialog', or test for 'gtkdialog4' and use that, so all the old scripts can carry on using 'gtkdialog3' and they will still work.
[url]https://bkhome.org/news/[/url]

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

#289 Post by 8-bit »

I have a problem with thunor's fileselect_widget example.
In the example, why can't I pass a selected directory from the folder entry to be used by the file entry?

I tried using the variable "ent3", but that did not work even though it contains the selected directory.

In other words, I am setting in /root/examples and I use directory to choose /root.
/root is now in the variable ent3.
But clicking on the file selection icon brings up the original directory /root/examples and not the selected one.

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

#290 Post by 8-bit »

This is the script I am using for insight into what I am trying to do.
In the original script "$HOME" works and is a global variable.
But replacing it with "$ent3" does not.
I think this goes along with Barry's comment of the latest gtkdialog breaking Pfind as passing the directory variable to the file button does not happen.

Evidently, what I am trying to do in this example of passing a variable from Fileselect-folder to Fileselect-File is not possible with the current gtk code it relies on. I have found information in searching the web that basically states that. So this one although no solved in it's present state is of no use and the app I was thinking about will have to be written from scratch.
EDIT: I need someone to show me what use Fileselect:directory is when I cannot pass the selected directory to either an internal variable or an outside file!
In other words, I need help understanding how this would work.

I am about to drop the whole thing as it currently is just an exercise to see if it can be done.

Code: Select all

#!/bin/sh

# NOTE: This example requires at least gtkdialog-0.7.21 (please visit
# http://code.google.com/p/gtkdialog/). Additionally if you are using
# Puppy Linux then you may find that an historical version of gtkdialog
# already exists in /usr/sbin, and if that is the case then you should
# modify the shell variable below to point to the new gtkdialog binary.
# Modified thunor's script trying to pass the directory variable to
#  the file button so it opens in the selected directory
GTKDIALOG=gtkdialog3    ##Using latest build of gtkdialog

function funcbtnCreate() {
   echo '<button>
         <input file stock="gtk-'$2'"></input>
         <action>fileselect:ent'$1'</action>
      </button>'
}
export ent1 ent3
export MAIN_DIALOG='
<window title="Fileselect" resizable="false" width-request="500">
   <vbox>
      <vbox border-width="20" spacing="10">
         <hbox>
            <text label="folder" width-request="80"></text>
            <entry fs-title="Select an existing folder" fs-action="folder">
               <variable>ent3</variable>
            </entry>
            '"$(funcbtnCreate 3 open)"'
         </hbox>
         <hseparator></hseparator>
         <hbox>
            <text label="file" width-request="80"></text>
            <entry fs-folder="'$ent3'" fs-action="file"
               fs-filters="c*|t*"
               fs-title="Select an existing file">
               <variable>ent1</variable>
            </entry>
            '"$(funcbtnCreate 1 new)"'
         </hbox>
      </vbox>
      <hseparator></hseparator>
      <hbox homogeneous="true">
         <button ok></button>
      </hbox>
   </vbox>
   <action signal="hide">exit:Exit</action>
</window>
'

$GTKDIALOG --center --program=MAIN_DIALOG
Last edited by 8-bit on Sat 03 Sep 2011, 23:31, edited 2 times in total.

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

#291 Post by BarryK »

I have implemented the separation of PETs that require gtkdialog4 versus gtkdialog3:

http://bkhome.org/blog/?viewDetailed=02457
[url]https://bkhome.org/news/[/url]

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

#292 Post by 8-bit »

Post now gone. When will I actually learn to read before shooting my mouth off.
I must be getting senile.

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

#293 Post by 01micko »

Barry

It could be dangerous reverting to gtkdialog3, unless the Moose on the Loose bugfix is applied, fixes stdin. This is the reason we could get rid of gtkdialog2 as I understand.

Slacko will not ship with gtkdialog3 but a link to it (beta2 will ship with rev-254)

By the way Thunor, nice job with the examples. 8)
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:

#294 Post by thunor »

01micko wrote:By the way Thunor, nice job with the examples. 8)
Mick, you're welcome :)

I'm busily adding the missing widget references so there'll be a few more *_advanced examples appearing.

Regards,
Thunor

User avatar
frafa
Posts: 10
Joined: Thu 04 Aug 2011, 14:48
Location: MONTPELIER
Contact:

#295 Post by frafa »

@8-bit
Example:

Code: Select all

#!/bin/bash
function FCT_ACTIVATE_FILE()
{
if [ -d "$ent3" ]; then
echo -e '<action signal="show">enable:button1</action>
<action signal="show">enable:ent1</action>
<action signal="show">enable:text1</action>
<action signal="show">refresh:button1</action>
<action signal="show">refresh:ent1</action>
<action signal="show">refresh:text1</action>'
else
echo -e '<action signal="show">disable:button1</action>
<action signal="show">disable:ent1</action>
<action signal="show">disable:text1</action>
<action signal="show">refresh:button1</action>
<action signal="show">refresh:ent1</action>
<action signal="show">refresh:text1</action>'
fi
}

function FCT_MAIN_FILES()
{
GTKDIALOG=gtkdialog3
export MAIN_DIALOG='<window title="Fileselect" resizable="false" width-request="500">
<vbox>
<vbox border-width="20" spacing="10">
<hbox>
<text label="folder" width-request="80"></text>
<entry fs-folder="'$1'" fs-title="Select an existing folder" fs-action="folder">
<variable>ent3</variable>
<input>if [ -d "'$1'" ]; then echo '$1'; else echo "Please select folder!"; fi</input>
</entry>
<button>
<input file stock="gtk-open"></input>
<action>fileselect:ent3</action>
<action>exit:selfolder</action>
</button>
</hbox>
<hseparator></hseparator>
<hbox>
<text label="file" width-request="80">
<variable>text1</variable>
</text>
<entry fs-folder="'$1'" fs-action="file" fs-filters="c*|t*" fs-title="Select an existing file">
<variable>ent1</variable>
</entry>
<button>
<input file stock="gtk-new"></input>
<action>fileselect:ent1</action>
<variable>button1</variable>
</button>
</hbox>
</vbox>
<hseparator></hseparator>
<hbox homogeneous="true">
<button ok></button>
</hbox>
</vbox>
'$(FCT_ACTIVATE_FILE)'
<action signal="hide">exit:Exit</action>
</window>'
MAIN_DIALOG="$($GTKDIALOG --center --program=MAIN_DIALOG)"
eval $MAIN_DIALOG
}
i=0
while true 
do
if [ "$i" -gt "5" ]; then break; fi
if [[ ! "$ent1" || ! "$ent3" ]]; then
FCT_MAIN_FILES "$ent3"
else
break
fi
let i++
sleep .1
done
echo "file:$ent1 folder:$ent3"
exit 0
Last edited by frafa on Mon 05 Sep 2011, 12:49, edited 4 times in total.

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

#296 Post by jpeps »

thunor wrote:
01micko wrote:By the way Thunor, nice job with the examples. 8)
Mick, you're welcome :)

I'm busily adding the missing widget references so there'll be a few more *_advanced examples appearing.

Regards,
Thunor
I just love the timer.

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

#297 Post by big_bass »

Hey thunor

I would like to thank you for stepping up to the plate and taking on the big task of updating, bug fixing, adding new features to gtkdialog for the linux community

and handling it all in a professional manner
using http://code.google.com/p/gtkdialog/

generally speaking when work is done in an organized documented way
users have the option to test new features and offer feedback with the aim to better the the code by taking part in the code development process

with an end goal of having a good program
to code small apps with

I always remind my self of a saying that I heard once
"if you stick your head above the crowd someone will throw a rock at you"
this isnt a problem you just have to learn to dodge it quickly
and go back to whatever you were doing



*I forget who said that its been a long time here was the quote*
funny that it was David Lee that said that
David Lee Roth quotes
You stick your head above the crowd and attract attention and
sometimes somebody will throw a rock at you. That's the territory.
You buy the land, you get the Indians.
Joe

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

#298 Post by 8-bit »

frafa,
I tried running your example a few times using the latest gtkdialog and had an error with the <sensitive> lines kicking me out.
When I remedied that, I had to kill it as it took up lots of processing power without ever displaying anything.

But thank you for thinking of me.

It is actually just a test.
(Variables stay populated by the way and I checked just before my fileselect action command by sending the variable to a temporary file.)

One is supposed to be able to pass a directory to fileselect for use with the file command. But there is something that is not happening of the variable passing it's content string when put into the entry that is passed to fileselect. The interesting thing here is that if you use a global variable, $HOME, that works. Maybe that means the variable has to be declared outside of the script.
I was up all night last night trying various things and So I may have pissed a few off as my mental state was not good.

For that, I sincerely Apologize to those I upset!


I WILL figure this out for myself or die trying.

All of you remember to bring flowers so you have something to pee on. :wink:

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#299 Post by vovchik »

Dear thunor,

Just another word of thanks. I fully endorse Joe's (big_bass) views in the post above. You are doing wonders....so please slog away for the common good.

With thanks and kind regards,
vovchik

User avatar
frafa
Posts: 10
Joined: Thu 04 Aug 2011, 14:48
Location: MONTPELIER
Contact:

#300 Post by frafa »

@8-bit
Hum strange...

-i have edited and removed sensitive in exemple
<sensitive>false</sensitive>
and replaced by
<action signal="show">disable:...</action>
and
<action signal="show">enable:...</action>

-and added a safety loop "while true ..." stop if loop >= 5 to prevent your bug
may be retested ...

François

Post Reply