Changeset 7387


Ignore:
Timestamp:
Dec 17, 2013 9:32:14 PM (12 months ago)
Author:
damato
Message:
  • mui/WriteWindow.c, misc: partly reverted the recent change to the ComposeMail function which was changed to always close a write window after any operation. Now the function will take an additional argument to allow to define if the function should close a window or not after the desired operation. This allowed to fix a problem where upon autosaving a mail the window was always closed. Thus, this fixeѕ #474.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r7385 r7387  
    55$Id$ 
    66$URL$ 
     7 
     82013-12-17 Jens Maus <mail@jens-maus.de> 
     9 
     10  * mui/WriteWindow.c, misc: partly reverted the recent change to the 
     11    ComposeMail function which was changed to always close a write window 
     12    after any operation. Now the function will take an additional argument 
     13    to allow to define if the function should close a window or not after 
     14    the desired operation. This allowed to fix a problem where upon 
     15    autosaving a mail the window was always closed. This closes #474. 
    716 
    8172013-12-17 Thore Böckelmann <tboeckel@gmx.de> 
  • trunk/src/YAM.c

    r7375 r7387  
    12871287      { 
    12881288        if(wmData->window != NULL) 
    1289           DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_QUEUE); 
     1289          DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_QUEUE, TRUE); 
    12901290      } 
    12911291    } 
  • trunk/src/YAM_FI.c

    r7307 r7387  
    13741374      { 
    13751375        set(wmData->window, MUIA_WriteWindow_To, filter->redirectTo); 
    1376         DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_QUEUE); 
     1376        DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_QUEUE, TRUE); 
    13771377 
    13781378        if(result != NULL) 
     
    13981398      { 
    13991399        set(wmData->window, MUIA_WriteWindow_To, filter->forwardTo); 
    1400         DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_QUEUE); 
     1400        DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_QUEUE, TRUE); 
    14011401 
    14021402        if(result != NULL) 
     
    14221422      { 
    14231423        DoMethod(wmData->window, MUIM_WriteWindow_LoadText, filter->replyFile, TRUE); 
    1424         DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_QUEUE); 
     1424        DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_QUEUE, TRUE); 
    14251425 
    14261426        if(result != NULL) 
  • trunk/src/mui/WriteWindow.c

    r7379 r7387  
    879879      if(obj != NULL) 
    880880      { 
    881         DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_SENDNOW,     obj, 2, METHOD(ComposeMail), WRITE_SEND); 
    882         DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_QUEUE,       obj, 2, METHOD(ComposeMail), WRITE_QUEUE); 
     881        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_SENDNOW,     obj, 3, METHOD(ComposeMail), WRITE_SEND, TRUE); 
     882        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_QUEUE,       obj, 3, METHOD(ComposeMail), WRITE_QUEUE, TRUE); 
    883883        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_CLOSE,       obj, 1, METHOD(CancelAction)); 
    884884        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_CUT,         obj, 2, METHOD(EditActionPerformed), EA_CUT); 
     
    13861386        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_SAVEAS,      obj, 1, METHOD(SaveTextAs)); 
    13871387        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_EDIT,        obj, 1, METHOD(LaunchEditor)); 
    1388         DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_SENDNOW,     obj, 2, METHOD(ComposeMail), WRITE_SEND); 
    1389         DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_QUEUE,       obj, 2, METHOD(ComposeMail), WRITE_QUEUE); 
    1390         DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_SAVEASDRAFT, obj, 2, METHOD(ComposeMail), WRITE_DRAFT); 
     1388        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_SENDNOW,     obj, 3, METHOD(ComposeMail), WRITE_SEND, TRUE); 
     1389        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_QUEUE,       obj, 3, METHOD(ComposeMail), WRITE_QUEUE, TRUE); 
     1390        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_SAVEASDRAFT, obj, 3, METHOD(ComposeMail), WRITE_DRAFT, TRUE); 
    13911391        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_CLOSE,       obj, 1, METHOD(CancelAction)); 
    13921392        DoMethod(obj, MUIM_Notify, MUIA_Window_MenuAction, WMEN_CUT,         obj, 2, METHOD(EditActionPerformed), EA_CUT); 
     
    16121612 
    16131613      // set main window button notifies 
    1614       DoMethod(data->BT_SAVEASDRAFT, MUIM_Notify, MUIA_Pressed, FALSE, obj, 2, METHOD(ComposeMail), WRITE_DRAFT); 
    1615       DoMethod(data->BT_QUEUE,       MUIM_Notify, MUIA_Pressed, FALSE, obj, 2, METHOD(ComposeMail), WRITE_QUEUE); 
    1616       DoMethod(data->BT_SEND,        MUIM_Notify, MUIA_Pressed, FALSE, obj, 2, METHOD(ComposeMail), WRITE_SEND); 
     1614      DoMethod(data->BT_SAVEASDRAFT, MUIM_Notify, MUIA_Pressed, FALSE, obj, 3, METHOD(ComposeMail), WRITE_DRAFT, TRUE); 
     1615      DoMethod(data->BT_QUEUE,       MUIM_Notify, MUIA_Pressed, FALSE, obj, 3, METHOD(ComposeMail), WRITE_QUEUE, TRUE); 
     1616      DoMethod(data->BT_SEND,        MUIM_Notify, MUIA_Pressed, FALSE, obj, 3, METHOD(ComposeMail), WRITE_SEND, TRUE); 
    16171617      DoMethod(data->BT_CANCEL,      MUIM_Notify, MUIA_Pressed, FALSE, obj, 1, METHOD(CancelAction)); 
    16181618 
     
    37873787/// DECLARE(ComposeMail) 
    37883788//  Validates write window options and generates a new message 
    3789 DECLARE(ComposeMail) // enum WriteMode mode 
     3789DECLARE(ComposeMail) // enum WriteMode mode, ULONG closeWindow 
    37903790{ 
    37913791  GETDATA; 
     
    43984398  } 
    43994399 
    4400   // cleanup certain references if the window is to be closed 
    4401   wmData->refMail = NULL; 
    4402   wmData->draftMail = NULL; 
    4403  
    4404   if(wmData->refMailList != NULL) 
    4405   { 
    4406     DeleteMailList(wmData->refMailList); 
    4407     wmData->refMailList = NULL; 
    4408   } 
    4409  
    4410   // cleanup the In-Reply-To / References stuff 
    4411   if(wmData->inReplyToMsgID != NULL) 
    4412   { 
    4413     dstrfree(wmData->inReplyToMsgID); 
    4414     wmData->inReplyToMsgID = NULL; 
    4415   } 
    4416  
    4417   if(wmData->references != NULL) 
    4418   { 
    4419     dstrfree(wmData->references); 
    4420     wmData->references = NULL; 
     4400  if(msg->closeWindow == TRUE) 
     4401  { 
     4402    // cleanup certain references if the window is to be closed 
     4403    wmData->refMail = NULL; 
     4404    wmData->draftMail = NULL; 
     4405 
     4406    if(wmData->refMailList != NULL) 
     4407    { 
     4408      DeleteMailList(wmData->refMailList); 
     4409      wmData->refMailList = NULL; 
     4410    } 
     4411 
     4412    // cleanup the In-Reply-To / References stuff 
     4413    if(wmData->inReplyToMsgID != NULL) 
     4414    { 
     4415      dstrfree(wmData->inReplyToMsgID); 
     4416      wmData->inReplyToMsgID = NULL; 
     4417    } 
     4418 
     4419    if(wmData->references != NULL) 
     4420    { 
     4421      dstrfree(wmData->references); 
     4422      wmData->references = NULL; 
     4423    } 
    44214424  } 
    44224425 
     
    44714474  // make sure to dispose the window data by calling 
    44724475  // CleanupWriteMailData method as soon as this method is finished 
    4473   DoMethod(_app(obj), MUIM_Application_PushMethod, _app(obj), 2, MUIM_YAMApplication_CleanupWriteMailData, wmData); 
     4476  if(msg->closeWindow == TRUE) 
     4477    DoMethod(_app(obj), MUIM_Application_PushMethod, _app(obj), 2, MUIM_YAMApplication_CleanupWriteMailData, wmData); 
    44744478 
    44754479  // update the statistics of the outgoing folder 
     
    44884492  // free the list of MIME parts but don't delete temporary 
    44894493  // files when the window is left open 
    4490   FreePartsList(comp.FirstPart, TRUE); 
     4494  FreePartsList(comp.FirstPart, msg->closeWindow); 
    44914495 
    44924496  // free the compose structure 
     
    45834587         xget(data->ST_REPLYTO, MUIA_RecipientString_MatchwindowOpen) == FALSE) 
    45844588      { 
    4585         if(DoMethod(obj, METHOD(ComposeMail), WRITE_DRAFT) == TRUE) 
     4589        if(DoMethod(obj, METHOD(ComposeMail), WRITE_DRAFT, FALSE) == TRUE) 
    45864590        { 
    45874591          // we must remember if the mail was automatically saved, since the editor object cannot 
     
    46324636        { 
    46334637          // save as draft (ComposeMail method will close the window) 
    4634           DoMethod(obj, METHOD(ComposeMail), WRITE_DRAFT); 
     4638          DoMethod(obj, METHOD(ComposeMail), WRITE_DRAFT, TRUE); 
    46354639 
    46364640          // set closeWindow to FALSE beause ComposeMail already 
  • trunk/src/rexx/writequeue.c

    r7199 r7387  
    6565 
    6666      if(wmData != NULL && wmData->window != NULL) 
    67         DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, args->draft ? WRITE_DRAFT : WRITE_QUEUE); 
     67        DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, args->draft ? WRITE_DRAFT : WRITE_QUEUE, TRUE); 
    6868      else 
    6969        params->rc = RETURN_ERROR; 
  • trunk/src/rexx/writesend.c

    r6495 r7387  
    6565 
    6666      if(wmData != NULL && wmData->window != NULL) 
    67         DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_SEND); 
     67        DoMethod(wmData->window, MUIM_WriteWindow_ComposeMail, WRITE_SEND, TRUE); 
    6868      else 
    6969        params->rc = RETURN_ERROR; 
Note: See TracChangeset for help on using the changeset viewer.