Closed Bug 1931712 Opened 2 months ago Closed 2 months ago

Tidy up picker code in file-utils.js in cZ

Categories

(SeaMonkey :: Chat, enhancement)

enhancement

Tracking

(seamonkey2.53? affected)

RESOLVED FIXED
Tracking Status
seamonkey2.53 ? affected

People

(Reporter: iannbugzilla, Assigned: iannbugzilla)

Details

(Whiteboard: SM2.53.20)

Attachments

(1 file)

At the moment:

  • getPicker gets passed an object as an argument but only uses one of the properties of that object
  • pickSaveAs has 5 possible arguments but only ever gets called with at most 3 of them
  • pickOpen has 4 possible arguments but only ever gets called with at most 2 of them

Tidy up involves:

  • setting a null default for futils.lastSaveAsDir and futils.lastOpenDir so the code doesn't have to check for their existence.
  • removing MSG_SAVE_AS and MSG_OPEN fallbacks, as a title is always passed through as an argument.
  • dropping the object argument from getPicker instead passing the only used property (defaultString) as an argument.
  • removing the 2 unused arguments from pickSaveAs and pickOpen.

[Approval Request Comment]
Regression caused by (bug #): n/a
User impact if declined: none
Testing completed (on m-c, etc.): 2.53.20pre
Risk to taking this patch (and alternatives if risky): low
String changes made by this patch: none

Attachment #9438156 - Flags: review?(frgrahl)
Attachment #9438156 - Flags: approval-comm-release?
Whiteboard: SM2.53.20

Comment on attachment 9438156 [details] [diff] [review]
1931712-irc-file-utils-picker-tidy-25320.patch

lgtm r/a+

Attachment #9438156 - Flags: review?(frgrahl)
Attachment #9438156 - Flags: review+
Attachment #9438156 - Flags: approval-comm-release?
Attachment #9438156 - Flags: approval-comm-release+

Btw. https://searchfox.org/comm-central/source/suite/chatzilla/js/lib/file-utils.js#187

picker.show no longer works after Bug 1387800. Still fine for 2.53 but something for the future.

Pushed by frgrahl@gmx.net:
https://hg.mozilla.org/comm-central/rev/3227aaf70906
Tidy up picker code in file-utils.js in cZ. r=frg

Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: