Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 02 Sep 2014, 21:19
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Gtkdialog Development
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 20 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 18, 19, 20, 21, 22, ..., 53, 54, 55 Next
Author Message
zigbert


Joined: 29 Mar 2006
Posts: 5701
Location: Valåmoen, Norway

PostPosted: Wed 31 Aug 2011, 14:44    Post subject:  

BarryK wrote:
You are playing with words here......
I am speechless.
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3365
Location: Oregon

PostPosted: Wed 31 Aug 2011, 16:18    Post subject:  

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.
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 31 Aug 2011, 20:46    Post subject:  

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.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3365
Location: Oregon

PostPosted: Wed 31 Aug 2011, 23:38    Post subject:  

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.
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3365
Location: Oregon

PostPosted: Thu 01 Sep 2011, 11:52    Post subject:
Subject description: continuation of selected directory variable passing.
 

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:

#!/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, 19:31; edited 2 times in total
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Thu 01 Sep 2011, 19:41    Post subject:  

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

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

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
8-bit


Joined: 03 Apr 2007
Posts: 3365
Location: Oregon

PostPosted: Fri 02 Sep 2011, 01:50    Post subject:
Subject description: Disabling the entry box. -SOLVED
 

Post now gone. When will I actually learn to read before shooting my mouth off.
I must be getting senile.
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Sun 04 Sep 2011, 17:58    Post subject:  

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. Cool

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
thunor


Joined: 14 Oct 2010
Posts: 350
Location: Minas Tirith, in the Pelennor Fields fighting the Easterlings

PostPosted: Sun 04 Sep 2011, 18:46    Post subject:  

01micko wrote:
By the way Thunor, nice job with the examples. Cool

Mick, you're welcome Smile

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

Regards,
Thunor
Back to top
View user's profile Send private message Visit poster's website 
frafa


Joined: 04 Aug 2011
Posts: 10
Location: MONTPELIER

PostPosted: Sun 04 Sep 2011, 21:07    Post subject:  

@8-bit
Example:
Code:
#!/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, 08:49; edited 4 times in total
Back to top
View user's profile Send private message Visit poster's website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sun 04 Sep 2011, 21:56    Post subject:  

thunor wrote:
01micko wrote:
By the way Thunor, nice job with the examples. Cool

Mick, you're welcome Smile

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.
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sun 04 Sep 2011, 22:56    Post subject:  

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

Quote:

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

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3365
Location: Oregon

PostPosted: Mon 05 Sep 2011, 00:59    Post subject:  

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
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Mon 05 Sep 2011, 03:46    Post subject:  

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
Back to top
View user's profile Send private message 
frafa


Joined: 04 Aug 2011
Posts: 10
Location: MONTPELIER

PostPosted: Mon 05 Sep 2011, 08:40    Post subject:  

@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
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 20 of 55 [821 Posts]   Goto page: Previous 1, 2, 3, ..., 18, 19, 20, 21, 22, ..., 53, 54, 55 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1135s ][ Queries: 12 (0.0123s) ][ GZIP on ]