Merge lp://qastaging/~agateau/unity-2d/unity-core into lp://qastaging/unity-2d/3.0

Proposed by Aurélien Gâteau
Status: Superseded
Proposed branch: lp://qastaging/~agateau/unity-2d/unity-core
Merge into: lp://qastaging/unity-2d/3.0
Diff against target: 4445 lines (+1465/-2159)
57 files modified
CMakeLists.txt (+5/-0)
debian/control (+5/-4)
debian/unity-2d-panel.install (+0/-2)
launcher/app/CMakeLists.txt (+0/-2)
launcher/app/launcher.cpp (+5/-21)
libunity-2d-private/Unity2d/CMakeLists.txt (+1/-7)
libunity-2d-private/Unity2d/launcherapplication.cpp (+3/-5)
libunity-2d-private/Unity2d/plugin.cpp (+0/-4)
libunity-2d-private/Unity2d/screeninfo.cpp (+1/-3)
libunity-2d-private/Unity2d/windowinfo.cpp (+1/-3)
libunity-2d-private/Unity2d/workspacesinfo.cpp (+1/-3)
libunity-2d-private/src/CMakeLists.txt (+1/-4)
libunity-2d-private/src/debug.cpp (+23/-0)
libunity-2d-private/src/debug_p.h (+6/-0)
libunity-2d-private/src/unity2dapplication.cpp (+48/-0)
libunity-2d-private/src/unity2dapplication.h (+7/-0)
libunity-2d-private/tests/keyboardmodifiersmonitortest.cpp (+1/-0)
libunity-2d-private/tests/mouseareademo.cpp (+1/-0)
panel/CMakeLists.txt (+3/-5)
panel/app/CMakeLists.txt (+3/-1)
panel/app/main.cpp (+5/-17)
panel/app/panelmanager.cpp (+32/-46)
panel/app/panelmanager.h (+4/-0)
panel/app/unity2dstyle.cpp (+0/-98)
panel/app/unity2dstyle.h (+0/-44)
panel/applets/CMakeLists.txt (+10/-30)
panel/applets/appname/appnameapplet.cpp (+5/-10)
panel/applets/appname/appnameapplet.h (+3/-1)
panel/applets/appname/com.canonical.AppMenu.Registrar.xml (+0/-82)
panel/applets/appname/menubarwidget.cpp (+79/-279)
panel/applets/appname/menubarwidget.h (+24/-66)
panel/applets/appname/registrar.cpp (+0/-138)
panel/applets/appname/registrar.h (+0/-85)
panel/applets/common/fakecairo.h (+125/-0)
panel/applets/common/indicatorentrywidget.cpp (+388/-0)
panel/applets/common/indicatorentrywidget.h (+81/-0)
panel/applets/common/indicatorsmanager.cpp (+179/-0)
panel/applets/common/indicatorsmanager.h (+70/-0)
panel/applets/common/indicatorwidget.cpp (+53/-0)
panel/applets/common/indicatorwidget.h (+51/-0)
panel/applets/common/panelstyle.cpp (+176/-0)
panel/applets/common/panelstyle.h (+59/-0)
panel/applets/indicator-config.h.in (+0/-7)
panel/applets/indicator/abstractindicator.cpp (+0/-43)
panel/applets/indicator/abstractindicator.h (+0/-53)
panel/applets/indicator/datetimeindicator.cpp (+0/-94)
panel/applets/indicator/datetimeindicator.h (+0/-53)
panel/applets/indicator/indicator.c (+0/-510)
panel/applets/indicator/indicator.h (+0/-45)
panel/applets/indicator/indicatorapplet.cpp (+0/-114)
panel/applets/indicator/indicatorapplet.h (+0/-60)
panel/applets/indicator/indicatorservicemanager.cpp (+0/-120)
panel/applets/indicator/indicatorservicemanager.h (+0/-54)
places/app/CMakeLists.txt (+0/-2)
places/app/places.cpp (+3/-19)
spread/app/CMakeLists.txt (+0/-4)
spread/app/spread.cpp (+3/-21)
To merge this branch: bzr merge lp://qastaging/~agateau/unity-2d/unity-core
Reviewer Review Type Date Requested Status
Tim Penhey (community) Needs Information
Florian Boucault Pending
Review via email: mp+66960@code.qastaging.launchpad.net

This proposal has been superseded by a proposal from 2011-07-25.

Commit message

[panel] Refactor to make use of indicator-panel-service, like Unity 3D does.

Description of the change

This branch is an heavy refactor of unity-2d-panel to use the new indicator-panel-service provided by Unity 3D. It has been developed on Oneiric and most likely will not build and work properly on Natty as it depends on GTK3[1] and UnityCore, a new library provided by Unity 3D.

[1] This branch is based on the gtk3 branch I created but which I did not propose for merge because support for indicators is disabled on it (at the time I did the work on this branch, indicators were gtk2-only).

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Hi Aurélien,

I notice you have a GConnector class. It covers a very similar area to Neil's
latest work -
https://code.launchpad.net/~njpatel/unity/nicer-glib-signals/+merge/67439

I also notice you aren't using namespaces for your top level classes - like
the GConnector. Have you considered using one?

A slight niggle, <string> is in the C++ standard library, not the STL (they
don't say we work for pedantical for nothing).

Redeclaring nux::Color is a dangerous thing. Slightly convoluted due to the
actual nux Color being nux::color::Color, which is then used in the nux
namespace. That is probably the only reason you are not getting linker errors
with this.

review: Needs Information
Revision history for this message
Aurélien Gâteau (agateau) wrote :

> Hi Aurélien,
>
> I notice you have a GConnector class. It covers a very similar area to Neil's
> latest work -
> https://code.launchpad.net/~njpatel/unity/nicer-glib-signals/+merge/67439

Yes, I discussed it briefly with Neil during Platform Rally, but from what I
understand it imposes the use of sigc++ signals. We already deal with GObject
and Qt signals so I prefer not adding another signal system to our stack
(granted, the code in this branch uses sigc++ signals when we deal with
UnityCore so this may be a moot point)

> I also notice you aren't using namespaces for your top level classes - like
> the GConnector. Have you considered using one?

Not really. GConnector is in libunity-2d-private, which is not supposed to be
reused outside of unity-2d. Therefore I don't see an advantage in using
namespaces here.

> A slight niggle, <string> is in the C++ standard library, not the STL (they
> don't say we work for pedantical for nothing).

Will fix :)

> Redeclaring nux::Color is a dangerous thing. Slightly convoluted due to the
> actual nux Color being nux::color::Color, which is then used in the nux
> namespace. That is probably the only reason you are not getting linker errors
> with this.

Granted, this code is hackish. It cannot cause link errors though:
nux::Color is in Nux and we only link to NuxCore, not to Nux. I would have
used nux::Color directly instead of reimplementing it otherwise.

This code is part of a fake Cairo API used to draw the border behind the active
menubar item:

I expected the corresponding code in unity-3d to continue to evolve based on
adjustments from Design and more drawing code to be added later on. It would
have been a pain to catch up with it if I had rewritten the whole drawing code
using Qt painting API. Instead I opted to fake the Cairo API, this way I
expected to be able to catch up by simply copying the drawing code from
unity-3d.

It turned out to be a not-so-smart move in the end because by the time I was
done with my fake Cairo API, Cimi started redoing the panel drawing code using
GTK3 style API :/. I plan on investigating whether it is possible for us to
directly call the GTK3 style API to paint on QWidgets so that we can keep
rendering synchronized. At this point this whole fake Cairo code should be
scrapped.

Revision history for this message
Tim Penhey (thumper) wrote :

On Tue, 12 Jul 2011 21:12:39 you wrote:
> > I also notice you aren't using namespaces for your top level classes -
> > like the GConnector. Have you considered using one?
>
> Not really. GConnector is in libunity-2d-private, which is not supposed to
> be reused outside of unity-2d. Therefore I don't see an advantage in using
> namespaces here.

You could say the same about unity, but I'm pushing for "namespace unity" (and
implementing).

> > Redeclaring nux::Color is a dangerous thing. Slightly convoluted due to
> > the actual nux Color being nux::color::Color, which is then used in the
> > nux namespace. That is probably the only reason you are not getting
> > linker errors with this.
>
> Granted, this code is hackish. It cannot cause link errors though:
> nux::Color is in Nux and we only link to NuxCore, not to Nux. I would have
> used nux::Color directly instead of reimplementing it otherwise.

No. nux::Color is in NuxCore, not Nux.

> This code is part of a fake Cairo API used to draw the border behind the
> active menubar item:
>
> I expected the corresponding code in unity-3d to continue to evolve based
> on adjustments from Design and more drawing code to be added later on. It
> would have been a pain to catch up with it if I had rewritten the whole
> drawing code using Qt painting API. Instead I opted to fake the Cairo API,
> this way I expected to be able to catch up by simply copying the drawing
> code from unity-3d.
>
> It turned out to be a not-so-smart move in the end because by the time I
> was done with my fake Cairo API, Cimi started redoing the panel drawing
> code using GTK3 style API :/. I plan on investigating whether it is
> possible for us to directly call the GTK3 style API to paint on QWidgets
> so that we can keep rendering synchronized. At this point this whole fake
> Cairo code should be scrapped.

Sure.

Revision history for this message
Aurélien Gâteau (agateau) wrote :

> On Tue, 12 Jul 2011 21:12:39 you wrote:
> > > I also notice you aren't using namespaces for your top level classes -
> > > like the GConnector. Have you considered using one?
> >
> > Not really. GConnector is in libunity-2d-private, which is not supposed to
> > be reused outside of unity-2d. Therefore I don't see an advantage in using
> > namespaces here.
>
> You could say the same about unity, but I'm pushing for "namespace unity" (and
> implementing).

Not exactly, at least libunity-core is used by both unity-2d and unity-3d.

> > > Redeclaring nux::Color is a dangerous thing. Slightly convoluted due to
> > > the actual nux Color being nux::color::Color, which is then used in the
> > > nux namespace. That is probably the only reason you are not getting
> > > linker errors with this.
> >
> > Granted, this code is hackish. It cannot cause link errors though:
> > nux::Color is in Nux and we only link to NuxCore, not to Nux. I would have
> > used nux::Color directly instead of reimplementing it otherwise.
>
> No. nux::Color is in NuxCore, not Nux.

Oh. Will fix.

Aurélien

671. By Aurélien Gâteau

Sync with trunk

672. By Aurélien Gâteau

[panel] Use the real nux::color::Color class instead of faking it.

673. By Aurélien Gâteau

[panel] Use the float versions of rgba accessors...

674. By Aurélien Gâteau

[panel] debug--

675. By Aurélien Gâteau

Merge gtk3 branch

676. By Aurélien Gâteau

Merge gtk3 branch

677. By Aurélien Gâteau

[packaging] Add missing build-dep, do not try to install removed pngs

678. By Aurélien Gâteau

Merged gtk3 branch

679. By Aurélien Gâteau

Cleanup

680. By Aurélien Gâteau

Synced with gtk3 branch

681. By Aurélien Gâteau

[build] Fix build with libunity-core 4.4

UnityCore.h has been removed

682. By Aurélien Gâteau

Remove forgotten FIXME comment

683. By Aurélien Gâteau

Sync with gtk3

684. By Aurélien Gâteau

Merge unity-2d/4.0 in

685. By Aurélien Gâteau

[panel] Empty commit to close bugs

686. By Aurélien Gâteau

Sync with unity-2d/4.0

687. By Aurélien Gâteau

[panel] Make sure indicators are present on hotplugged monitor

IndicatorsManager should not be shared among panels, otherwise when a new
monitor is plugged after unity-2d-panel startup, we don't get any indicators as
no on_object_added() signal is emitted.

Unmerged revisions

687. By Aurélien Gâteau

[panel] Make sure indicators are present on hotplugged monitor

IndicatorsManager should not be shared among panels, otherwise when a new
monitor is plugged after unity-2d-panel startup, we don't get any indicators as
no on_object_added() signal is emitted.

686. By Aurélien Gâteau

Sync with unity-2d/4.0

685. By Aurélien Gâteau

[panel] Empty commit to close bugs

684. By Aurélien Gâteau

Merge unity-2d/4.0 in

683. By Aurélien Gâteau

Sync with gtk3

682. By Aurélien Gâteau

Remove forgotten FIXME comment

681. By Aurélien Gâteau

[build] Fix build with libunity-core 4.4

UnityCore.h has been removed

680. By Aurélien Gâteau

Synced with gtk3 branch

679. By Aurélien Gâteau

Cleanup

678. By Aurélien Gâteau

Merged gtk3 branch

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches