[Merge] lp:~dylanmccall/update-manager/dialogs-refactor into lp:update-manager

Dylan McCall dylanmccall at gmail.com
Mon May 20 06:07:31 UTC 2013

Dylan McCall has proposed merging lp:~dylanmccall/update-manager/dialogs-refactor into lp:update-manager.

Requested reviews:
  Ubuntu Core Development Team (ubuntu-core-dev)
Related bugs:
  Bug #1111768 in update-manager (Ubuntu): "Updates remain (unchecked) after changing software sources"

For more details, see:

With this branch, I am proposing some refactoring of update-manager's various screens so they all use the same base class, "Dialog", which is typically a Gtk widget that can be added as a child of the application's main window.

Previously, the design of the application meant we used Dialog sometimes, but not always, with the UpdatesAvailable screen being a particularly noteworthy omission. To deal with all these different screens, whenever UpdateManager wanted to show a new screen it would call that screen's start method, and then the screen itself would effectively take control of the main window. This meant adding new widgets, hiding the main window, making it resizable, and the like; which also meant code duplication, several calls to Gtk.main, and a strong smell of feature envy :) With my design, I'm trying to adopt a more conventional layout, using the Dialog class throughout, as a GTK widget wherever possible. (The settings dialog and InstallBackendSynaptic keep us from being all internal Gtk widgets all the time, but we're really close).

There is now a little less code (diffstat: 11 files changed, 747 insertions(+), 1074 deletions(-)), and it should be much easier to make a single change and have it apply logically across the application. In addition, because the main window has a better handle on its children, this paves the way for us to implement pretty transitions between screens, for example using the new-fangled GtkRevealer widget. Originally this would have meant changing every screen to deal with a new container in the main window. With this change, we can do it all in UpdateManager.py.
Your team Ubuntu Core Development Team is requested to review the proposed merge of lp:~dylanmccall/update-manager/dialogs-refactor into lp:update-manager.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: review-diff.txt
Type: text/x-diff
Size: 108282 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-reviews/attachments/20130520/3c0e8a4c/attachment-0001.diff>

More information about the Ubuntu-reviews mailing list