Merge lp:~osomon/unity-2d/one-panel-per-screen into lp:unity-2d/3.0
Status: | Merged |
---|---|
Approved by: | Aurélien Gâteau |
Approved revision: | 505 |
Merged at revision: | 508 |
Proposed branch: | lp:~osomon/unity-2d/one-panel-per-screen |
Merge into: | lp:unity-2d/3.0 |
Diff against target: |
439 lines (+232/-54) 10 files modified
panel/app/CMakeLists.txt (+1/-0) panel/app/main.cpp (+2/-47) panel/app/panelmanager.cpp (+135/-0) panel/app/panelmanager.h (+48/-0) panel/applets/appname/appnameapplet.cpp (+5/-2) panel/applets/appname/menubarwidget.cpp (+1/-1) panel/applets/appname/registrar.cpp (+8/-2) panel/applets/appname/registrar.h (+6/-2) panel/applets/appname/windowhelper.cpp (+25/-0) panel/applets/appname/windowhelper.h (+1/-0) |
To merge this branch: | bzr merge lp:~osomon/unity-2d/one-panel-per-screen |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Aurélien Gâteau (community) | Approve | ||
Review via email: mp+56162@code.launchpad.net |
Commit message
[panel] Display one panel per screen.
Only the panel on the primary screen contains the home button applet ("circle of friends" that invokes the dash) and the systray.
All panels contain an instance of the applet that displays the active window’s application title and menu bar, as well as the application and system indicators.
Description of the change
Notes to the reviewer:
- I developed and tested on Maverick, so thorough functional testing on Natty is expected, in particular dynamically adding/removing screens while unity-2d-panel is running.
- On Maverick, I noticed one tiny problem with the "me" system indicator: when there are several screens, only the instance on the primary screen has an icon and a label, other instances seem empty. However their menus are there and functional, the problem is only with the menu title. I suspect a bug in the indicator itself, but I’m not sure. It may have been fixed in Natty as well, feedback is welcome.
No time to test tonight, but the way you implemented it looks good. Here are a few remarks to keep things moving:
- Please rename PanelsManager to PanelManager
- Can you make the helper functions in panelmanagers static? this makes it more explicit they are not meant to be used from outside (they were not when they were in main.cpp because I assumed it was clear no code from main.cpp would ever be called from somewhere else)
- Adjust the registrar singleton method to something like this:
Registrar* Registrar: :instance( )
{
static Registrar singleton;
return &singleton;
}
It's almost the same, except memory checkers such as valgrind won't complain about not released memory.
- You don't need to mark Registrar constructor explicit. This is only useful for one-parameter constructors.
I may add a few other requests tomorrow morning, but I have to go now.