зеркало из https://github.com/mozilla/gecko-dev.git
Moved widgetry out of xpcom
This commit is contained in:
Родитель
818691e714
Коммит
5a9665a03c
|
@ -24,6 +24,10 @@ include $(DEPTH)/config/autoconf.mk
|
|||
|
||||
DEFINES += -D_IMPL_NS_UI
|
||||
|
||||
XPIDLSRCS = \
|
||||
nsIFileSpecWithUI.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsIFontSizeIterator.h \
|
||||
nsIFontNameIterator.h \
|
||||
|
@ -34,6 +38,7 @@ EXPORTS = \
|
|||
nsIMenuItem.h \
|
||||
nsIImageButton.h \
|
||||
nsIPopUpMenu.h \
|
||||
nsIFileWidget.h \
|
||||
nsIMenuButton.h \
|
||||
nsIImageButtonListener.h \
|
||||
nsStringUtil.h \
|
||||
|
|
|
@ -21,6 +21,10 @@ IGNORE_MANIFEST=1
|
|||
DEFINES=-D_IMPL_NS_UI
|
||||
MODULE=raptor
|
||||
|
||||
XPIDLSRCS = \
|
||||
.\nsIFileSpecWithUI.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS=nsui.h \
|
||||
nsIFontSizeIterator.h \
|
||||
nsIFontNameIterator.h \
|
||||
|
@ -29,6 +33,7 @@ EXPORTS=nsui.h \
|
|||
nsIFormatConverter.h \
|
||||
nsIClipboardOwner.h \
|
||||
nsIClipboard.h \
|
||||
nsIFileWidget.h \
|
||||
nsITransferable.h \
|
||||
nsIGenericTransferable.h \
|
||||
nsIDragService.h \
|
||||
|
|
|
@ -51,12 +51,12 @@ CPPSRCS = \
|
|||
EXPORTS = \
|
||||
nsEscape.h \
|
||||
nsFileSpec.h \
|
||||
nsFileSpecImpl.h \
|
||||
nsFileSpecStreaming.h \
|
||||
nsFileStream.h \
|
||||
nsIBaseStream.h \
|
||||
nsIByteBufferInputStream.h \
|
||||
nsIFileStream.h \
|
||||
nsIFileWidget.h \
|
||||
nsIInputStream.h \
|
||||
nsIOutputStream.h \
|
||||
nsIStringStream.h \
|
||||
|
|
|
@ -26,12 +26,12 @@ MODULE = xpcom
|
|||
EXPORTS = \
|
||||
nsEscape.h \
|
||||
nsFileSpec.h \
|
||||
nsFileSpecImpl.h \
|
||||
nsFileSpecStreaming.h \
|
||||
nsFileStream.h \
|
||||
nsIBaseStream.h \
|
||||
nsIByteBufferInputStream.h \
|
||||
nsIFileStream.h \
|
||||
nsIFileWidget.h \
|
||||
nsIInputStream.h \
|
||||
nsIOutputStream.h \
|
||||
nsIStringStream.h \
|
||||
|
|
|
@ -153,6 +153,12 @@ class NS_COM nsFileSpecImpl
|
|||
/* void endline (); */
|
||||
NS_IMETHOD endline();
|
||||
|
||||
//----------------------
|
||||
// COM Cruft
|
||||
//----------------------
|
||||
|
||||
static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec);
|
||||
|
||||
//----------------------
|
||||
// Implementation
|
||||
//----------------------
|
||||
|
@ -161,7 +167,7 @@ class NS_COM nsFileSpecImpl
|
|||
nsFileSpecImpl(const nsFileSpec& inSpec);
|
||||
virtual ~nsFileSpecImpl();
|
||||
static nsresult MakeInterface(const nsFileSpec& inSpec, nsIFileSpec** outSpec);
|
||||
static NS_METHOD Create(nsISupports* outer, const nsIID& aIID, void* *aIFileSpec);
|
||||
|
||||
//----------------------
|
||||
// Data
|
||||
//----------------------
|
||||
|
@ -170,15 +176,6 @@ class NS_COM nsFileSpecImpl
|
|||
nsIInputStream* mInputStream;
|
||||
nsIOutputStream* mOutputStream;
|
||||
|
||||
// These will go away
|
||||
NS_IMETHOD chooseOutputFile(const char *windowTitle, const char *suggestedLeafName);
|
||||
|
||||
NS_IMETHOD chooseInputFile(const char *title,
|
||||
nsIFileSpec::StandardFilterMask standardFilterMask,
|
||||
const char *extraFilterTitle, const char *extraFilter);
|
||||
|
||||
NS_IMETHOD chooseDirectory(const char *title);
|
||||
|
||||
}; // class nsFileSpecImpl
|
||||
|
||||
#endif // _FILESPECIMPL_H_
|
||||
|
|
|
@ -28,8 +28,7 @@
|
|||
#include "nsAppCoresCIDs.h"
|
||||
#include "nsIDOMAppCoresManager.h"
|
||||
|
||||
#define FILE_WIDGET_DEPENDENCY
|
||||
#include "nsIFileSpec.h"
|
||||
#include "nsIFileSpecWithUI.h"
|
||||
|
||||
#include "nsIScriptContext.h"
|
||||
#include "nsIScriptContextOwner.h"
|
||||
|
@ -1144,13 +1143,13 @@ static void BuildFileURL(const char * aFileName, nsString & aFileURL)
|
|||
NS_IMETHODIMP nsBrowserAppCore::OpenWindow()
|
||||
//----------------------------------------------------------------------------------------
|
||||
{
|
||||
nsCOMPtr<nsIFileSpec> fileSpec;
|
||||
nsresult rv = NS_NewFileSpec(getter_AddRefs(fileSpec));
|
||||
nsCOMPtr<nsIFileSpecWithUI> fileSpec;
|
||||
nsresult rv = NS_NewFileSpecWithUI(getter_AddRefs(fileSpec));
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
rv = fileSpec->chooseInputFile(
|
||||
"Open File", nsIFileSpec::eAllStandardFilters, nsnull, nsnull);
|
||||
"Open File", nsIFileSpecWithUI::eAllStandardFilters, nsnull, nsnull);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче