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,6 +43,7 @@
43 const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = 43 const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
44 { 44 {
45 { 45 {
  46 + LIB3270_TOGGLE_MONOCASE,
46 "monocase", 47 "monocase",
47 False, 48 False,
48 NULL, // Default keycode 49 NULL, // Default keycode
@@ -52,6 +53,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -52,6 +53,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
52 N_( "If set, the terminal operates in uppercase-only mode" ) 53 N_( "If set, the terminal operates in uppercase-only mode" )
53 }, 54 },
54 { 55 {
  56 + LIB3270_TOGGLE_CURSOR_BLINK,
55 "cursorblink", 57 "cursorblink",
56 True, 58 True,
57 NULL, // Default keycode 59 NULL, // Default keycode
@@ -61,6 +63,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -61,6 +63,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
61 N_( "If set, the cursor blinks" ) 63 N_( "If set, the cursor blinks" )
62 }, 64 },
63 { 65 {
  66 + LIB3270_TOGGLE_SHOW_TIMING,
64 "showtiming", 67 "showtiming",
65 True, 68 True,
66 NULL, // Default keycode 69 NULL, // Default keycode
@@ -70,6 +73,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -70,6 +73,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
70 N_( "If set, the time taken by the host to process an AID is displayed on the status line" ) 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 "cursorpos", 77 "cursorpos",
74 True, 78 True,
75 NULL, // Default keycode 79 NULL, // Default keycode
@@ -79,6 +83,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -79,6 +83,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
79 N_( "Display the cursor location in the OIA (the status line)" ) 83 N_( "Display the cursor location in the OIA (the status line)" )
80 }, 84 },
81 { 85 {
  86 + LIB3270_TOGGLE_DS_TRACE,
82 "dstrace", 87 "dstrace",
83 False, 88 False,
84 NULL, // Default keycode 89 NULL, // Default keycode
@@ -88,6 +93,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "linewrap", 97 "linewrap",
92 False, 98 False,
93 NULL, // Default keycode 99 NULL, // Default keycode
@@ -97,6 +103,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -97,6 +103,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
97 N_("If set, the NVT terminal emulator automatically assumes a NEWLINE character when it reaches the end of a line.") 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 "blankfill", 107 "blankfill",
101 False, 108 False,
102 NULL, // Default keycode 109 NULL, // Default keycode
@@ -106,6 +113,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -106,6 +113,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
106 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" ) 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 "screentrace", 117 "screentrace",
110 False, 118 False,
111 NULL, // Default keycode 119 NULL, // Default keycode
@@ -115,6 +123,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "eventtrace", 127 "eventtrace",
119 False, 128 False,
120 NULL, // Default keycode 129 NULL, // Default keycode
@@ -124,6 +133,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "marginedpaste", 137 "marginedpaste",
128 False, 138 False,
129 NULL, // Default keycode 139 NULL, // Default keycode
@@ -133,6 +143,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -133,6 +143,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
133 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" ) 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 "rectselect", 147 "rectselect",
137 False, 148 False,
138 NULL, // Default keycode 149 NULL, // Default keycode
@@ -142,6 +153,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -142,6 +153,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
142 N_( "If set, the terminal will always select rectangular areas of the screen. Otherwise, it selects continuous regions of the screen" ) 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 "crosshair", 157 "crosshair",
146 False, 158 False,
147 "<alt>x", // Default keycode 159 "<alt>x", // Default keycode
@@ -151,6 +163,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -151,6 +163,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
151 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" ) 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 "fullscreen", 167 "fullscreen",
155 False, 168 False,
156 "<alt>Home", // Default keycode 169 "<alt>Home", // Default keycode
@@ -160,6 +173,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -160,6 +173,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
160 N_( "If set, asks to place the toplevel window in the fullscreen state" ) 173 N_( "If set, asks to place the toplevel window in the fullscreen state" )
161 }, 174 },
162 { 175 {
  176 + LIB3270_TOGGLE_RECONNECT,
163 "reconnect", 177 "reconnect",
164 False, 178 False,
165 NULL, // Default keycode 179 NULL, // Default keycode
@@ -169,6 +183,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -169,6 +183,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
169 N_( "Automatically reconnect to the host if it ever disconnects" ) 183 N_( "Automatically reconnect to the host if it ever disconnects" )
170 }, 184 },
171 { 185 {
  186 + LIB3270_TOGGLE_INSERT,
172 "insert", 187 "insert",
173 False, 188 False,
174 "Insert", // Default keycode 189 "Insert", // Default keycode
@@ -178,6 +193,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "smartpaste", 197 "smartpaste",
182 False, 198 False,
183 NULL, // Default keycode 199 NULL, // Default keycode
@@ -187,6 +203,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "bold", 207 "bold",
191 False, 208 False,
192 NULL, // Default keycode 209 NULL, // Default keycode
@@ -196,6 +213,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "keepselected", 217 "keepselected",
200 False, 218 False,
201 NULL, // Default keycode 219 NULL, // Default keycode
@@ -205,8 +223,9 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "underline", 227 "underline",
209 - False, 228 + True,
210 NULL, // Default keycode 229 NULL, // Default keycode
211 "format-text-underline", // Icon name 230 "format-text-underline", // Icon name
212 N_( "Underline" ), 231 N_( "Underline" ),
@@ -214,6 +233,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "autoconnect", 237 "autoconnect",
218 False, 238 False,
219 NULL, // Default keycode 239 NULL, // Default keycode
@@ -223,6 +243,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "kpalternative", 247 "kpalternative",
227 False, 248 False,
228 NULL, // Default keycode 249 NULL, // Default keycode
@@ -232,6 +253,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -232,6 +253,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
232 N_( "Use the keys +/- from keypad to select editable fields" ) 253 N_( "Use the keys +/- from keypad to select editable fields" )
233 }, 254 },
234 { 255 {
  256 + LIB3270_TOGGLE_BEEP,
235 "beep", 257 "beep",
236 True, 258 True,
237 NULL, // Default keycode 259 NULL, // Default keycode
@@ -241,6 +263,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -241,6 +263,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
241 N_( "Beep on errors" ) 263 N_( "Beep on errors" )
242 }, 264 },
243 { 265 {
  266 + LIB3270_TOGGLE_VIEW_FIELD,
244 "fieldattr", 267 "fieldattr",
245 False, 268 False,
246 NULL, // Default keycode 269 NULL, // Default keycode
@@ -250,6 +273,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 "altscreen", 277 "altscreen",
254 True, 278 True,
255 NULL, // Default keycode 279 NULL, // Default keycode
@@ -259,6 +283,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -259,6 +283,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
259 N_( "Auto resize on altscreen" ) 283 N_( "Auto resize on altscreen" )
260 }, 284 },
261 { 285 {
  286 + LIB3270_TOGGLE_KEEP_ALIVE,
262 "keepalive", 287 "keepalive",
263 True, 288 True,
264 NULL, // Default keycode 289 NULL, // Default keycode
@@ -268,6 +293,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -268,6 +293,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
268 N_( "Enable network keep-alive with SO_KEEPALIVE" ) 293 N_( "Enable network keep-alive with SO_KEEPALIVE" )
269 }, 294 },
270 { 295 {
  296 + LIB3270_TOGGLE_NETWORK_TRACE,
271 "nettrace", 297 "nettrace",
272 False, 298 False,
273 NULL, // Default keycode 299 NULL, // Default keycode
@@ -277,6 +303,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -277,6 +303,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] =
277 N_( "Enable network in/out trace" ) 303 N_( "Enable network in/out trace" )
278 }, 304 },
279 { 305 {
  306 + LIB3270_TOGGLE_SSL_TRACE,
280 "ssltrace", 307 "ssltrace",
281 False, 308 False,
282 NULL, // Default keycode 309 NULL, // Default keycode
@@ -287,6 +314,7 @@ const LIB3270_TOGGLE_ENTRY toggle_descriptor[LIB3270_TOGGLE_COUNT+1] = @@ -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 NULL, 318 NULL,
291 0, 319 0,
292 NULL, 320 NULL,
src/include/lib3270/toggle.h
@@ -39,16 +39,16 @@ @@ -39,16 +39,16 @@
39 39
40 typedef struct _lib3270_toggle_entry 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 } LIB3270_TOGGLE_ENTRY; 50 } LIB3270_TOGGLE_ENTRY;
50 51
51 -  
52 /** 52 /**
53 * @brief Get the toggle description table. 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,7 +244,7 @@ X509_CRL * get_crl_using_ldap(H3270 *hSession, SSL_ERROR_MESSAGE * message, cons
244 lib3270_trace_data( 244 lib3270_trace_data(
245 hSession, 245 hSession,
246 "CRL Data received from LDAP server", 246 "CRL Data received from LDAP server",
247 - (const char *) value[0]->bv_val, 247 + (const unsigned char *) value[0]->bv_val,
248 value[0]->bv_len 248 value[0]->bv_len
249 ); 249 );
250 } 250 }