From 81534d006ffb510d97f4727533aec4eb50f71d62 Mon Sep 17 00:00:00 2001 From: guy Date: Mon, 23 Mar 2009 15:16:49 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : tutti Ricompilazione Demo : [ ] Commento : 0001213: mappa di login, fuoco Lla mappa di login si apre ma per poter digitare la password bisogna cliccare sul campo col mouse. Stesso problema richiamando le ricerche, per esempio quella clienti. git-svn-id: svn://10.65.10.50/trunk@18591 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/applicat.cpp | 13 +++++++++++++ include/applicat.h | 1 + include/mask.cpp | 8 ++++++-- include/maskfld.cpp | 7 ++++--- include/modtbapp.cpp | 3 +++ include/printapp.cpp | 4 +++- include/tabapp.cpp | 8 +++++++- include/treectrl.cpp | 21 ++++++++++++++++----- 8 files changed, 53 insertions(+), 12 deletions(-) diff --git a/include/applicat.cpp b/include/applicat.cpp index 1ce40ffe6..8c946badd 100755 --- a/include/applicat.cpp +++ b/include/applicat.cpp @@ -190,6 +190,9 @@ long TApplication::handler(WINDOW win, EVENT* ep) case M_FILE_PG_SETUP: printer().set(); break; + case M_FILE_PREVIEW: + preview(); + break; case M_FILE_PRINT: print(); break; @@ -563,6 +566,16 @@ void TApplication::print() #ifdef DBG NFCHECK("Non saprei bene cosa stampare!"); #endif + enable_menu_item(M_FILE_PREVIEW, false); + enable_menu_item(M_FILE_PRINT, false); +} + +void TApplication::preview() +{ + const TPrtype oldmode = printer().printtype(); + printer().set_printtype(screenvis); + print(); + printer().set_printtype(oldmode); } void TApplication::check_menu_item(MENU_TAG item, bool chk) diff --git a/include/applicat.h b/include/applicat.h index e6d7609c3..acad7564e 100755 --- a/include/applicat.h +++ b/include/applicat.h @@ -121,6 +121,7 @@ public: { return _create_ok; } // @cmember Risposta alla selezione Stampa del menu File virtual void print(); + virtual void preview(); virtual bool get_next_pdf(int anno, long ditta, const char* codnum, long numdoc, long codcf, TFilename& pdf) const; virtual bool get_next_mail(TToken_string& to, TToken_string& cc, TToken_string& ccn, diff --git a/include/mask.cpp b/include/mask.cpp index 4e631692c..770295310 100755 --- a/include/mask.cpp +++ b/include/mask.cpp @@ -1365,8 +1365,12 @@ WINDOW TMask::create_page(const char* title, int dove) void TMask::set_focus() { TWindow::set_focus(); - if (_notebook != NULL_WIN) - xvt_scr_set_focus_vobj(curr_win()); + WINDOW w = curr_win(); + if (w != win()) // Succede se ci sono notebook o toolbar + { + xvt_scr_set_focus_vobj(w); + xvt_vobj_raise(w); + } } // @doc EXTERNAL diff --git a/include/maskfld.cpp b/include/maskfld.cpp index 3b3d7a540..3734c8183 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -771,7 +771,7 @@ bool TOperable_field::parse_item(TScanner& scanner) if (scanner.key() == "ME") { const TString& m = scanner.line().trim(); // Togli spazi - message(0, TRUE)->add(m); + message(0, true)->add(m); return true; } @@ -781,6 +781,7 @@ bool TOperable_field::parse_item(TScanner& scanner) void TOperable_field::set_focus() const { mask().set_focus_field(dlg()); + _ctl->set_focus(); } // Certified 100% @@ -2838,8 +2839,8 @@ void TFile_select::parse_output(TScanner& scanner) KEY TFile_select::run() { TFilename path; - path.add(field().get()); - if (_filter.find('.') > 0 && !_filter.ends_with(".*")) + path = field().get(); + if (path.full() && _filter.find('.') > 0 && !_filter.ends_with(".*")) path.ext(_filter.ext()); FILE_SPEC fs; xvt_fsys_convert_str_to_fspec(path, &fs); diff --git a/include/modtbapp.cpp b/include/modtbapp.cpp index d5c496008..3226b6285 100755 --- a/include/modtbapp.cpp +++ b/include/modtbapp.cpp @@ -62,7 +62,10 @@ bool TTable_module_application::user_create() if (tb > 0) rep.overwrite("st", tb); if (rep.custom_path()) + { + enable_menu_item(M_FILE_PREVIEW); enable_menu_item(M_FILE_PRINT); + } TString title; _msk->get_caption(title); diff --git a/include/printapp.cpp b/include/printapp.cpp index 2ed2156d7..31fea552f 100755 --- a/include/printapp.cpp +++ b/include/printapp.cpp @@ -1112,7 +1112,7 @@ bool TPrint_application::print_tree (link_item * head) do { if (!preprocess_print (head->_logicnum, head->_cnt)) - break; + break; do { // set print rows according to current file @@ -1582,11 +1582,13 @@ void TPrint_application::do_print(int n) void TPrint_application::enable_print_menu() { + enable_menu_item(M_FILE_PREVIEW, TRUE); enable_menu_item(M_FILE_PRINT, TRUE); } void TPrint_application::disable_print_menu() { + enable_menu_item(M_FILE_PREVIEW, FALSE); enable_menu_item(M_FILE_PRINT, FALSE); } diff --git a/include/tabapp.cpp b/include/tabapp.cpp index ce17a795e..c36e06e7a 100755 --- a/include/tabapp.cpp +++ b/include/tabapp.cpp @@ -124,7 +124,10 @@ bool TTable_application::user_create() TFilename rpt; get_mask_name(rpt); rpt.ext("rpt"); if (rpt.custom_path()) + { + enable_menu_item(M_FILE_PREVIEW); enable_menu_item(M_FILE_PRINT); + } TString title; _msk->get_caption(title); @@ -300,8 +303,11 @@ bool TMultirel_application::user_create() TFilename rep = tabname; rep.ext("rep"); - if (rep.custom_path()) + if (rep.custom_path()) + { + enable_menu_item(M_FILE_PREVIEW); enable_menu_item(M_FILE_PRINT); + } TString title; _msk->get_caption(title); diff --git a/include/treectrl.cpp b/include/treectrl.cpp index 564801c0a..8a5c37bce 100755 --- a/include/treectrl.cpp +++ b/include/treectrl.cpp @@ -533,14 +533,25 @@ void TTree_window::set_row_height(int rh) { } -TTree_window::TTree_window(int x, int y, int dx, int dy, - WINDOW parent, TTree_field* owner) - : TControl_host_window(x, y, dx, dy, parent, owner), - _tree(NULL), _hide_leaves(false) +TTree_window::TTree_window(int x, int y, int dx, int dy, WINDOW parent, TTree_field* owner) + : TControl_host_window(x, y, dx, dy, parent, owner), _tree(NULL), _hide_leaves(false) { RCT rct; xvt_vobj_get_client_rect(win(), &rct); _ctrl = xvt_treeview_create(win(), &rct, "", 0, (long)this, owner->dlg(), - NULL, NULL, NULL, 0, CHARY+2); + NULL, NULL, NULL, 0, CHARY+2); + + XVT_COLOR_COMPONENT xcc[8]; memset(xcc, 0, sizeof(xcc)); + xcc[0].type = XVT_COLOR_BACKGROUND; + xcc[0].color = NORMAL_BACK_COLOR; + xcc[1].type = XVT_COLOR_FOREGROUND; + xcc[1].color = NORMAL_COLOR; + xcc[2].type = XVT_COLOR_HIGHLIGHT; + xcc[2].color = FOCUS_BACK_COLOR; + xcc[3].type = XVT_COLOR_SELECT; + xcc[3].color = FOCUS_COLOR; + xcc[4].type = XVT_COLOR_BLEND; + xcc[4].color = MASK_BACK_COLOR; + xvt_ctl_set_colors(_ctrl, xcc, XVT_COLOR_ACTION_SET); } ///////////////////////////////////////////////////////////