diff --git a/ba/ba0100.cpp b/ba/ba0100.cpp index 808aab302..449e27eba 100755 --- a/ba/ba0100.cpp +++ b/ba/ba0100.cpp @@ -375,18 +375,11 @@ bool TExplorer_mask::stop_run(KEY k) for (i = 2; i >= 0; i--) xvt_image_destroy(image[i]); - if (sys_dll_changed()) //se e' stato installato SY.. - { - xvt_sys_sleep(1); //..aspetta un attimo poi forza l'uscita - } - else + if (!yesno_box(TR("Si desidera uscire?"))) //..altrimenti chiede educatamente se si desidera uscire { - if (!yesno_box(TR("Si desidera uscire?"))) //..altrimenti chiede educatamente se si desidera uscire - { - for (i = 0; i < 3; i++) - xvt_dwin_invalidate_rect(window[i], NULL); - return false; - } + for (i = 0; i < 3; i++) + xvt_dwin_invalidate_rect(window[i], NULL); + return false; } } } @@ -493,6 +486,9 @@ bool TExplorer_mask::on_key(KEY k) set(DLG_USER, app().main_menu().last_search_string(), true); return true; } + if (k == K_FORCE_CLOSE || k == K_QUIT) + return stop_run(k); + return TMask::on_key(k); } diff --git a/ba/ba0101.cpp b/ba/ba0101.cpp index 1c76d6761..bbe7c1057 100755 --- a/ba/ba0101.cpp +++ b/ba/ba0101.cpp @@ -317,42 +317,20 @@ bool TMenuitem::perform_program() const TExternal_app a(_action); const bool async = install_app; // Lancio l'installazione moduli sempre asincrona a.run(async, 3); -/* - if (maintenance_app) - { - char line1[16],line2[16]; - while (fexist("conv.his")) - { - FILE* fp = fopen("conv.his","r"); - fgets(line1,15,fp); - fclose(fp); - // Ora aspetta... - time_t old_time ; - time( &old_time) ; - while ( time( (time_t *) 0 ) <= old_time ) do_events(); - TExternal_app auto_conv("ba1 -0 -C"); - auto_conv.run(); - fp = fopen("conv.his","r"); - if (fp != NULL) - { - fgets(line2,15,fp); - fclose(fp); - } - else strcpy(line2,""); - if (strcmp(line1,line2) == 0) - if (!yesno_box("La conversione non sembra procedere. Continuare?")) - break; - } - } -*/ prefix().set("DEF"); // Aggiorna prefix if (install_app) { WINDOW w = cur_win(); - if (w != NULL_WIN) - dispatch_e_char(w, K_QUIT); + if (w != NULL_WIN) //TExplorer_mask + dispatch_e_char(w, K_FORCE_CLOSE); //chiude senza chiedere conferma (installazione e roba simile) + else + { + EVENT e; memset(&e, 0, sizeof(e)); + e.type = E_CLOSE; + dispatch_event(TASK_WIN, e, true); + } } printer_destroy(); // Forza rilettura parametri della stampante diff --git a/ba/ba1700.cpp b/ba/ba1700.cpp index 4572f274c..7a1da0a57 100755 --- a/ba/ba1700.cpp +++ b/ba/ba1700.cpp @@ -624,8 +624,9 @@ int TInstaller_mask::needs_reboot(const TFilename& file) const bool TInstaller_mask::is_zip_file(const TFilename& n) const { - const char* ext = n.ext(); - return xvt_str_compare_ignoring_case(ext, "zip") == 0; + bool yes = xvt_str_compare_ignoring_case(n.ext(), "zip") == 0 && + xvt_str_compare_ignoring_case(n.name(), "dninst.zip") != 0; +return yes; } void TInstaller_mask::create_dirs(const char* path) const diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index 764a243c6..70a407720 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -5017,7 +5017,11 @@ WINDOW xvt_win_create(WIN_TYPE wtype, const RCT* rct_p, const char* title, int m long xvt_win_dispatch_event(WINDOW win, EVENT* event_p) { - XVT_ASSERT(event_p != NULL); + XVT_ASSERT(win != NULL_WIN && event_p != NULL); + + if (win == (WINDOW)_task_win) + return _task_win_handler(win, event_p); + CAST_TWIN(win, w); return w._eh(win, event_p); }