bug 11632 - save page with images, stylesheets, objects and applets.

r=hewitt, brade, sr=hyatt
This commit is contained in:
ben%netscape.com 2001-12-12 04:17:26 +00:00
parent 3eb962cb6b
commit 35d4bc6f3a
5 changed files with 45 additions and 0 deletions

View File

@ -76,6 +76,13 @@ interface nsIFilePicker : nsISupports
/* what is this? */
attribute wstring defaultString;
/**
* The filter which is currently selected in the File Picker dialog
*
* @return Returns the index (0 based) of the selected filter in the filter list.
*/
attribute long filterIndex;
/**
* Set the directory that the file open/save dialog initially displays
*

View File

@ -308,6 +308,25 @@ NS_IMETHODIMP nsFilePicker::GetDefaultString(PRUnichar **aString)
return NS_ERROR_FAILURE;
}
//-------------------------------------------------------------------------
//
// Set the filter index
//
//-------------------------------------------------------------------------
NS_IMETHODIMP nsFilePicker::GetFilterIndex(PRInt32 *aFilterIndex)
{
// Windows' filter index is 1-based, we use a 0-based system.
*aFilterIndex = mSelectedType - 1;
return NS_OK;
}
NS_IMETHODIMP nsFilePicker::SetFilterIndex(PRInt32 aFilterIndex)
{
// Windows' filter index is 1-based, we use a 0-based system.
mSelectedType = aFilterIndex + 1;
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Set the display directory

View File

@ -51,6 +51,8 @@ public:
NS_IMETHOD SetDefaultString(const PRUnichar * aDefaultString);
NS_IMETHOD GetDisplayDirectory(nsILocalFile * *aDisplayDirectory);
NS_IMETHOD SetDisplayDirectory(nsILocalFile * aDisplayDirectory);
NS_IMETHOD GetFilterIndex(PRInt32 *aFilterIndex);
NS_IMETHOD SetFilterIndex(PRInt32 aFilterIndex);
NS_IMETHOD GetFile(nsILocalFile * *aFile);
NS_IMETHOD GetFileURL(nsIFileURL * *aFileURL);
NS_IMETHOD Show(PRInt16 *_retval);

View File

@ -162,4 +162,19 @@ nsBaseFilePicker::AppendFilters(PRInt32 aFilterMask)
return NS_OK;
}
//-------------------------------------------------------------------------
//
// Set the filter index
//
//-------------------------------------------------------------------------
NS_IMETHODIMP nsBaseFilePicker::GetFilterIndex(PRInt32 *aFilterIndex)
{
*aFilterIndex = 0;
return NS_OK;
}
NS_IMETHODIMP nsBaseFilePicker::SetFilterIndex(PRInt32 aFilterIndex)
{
return NS_OK;
}

View File

@ -39,6 +39,8 @@ public:
PRInt16 aMode);
NS_IMETHOD AppendFilters(PRInt32 filterMask);
NS_IMETHOD GetFilterIndex(PRInt32 *aFilterIndex);
NS_IMETHOD SetFilterIndex(PRInt32 aFilterIndex);
protected: