Commit 18bfb59fa3b4bb34c4f3500dbee062791464298d

Authored by perry.werneck@gmail.com
1 parent 1bee10c4

Incluindo descrição e label dos toggles na biblioteca

Showing 1 changed file with 164 additions and 26 deletions   Show diff stats
toggles.c
... ... @@ -59,36 +59,167 @@ static const struct _toggle_info
59 59 {
60 60 const char * name;
61 61 const char def;
  62 + const char * label;
62 63 const char * description;
63 64 }
64 65 toggle_info[LIB3270_TOGGLE_COUNT] =
65 66 {
66   - { "monocase", False, N_( "Uppercase mode." ) },
67   - { "cursorblink", True, N_( "" ) },
68   - { "showtiming", False, N_( "" ) },
69   - { "cursorpos", True, N_( "Display the cursor location in the OIA (the status line)." ) },
70   - { "dstrace", False, N_( "" ) },
71   - { "linewrap", False, N_( "" ) },
72   - { "blankfill", False, 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" ) },
73   - { "screentrace", False, N_( "" ) },
74   - { "eventtrace", False, N_( "" ) },
75   - { "marginedpaste", False, N_( "" ) },
76   - { "rectselect", False, N_( "" ) },
77   - { "crosshair", False, N_( "" ) },
78   - { "fullscreen", False, N_( "" ) },
79   - { "reconnect", False, N_( "" ) },
80   - { "insert", False, N_( "" ) },
81   - { "smartpaste", False, N_( "" ) },
82   - { "bold", False, N_( "" ) },
83   - { "keepselected", False, N_( "" ) },
84   - { "underline", False, N_( "" ) },
85   - { "autoconnect", False, N_( "" ) },
86   - { "kpalternative", False, N_( "Keypad +/- move to next/previous field" ) },
87   - { "beep", True, N_( "Beep on errors" ) },
88   - { "fieldattr", False, N_( "Show Field attribute" ) },
89   - { "altscreen", True, N_( "Auto resize on altscreen" ) },
90   - { "keepalive", True, N_( "Enable network keep-alive with SO_KEEPALIVE" ) },
91   - { "nettrace", False, N_( "Enable network in/out trace" ) },
  67 + {
  68 + "monocase",
  69 + False,
  70 + N_( "Monocase" ),
  71 + N_( "If set, the terminal operates in uppercase-only mode" )
  72 + },
  73 + {
  74 + "cursorblink",
  75 + True,
  76 + N_( "Blinking Cursor" ),
  77 + N_( "If set, the cursor blinks" )
  78 + },
  79 + {
  80 + "showtiming",
  81 + True,
  82 + N_( "Show timer when processing" ),
  83 + N_( "If set, the time taken by the host to process an AID is displayed on the status line" )
  84 + },
  85 + {
  86 + "cursorpos",
  87 + True,
  88 + N_( "Track Cursor" ),
  89 + N_( "Display the cursor location in the OIA (the status line)" )
  90 + },
  91 + {
  92 + "dstrace",
  93 + False,
  94 + N_( "Trace Data Stream" ),
  95 + N_( "" )
  96 + },
  97 + {
  98 + "linewrap",
  99 + False,
  100 + N_( "" ),
  101 + N_( "" )
  102 + },
  103 + {
  104 + "blankfill",
  105 + False,
  106 + N_( "Blank Fill" ),
  107 + 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" )
  108 + },
  109 + {
  110 + "screentrace",
  111 + False,
  112 + N_( "Trace screen contents" ),
  113 + N_( "" )
  114 + },
  115 + {
  116 + "eventtrace",
  117 + False,
  118 + N_( "Trace interface events" ),
  119 + N_( "" )
  120 + },
  121 + {
  122 + "marginedpaste",
  123 + False,
  124 + N_( "Paste with left margin" ),
  125 + 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." )
  126 + },
  127 + {
  128 + "rectselect",
  129 + False,
  130 + N_( "Select by rectangles" ),
  131 + N_( "If set, the terminal will always select rectangular areas of the screen. Otherwise, it selects continuous regions of the screen" )
  132 + },
  133 + {
  134 + "crosshair",
  135 + False,
  136 + N_( "Cross hair cursor" ),
  137 + 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" )
  138 + },
  139 + {
  140 + "fullscreen",
  141 + False,
  142 + N_( "Full Screen" ),
  143 + N_( "" )
  144 + },
  145 + {
  146 + "reconnect",
  147 + False,
  148 + N_( "Auto-Reconnect" ),
  149 + N_( "" )
  150 + },
  151 + {
  152 + "insert",
  153 + False,
  154 + N_( "" ),
  155 + N_( "" )
  156 + },
  157 + {
  158 + "smartpaste",
  159 + False,
  160 + N_( "Smart paste" ),
  161 + N_( "" )
  162 + },
  163 + {
  164 + "bold",
  165 + False,
  166 + N_( "Bold" ),
  167 + N_( "" )
  168 + },
  169 + {
  170 + "keepselected",
  171 + False,
  172 + N_( "Keep selected" ),
  173 + N_( "" )
  174 + },
  175 + {
  176 + "underline",
  177 + False,
  178 + N_( "Show Underline" ),
  179 + N_( "" )
  180 + },
  181 + {
  182 + "autoconnect",
  183 + False,
  184 + N_( "Connect on startup" ),
  185 + N_( "" )
  186 + },
  187 + {
  188 + "kpalternative",
  189 + False,
  190 + N_( "Use +/- for field navigation" ),
  191 + N_( "Keypad +/- move to next/previous field" )
  192 + },
  193 + {
  194 + "beep",
  195 + True,
  196 + N_( "Alert sound" ),
  197 + N_( "Beep on errors" )
  198 + },
  199 + {
  200 + "fieldattr",
  201 + False,
  202 + N_( "" ),
  203 + N_( "Show Field attribute" )
  204 + },
  205 + {
  206 + "altscreen",
  207 + True,
  208 + N_( "Resize on alternate screen" ),
  209 + N_( "Auto resize on altscreen" )
  210 + },
  211 + {
  212 + "keepalive",
  213 + True,
  214 + N_( "Network keep alive" ),
  215 + N_( "Enable network keep-alive with SO_KEEPALIVE" )
  216 + },
  217 + {
  218 + "nettrace",
  219 + False,
  220 + N_( "Trace network data flow" ),
  221 + N_( "Enable network in/out trace" )
  222 + },
92 223 };
93 224  
94 225 LIB3270_EXPORT unsigned char lib3270_get_toggle(H3270 *session, LIB3270_TOGGLE ix)
... ... @@ -230,6 +361,13 @@ void shutdown_toggles(H3270 *session)
230 361 #endif
231 362 }
232 363  
  364 +LIB3270_EXPORT const char * lib3270_get_toggle_label(LIB3270_TOGGLE_ID ix)
  365 +{
  366 + if(ix < N_TOGGLES)
  367 + return toggle_info[ix].label;
  368 + return "";
  369 +}
  370 +
233 371 LIB3270_EXPORT const char * lib3270_get_toggle_description(LIB3270_TOGGLE_ID ix)
234 372 {
235 373 if(ix < N_TOGGLES)
... ...