From 33b346ad0cdb9741574940441d1da74e512658e2 Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 15 May 2015 08:55:35 +0000 Subject: [PATCH] git-svn-id: svn://10.65.10.50/branches/R_10_00@23095 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba0100.cpp | 1 + ba/ba1600.cpp | 2 +- ba/ba2800.cpp | 3 ++- ba/ba7100.cpp | 34 +++++----------------------------- 4 files changed, 9 insertions(+), 31 deletions(-) diff --git a/ba/ba0100.cpp b/ba/ba0100.cpp index 46de8f0f3..c38c2f99a 100755 --- a/ba/ba0100.cpp +++ b/ba/ba0100.cpp @@ -1762,6 +1762,7 @@ bool TStudy_mask::is_valid_study(const char* path) const void TStudy_mask::list_studies(TString_array& sht, bool firms_count) const { + TWait_cursor hourglass; TFilename str = firm2dir(-1); for (int i = str.len()-2; i > 0; i--) { diff --git a/ba/ba1600.cpp b/ba/ba1600.cpp index ee2f2c5ea..5bafde539 100755 --- a/ba/ba1600.cpp +++ b/ba/ba1600.cpp @@ -2241,7 +2241,7 @@ void TCreazione_dischi::main_loop() int ba1600(int argc, char* argv[]) { - if (user() == ::dongle().administrator()) + if (is_power_station()) { TCreazione_dischi app; app.run(argc, argv, TR("Creazione Patch")); diff --git a/ba/ba2800.cpp b/ba/ba2800.cpp index 98f11bd70..23533e849 100644 --- a/ba/ba2800.cpp +++ b/ba/ba2800.cpp @@ -860,6 +860,7 @@ void Tdninst_mask::save_sheet() remove(DNINST_BAK); } } + _dninst.save(11); // Sicurezza } } @@ -1122,7 +1123,7 @@ bool Tdninst_manager::create() // 8453 = Ilaria; 8517 = Sara const TString& host = get_hostname(); if (n != 8453 && n != 8517 && !is_power_station() && - host.compare("nbkgiardini", -1, true) != 0 && + !host.ends_with("giardini", true) && host.compare("pccopw7", -1, true) != 0 && host.compare("pcpiccolow7", -1, true) != 0) return error_box(FR("Postazione %s non abilitata"), (const char*)host); diff --git a/ba/ba7100.cpp b/ba/ba7100.cpp index 898e3f893..b2b19aabd 100755 --- a/ba/ba7100.cpp +++ b/ba/ba7100.cpp @@ -23,28 +23,6 @@ #define NOT_TRANS -883 #define NOT_GEST -884 -/////////////////////////////////////////////////////////// -// TConfig utilities -/////////////////////////////////////////////////////////// - -/* Obsolete -static const TString& set_ini_var(int cfg, const char* para, const char* var, const char* val) -{ - TConfig ini(cfg, para); - const TString& prev = ini.get(var); - if (val != NULL) - ini.set(var, val); - if (prev.blank()) - return EMPTY_STRING; - TString& tmp = get_tmp_string(); - tmp = prev; - return tmp; -} - -inline const TString& get_ini_var(int cfg, const char* para, const char* var) -{ return ini_get_string(cfg, para, var); } -*/ - /////////////////////////////////////////////////////////// // TMail_box /////////////////////////////////////////////////////////// @@ -726,7 +704,6 @@ void TMailer_mask::scan_dir(const TFilename& dir, TMail_messages& box) const if (subject.full()) { FILE_SPEC fs; xvt_fsys_convert_str_to_fspec(*row, &fs); - TMail_message* msg = new TMail_message(user(), subject, text, fs.dir.path); msg->set_id(id = fs.name); @@ -1036,7 +1013,7 @@ static int run_sync(const char* appname) SHELLEXECUTEINFO sei; memset(&sei, 0, sizeof(sei)); sei.cbSize = sizeof(sei); - sei.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_DDEWAIT; + sei.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NOASYNC; sei.lpVerb = ""; sei.lpFile = app; sei.lpParameters = par; @@ -1045,7 +1022,8 @@ static int run_sync(const char* appname) { if (sei.hProcess != NULL) { - ::WaitForSingleObject(sei.hProcess, 0); + if (::WaitForSingleObject(sei.hProcess, INFINITE)) + err = GetLastError(); ::CloseHandle(sei.hProcess); } else @@ -1515,16 +1493,14 @@ bool TMailer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly _timer_id = xvt_timer_create(win(), 1000L); _secs = 0L; if (_timer_id == XVT_TIMER_ERROR) - return error_box("Impossibile impostare il timer"); + return error_box(TR("Impossibile impostare il timer")); } } break; case F_MESSAGES: if (e == fe_init) { - if (!field(F_SERVER).empty() && - !field(F_USER).empty() && - !field(F_PASSWORD).empty()) + if (!field(F_SERVER).empty() && !field(F_USER).empty() && !field(F_PASSWORD).empty()) fill_messages(); } else if (e == se_query_add)