You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



New Context Menu Options

Set Image As Wallpaper
(Windows only)
- Ability to obtain in-memory bitmap representation for a given image in a
document - 3 days (conservative)
- Write this representation to disk in the correct location, as "Brandname
Wallpaper" -  2 days (conservative)
- menu item UI - 1 day.

Save Page With Images:

UI presentation is as follows: when user saves page (either from File->Save As) or from context menu, a file picker dialog is displayed with various filters depending on the type of document loaded.

Code paths & requirements for each type:

HTML (XML,XUL? Uncertain) Document
- Dialog has three filter options:
 Web Page, complete (*.htm, *.html)   <-- saves page complete with images
 Web Page, HTML only (*.htm, *.html)  <-- saves HTML document only
 Text only (*.txt)                    <-- saves Text conversion (*)

(*) Separate PRD item)
 
IMAGE Document
- Dialog has two filter options:
 Image (*.extension)   <-- where 'extension' is gleaned from the extension of the image document
 All Files (*.*)

Other Document
- Dialog has one filter option
 All Files (*.*)

SWAGs:
 Code to determine which type of document is selected - 2 days
 Code to save Web Page with Images, using nsIWebBrowserPersist - 1 day
 Code to save Images/Other Documents/HTML Only, using nsIWebBrowserPersist - 1 day
 Code to ensure this all works correctly within helper app download dialog - 1 day
 (can later be migrated to Download Manager)
 Code to make nsIFilePicker report which filter was selected, so we can
 make a decision on what save option to take:
   Windows & Unix XP File Picker - 1 day
   Mac: ??? - Need Mac Help here. Someone who knows NavServices.

Save as Text:
 Proposed implementation (not necessarily best, just off top of my head):
 1) Download HTML file to temporary file using nsIWebBrowserPersist.
 2) Read HTML document into memory as string
 3) Create component that has method that uses nsIHTMLToTextConverter to
    convert html string to text. See code in nsMsgCompUtils.cpp &
    nsMsgCompose.cpp

 SWAG: 3 days.


Send Page, Edit Page - one day inclusive, just involves adding UI


Before we add anything to the context menus, we should do some cleaning of  what's in there already. It is currently heavy in many cases, and the code behind it is confusing. Blake has volunteered to help with this in 0.9.5.