diff --git a/harbour/ChangeLog b/harbour/ChangeLog index edf447515b..e8b02ee833 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,21 @@ The license applies to all entries newer than 2009-04-28. */ +2011-03-30 14:20 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) + * src/rtl/gtwin/gtwin.c + % Replaced kbd modifier readout with a more efficient + version. It contains hack required to make core + low-level function to work correctly with win consoles. + Patch co-developed with Przemek. + + * contrib/hbtip/sendmail.prg + ! Implemented fix to enclose attachment filenames in + dbl quotes as suggested by George Frehner. + Pls test. + + * contrib/hbtip/mail.prg + * Formatting. + 2011-03-30 13:40 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbgtinfo.ch ! fixed wrong decimal value defined for HB_GTI_KBD_RALT. @@ -40,7 +55,7 @@ Now no more raw pointers generated with hb_retptr() in hbQT. Please review and test. - WARNING: third party libs should check their sources to + WARNING: third party libs should check their sources to entertain this change. 2011-03-29 10:07 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) @@ -6943,7 +6958,7 @@ 2010-12-11 17:52 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) * src/rtl/gtwin/gtwin.c - + Attempt to enable HB_GTI_PALETTER support for MSVC 2005/2008 + + Attempt to enable HB_GTI_PALETTE support for MSVC 2005/2008 combined with Longhorn SDK. (also reverted prev change) Please retest in above environments, plus old MSVC and BCC 5.9. diff --git a/harbour/contrib/hbtip/mail.prg b/harbour/contrib/hbtip/mail.prg index 860613d270..a94e4b86df 100644 --- a/harbour/contrib/hbtip/mail.prg +++ b/harbour/contrib/hbtip/mail.prg @@ -231,7 +231,7 @@ METHOD SetFieldOption( cPart, cOption, cValue ) CLASS TipMail cEnc := hb_HValueAt( ::hHeaders, nPos ) aMatch := hb_regex( "(.*?;\s*)" + cOption + "\s*=[^;]*(.*)?", cEnc, .F. ) IF Empty( aMatch ) - ::hHeaders[ cPart ] := cEnc += "; "+ cOption + '="' + cValue + '"' + ::hHeaders[ cPart ] := cEnc += "; " + cOption + '="' + cValue + '"' ELSE ::hHeaders[ cPart ] := aMatch[ 2 ] + cOption + '="' +; cValue + '"' + aMatch[ 3 ] diff --git a/harbour/contrib/hbtip/sendmail.prg b/harbour/contrib/hbtip/sendmail.prg index e9ab5ad690..c0e3c1714f 100644 --- a/harbour/contrib/hbtip/sendmail.prg +++ b/harbour/contrib/hbtip/sendmail.prg @@ -483,7 +483,7 @@ FUNCTION hb_MailAssemble( cFrom, xTo, xCC, cBody, cSubject, ; oAttach:hHeaders[ "Content-Type" ] := cMimeText // But usually, original filename is set here - oAttach:hHeaders[ "Content-Disposition" ] := "attachment; filename=" + cFname + cFext + oAttach:hHeaders[ "Content-Disposition" ] := "attachment; filename=" + '"' + cFname + cFext + '"' oAttach:SetBody( cData ) oMail:Attach( oAttach ) NEXT diff --git a/harbour/src/rtl/gtwin/gtwin.c b/harbour/src/rtl/gtwin/gtwin.c index 4c5098a14a..f2dfa36f1a 100644 --- a/harbour/src/rtl/gtwin/gtwin.c +++ b/harbour/src/rtl/gtwin/gtwin.c @@ -442,27 +442,12 @@ static const CLIPKEYCODE extKeyTab[CLIP_EXTKEY_COUNT] = { static int hb_gt_win_getKbdState( void ) { - int iKbdState = 0; + /* Workaround for problems with GetKeyboardState() used with + * MS-Windows console + */ + ( void ) GetKeyState( 0 ); - if( GetKeyState( VK_SHIFT ) & 0x80 ) iKbdState |= HB_GTI_KBD_SHIFT; - if( GetKeyState( VK_CONTROL ) & 0x80 ) iKbdState |= HB_GTI_KBD_CTRL; - if( GetKeyState( VK_MENU ) & 0x80 ) iKbdState |= HB_GTI_KBD_ALT; - if( GetKeyState( VK_LWIN ) & 0x80 ) iKbdState |= HB_GTI_KBD_LWIN; - if( GetKeyState( VK_RWIN ) & 0x80 ) iKbdState |= HB_GTI_KBD_RWIN; - if( GetKeyState( VK_APPS ) & 0x80 ) iKbdState |= HB_GTI_KBD_MENU; - if( GetKeyState( VK_SCROLL ) & 0x01 ) iKbdState |= HB_GTI_KBD_SCROLOCK; - if( GetKeyState( VK_NUMLOCK ) & 0x01 ) iKbdState |= HB_GTI_KBD_NUMLOCK; - if( GetKeyState( VK_CAPITAL ) & 0x01 ) iKbdState |= HB_GTI_KBD_CAPSLOCK; - if( GetKeyState( VK_INSERT ) & 0x01 ) iKbdState |= HB_GTI_KBD_INSERT; - - if( GetKeyState( VK_LSHIFT ) & 0x80 ) iKbdState |= HB_GTI_KBD_LSHIFT; - if( GetKeyState( VK_RSHIFT ) & 0x80 ) iKbdState |= HB_GTI_KBD_RSHIFT; - if( GetKeyState( VK_LCONTROL ) & 0x80 ) iKbdState |= HB_GTI_KBD_LCTRL; - if( GetKeyState( VK_RCONTROL ) & 0x80 ) iKbdState |= HB_GTI_KBD_RCTRL; - if( GetKeyState( VK_LMENU ) & 0x80 ) iKbdState |= HB_GTI_KBD_LALT; - if( GetKeyState( VK_RMENU ) & 0x80 ) iKbdState |= HB_GTI_KBD_RALT; - - return iKbdState; + return hb_gt_winapi_getKbdState(); } /* *********************************************************************** */