Commit b1eba98b58892bf6edf3358356cc058b94604f35
1 parent
1ad4d6e6
Exists in
master
and in
3 other branches
Adding method to get the complete toggle descriptions.
Showing
2 changed files
with
18 additions
and
6 deletions
Show diff stats
src/core/toggles/table.c
@@ -171,8 +171,8 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | @@ -171,8 +171,8 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | ||
171 | { | 171 | { |
172 | "insert", | 172 | "insert", |
173 | False, | 173 | False, |
174 | - NULL, // Default keycode | ||
175 | - NULL, // Icon name | 174 | + "Insert", // Default keycode |
175 | + "insert-text", // Icon name | ||
176 | N_( "Insert" ), | 176 | N_( "Insert" ), |
177 | N_( "Set insert mode" ), | 177 | N_( "Set insert mode" ), |
178 | "" | 178 | "" |
@@ -189,8 +189,8 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | @@ -189,8 +189,8 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | ||
189 | { | 189 | { |
190 | "bold", | 190 | "bold", |
191 | False, | 191 | False, |
192 | - NULL, // Default keycode | ||
193 | - NULL, // Icon name | 192 | + NULL, // Default keycode |
193 | + "format-text-bold", // Icon name | ||
194 | N_( "Bold" ), | 194 | N_( "Bold" ), |
195 | N_( "Bold" ), | 195 | N_( "Bold" ), |
196 | "" | 196 | "" |
@@ -207,8 +207,8 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | @@ -207,8 +207,8 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | ||
207 | { | 207 | { |
208 | "underline", | 208 | "underline", |
209 | False, | 209 | False, |
210 | - NULL, // Default keycode | ||
211 | - NULL, // Icon name | 210 | + NULL, // Default keycode |
211 | + "format-text-underline", // Icon name | ||
212 | N_( "Underline" ), | 212 | N_( "Underline" ), |
213 | N_( "Show Underline" ), | 213 | N_( "Show Underline" ), |
214 | "" | 214 | "" |
@@ -298,6 +298,11 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | @@ -298,6 +298,11 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = | ||
298 | 298 | ||
299 | }; | 299 | }; |
300 | 300 | ||
301 | +LIB3270_EXPORT const LIB3270_TOGGLE_ENTRY * lib3270_get_toggle_list() | ||
302 | +{ | ||
303 | + return toggle_descriptor; | ||
304 | +} | ||
305 | + | ||
301 | LIB3270_EXPORT const char * lib3270_get_toggle_summary(LIB3270_TOGGLE ix) | 306 | LIB3270_EXPORT const char * lib3270_get_toggle_summary(LIB3270_TOGGLE ix) |
302 | { | 307 | { |
303 | if(ix < LIB3270_TOGGLE_COUNT) | 308 | if(ix < LIB3270_TOGGLE_COUNT) |
src/include/lib3270/toggle.h
@@ -48,6 +48,13 @@ | @@ -48,6 +48,13 @@ | ||
48 | const char *description; ///< @brief Toggle description. | 48 | const char *description; ///< @brief Toggle description. |
49 | } LIB3270_TOGGLE_ENTRY; | 49 | } LIB3270_TOGGLE_ENTRY; |
50 | 50 | ||
51 | + | ||
52 | + /** | ||
53 | + * @brief Get the toggle description table. | ||
54 | + * | ||
55 | + */ | ||
56 | + LIB3270_EXPORT const LIB3270_TOGGLE_ENTRY * lib3270_get_toggle_list(); | ||
57 | + | ||
51 | /** | 58 | /** |
52 | * @brief get toggle state. | 59 | * @brief get toggle state. |
53 | * | 60 | * |