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
Родитель 0777ae3e46
Коммит 796f574cf4
5 изменённых файлов: 45 добавлений и 0 удалений

Просмотреть файл

@ -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
*

Просмотреть файл

@ -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

Просмотреть файл

@ -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);

Просмотреть файл

@ -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;
}

Просмотреть файл

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