Added code (ifdef'ed out) to check to see if the clipboard show be forced to

the native clipboard before the app exits
This commit is contained in:
rods%netscape.com 1999-03-23 21:30:41 +00:00
Родитель a12004d678
Коммит 7e5b1981b8
1 изменённых файлов: 41 добавлений и 0 удалений

Просмотреть файл

@ -75,6 +75,19 @@
#include "nsIServiceManager.h"
///////////////////////////////////////
//#define NEW_CLIPBOARD_SUPPORT
#ifdef NEW_CLIPBOARD_SUPPORT
// Drag & Drop, Clipboard
#include "nsWidgetsCID.h"
#include "nsIClipboard.h"
#include "nsITransferable.h"
// Drag & Drop, Clipboard Support
static NS_DEFINE_IID(kIClipboardIID, NS_ICLIPBOARD_IID);
static NS_DEFINE_CID(kCClipboardCID, NS_CLIPBOARD_CID);
#endif
/* Define Class IDs */
static NS_DEFINE_IID(kAppShellServiceCID, NS_APPSHELL_SERVICE_CID);
@ -537,11 +550,39 @@ nsEditorAppCore::Close()
return NS_OK;
}
NS_IMETHODIMP
nsEditorAppCore::Exit()
{
nsIAppShellService* appShell = nsnull;
#ifdef NEW_CLIPBOARD_SUPPORT
nsIClipboard* clipboard;
nsresult rvv = nsServiceManager::GetService(kCClipboardCID,
kIClipboardIID,
(nsISupports **)&clipboard);
if (NS_OK == rvv) {
nsITransferable * trans;
clipboard->GetTransferable(&trans);
if (nsnull != trans) {
if (NS_OK == trans->IsLargeDataSet()) {
// XXX A Dialog goes here to see if they want to "force" a copy
// of the data to the clipboard
//if (status == IDYES) {
// clipboard->ForceDataToClipboard();
//}
}
NS_RELEASE(trans);
}
NS_RELEASE(clipboard);
}
#endif
/*
* Create the Application Shell instance...
*/