Gtkdialog Tutorial Manual

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#21 Post by smokey01 »

don,

Great tutorial. I've noticed that it doesn't display the following image:
Screen-30.png as It appears to be hard coded unlike the rest of the images.

Have you got a good real time example for the progress bar.

I'm trying to get a display when transferring files with ncat. The following strings work fine in a terminal.

To send----> ncat --send-only xxx.xxx.xxx.xxx port < /root/filename
To listen--> ncat -l 192.168.0.2 port > filename

How would you convert this to a ProgressBar in gtkdialog?

Thanks

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#22 Post by don570 »

To Smokey:

I'll look into the progress bar. I've never used it myself. Instead
I put a yaf-splash or gtkdialog splash screen at the top of screen
to remind the user that processing is being done in background.

Then kill command can be used to close the warning window.

The problem is that only a few distros have yaf-splash installed.
Carolina doesn't., but it has gtkdialog-splash
http://www.murga-linux.com/puppy/viewtopic.php?p=424522

Here's an example in Bulldog finder

Code: Select all


yaf-splash -timeout 0  -placement top  -bg orange  -outline 0 -margin 10 -text "$(gettext 'Examining files, please wait...')" & PID=$!
and then kill with

Code: Select all

kill $PID

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#23 Post by sunburnt »

don570; Thanks for the: "PID=$!" I`ve not seen that, it beats parsing ps for the pid.

I posted a download Xdialog progress utility here:

http://www.murga-linux.com/puppy/viewto ... 943#739943

Any improvements or suggestions are welcome. I`ll be posting a new one Thursday - Friday.
.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#24 Post by don570 »

new version 2.3
- changed /root to $HOME and sh to bash
-I changed to this example to show an interesting input directive

Code: Select all

#! /bin/bash

export MAIN_DIALOG='
<vbox border-width="20">
       <hbox>
            <text>
            <input>[ -d $HOME ] && echo "I found folder" && echo -e "\nYou bet I did" || echo -e "\n No, I did not find the folder"</input>
            </text>
       </hbox>
       </vbox>
'
gtkdialog --program MAIN_DIALOG
________________________________________

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#25 Post by don570 »

version 2.4

I came up with a new example for the input directive page

Code: Select all

#! /bin/bash

echo 5 > /tmp/value.tmp

export MAIN_DIALOG='
<vbox border-width="20">
       <hbox>
            <text>
            <input>[  $(cat /tmp/value.tmp) -gt "8"  ]  &&  echo  TRUE || echo FALSE </input>
            </text>
       </hbox>
</vbox>
'
gtkdialog --program MAIN_DIALOG

________________________________________________

User avatar
koulaxizis
Posts: 452
Joined: Sun 17 Jul 2011, 18:43
Location: Greece
Contact:

#26 Post by koulaxizis »

Mirrored

PET | DEB

Thank you so much for this project of yours. It's really helpful, even for me who am clueless! :D
[b]Christos Koulaxizis[/b]
[i]Woof woof from Greece![/i]

[color=darkred][url=https://sourceforge.net/projects/puppystuff/][ Puppy Stuff Repository ][/url][/color]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#27 Post by don570 »

Warning! Don't download. Somebody has switched download
from pet to exe.

I will repost in a few days.

_________________________________________________
Last edited by don570 on Sat 19 Dec 2015, 21:17, edited 1 time in total.

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#28 Post by don570 »

FIXED!!!

Thank goodness that koulaxizis made a backup :lol:
_______________________________________________

User avatar
koulaxizis
Posts: 452
Joined: Sun 17 Jul 2011, 18:43
Location: Greece
Contact:

#29 Post by koulaxizis »

I was useful, heaaahhh! :lol:
[b]Christos Koulaxizis[/b]
[i]Woof woof from Greece![/i]

[color=darkred][url=https://sourceforge.net/projects/puppystuff/][ Puppy Stuff Repository ][/url][/color]

User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#30 Post by don570 »

datafilehost.com is forcing people to use their downloader app
apparently :cry:

User avatar
koulaxizis
Posts: 452
Joined: Sun 17 Jul 2011, 18:43
Location: Greece
Contact:

#31 Post by koulaxizis »

don570 wrote:datafilehost.com is forcing people to use their downloader app
apparently :cry:
SourceForge is a good, reliable and free solution! ;)
[b]Christos Koulaxizis[/b]
[i]Woof woof from Greece![/i]

[color=darkred][url=https://sourceforge.net/projects/puppystuff/][ Puppy Stuff Repository ][/url][/color]

Post Reply