No more message box - Re: CVS: commit msevior abi/src/af/xap/unix xap_UnixFrameImpl.cpp

From: <msevior_at_physics.unimelb.edu.au>
Date: Sat Mar 17 2007 - 13:13:40 CET

>
> Update of /cvsroot/abi/src/af/xap/unix
> In directory abiword.snt.utwente.nl:/tmp/cvs-serv22924/src/af/xap/unix
>
> Modified Files:
> xap_UnixFrameImpl.cpp
> Log Message:
>
> Make drag of files into document paste unless the document is empty.
>

As requested.

Cheers

Martin

>
> Index: xap_UnixFrameImpl.cpp
> ===================================================================
> RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixFrameImpl.cpp,v
> retrieving revision 1.141
> retrieving revision 1.142
> diff -u -d -r1.141 -r1.142
> --- xap_UnixFrameImpl.cpp 13 Mar 2007 05:16:07 -0000 1.141
> +++ xap_UnixFrameImpl.cpp 17 Mar 2007 11:05:09 -0000 1.142
> @@ -264,6 +264,7 @@
> else
> pNewFrame = pFrame;
>
> +
> UT_Error error = pNewFrame->loadDocument(file.utf8_str(), 0 /*
> IEFT_Unknown */);
> if (error)
> {
> @@ -327,30 +328,22 @@
> }
> else
> {
> - bool bDoLoad = true;
> if(pFrame)
> {
> AP_FrameData *pFrameData = static_cast<AP_FrameData
> *>(pFrame->getFrameData());
> if(pFrameData && pFrameData->m_bIsWidget)
> {
> - bDoLoad =false;
> + s_pasteFile(uri,pFrame);
> + }
> + else if(pFrame->isDirty() || pFrame->getFilename())
> + {
> s_pasteFile(uri,pFrame);
> }
> else
> {
> - if(pFrame->showMessageBox(XAP_STRING_ID_MSG_PasteOrLoad,
> - XAP_Dialog_MessageBox::b_YN,
> - XAP_Dialog_MessageBox::a_YES)
> - == XAP_Dialog_MessageBox::a_YES)
> - {
> - bDoLoad =false;
> - s_pasteFile(uri,pFrame);
> - }
> + s_loadDocument (uri, pFrame);
> }
> }
> - if(bDoLoad)
> - s_loadDocument (uri, pFrame);
> - return;
> }
> }
>
>
> -----------------------------------------------
> To unsubscribe from this list, send a message to
> abisource-cvs-commit-request@abisource.com with the word
> unsubscribe in the message body.
>
Received on Sat Mar 17 13:13:11 2007

This archive was generated by hypermail 2.1.8 : Sat Mar 17 2007 - 13:13:12 CET