From 72ee010211ab8b4d4fe2dcef1aeff318c8b4c319 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 21 Apr 2011 10:33:20 +0000 Subject: [PATCH] Patch level : 10.0 Files correlati : Ricompilazione Demo : [ ] Commento : Corretta centratura icone per Windows 7 git-svn-id: svn://10.65.10.50/branches/R_10_00@22005 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- include/controls.cpp | 5 ++--- include/golem.cpp | 8 +++----- include/reprint.cpp | 2 +- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/include/controls.cpp b/include/controls.cpp index ab9d6f264..a74a03334 100755 --- a/include/controls.cpp +++ b/include/controls.cpp @@ -1697,8 +1697,8 @@ void TButton_control::set_icon(unsigned int icon_up, unsigned int icon_dn) _obj->v.btn->drawable = false; const XI_RCT& rct = _obj->v.btn->rct; - _obj->v.btn->icon_x = (rct.right - rct.left - 32) / 2 - 5; - _obj->v.btn->icon_y = (rct.bottom - rct.top - 32) / 2 - 5; + _obj->v.btn->icon_x = short(rct.right - rct.left - xvt_vobj_get_attr(NULL_WIN, ATTR_ICON_WIDTH)) / 2 - 5; + _obj->v.btn->icon_y = short(rct.bottom - rct.top - xvt_vobj_get_attr(NULL_WIN, ATTR_ICON_HEIGHT)) / 2 - 5; } /////////////////////////////////////////////////////////// @@ -1710,7 +1710,6 @@ TPushbutton_control::TPushbutton_control(WINDOW win, short cid, const char* flags, const char* text, int bmp_up, int bmp_dn) : _bmp_up(bmp_up), _bmp_dn(bmp_dn) - { const bool drawable = bmp_up > 0; create(win, cid, left, top, width, height, flags, text, WC_PUSHBUTTON, NULL, drawable); diff --git a/include/golem.cpp b/include/golem.cpp index d69bee6d3..68662b9f9 100755 --- a/include/golem.cpp +++ b/include/golem.cpp @@ -13,7 +13,6 @@ #include #include - #ifdef WIN32 #include #include @@ -410,12 +409,11 @@ bool TGolem_field::autosave(TRelation& r) if (old_file != new_file) { - const bool was_stored = old_row.get_char(2) <= ' ' && - golem_path.compare(old_file, golem_path.len(), true) == 0; + const bool was_stored = old_row.get_char(2) <= ' ' && old_file.starts_with(golem_path, true); const bool tobe_stored = new_row.get_char(2) <= ' '; if (was_stored && fexist(old_file)) old_file.fremove(); - if (tobe_stored && !new_file.blank()) + if (tobe_stored && new_file.full()) { char ext[_MAX_EXT]; xvt_fsys_parse_pathname(new_file, NULL, NULL, NULL, ext, NULL); @@ -428,7 +426,7 @@ bool TGolem_field::autosave(TRelation& r) // Cancella il file originale se temporaneo TFilename tmp; tmp.tempdir(); - if (tmp.compare(new_file, tmp.len(), true) == 0) + if (new_file.starts_with(tmp, true)) new_file.fremove(); } } diff --git a/include/reprint.cpp b/include/reprint.cpp index 6b952272f..866e6d173 100755 --- a/include/reprint.cpp +++ b/include/reprint.cpp @@ -2609,7 +2609,7 @@ bool TReport_book::init(TReport& rep) { TPrinter& pr = printer(); - bool save_profile = rep.save_last_printer(); + bool save_profile = rep.save_last_printer() && (pr.printtype() < exportprinter); if (save_profile && !pr.manual_setup()) { const TString profile = rep.filename().name();