Accessing "Download more dictionaries" from the Check Spelling dialog should open a content tab not the external browser

RESOLVED FIXED in Thunderbird 5.0b1

Status

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: standard8, Assigned: squib)

Tracking

unspecified
Thunderbird 5.0b1
Bug Flags:
wanted-thunderbird +
in-litmus +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

8 years ago
AMO can now detect Thunderbird and offer to download dictionaries at the right time.

Therefore if the user selects to download dictionaries from the check spelling dialog (EdSpellCheck) we should open AMO in a tab so that users can install dictionaries directly.
Flags: wanted-thunderbird+
Depends on: 620781
(Assignee)

Comment 1

8 years ago
Is the proper way to do this by overlaying EdSpellCheck and overriding SelectLanguage()? http://mxr.mozilla.org/comm-central/source/editor/ui/dialogs/content/EdSpellCheck.js#452
(Reporter)

Comment 2

8 years ago
I think its either that, or override openURL for that dialog.
(Assignee)

Comment 3

8 years ago
Created attachment 520119 [details] [diff] [review]
Override openURL in the spell check window

Yeah, overriding openURL seems like a better idea. Here's a patch that does that.
Assignee: nobody → squibblyflabbetydoo
Status: NEW → ASSIGNED
Attachment #520119 - Flags: review?(bugzilla)
(Reporter)

Comment 4

8 years ago
Comment on attachment 520119 [details] [diff] [review]
Override openURL in the spell check window

>diff --git a/mail/base/content/EdSpellCheckOverlay.js b/mail/base/content/EdSpellCheckOverlay.js
>new file mode 100644
>--- /dev/null
>+++ b/mail/base/content/EdSpellCheckOverlay.js
>@@ -0,0 +1,45 @@
>+/* ***** BEGIN LICENSE BLOCK *****
>+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
>+ *
>+ * The contents of this file are subject to the Mozilla Public License Version
>+ * 1.1 (the "License"); you may not use this file except in compliance with
>+ * the License. You may obtain a copy of the License at
>+ * http://www.mozilla.org/MPL/
>+ *
>+ * Software distributed under the License is distributed on an "AS IS" basis,
>+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
>+ * for the specific language governing rights and limitations under the
>+ * License.
>+ *
>+ * The Original Code is Thunderbird Version of Spell Check UI.
>+ *
>+ * The Initial Developer of the Original Code is
>+ * mozilla.org
>+ * Portions created by the Initial Developer are Copyright (C) 2011
>+ * the Initial Developer. All Rights Reserved.
>+ *
>+ * Contributor(s):
>+ *   Jim Porter <squibblyflabbetydoo@gmail.com>
>+ *
>+ * Alternatively, the contents of this file may be used under the terms of
>+ * either the GNU General Public License Version 2 or later (the "GPL"), or
>+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
>+ * in which case the provisions of the GPL or the LGPL are applicable instead
>+ * of those above. If you wish to allow use of your version of this file only
>+ * under the terms of either the GPL or the LGPL, and not to allow others to
>+ * use your version of this file under the terms of the MPL, indicate your
>+ * decision by deleting the provisions above and replace them with the notice
>+ * and other provisions required by the GPL or the LGPL. If you do not delete
>+ * the provisions above, a recipient may use your version of this file under
>+ * the terms of any one of the MPL, the GPL or the LGPL.
>+ *
>+ * ***** END LICENSE BLOCK ***** */
>+
>+/**
>+ * Override openURL to open in a content tab within Thunderbird.
>+ *
>+ * @param url the URL to open
>+ */
>+function openURL(url) {
>+  openContentTab(url, "tab", "^https://addons.mozilla.org");
>+}
>diff --git a/mail/base/content/EdSpellCheckOverlay.xul b/mail/base/content/EdSpellCheckOverlay.xul
>new file mode 100644
>--- /dev/null
>+++ b/mail/base/content/EdSpellCheckOverlay.xul
>@@ -0,0 +1,43 @@
>+<?xml version="1.0"?>
>+<!-- ***** BEGIN LICENSE BLOCK *****
>+   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
>+   -
>+   - The contents of this file are subject to the Mozilla Public License Version
>+   - 1.1 (the "License"); you may not use this file except in compliance with
>+   - the License. You may obtain a copy of the License at
>+   - http://www.mozilla.org/MPL/
>+   -
>+   - Software distributed under the License is distributed on an "AS IS" basis,
>+   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
>+   - for the specific language governing rights and limitations under the
>+   - License.
>+   -
>+   - The Original Code is Thunderbird Version of Spell Check UI.
>+   -
>+   - The Initial Developer of the Original Code is
>+   - mozilla.org
>+   - Portions created by the Initial Developer are Copyright (C) 2011
>+   - the Initial Developer. All Rights Reserved.
>+   -
>+   - Contributor(s):
>+   -   Jim Porter <squibblyflabbetydoo@gmail.com>
>+   -
>+   - Alternatively, the contents of this file may be used under the terms of
>+   - either the GNU General Public License Version 2 or later (the "GPL"), or
>+   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
>+   - in which case the provisions of the GPL or the LGPL are applicable instead
>+   - of those above. If you wish to allow use of your version of this file only
>+   - under the terms of either the GPL or the LGPL, and not to allow others to
>+   - use your version of this file under the terms of the MPL, indicate your
>+   - decision by deleting the provisions above and replace them with the notice
>+   - and other provisions required by the LGPL or the GPL. If you do not delete
>+   - the provisions above, a recipient may use your version of this file under
>+   - the terms of any one of the MPL, the GPL or the LGPL.
>+   -
>+   - ***** END LICENSE BLOCK ***** -->
>+
>+<overlay id="EdSpellCheckOverlay"
>+         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
>+  <script type="application/javascript" src="chrome://communicator/content/utilityOverlay.js"/>
>+  <script type="application/javascript" src="chrome://messenger/content/EdSpellCheckOverlay.js"/>
>+</overlay>
>diff --git a/mail/base/jar.mn b/mail/base/jar.mn
>--- a/mail/base/jar.mn
>+++ b/mail/base/jar.mn
>@@ -4,6 +4,7 @@
> % override chrome://messagebody/skin/messageBody.css chrome://messenger/skin/messageBody.css
> % overlay chrome://global/content/viewSource.xul chrome://messenger/content/viewSourceOverlay.xul
> % overlay chrome://global/content/config.xul chrome://messenger/content/configEditorOverlay.xul
>+% overlay chrome://editor/content/EdSpellCheck.xul chrome://messenger/content/EdSpellCheckOverlay.xul
> % style chrome://global/content/customizeToolbar.xul chrome://messenger/content/messenger.css
> % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/
> % style chrome://global/content/customizeToolbar.xul chrome://messenger/skin/addressbook/addressbook.css
>@@ -87,6 +88,8 @@
>     content/messenger/newTagDialog.js               (content/newTagDialog.js)
> *   content/messenger/viewSourceOverlay.xul         (content/viewSourceOverlay.xul)
> *   content/messenger/configEditorOverlay.xul       (content/configEditorOverlay.xul)
>+    content/messenger/EdSpellCheckOverlay.xul       (content/EdSpellCheckOverlay.xul)
>+    content/messenger/EdSpellCheckOverlay.js        (content/EdSpellCheckOverlay.js)
>     content/messenger/composerOverlay.css           (content/composerOverlay.css)
>     content/messenger/threadPane.js                 (content/threadPane.js)
>     content/messenger/threadPaneColumnPicker.xml    (content/threadPaneColumnPicker.xml)
Attachment #520119 - Flags: review?(bugzilla) → review+
(Assignee)

Comment 5

8 years ago
I considered writing a mozmill test for this, but it seems difficult to do that, since I can't grab the spellcheck dialog in mozmill. I suppose I could fix that too, but unless someone thinks that's absolutely essential, I'll just avoid the extra work. :)

Adding checkin-needed, but feel free to remove that if you really want a test.
Keywords: checkin-needed
Flags: in-litmus?(ludovic)
(Reporter)

Comment 6

8 years ago
Checked in: http://hg.mozilla.org/comm-central/rev/6284ebc11965
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 3.3a4
(Reporter)

Updated

8 years ago
status-thunderbird5.0: wanted → ---
https://litmus.mozilla.org/show_test.cgi?id=15378
Flags: in-litmus?(ludovic) → in-litmus+
You need to log in before you can comment on or make changes to this bug.