Add new GetFile method that uses an nsFileSpec instead of an nsString
git-svn-id: svn://10.0.0.236/trunk@25985 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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[],
|
||||
|
||||
Reference in New Issue
Block a user