diff --git a/mozilla/widget/public/nsIFileWidget.h b/mozilla/widget/public/nsIFileWidget.h index f7777c874f9..0574e805e21 100644 --- a/mozilla/widget/public/nsIFileWidget.h +++ b/mozilla/widget/public/nsIFileWidget.h @@ -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; /** diff --git a/mozilla/widget/src/mac/nsFileWidget.cpp b/mozilla/widget/src/mac/nsFileWidget.cpp index 9e4fa42c255..fe5070c088a 100644 --- a/mozilla/widget/src/mac/nsFileWidget.cpp +++ b/mozilla/widget/src/mac/nsFileWidget.cpp @@ -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 diff --git a/mozilla/widget/src/mac/nsFileWidget.h b/mozilla/widget/src/mac/nsFileWidget.h index fda1c0e4f50..0b10629ed7d 100644 --- a/mozilla/widget/src/mac/nsFileWidget.h +++ b/mozilla/widget/src/mac/nsFileWidget.h @@ -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[],