With a few notable changes, the dialog.c module was legacy code which tried to do too much. In attempting to add stock icons and embedded buttons so many irreversible bugs had crept into the code which made it almost impossible to prevent an application crashing. A quick glance at the gtk style guide makes no mention to of the use of Stock icons in dialog buttons so, the best way forward was to retire the inclusion of icons and predefined buttons in favour of something much simpler and far less prone to crashing. The following extract from the development documentation highlights the changes made.
For more complex display strings the use of an associate value makes response parsing simpler.
Use underscore ("'_") to indicate accelerators, e.g.
Method 3) Default.
If the -buttons option is not specified then a single "Ok" button will be added to the dialog. This would be equivalent to using:
To add previously created button widgets, use the -actionButtons option.
- -buttons
- type: list (default: Ok)
- List of buttons to be displayed consisting of a list of display strings with optional values.
Method 2) String and Value.
- Method 1) Simple Strings.
- In this case the text string will be used as the basis of the returned value stripped of any percent string underscore markup.
Clicking the "Yes" button will return "Yes" from the [gnocl::dialog] command or by substitution of the %v parameter in the -onResponse callback script..-buttons "%__Yes %__No"
For more complex display strings the use of an associate value makes response parsing simpler.
Use underscore ("'_") to indicate accelerators, e.g.
As with method 1), clicking the "Portable Document Format " button will return "pdf" from the [gnocl::dialog] command or by substitution of the %v parameter in the -onResponse callback script..-buttons [list [list {%_P_ortable Document Format} pdf] [list {%_O_pen Document Text ODT} odt]
Method 3) Default.
If the -buttons option is not specified then a single "Ok" button will be added to the dialog. This would be equivalent to using:
Note: The use of the %_ prefix is optional and retained for legacy.-buttons "%__Ok"
To add previously created button widgets, use the -actionButtons option.
Comments