Commit 5aaeda65dc7f2779b8369acd60c7642903f38142

Authored by perry.werneck@gmail.com
1 parent 44d2c241

Incluindo notificacao quando da mudanca de um toggle

Showing 1 changed file with 31 additions and 31 deletions   Show diff stats
@@ -58,36 +58,36 @@ @@ -58,36 +58,36 @@
58 static const struct _toggle 58 static const struct _toggle
59 { 59 {
60 const char *name; 60 const char *name;
61 - const char *descr; 61 + const char *description;
62 } 62 }
63 toggle_info[LIB3270_TOGGLE_COUNT] = 63 toggle_info[LIB3270_TOGGLE_COUNT] =
64 { 64 {
65 - { "monocase", "" },  
66 - { "cursorblink", "" },  
67 - { "showtiming", "" },  
68 - { "cursorpos", "" },  
69 - { "dstrace", "" },  
70 - { "linewrap", "" },  
71 - { "blankfill", "" },  
72 - { "screentrace", "" },  
73 - { "eventtrace", "" },  
74 - { "marginedpaste", "" },  
75 - { "rectselect", "" },  
76 - { "crosshair", "" },  
77 - { "fullscreen", "" },  
78 - { "reconnect", "" },  
79 - { "insert", "" },  
80 - { "smartpaste", "" },  
81 - { "bold", "" },  
82 - { "keepselected", "" },  
83 - { "underline", "" },  
84 - { "autoconnect", "" },  
85 - { "kpalternative", "" }, /**< Keypad +/- move to next/previous field */  
86 - { "beep", "" }, /**< Beep on errors */  
87 - { "fieldattr", "" }, /**< View Field attribute */  
88 - { "altscreen", "" }, /**< auto resize on altscreen */  
89 - { "keepalive", "" }, /**< Enable network keep-alive with SO_KEEPALIVE */  
90 - { "nettrace", "" }, /**< Enable network in/out trace */ 65 + { "monocase", N_( "" ) },
  66 + { "cursorblink", N_( "" ) },
  67 + { "showtiming", N_( "" ) },
  68 + { "cursorpos", N_( "" ) },
  69 + { "dstrace", N_( "" ) },
  70 + { "linewrap", N_( "" ) },
  71 + { "blankfill", N_( "" ) },
  72 + { "screentrace", N_( "" ) },
  73 + { "eventtrace", N_( "" ) },
  74 + { "marginedpaste", N_( "" ) },
  75 + { "rectselect", N_( "" ) },
  76 + { "crosshair", N_( "" ) },
  77 + { "fullscreen", N_( "" ) },
  78 + { "reconnect", N_( "" ) },
  79 + { "insert", N_( "" ) },
  80 + { "smartpaste", N_( "" ) },
  81 + { "bold", N_( "" ) },
  82 + { "keepselected", N_( "" ) },
  83 + { "underline", N_( "" ) },
  84 + { "autoconnect", N_( "" ) },
  85 + { "kpalternative", N_( "Keypad +/- move to next/previous field" ) },
  86 + { "beep", N_( "Beep on errors" ) },
  87 + { "fieldattr", N_( "Show Field attribute" ) },
  88 + { "altscreen", N_( "Auto resize on altscreen" ) },
  89 + { "keepalive", N_( "Enable network keep-alive with SO_KEEPALIVE" ) },
  90 + { "nettrace", N_( "Enable network in/out trace" ) },
91 }; 91 };
92 92
93 LIB3270_EXPORT unsigned char lib3270_get_toggle(H3270 *session, LIB3270_TOGGLE ix) 93 LIB3270_EXPORT unsigned char lib3270_get_toggle(H3270 *session, LIB3270_TOGGLE ix)
@@ -109,7 +109,7 @@ static void toggle_notify(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGG @@ -109,7 +109,7 @@ static void toggle_notify(H3270 *session, struct lib3270_toggle *t, LIB3270_TOGG
109 t->upcall(session, t, TT_INTERACTIVE); 109 t->upcall(session, t, TT_INTERACTIVE);
110 110
111 if(session->update_toggle) 111 if(session->update_toggle)
112 - session->update_toggle(session,ix,t->value,TT_INTERACTIVE,toggle_names[ix]); 112 + session->update_toggle(session,ix,t->value,TT_INTERACTIVE,toggle_info[ix].name);
113 113
114 } 114 }
115 115
@@ -244,14 +244,14 @@ void shutdown_toggles(H3270 *session) @@ -244,14 +244,14 @@ void shutdown_toggles(H3270 *session)
244 LIB3270_EXPORT const char * lib3270_get_toggle_description(LIB3270_TOGGLE_ID ix) 244 LIB3270_EXPORT const char * lib3270_get_toggle_description(LIB3270_TOGGLE_ID ix)
245 { 245 {
246 if(ix < N_TOGGLES) 246 if(ix < N_TOGGLES)
247 - return toggle_names[ix]; 247 + return toggle_info[ix].description;
248 return ""; 248 return "";
249 } 249 }
250 250
251 LIB3270_EXPORT const char * lib3270_get_toggle_name(LIB3270_TOGGLE_ID ix) 251 LIB3270_EXPORT const char * lib3270_get_toggle_name(LIB3270_TOGGLE_ID ix)
252 { 252 {
253 if(ix < N_TOGGLES) 253 if(ix < N_TOGGLES)
254 - return toggle_names[ix]; 254 + return toggle_info[ix].name;
255 return ""; 255 return "";
256 } 256 }
257 257
@@ -262,7 +262,7 @@ LIB3270_EXPORT LIB3270_TOGGLE lib3270_get_toggle_id(const char *name) @@ -262,7 +262,7 @@ LIB3270_EXPORT LIB3270_TOGGLE lib3270_get_toggle_id(const char *name)
262 int f; 262 int f;
263 for(f=0;f<N_TOGGLES;f++) 263 for(f=0;f<N_TOGGLES;f++)
264 { 264 {
265 - if(!strcasecmp(name,toggle_names[f])) 265 + if(!strcasecmp(name,toggle_info[f].name))
266 return f; 266 return f;
267 } 267 }
268 } 268 }