mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Add new GetFile method that uses an nsFileSpec instead of an nsString
This commit is contained in:
parent
02d7145327
commit
1a4f805e40
@ -20,6 +20,7 @@
|
||||
#define nsIFileWidget_h__
|
||||
|
||||
#include "nsString.h"
|
||||
#include "nsFileSpec.h"
|
||||
|
||||
// {F8030015-C342-11d1-97F0-00609703C14E}
|
||||
#define NS_IFILEWIDGET_IID \
|
||||
@ -34,7 +35,10 @@ enum nsMode {
|
||||
/// Load a file or directory
|
||||
eMode_load,
|
||||
/// Save a file or directory
|
||||
eMode_save };
|
||||
eMode_save,
|
||||
/// Select a fodler/directory
|
||||
eMode_getfolder
|
||||
};
|
||||
|
||||
/**
|
||||
* File selector widget.
|
||||
@ -94,6 +98,14 @@ public:
|
||||
*/
|
||||
|
||||
NS_IMETHOD GetFile(nsString& aFile) = 0;
|
||||
|
||||
/**
|
||||
* Get the nsFileSpec for the file or directory.
|
||||
*
|
||||
* @param aFile on exit it contains the file or directory selected
|
||||
*/
|
||||
|
||||
NS_IMETHOD GetFile(nsFileSpec& aFile) = 0;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -227,6 +227,11 @@ NS_IMETHODIMP nsFileWidget::GetFile(nsString& aFile)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsFileWidget::GetFile(nsFileSpec& aFile)
|
||||
{
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
//
|
||||
// Get the file + path
|
||||
|
@ -67,6 +67,7 @@ class nsFileWidget : public nsWindow, public nsIFileWidget
|
||||
|
||||
virtual PRBool Show();
|
||||
NS_IMETHOD GetFile(nsString& aFile);
|
||||
NS_IMETHOD GetFile(nsFileSpec& aFile);
|
||||
NS_IMETHOD SetDefaultString(nsString& aString);
|
||||
NS_IMETHOD SetFilterList(PRUint32 aNumberOfFilters,
|
||||
const nsString aTitles[],
|
||||
|
Loading…
Reference in New Issue
Block a user