Closed
Bug 107068
Opened 23 years ago
Closed 23 years ago
allow for generic extensions to the account manager, nsIMsgIdentity and nsIMsgIncomingServer
Categories
(SeaMonkey :: MailNews: Account Configuration, defect)
SeaMonkey
MailNews: Account Configuration
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: sspitzer, Assigned: sspitzer)
References
Details
Attachments
(1 file, 4 obsolete files)
allow for generic extensions to the account manager
patch (and info) coming.
Assignee | ||
Comment 1•23 years ago
|
||
to use this, you need to set a pref, and have two files.
pref("mailnews.accountmanager.extension.foobar",1);
chrome://messenger/content/am-foobar.xul
chrome://messenger/locale/am-foobar.properties
and in that bundle, a property for your panel title. it must be named
prefPanel-foobar.
you can define as many extensions as you want, as long as they are unique and
start with "mailnews.accountmanager.extension."
currently, any extension you add will show up in the account manager under any
acccount that has identities. we don't support extensions for the smtp server,
or for accounts with identities.
one todo item, switch from using a pref to using categories.
but that can come next.
Assignee | ||
Comment 2•23 years ago
|
||
Assignee | ||
Comment 3•23 years ago
|
||
some known limitiations with the current patch:
1) there's isn't a way to not show the panel (like you can with the offline
panel) depending on a server attribute. that can come later.
in am-foobar.xul, those who extend the account manager can use the existing
hidefor="" attribute to hide certain ui elements for certain server types.
2) because the code looks in the messenger.jar and the region jar (en-US.jar),
it means that to extend the account manager, you'd have to do it at build
time. (you couldn't drop in an xpi, unless xpis are smart enough to add files
to existing jars, which would solve this problem.)
for now, I'm ok with that limitation for now. distribution providers can
provide builds with extensions, they just can't provide .xpi files to allow
existings users to download extensions.
Status: NEW → ASSIGNED
Assignee | ||
Comment 4•23 years ago
|
||
other limitiations:
1) you can't extend account with out identities (like "Local Folders", or
imported mail accounts.)
2) you can't extend the SMTP server.
3) you can't add new "top level" items.
basically, you can only add new panels to accounts that have identities.
but the good news is that's the common case.
Assignee | ||
Comment 5•23 years ago
|
||
for this to work properly, I'm extending AccountManager.js so that if an
attribute has generic="true", we'll do the right thing. (call
identity.get/set<preftype>().
I'll provide a sample "foobar" extension.
Assignee | ||
Comment 6•23 years ago
|
||
Assignee | ||
Comment 7•23 years ago
|
||
Assignee | ||
Comment 8•23 years ago
|
||
*** Bug 107003 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 9•23 years ago
|
||
Assignee | ||
Comment 10•23 years ago
|
||
it would be really useful, as putterman points out, if the panels would only
show based on certain criteria.
here's what I'm going to do: for the nsIMsgAccountManagerExtension interface,
I'll do this:
readonly string extensionName;
bool showPanel(nsIMsgAccount account);
then, the extension implementor can decide when it shows up. (based on # of
identities, server type, what ever.)
we can use this to add a movemail panel. or some advanced news panels.
Assignee | ||
Comment 11•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Attachment #55340 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #55374 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #55375 -
Attachment is obsolete: true
Assignee | ||
Updated•23 years ago
|
Attachment #55401 -
Attachment is obsolete: true
Assignee | ||
Comment 12•23 years ago
|
||
ok, that last patch includes the changes to switch from using prefs to using the
category manager.
it also include the sample extension.
here's the new inteface:
interface nsIMsgAccountManagerExtension : nsISupports
{
readonly attribute string name;
boolean showPanel(in nsIMsgIncomingServer server);
};
you can get the identities from the server (using the account manager) so I'll
leave it to the extension implementors to decide how to implement showPanel().
the sample only shows the "Sample" panel on nntp accounts.
once this lands, we should use it to prevent code rot.
I'm thinking of adding a "nntp" extension, so that I can put all the advanced
nntp pref UI in a panel, like "abbreviate newsgroup name in folder pane", "use
push auth".
Assignee | ||
Updated•23 years ago
|
OS: Windows 2000 → All
Hardware: PC → All
Summary: allow for generic extensions to the account manager → allow for generic extensions to the account manager, nsIMsgIdentity and nsIMsgIncomingServer
Comment 13•23 years ago
|
||
Comment on attachment 55405 [details] [diff] [review]
complete patch. no more prefs, using categories. sample extension include, only shows up for nntp accounts.
sr=mscott
I'll check this patch in with some other stuff
Attachment #55405 -
Flags: superreview+
Comment 14•23 years ago
|
||
r=bhuvan. go for it.
Assignee | ||
Comment 15•23 years ago
|
||
this fix has landed.
I'll create some docs for it (for mozilla.org) and a sample extension (for push
auth), when I get some cycles.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 16•23 years ago
|
||
What can I do to verify this bug?
Comment 17•23 years ago
|
||
nothing really. I'll do it.
verified by code inspection.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: Browser → Seamonkey
You need to log in
before you can comment on or make changes to this bug.
Description
•