Commit 24b6830ef03892305bed016e2fa01bd06897cc27

Authored by Perry Werneck
1 parent 4c492af7

Adding id in the toggle id description. Required for dynamic attributes.

src/core/toggles/table.c
... ... @@ -43,6 +43,7 @@
43 43 const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
44 44 {
45 45 {
  46 + LIB3270_TOGGLE_MONOCASE,
46 47 "monocase",
47 48 False,
48 49 NULL, // Default keycode
... ... @@ -52,6 +53,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
52 53 N_( "If set, the terminal operates in uppercase-only mode" )
53 54 },
54 55 {
  56 + LIB3270_TOGGLE_CURSOR_BLINK,
55 57 "cursorblink",
56 58 True,
57 59 NULL, // Default keycode
... ... @@ -61,6 +63,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
61 63 N_( "If set, the cursor blinks" )
62 64 },
63 65 {
  66 + LIB3270_TOGGLE_SHOW_TIMING,
64 67 "showtiming",
65 68 True,
66 69 NULL, // Default keycode
... ... @@ -70,6 +73,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
70 73 N_( "If set, the time taken by the host to process an AID is displayed on the status line" )
71 74 },
72 75 {
  76 + LIB3270_TOGGLE_CURSOR_POS,
73 77 "cursorpos",
74 78 True,
75 79 NULL, // Default keycode
... ... @@ -79,6 +83,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
79 83 N_( "Display the cursor location in the OIA (the status line)" )
80 84 },
81 85 {
  86 + LIB3270_TOGGLE_DS_TRACE,
82 87 "dstrace",
83 88 False,
84 89 NULL, // Default keycode
... ... @@ -88,6 +93,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
88 93 ""
89 94 },
90 95 {
  96 + LIB3270_TOGGLE_LINE_WRAP,
91 97 "linewrap",
92 98 False,
93 99 NULL, // Default keycode
... ... @@ -97,6 +103,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
97 103 N_("If set, the NVT terminal emulator automatically assumes a NEWLINE character when it reaches the end of a line.")
98 104 },
99 105 {
  106 + LIB3270_TOGGLE_BLANK_FILL,
100 107 "blankfill",
101 108 False,
102 109 NULL, // Default keycode
... ... @@ -106,6 +113,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
106 113 N_( "Automatically convert trailing blanks in a field to NULLs in order to insert a character, and will automatically convert leading NULLs to blanks so that input data is not squeezed to the left" )
107 114 },
108 115 {
  116 + LIB3270_TOGGLE_SCREEN_TRACE,
109 117 "screentrace",
110 118 False,
111 119 NULL, // Default keycode
... ... @@ -115,6 +123,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
115 123 ""
116 124 },
117 125 {
  126 + LIB3270_TOGGLE_EVENT_TRACE,
118 127 "eventtrace",
119 128 False,
120 129 NULL, // Default keycode
... ... @@ -124,6 +133,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
124 133 ""
125 134 },
126 135 {
  136 + LIB3270_TOGGLE_MARGINED_PASTE,
127 137 "marginedpaste",
128 138 False,
129 139 NULL, // Default keycode
... ... @@ -133,6 +143,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
133 143 N_( "If set, puts restrictions on how pasted text is placed on the screen. The position of the cursor at the time the paste operation is begun is used as a left margin. No pasted text will fill any area of the screen to the left of that position. This option is useful for pasting into certain IBM editors that use the left side of the screen for control information" )
134 144 },
135 145 {
  146 + LIB3270_TOGGLE_RECTANGLE_SELECT,
136 147 "rectselect",
137 148 False,
138 149 NULL, // Default keycode
... ... @@ -142,6 +153,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
142 153 N_( "If set, the terminal will always select rectangular areas of the screen. Otherwise, it selects continuous regions of the screen" )
143 154 },
144 155 {
  156 + LIB3270_TOGGLE_CROSSHAIR,
145 157 "crosshair",
146 158 False,
147 159 "<alt>x", // Default keycode
... ... @@ -151,6 +163,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
151 163 N_( "If set, the terminal will display a crosshair over the cursor: lines extending the full width and height of the screen, centered over the cursor position. This makes locating the cursor on the screen much easier" )
152 164 },
153 165 {
  166 + LIB3270_TOGGLE_FULL_SCREEN,
154 167 "fullscreen",
155 168 False,
156 169 "<alt>Home", // Default keycode
... ... @@ -160,6 +173,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
160 173 N_( "If set, asks to place the toplevel window in the fullscreen state" )
161 174 },
162 175 {
  176 + LIB3270_TOGGLE_RECONNECT,
163 177 "reconnect",
164 178 False,
165 179 NULL, // Default keycode
... ... @@ -169,6 +183,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
169 183 N_( "Automatically reconnect to the host if it ever disconnects" )
170 184 },
171 185 {
  186 + LIB3270_TOGGLE_INSERT,
172 187 "insert",
173 188 False,
174 189 "Insert", // Default keycode
... ... @@ -178,6 +193,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
178 193 ""
179 194 },
180 195 {
  196 + LIB3270_TOGGLE_SMART_PASTE,
181 197 "smartpaste",
182 198 False,
183 199 NULL, // Default keycode
... ... @@ -187,6 +203,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
187 203 ""
188 204 },
189 205 {
  206 + LIB3270_TOGGLE_BOLD,
190 207 "bold",
191 208 False,
192 209 NULL, // Default keycode
... ... @@ -196,6 +213,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
196 213 ""
197 214 },
198 215 {
  216 + LIB3270_TOGGLE_KEEP_SELECTED,
199 217 "keepselected",
200 218 False,
201 219 NULL, // Default keycode
... ... @@ -205,8 +223,9 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
205 223 ""
206 224 },
207 225 {
  226 + LIB3270_TOGGLE_UNDERLINE,
208 227 "underline",
209   - False,
  228 + True,
210 229 NULL, // Default keycode
211 230 "format-text-underline", // Icon name
212 231 N_( "Underline" ),
... ... @@ -214,6 +233,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
214 233 ""
215 234 },
216 235 {
  236 + LIB3270_TOGGLE_CONNECT_ON_STARTUP,
217 237 "autoconnect",
218 238 False,
219 239 NULL, // Default keycode
... ... @@ -223,6 +243,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
223 243 ""
224 244 },
225 245 {
  246 + LIB3270_TOGGLE_KP_ALTERNATIVE,
226 247 "kpalternative",
227 248 False,
228 249 NULL, // Default keycode
... ... @@ -232,6 +253,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
232 253 N_( "Use the keys +/- from keypad to select editable fields" )
233 254 },
234 255 {
  256 + LIB3270_TOGGLE_BEEP,
235 257 "beep",
236 258 True,
237 259 NULL, // Default keycode
... ... @@ -241,6 +263,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
241 263 N_( "Beep on errors" )
242 264 },
243 265 {
  266 + LIB3270_TOGGLE_VIEW_FIELD,
244 267 "fieldattr",
245 268 False,
246 269 NULL, // Default keycode
... ... @@ -250,6 +273,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
250 273 ""
251 274 },
252 275 {
  276 + LIB3270_TOGGLE_ALTSCREEN,
253 277 "altscreen",
254 278 True,
255 279 NULL, // Default keycode
... ... @@ -259,6 +283,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
259 283 N_( "Auto resize on altscreen" )
260 284 },
261 285 {
  286 + LIB3270_TOGGLE_KEEP_ALIVE,
262 287 "keepalive",
263 288 True,
264 289 NULL, // Default keycode
... ... @@ -268,6 +293,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
268 293 N_( "Enable network keep-alive with SO_KEEPALIVE" )
269 294 },
270 295 {
  296 + LIB3270_TOGGLE_NETWORK_TRACE,
271 297 "nettrace",
272 298 False,
273 299 NULL, // Default keycode
... ... @@ -277,6 +303,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
277 303 N_( "Enable network in/out trace" )
278 304 },
279 305 {
  306 + LIB3270_TOGGLE_SSL_TRACE,
280 307 "ssltrace",
281 308 False,
282 309 NULL, // Default keycode
... ... @@ -287,6 +314,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
287 314 },
288 315  
289 316 {
  317 + LIB3270_TOGGLE_COUNT,
290 318 NULL,
291 319 0,
292 320 NULL,
... ...
src/include/lib3270/toggle.h
... ... @@ -39,16 +39,16 @@
39 39  
40 40 typedef struct _lib3270_toggle_entry
41 41 {
42   - const char *name; ///< @brief Toggle name.
43   - const char def; ///< @brief Default value.
44   - const char *key; ///< @brief Default key (or NULL if no default).
45   - const char *icon; ///< @brief Icon name (from https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html)
46   - const char *label; ///< @brief Button label (or NULL).
47   - const char *summary; ///< @brief Short description (or NULL).
48   - const char *description; ///< @brief Toggle description.
  42 + LIB3270_TOGGLE id; ///< @brief Toggle ID.
  43 + const char * name; ///< @brief Toggle name.
  44 + const char def; ///< @brief Default value.
  45 + const char * key; ///< @brief Default key (or NULL if no default).
  46 + const char * icon; ///< @brief Icon name (from https://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html)
  47 + const char * label; ///< @brief Button label (or NULL).
  48 + const char * summary; ///< @brief Short description (or NULL).
  49 + const char * description; ///< @brief Toggle description.
49 50 } LIB3270_TOGGLE_ENTRY;
50 51  
51   -
52 52 /**
53 53 * @brief Get the toggle description table.
54 54 *
... ...
src/ssl/windows/ldap.c
... ... @@ -244,7 +244,7 @@ X509_CRL * get_crl_using_ldap(H3270 *hSession, SSL_ERROR_MESSAGE * message, cons
244 244 lib3270_trace_data(
245 245 hSession,
246 246 "CRL Data received from LDAP server",
247   - (const char *) value[0]->bv_val,
  247 + (const unsigned char *) value[0]->bv_val,
248 248 value[0]->bv_len
249 249 );
250 250 }
... ...