Closed
Bug 671572
Opened 12 years ago
Closed 12 years ago
Switch suite to use Services.prompt
Categories
(SeaMonkey :: General, defect)
SeaMonkey
General
Tracking
(Not tracked)
RESOLVED
FIXED
seamonkey2.5
People
(Reporter: iannbugzilla, Assigned: iannbugzilla)
References
Details
Attachments
(1 file, 1 obsolete file)
We import Services.jsm but we need to make better use of prompt provided by it. This patch: * Switches suite code to use prompt provided by Services.jsm
Attachment #545929 -
Flags: review?(neil)
Comment 1•12 years ago
|
||
Comment on attachment 545929 [details] [diff] [review] switch suite to use Services.prompt > nsPreferences.setUnicharPref("browser.startup.homepage", aURL); [You haven't done Services.prefs yet, have you?] >diff --git a/suite/common/downloads/downloadmanager.js b/suite/common/downloads/downloadmanager.js This is used by the progress dialog which doesn't import Services yet... > setWallpaper: function() { [I keep forgetting to write a proper wallpaper dialog...]
![]() |
||
Comment 2•12 years ago
|
||
> [I keep forgetting to write a proper wallpaper dialog...] We can just copy the Firefox version: http://mxr.mozilla.org/seamonkey/source/browser/base/content/nsContextMenu.js#787 http://mxr.mozilla.org/seamonkey/source/browser/components/shell/content/setDesktopBackground.xul
Comment 3•12 years ago
|
||
Comment on attachment 545929 [details] [diff] [review] switch suite to use Services.prompt >+ if (Services.prompt.confirmEx(window, promptTitle, promptMsg, >+ (Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) + >+ (Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1), >+ okButton, null, null, null, {value:0}) == 0) Not really the right indentation here, but you don't really have much choice, so I'd just go for an extra two spaces. > nsPreferences.setUnicharPref("browser.startup.homepage", aURL); >- } Looks like it's missing some reindentation, although in this case you might be changing the line again shortly anyway... >- if (!prompts.confirm(null, >+ if (!Services.prompt.confirm(null, > PlacesUIUtils.getString("bookmarksRestoreAlertTitle"), > PlacesUIUtils.getString("bookmarksRestoreAlert"))) Nit: reindentation >- promptConfirmButton, null, null, null, {value:0}); >+ promptConfirmButton, null, null, null, {value:0}) != 0) [I'm not actually sure that {value:0} is correct. Isn't it inout boolean?]
Changes since last version: * Used false instead of zero for calls to confirmEx * Fixed indentation issues.
Attachment #545929 -
Attachment is obsolete: true
Attachment #546149 -
Flags: review?(neil)
Attachment #545929 -
Flags: review?(neil)
Comment 5•12 years ago
|
||
Comment on attachment 546149 [details] [diff] [review] switch suite to use Services.prompt with more space and less zeros [Checked in: Comment 6] > nsPreferences.setUnicharPref("browser.startup.homepage", aURL); >- } > } I hope this gets reindented eventually ;-)
Attachment #546149 -
Flags: review?(neil) → review+
Comment on attachment 546149 [details] [diff] [review] switch suite to use Services.prompt with more space and less zeros [Checked in: Comment 6] http://hg.mozilla.org/comm-central/rev/a87f3182f6f9
Attachment #546149 -
Attachment description: switch suite to use Services.prompt with more space and less zeros → switch suite to use Services.prompt with more space and less zeros [Checked in: Comment 5]
Attachment #546149 -
Attachment description: switch suite to use Services.prompt with more space and less zeros [Checked in: Comment 5] → switch suite to use Services.prompt with more space and less zeros [Checked in: Comment 6]
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.5
You need to log in
before you can comment on or make changes to this bug.
Description
•