Closed Bug 456869 Opened 16 years ago Closed 16 years ago

port the firefox add-ons preference to thunderbird preferences

Categories

(Thunderbird :: Preferences, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 3.0b1

People

(Reporter: clarkbw, Assigned: clarkbw)

References

()

Details

Attachments

(2 files)

Hopefully add-ons, with the new add-ons manager, will help people install more Thunderbird add-ons than before.  We should take what Firefox has done by adding a section to the Main preferences page for Add-ons.  This will give more prominence to the add-ons and is arguably a better area for displaying it than an item in the Tools menu.

+--------------------------------------------------------------------------+
|---------+                                                                |
|  Main   | Display | Composition  |  Security   |  Calendar  |  Advanced  |
|---------+----------------------------------------------------------------|
|                                                                          |
| Add-ons                                                                  |
|   Change your preferences for add-ons              ( Manage Add-ons... ) |
|                                                                          |
+--------------------------------------------------------------------------+
Here's a screenshot of the change, obviously things look cramped right now.  When bug 452909 and bug 452890 land there will be much more room.

Patch to follow...
Assignee: nobody → clarkbw
Comment on attachment 340391 [details] [diff] [review]
patch to port firefox add-ons pref to the general thunderbird pref page

This patch ports over the Firefox Add-ons pref
Attachment #340391 - Flags: review?(mkmelin+mozilla)
Attachment #340391 - Flags: review?(mkmelin+mozilla) → review+
Comment on attachment 340391 [details] [diff] [review]
patch to port firefox add-ons pref to the general thunderbird pref page

Looks good to me! r=mkmelin
setting keywords and updating status whiteboard
Keywords: checkin-needed
Whiteboard: [checkin post beta 1 freeze]
Checked in, changeset id: 489:addca62df649
Status: NEW → RESOLVED
Closed: 16 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [checkin post beta 1 freeze]
Bleah!

+  showAddonsMgr: function ()
+  {
+    const EMTYPE = "Extension:Manager";
+    var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
+                       .getService(Components.interfaces.nsIWindowMediator);
+    var theEM = wm.getMostRecentWindow(EMTYPE);
+    if (theEM) {
+      theEM.focus();
+      theEM.showView("extensions");
+      return;
+    }
+
+    const EMURL = "chrome://mozapps/content/extensions/extensions.xul";
+    const EMFEATURES = "chrome,menubar,extra-chrome,toolbar,dialog=no,resizable";
+    window.openDialog(EMURL, "", EMFEATURES, "extensions");

This could all be reduced to:

showAddonsMgr: function ()
{
    document.documentElement
            .openWindow("Extension:Manager", 
                        "chrome://mozapps/content/extensions/extensions.xul",
                        "chrome,menubar,extra-chrome,toolbar", null);

}

Who let this get past review?
Heh, we're just following the firefox lead.
http://mxr.mozilla.org/mozilla-central/source/browser/components/preferences/main.js#463

Many times when the firefox code is a bit ugly (but now wrong), the value of tidying up our version before porting is quite small as it makes porting future fixes harder.
s/now/not
(In reply to comment #8)
> Many times when the firefox code is a bit ugly (but now wrong), the value of
> tidying up our version before porting is quite small as it makes porting future
> fixes harder.

In this case I don't think we'd ever be porting a fix to that code. If it was, it would just be changing one of the urls/parameters which would be obvious.

I'd rather we didn't port bad code generally, even though it may make porting fixes hard. We should fix it when we port and file bugs on firefox to tell them its bad.
Sure, in this case I just didn't see the other way to do it.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: