Gtkdialog: Function result to disable button

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
thanius
Posts: 10
Joined: Tue 04 Feb 2014, 17:19

Gtkdialog: Function result to disable button

#1 Post by thanius »

Hi there! This looks like a place where I can get some help with gtkdialog.
I'm writing a GUI for a script of mine and having trouble with some flags.

I want to have fileselect send a variable with a filepath, have it run through a md5 checker and enable an install button if md5 checks out ok.

So, fileselect to variable, have a function grab the variable and run its magic, return either true or false.
If true enable button, if false disable button.
Can this be done? I've tried creating flags within gtkdialog as well as bash function, but nothing seems to work - either returning wrong value or fileselect crashes after two failed entries.
Where can I find more advanced examples, other than those in the docs and wiki?

Cheers.

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#2 Post by RSH »

I don't know how familiar you are with bash scripting, but to examine pmenu-3.0.0.pet could be useful, of course.

It uses functions to enable/disable and to refresh its GUI buttons.

I have have used parts from this for some of my own scripts - really useful code to find in there!

Good luck with the your scripting-project!
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

Post Reply