Commit 50fefed48acd96d035bd0c77f72f913b23f07ef2
1 parent
5c56d070
Exists in
master
and in
5 other branches
Implementando configuracao do modelo pela linha de comando
Showing
1 changed file
with
5 additions
and
1 deletions
Show diff stats
src/pw3270/window.c
... | ... | @@ -345,10 +345,14 @@ |
345 | 345 | if(gtk_check_menu_item_get_active(item)) |
346 | 346 | { |
347 | 347 | char name[2]; |
348 | + int model = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(item),"mode_3270")); | |
349 | + | |
350 | + if(model == lib3270_get_model(v3270_get_session(widget))) | |
351 | + return; | |
348 | 352 | |
349 | 353 | trace("screen model on widget %p changes to %d",widget,GPOINTER_TO_INT(g_object_get_data(G_OBJECT(item),"mode_3270"))); |
350 | 354 | |
351 | - name[0] = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(item),"mode_3270"))+'0'; | |
355 | + name[0] = model+'0'; | |
352 | 356 | name[1] = 0; |
353 | 357 | lib3270_set_model(v3270_get_session(widget),name); |
354 | 358 | } | ... | ... |