Commit 0f1e1eafa2519c7f6c6ab2836a5d7c309b60e642
1 parent
e59a573a
Exists in
master
and in
5 other branches
Iniciando plugins após a apresentação da janela principal para permitir que um d…
…eterminado plugin emita alerta e cancele a aplicação.
Showing
1 changed file
with
17 additions
and
0 deletions
Show diff stats
src/pw3270/main.c
... | ... | @@ -334,6 +334,19 @@ static void g_trace(H3270 *hSession, const char *fmt, va_list args) |
334 | 334 | g_free(ptr); |
335 | 335 | } |
336 | 336 | |
337 | +static gboolean startup(GtkWidget *toplevel) | |
338 | +{ | |
339 | + gtk_window_present(GTK_WINDOW(toplevel)); | |
340 | + | |
341 | +#ifdef HAVE_GTKMAC | |
342 | + gtk_osxapplication_ready(osxapp); | |
343 | +#endif // HAVE_GTKMAC | |
344 | + | |
345 | + pw3270_start_plugins(toplevel); | |
346 | + | |
347 | + return FALSE; | |
348 | +} | |
349 | + | |
337 | 350 | int main(int argc, char *argv[]) |
338 | 351 | { |
339 | 352 | static const gchar * session_name = PACKAGE_NAME; |
... | ... | @@ -568,12 +581,16 @@ int main(int argc, char *argv[]) |
568 | 581 | |
569 | 582 | v3270_set_auto_disconnect(pw3270_get_terminal_widget(toplevel),timer); |
570 | 583 | |
584 | + /* | |
571 | 585 | pw3270_start_plugins(toplevel); |
572 | 586 | gtk_window_present(GTK_WINDOW(toplevel)); |
573 | 587 | |
574 | 588 | #ifdef HAVE_GTKMAC |
575 | 589 | gtk_osxapplication_ready(osxapp); |
576 | 590 | #endif // HAVE_GTKMAC |
591 | + */ | |
592 | + | |
593 | + g_idle_add((GSourceFunc) startup, toplevel); | |
577 | 594 | |
578 | 595 | gtk_main(); |
579 | 596 | ... | ... |