summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Newman <MikeGTN@src.gnome.org>2003-05-20 23:48:12 +0000
committerMike Newman <MikeGTN@src.gnome.org>2003-05-20 23:48:12 +0000
commit0664c941978b167c44441758de7ee383fca6251b (patch)
treee7bbc5d78546f45f90b0a347cfd12a3478836ca3 /src
parentrelease 1.2 Updated for new release (diff)
downloadzenity-0664c941978b167c44441758de7ee383fca6251b.tar.gz
zenity-0664c941978b167c44441758de7ee383fca6251b.tar.bz2
zenity-0664c941978b167c44441758de7ee383fca6251b.zip
Update to gdialog wrapper script
Diffstat (limited to 'src')
-rw-r--r--src/gdialog42
1 files changed, 38 insertions, 4 deletions
diff --git a/src/gdialog b/src/gdialog
index 2eb5b0fa..14e7bed2 100644
--- a/src/gdialog
+++ b/src/gdialog
@@ -112,25 +112,59 @@ ARG: while ($argn < $args) {
# Conveniently, zenity and gdialog use the same names
# for list types, so pass this to zenity intact along with
# an untitled column for the check or radio buttons
+ # and the 'text' arg as a second column header
$command .= "--list $list --column='' --column $element ";
- # Skip to the first 'name' arg of the list content
+ # Skip to the first 'item' arg of the list content
+ # bypassing height, width and list-height
+ # from here args run [tag] [item] [status] ...
- $argn += 6;
+ $argn += 5;
# Loop over the remainder of the commandline
# discarding the 'status' and 'tag' args of each item
- # and using the 'name' for display in our second column
+ # and using the 'item' for display in our second column
+ # also pass a NULL argument since zenity can't set the status
+ # of a row like gdialog can
while ($argn < $args) {
get_arg;
- $command .= "$element ";
+ $command .= "NULL $element ";
$argn += 3;
}
last ARG;
}
+ if ($element eq "--menu") {
+ $list=$element;
+ $argn++;
+ get_arg;
+
+ # a gdialog --menu is just a one column zenity --list
+ # Use the 'text' arg as a second column header
+ # FIXME: or should it be the dialog text?
+
+ $command .= "--list --column $element ";
+
+ # Skip to the first 'item' arg of the list content
+ # bypassing height, width and list-height
+ # from here args run [tag] [item] ...
+
+ $argn += 5;
+
+ # Loop over the remainder of the commandline
+ # discarding the 'tag' args of each item
+ # and using the 'item' for display in our second column
+
+ while ($argn < $args) {
+ get_arg;
+ $command .= "$element ";
+ $argn += 2;
+ }
+ last ARG;
+ }
+
if ($element eq "--gauge") {
$argn++;
get_arg;
bgstack15