If Zenity exits with code -1, the Cancel button was clicked.
如果Zenity的退出代码是- 1,单击的是Cancel按钮。
Listing 1 shows is an example from the Zenity documentation.
清单1展示Zenity文档中的一个示例。
You can use Zenity to open GTK + dialog boxes from any shell script.
您可以使用Zenity从任何shell脚本打开GTK +对话框。
Zenity offers many of the same controls as dialog. Here is a snippet to collect a name.
Zenity提供与dialog相同的许多控件。
You use dialog with traditional, text-based interfaces; Zenity proffers the style of the modern, windowed desktop.
对于传统的、基于文本的界面使用dialog,Zenity提供现代风格的视窗化桌面。
Again, to use dialog or Zenity, replace code where you previously referenced a command-line argument with a dialog box.
再次说明,要使用dialog或zenity,用对话框替换您之前引用过命令行参数的代码。
You'll likely find Zenity more advantageous than dialog, especially as most computer users have an X desktop of some sort.
您可能发现Zenity比dialog更有优势,特别是由于大部分计算机用户都有某种x桌面。
If you don't run GNOME, you can install Zenity separately (however, expect a large number of GTK + libraries to be installed, too).
如果您不运行GNOME,可以单独安装Zenity(但是,也要安装大量gtk +库)。
In fact, Zenity shares many of the same features as dialog; the only difference is that Zenity works in an X Window System environment.
事实上,Zenity与dialog有着许多相同的功能;惟一的区别在于,Zenity在一个XWindow System环境中工作。
Like dialog, Zenity has a good number of options-perhaps even more than dialog-but the options are well named and thus self-explanatory.
如同dialog,Zenity有很多选项—甚至比dialog还多—但是选项命名贴切,因而不言自明。
Again, if the exit code of zenity is 0, then ENTRY has the person's name. Here is the calendar example from above rewritten to use zenity.
再次说明,如果zenity的退出代码是0,那么ENTRY有某人的姓名。
The sub-shell (wrapped in parentheses) performs a series of tasks-albeit sleep delays in this contrived example-and emits output to a Zenity progress meter via a pipe.
sub -shell(包含在括号中)执行一系列任务—在这个人为例子中albeitsleep延迟—且通过一个管道将输出发出到一个Zenity过程表。
A wrapper for the tool using zenity (a GTK + UI tool) is provided so you can use it without having to have command-line experience (for example, golf course office staff).
提供了对该工具的封装,它用的是zenity(一个GTK +UI工具),您可以使用它,而无需命令行开发经验(例如,高尔夫球场办公人员)。
Although Zenity is a little more verbose-there are separate options for day, month, and year, for example-the additional switches free you from remembering the precise usage sequence of arguments.
尽管Zenity更详细一点—例如,对于年、月、日有单独的选项—其他DOS命令使您免于记住精确的参数使用顺序。
With such tools—dialog and Zenity are two worthy of mention (see Resources)—you can use dialog boxes, file browsers, and other common "windowing" controls and techniques to interact with your users.
有了这样的工具 —dialog和Zenity是两个值得一提的工具(参见参考资料)—您就可以使用对话框、文件浏览器和其他常见的 “windowing”控件和技术来与您的用户交互。
With such tools—dialog and Zenity are two worthy of mention (see Resources)—you can use dialog boxes, file browsers, and other common "windowing" controls and techniques to interact with your users.
有了这样的工具 —dialog和Zenity是两个值得一提的工具(参见参考资料)—您就可以使用对话框、文件浏览器和其他常见的 “windowing”控件和技术来与您的用户交互。
应用推荐