Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[screenshot] Use the new nsIFilePicker::ShowAsync method. #112

Closed
xabolcs opened this Issue Nov 22, 2012 · 2 comments

Comments

Projects
None yet
1 participant
Collaborator

xabolcs commented Nov 22, 2012

From the XPCOM section of Jorge's Add-on Compatibility for Firefox 17 post:

...

XPCOM

...

I didn't searched through the source, but at least the screenshot feautre uses nsIFilePicker::Show, which is going to deprecated in Firefox 17.

Collaborator

xabolcs commented Nov 22, 2012

From MDN:

... The passed in object's done method will be called upon completion.

void open(
  in nsIFilePickerShownCallback aFilePickerShownCallback
);

where nsIFilePickerShownCallback is:

[scriptable, function, uuid(0d79adad-b244-49A5-9997-2a8cad93fc44)]
interface nsIFilePickerShownCallback : nsISupports
{
 /**
  * Callback which is called when a filepicker is shown and a result
  * is returned.
  *
  * @param aResult One of returnOK, returnCancel, or returnReplace
  */
  void done(in short aResult);
};

@xabolcs xabolcs was assigned Mar 13, 2013

@xabolcs xabolcs added a commit to xabolcs/nightlytt that referenced this issue Mar 13, 2013

@xabolcs xabolcs Issue #112 - Favor the new nsIFilePicker::ShowAsync method in saveScr…
…eenshot()
041e3e7

@xabolcs xabolcs added a commit to xabolcs/nightlytt that referenced this issue Mar 20, 2013

@xabolcs xabolcs Issue #112 - addressing comments 1
- checking for fp.returnOK and fp.returnReplace
- doneCallback renamed to fpCallback (+ named function)
- avoid result variable in the fallback case
a08d87e

@xabolcs xabolcs added a commit to xabolcs/nightlytt that referenced this issue Mar 21, 2013

@xabolcs xabolcs Issue #112 - addressing comments 2
- implement nsIFilePickerShownCallback
3ab3212

@xabolcs xabolcs added a commit to xabolcs/nightlytt that referenced this issue Apr 9, 2013

@xabolcs xabolcs Issue #112 - addressing comments 3
- fp.returnCancel
- ===
01a4e76
Collaborator

xabolcs commented Apr 13, 2013

Fixed by commit 2931633 above.

@xabolcs xabolcs closed this Apr 13, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment