Commit 44439af72420ae8bb4d3908baa71524a8142deb6
1 parent
fade02b5
Exists in
master
and in
1 other branch
Opening URL myself if no one answers to the open-url signal.
Showing
2 changed files
with
15 additions
and
3 deletions
Show diff stats
src/terminal/callbacks.c
| ... | ... | @@ -434,12 +434,24 @@ static int load(H3270 *session, const char *filename) |
| 434 | 434 | |
| 435 | 435 | debug("Emitting '%s'", text); |
| 436 | 436 | |
| 437 | + guint response = (guint) -1; | |
| 437 | 438 | v3270_signal_emit( |
| 438 | 439 | terminal, |
| 439 | 440 | V3270_SIGNAL_OPEN_URL, |
| 440 | - text | |
| 441 | + text, | |
| 442 | + &response | |
| 441 | 443 | ); |
| 442 | 444 | |
| 445 | + if(response == (guint) -1) { | |
| 446 | + // No one has changed the response, take default action. | |
| 447 | + gtk_show_uri_on_window( | |
| 448 | + GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(terminal))), | |
| 449 | + text, | |
| 450 | + GDK_CURRENT_TIME, | |
| 451 | + NULL | |
| 452 | + ); | |
| 453 | + } | |
| 454 | + | |
| 443 | 455 | } |
| 444 | 456 | |
| 445 | 457 | } | ... | ... |
src/terminal/widget.c
| ... | ... | @@ -534,8 +534,8 @@ static void finalize(GObject *object) { |
| 534 | 534 | G_SIGNAL_RUN_LAST, |
| 535 | 535 | 0, |
| 536 | 536 | NULL, NULL, |
| 537 | - v3270_VOID__POINTER, | |
| 538 | - G_TYPE_NONE, 1, G_TYPE_STRING); | |
| 537 | + v3270_UINT__POINTER, | |
| 538 | + G_TYPE_UINT, 1, G_TYPE_STRING); | |
| 539 | 539 | |
| 540 | 540 | v3270_widget_signal[V3270_SIGNAL_SAVE_POPUP_RESPONSE] = |
| 541 | 541 | g_signal_new( I_("save-popup-response"), | ... | ... |