WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Request for GTKdialog  (Read 3550 times)

Offline Paulo

  • Full Member
  • ***
  • Posts: 139
Request for GTKdialog
« on: March 23, 2013, 01:04:32 PM »
Hi all

Firstly, my apologies if I have posted in the wrong section but couldn't work out which one would be best for a software request.

START EDIT:
Thanks Rich for moving it to the right place, don't know how I didn't see the "Extension Requests" section.
END EDIT.

Any chance someone could compile GTKdialog and add it to the repo?
It's a nice simple way to create GUI's using bash/ash, but I don't have the experience to comiple it for TC.

Quote
Description
Gtkdialog (or gtkdialog) is a small utility for fast and easy GUI building. It can be used to create dialog boxes for almost any interpreted and compiled programs which is a very attractive feature since the developer does not have to learn various GUI languages for the miscellaneous programming languages.

GtkDialog lets your bash script run in a gui using a xml like language.

Here is a simple example using bash but ash would work just as well:

Code: [Select]
#!/bin/bash

TEXT='Hello world'

export script='
<text>
  <label>Content of variable is: '"$TEXT"'</label>
</text>'

gtkdialog --program=script

Some links:

http://code.google.com/p/gtkdialog/

http://www.murga-linux.com/puppy/viewtopic.php?t=38608

http://www.murga-linux.com/puppy/viewtopic.php?t=69188

http://puppylinux.org/wikka/gtkdialog

As can be seen from the links above, GTKdialog is used extensively in PuppyLinux and it would be great to have it in TC as well.
PCLinuxOS magazine also wrote an article on it, although it was aimed for for KDE (don't know if that matters or not).
http://pclosmag.com/html/Issues/200910/page21.html

Thanks.
« Last Edit: March 23, 2013, 01:39:53 PM by Paulo »

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Request for GTKdialog
« Reply #1 on: March 23, 2013, 04:54:26 PM »
zenity and Xdialog which serve the same purpose are in repo.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline AmatCoder

  • Full Member
  • ***
  • Posts: 179
    • AmatCoder Projects
Re: Request for GTKdialog
« Reply #2 on: March 23, 2013, 05:20:54 PM »
I just send this extension. Wait a few days until repository is updated.

Offline Paulo

  • Full Member
  • ***
  • Posts: 139
Re: Request for GTKdialog
« Reply #3 on: March 23, 2013, 05:42:45 PM »
@tinypoodle

Correct me if I'm wrong, but zenity and Xdialog can only do simple message boxes whilst GTKdialog can do much more such as displaying images, open file dialog boxes (if that is the right term)
and so forth.

@AmatCoder

Thank you very much, looking forward to it.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Request for GTKdialog
« Reply #4 on: March 23, 2013, 05:56:02 PM »
Personally I have never used zenity, but Xdialog certainly features a variety of widgets and can display icons.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Paulo

  • Full Member
  • ***
  • Posts: 139
Re: Request for GTKdialog
« Reply #5 on: March 23, 2013, 06:11:27 PM »
@tinypoodle

Compare the features:

GTKdialog: http://code.google.com/p/gtkdialog/

Xdialog: http://xdialog.free.fr/

I don't see an option for Xdialog being able to display images too as opposed to icons.
Another thing I notice is that Xdialog uses a temp file to get it's data whilst with GTKdialog one only has to "export" the data.
Much more efficient and allows for more interactivity.

Offline Paulo

  • Full Member
  • ***
  • Posts: 139
Re: Request for GTKdialog
« Reply #6 on: March 25, 2013, 12:57:47 PM »
@AmatCoder

Quote
I just send this extension. Wait a few days until repository is updated.

Just seen it in the repo, going to download it and give it a try.
Thank you very much.

EDIT:

So far so good.
Here is a simple test to try it out:

Code: [Select]
#!/bin/sh
export MSG="This is a test... I repeat: This is a test... "
export GTKBOX='
<window title="This  is the window title" resizable="false">
<vbox width-request="300">
 <text>
  <variable>MSG</variable>
  <input>echo -en "${MSG:2}${MSG:0:2}"</input>
 </text>
 <timer milliseconds="true" interval="200" visible="false">
  <action type="refresh">MSG</action>
 </timer>
</vbox>
</window>'
gtkdialog -p GTKBOX

Save the script as GTKBOX, make it executable then run it.
« Last Edit: March 25, 2013, 02:34:02 PM by Paulo »