Results 1 to 4 of 4
Hi all,
I recently stepped into zenity, GUI Dialogs from shell. It is a
GNOME application but works also with KDE.
I would like to change some outputs like the ...
- 02-27-2009 #1Just Joined!
- Join Date
- Oct 2004
- Posts
- 62
zenity, GUI Dialogs from shell
Hi all,
I recently stepped into zenity, GUI Dialogs from shell. It is a
GNOME application but works also with KDE.
I would like to change some outputs like the format of the date in
the dialog Calendar (from American to European).
For that. I need to get the source. Can someone help me in terms of links where sources can be
downloaded?
Bye.
P.S. For those interested, here you can find the manual.
- 02-27-2009 #2Linux Engineer
- Join Date
- Apr 2006
- Location
- Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
- Posts
- 1,117
Hi.
This page has a number of links to sources: freshmeat.net: Project details for Zenity ... cheers, drlWelcome - get the most out of the forum by reading forum basics and guidelines: click here.
90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
We look forward to helping you with the challenge of the other 10%.
( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )
- 02-28-2009 #3Just Joined!
- Join Date
- Oct 2004
- Posts
- 62
Hi drl,
thanks for the link infos on zenity sources...
Before starting the demanding (for me...) task of modifying the zenity sources,
I solved the immediate problem of the European format for the chosen date
with a somewhat clumsy method:
After having modified the Calendar Dialog Bash example
Of course, there are more intelligent methods for changing the format of a dateCode:from "then echo $?" to "then echo -n | head -n 1" (line 9) causing the following different outputs: from 08/13/2004 (date in American style) 0 to 08/13/2004 (only) I changed the date format executing: bash zenity_calendar.sh>x;echo `cat x|cut -d'/' -f2`. `cat x|cut -d'/' -f1`. `cat x|cut -d'/' -f3|tail -c -3` (with as a result: 13.08.04)
(specially if you want to add also the day of the week)...
Bye.
- 03-02-2009 #4Just Joined!
- Join Date
- Oct 2004
- Posts
- 62
Hi,
for the date output format of zenity calendar I had only to read the man (RTFM!)...
From a small snippet of code by Ryan Cartwright...
This example output Fry 20.02.09, or whatever you want, according the --date-formatCode:DATE=`zenity --calendar --day "20" --month "2" --year "2009" --date-format "%a %d.%m.%y"` if [ $? == 0 ] then echo $DATE fi
....
Bye.


Reply With Quote