Commit f7c504e31620ca326cec7417b7d77e7abe3c8b9a
1 parent
927dff03
Exists in
master
and in
1 other branch
Refactoring popup engine.
Showing
1 changed file
with
16 additions
and
0 deletions
Show diff stats
src/terminal/callbacks.c
| @@ -428,6 +428,20 @@ static void popup_handler(H3270 *session, LIB3270_NOTIFY type, const char *title | @@ -428,6 +428,20 @@ static void popup_handler(H3270 *session, LIB3270_NOTIFY type, const char *title | ||
| 428 | return -1; | 428 | return -1; |
| 429 | } | 429 | } |
| 430 | 430 | ||
| 431 | + static int popup_show(H3270 *hSession, const LIB3270_POPUP *popup, unsigned char wait) { | ||
| 432 | + | ||
| 433 | + GtkResponseType response = v3270_show_popup( | ||
| 434 | + GTK_WIDGET(lib3270_get_user_data(hSession)), | ||
| 435 | + popup, | ||
| 436 | + wait != 0 ? TRUE : FALSE ); | ||
| 437 | + | ||
| 438 | + if(response == GTK_RESPONSE_OK || response == GTK_RESPONSE_APPLY) | ||
| 439 | + return 0; | ||
| 440 | + | ||
| 441 | + return -1; | ||
| 442 | + | ||
| 443 | + } | ||
| 444 | + | ||
| 431 | void v3270_install_callbacks(v3270 *widget) | 445 | void v3270_install_callbacks(v3270 *widget) |
| 432 | { | 446 | { |
| 433 | struct lib3270_session_callbacks *cbk; | 447 | struct lib3270_session_callbacks *cbk; |
| @@ -466,7 +480,9 @@ static void popup_handler(H3270 *session, LIB3270_NOTIFY type, const char *title | @@ -466,7 +480,9 @@ static void popup_handler(H3270 *session, LIB3270_NOTIFY type, const char *title | ||
| 466 | cbk->print = print; | 480 | cbk->print = print; |
| 467 | cbk->save = save; | 481 | cbk->save = save; |
| 468 | cbk->load = load; | 482 | cbk->load = load; |
| 483 | + | ||
| 469 | cbk->popup_ssl_error = popup_ssl_error; | 484 | cbk->popup_ssl_error = popup_ssl_error; |
| 485 | + cbk->popup_show = popup_show; | ||
| 470 | 486 | ||
| 471 | } | 487 | } |
| 472 | 488 |