Correções importantes no 3.2 e 3.4

Projeto [x]Harbour - Compilador de código aberto compatível com o Clipper.

Moderador: Moderadores

Avatar do usuário
Itamar M. Lins Jr.
Administrador
Administrador
Mensagens: 7929
Registrado em: 30 Mai 2007 11:31
Localização: Ilheus Bahia
Curtiu: 1 vez

Correções importantes no 3.2 e 3.4

Mensagem por Itamar M. Lins Jr. »

Ola!
Foi adicionado envio de email via tip_MailSend pelo outlook exemplo mais abaixo.
O Viktor parece que voltou das férias, 15/02/2015 ás 20:34 só agora já fez mais de 20 atualizações no 3.4

No harbour 3.2 que é o principal, testem se está funcionando o Copiar/Colar com letras acentuadas, parece que foi corrigido isso também.
2015-02-15 20:23 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
* src/rtl/gtwin/gtwin.c
* added hack to process characters generated without keydown event.
It should fix issue #86.
Przemek reescreveu o teditor.prg/memoedit, ao que tudo indica melhorou a compatibilidade com clipper.

Código: Selecionar todos

2015-02-13 17:08 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  * src/rtl/mlcfunc.c
    ! fixed MPosToLC() results for position in last line which have to
      be moved after analyzing rest of line due to word wrapping.

  * src/rtl/teditor.prg
    * rewritten whole internal code critical for basic functionality.
    + resolved the problem with keycode conflicts for GTs which
      support extended keycodes.
    + added support missing MemoEdit() editor functionality.
    ; Number of bugs and mistakes was to big to try to update it.
      New code is smaller and simpler. I tried to keep compatibility
      with previous version and added to new version most of "helper"
      methods which are not used in MemoEdit() at all anyhow I cannot
      guaranty that all existing code using TEditor will work without
      modifications, i.e. I had to remove :SetPos() and all logic bound
      with it because it was to hard for my brain to understand this
      idea and/or functionality.
      If someone needs strict compatibility with previous version then
      he should add to his source code copy of old code.
      Current code should addressed most of MemoEdit() problems with
      text formatting and editing reported in the past though probably
      not all. I have no spare time for precise tests of Cl*pper's
      MemoEdit().

  * src/rtl/memoedit.prg
    * overload :InsertState() method to show <insert> SCOREBOARD message
    * changed "Abort Edit? (Y/N)" message position to be Clipper compatible
    * removed redundant keycode comparison
    * do not ::SetPos HBEditor method - this method has been removed
...

2015-02-11 18:48 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl)
  * src/rtl/mlcfunc.c
    * modified unpadded MemoLine() mode to return last blank
      character in the line

  * src/rtl/teditor.prg
    ! fixed typo in MemoLine() parameters
    + added lSoftCR parameter to GetText() - when it's true returned
      text contains SoftCRs

  * src/rtl/memoedit.prg
    ! return text with SoftCRs - Cl*pper compatible

  ; Above modifications fix initial and result text formatting
    in MemoEdit() (#84)

Código: Selecionar todos

/* Copyright 2009 Viktor Szakats (vszakats.net/harbour) */

#require "hbssl"
#require "hbtip"

#if ! defined( __HBSCRIPT__HBSHELL )
REQUEST __HBEXTERN__HBSSL__
#endif

#include "simpleio.ch"

PROCEDURE Main( cFrom, cPassword, cTo, cProvider )

   LOCAL cHost
   LOCAL lSTARTTLS := .F.

   IF ! tip_SSL()
      ? "Error: Requires SSL support"
      RETURN
   ENDIF

   hb_default( @cFrom    , "<from@example.net>" )
   hb_default( @cPassword, "password" )
   hb_default( @cTo      , "to@example.com" )
   hb_default( @cProvider, "" )

   cProvider := Lower( cProvider )

   DO CASE
   CASE cProvider == "apple" .OR. "@icloud.com" $ cFrom .OR. "@mac.com" $ cFrom .OR. "@me.com" $ cFrom
      cHost := "smtp.mail.me.com"; lSTARTTLS := .T.
   CASE cProvider == "fastmail" .OR. "@fastmail.com" $ cFrom .OR. "@fastmail.fm" $ cFrom
      cHost := "mail.messagingengine.com"
   CASE cProvider == "gmx.net" .OR. "@gmx.net" $ cFrom .OR. "@gmx.ch" $ cFrom .OR. "@gmx.de" $ cFrom
      cHost := "mail.gmx.net"; lSTARTTLS := .T.
   CASE cProvider == "google" .OR. "@gmail.com" $ cFrom .OR. "@googlemail.com" $ cFrom
      cHost := "smtp.gmail.com"
   CASE cProvider == "mail.ru" .OR. "@mail.ru" $ cFrom
      cHost := "smtp.mail.ru"
   CASE cProvider == "netease" .OR. "@163.com" $ cFrom
      cHost := "smtp.163.com"
   CASE cProvider == "office365"
      cHost := "smtp.office365.com"; lSTARTTLS := .T.
   CASE cProvider == "outlook" .OR. "@outlook.com" $ cFrom .OR. "@hotmail.com" $ cFrom
      cHost := "smtp-mail.outlook.com"; lSTARTTLS := .T.
   CASE cProvider == "sina" .OR. "@sina.com" $ cFrom
      cHost := "smtp.vip.sina.com"
   CASE cProvider == "uol" .OR. "@uol.com.br" $ cFrom
      cHost := "smtps.uol.com.br"
   CASE cProvider == "yahoo" .OR. "@yahoo.com" $ cFrom
      cHost := "smtp.mail.yahoo.com"
   OTHERWISE
      ? "Error: Unknown provider"
      RETURN
   ENDCASE

   ? tip_MailSend( ;
      cHost, ;
      iif( lSTARTTLS, 587, 465 ), ;
      cFrom, ;
      cTo, ;
      NIL /* CC */, ;
      {} /* BCC */, ;
      "test: body", ;
      "test: subject", ;
      NIL /* attachment */, ;
      cFrom, ;
      cPassword, ;
      "", ;
      NIL /* nPriority */, ;
      NIL /* lRead */, ;
      .T. /* lTrace */, ;
      .F., ;
      NIL /* lNoAuth */, ;
      NIL /* nTimeOut */, ;
      NIL /* cReplyTo */, ;
      ! lSTARTTLS )

   RETURN
Saudações,
Itamar M. Lins Jr.
Saudações,
Itamar M. Lins Jr.
Responder