canmove, Confirmed users
1,570
edits
No edit summary |
No edit summary |
||
| Line 78: | Line 78: | ||
Currently the UI is purely template based which has meant that plugin and add-on search results have ended up being put into in-memory rdf datasources. Switching away from templates will allow us to break this into a more straightforward approach. We just have one richlistbox per pane in a deck, on startup we create richlistitems for every installed add-on, plugin and search results when available. | Currently the UI is purely template based which has meant that plugin and add-on search results have ended up being put into in-memory rdf datasources. Switching away from templates will allow us to break this into a more straightforward approach. We just have one richlistbox per pane in a deck, on startup we create richlistitems for every installed add-on, plugin and search results when available. | ||
For the install and add-on lists we will have to have some kind of notification from the EM backend to the UI to let it know that a change has been made that might require updating the UI. Add-on properties don't change all that much, mainly state changes which should make this easy to handle. | For the install and add-on lists we will have to have some kind of notification from the EM backend to the UI to let it know that a change has been made that might require updating the UI. Add-on properties don't change all that much, mainly state changes which should make this easy to handle. We already have state changed exposed through observer notifications, we can likely reuse/adapt that method. | ||
==API== | ==API== | ||
Interface changes are necessary so that the UI can query for all of the necessary information. The main changes are to nsIExtensionManager and nsIUpdateItem (renamed to nsIAddon). | |||
[[Extension Manager:Sqlite Storage:nsIExtensionManager]] | |||
[[Extension Manager:Sqlite Storage:nsIAddon]] | |||
Installed items would be initialised from the addon table in the database. This gives enough information for internal operations. Accesses to other properties like the localised information will cause additional db queries to find them. | |||
Installed items would be initialised from the database. | |||
For a pending install/downloading add-on the nsIAddon interface is mostly unfilled, things like the version are unavailable until after the download is complete and the install.rdf read. If they are updates then the id and name and some other information can be prefilled from the original item. This would enable us to reject updates that turn out to not be the id and version expected. | For a pending install/downloading add-on the nsIAddon interface is mostly unfilled, things like the version are unavailable until after the download is complete and the install.rdf read. If they are updates then the id and name and some other information can be prefilled from the original item. This would enable us to reject updates that turn out to not be the id and version expected. | ||
''We could consider moving the add-on operations (uninstall, disable, enable etc.) onto the nsIAddon interface.'' | ''We could consider moving the add-on operations (uninstall, disable, enable etc.) onto the nsIAddon interface.'' | ||
=Major Tasks= | =Major Tasks= | ||