Closed
Bug 402457
Opened 17 years ago
Closed 17 years ago
Make the interface for deleting address books simpler.
Categories
(MailNews Core :: Address Book, defect)
MailNews Core
Address Book
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: standard8, Assigned: standard8)
Details
Attachments
(1 file)
35.72 KB,
patch
|
neil
:
review+
Bienvenu
:
superreview+
|
Details | Diff | Splinter Review |
The current interface for deleting address books is:
void deleteAddressBooks(in nsIRDFDataSource aDS, in nsISupportsArray aParentDir, in nsISupportsArray aResourceArray);
This is quite complicated to set up to call, and leads to duplication of code. All that should be required is:
void deleteAddressBook(in ACString aURI);
The attached patch makes this change with some additional tidy up:
- Moves AbDeleteDirectory from addressbook.js to abCommon.js and makes it so it can be called with just a URI. Although there is just one caller in js for this function at the moment, I'm planning a later patch to the Edit Directories dialog to use the function as well.
- Removes the "top.addressbook" variable. We only use this in a couple of places, and one of those is also going away soon (bug 397194)
- Removes some defines for ICOMMANDLINEHANDLER that aren't required now (I couldn't be bothered to raise a separate bug for that and as I'm in the area...)
- Drops the "DeleteCards" and "Delete" from the rdf data source. "DeleteCards" isn't used in current source, and the changes to nsAddressBook mean that "Delete" is also obsolete. This simplifies the delete process quite a bit.
- Implements changes for both TB & SM.
Attachment #287319 -
Flags: superreview?(bienvenu)
Attachment #287319 -
Flags: review?(neil)
Comment 1•17 years ago
|
||
Comment on attachment 287319 [details] [diff] [review]
The fix
I couldn't actually create a mailing list in order to try deleting it...
If these are all the instances of .createInstance(Components.interfaces.nsIAddressBook) then it might make sense to change them to .getService?
Attachment #287319 -
Flags: review?(neil) → review+
Comment 2•17 years ago
|
||
Comment on attachment 287319 [details] [diff] [review]
The fix
it does seem odd to have to create an nsIAddressBook to delete an address book, but this is an improvement on the way it was before, and I guess there's not an object or service that holds all the address books.
Attachment #287319 -
Flags: superreview?(bienvenu) → superreview+
Assignee | ||
Comment 3•17 years ago
|
||
I think changing nsIAddressBook to be a service would be part of future plans. Especially if we are restructuring it. For now I think the change is an improvement over what was there, but I'll consider moving it to a service anyway in the next few weeks.
I've checked the patch in, so this bug is now fixed.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•