Merge lp:~osomon/unity-2d/natty-panel-backport-oneiric-changes into lp:unity-2d/3.0

Proposed by Olivier Tilloy
Status: Merged
Approved by: Florian Boucault
Approved revision: 690
Merged at revision: 689
Proposed branch: lp:~osomon/unity-2d/natty-panel-backport-oneiric-changes
Merge into: lp:unity-2d/3.0
Diff against target: 476 lines (+77/-42)
30 files modified
libunity-2d-private/src/panelapplet.cpp (+21/-3)
libunity-2d-private/src/panelapplet.h (+9/-1)
libunity-2d-private/src/panelappletproviderinterface.h (+1/-1)
panel/app/panelmanager.cpp (+2/-2)
panel/app/panelmanager.h (+2/-0)
panel/applets/appindicator/appindicatorapplet.cpp (+2/-1)
panel/applets/appindicator/appindicatorapplet.h (+1/-1)
panel/applets/appindicator/plugin.cpp (+2/-2)
panel/applets/appindicator/plugin.h (+1/-1)
panel/applets/appname/appnameapplet.cpp (+3/-2)
panel/applets/appname/appnameapplet.h (+1/-1)
panel/applets/appname/plugin.cpp (+2/-2)
panel/applets/appname/plugin.h (+1/-1)
panel/applets/homebutton/homebuttonapplet.cpp (+3/-2)
panel/applets/homebutton/homebuttonapplet.h (+1/-1)
panel/applets/homebutton/plugin.cpp (+2/-2)
panel/applets/homebutton/plugin.h (+1/-1)
panel/applets/indicator/indicatorapplet.cpp (+2/-1)
panel/applets/indicator/indicatorapplet.h (+1/-1)
panel/applets/indicator/plugin.cpp (+2/-2)
panel/applets/indicator/plugin.h (+1/-1)
panel/applets/legacytray/legacytrayapplet.cpp (+3/-2)
panel/applets/legacytray/legacytrayapplet.h (+1/-1)
panel/applets/legacytray/plugin.cpp (+2/-2)
panel/applets/legacytray/plugin.h (+1/-1)
panel/applets/separator/plugin.cpp (+2/-2)
panel/applets/separator/plugin.h (+1/-1)
panel/applets/separator/separatorapplet.cpp (+3/-2)
panel/applets/separator/separatorapplet.h (+1/-1)
panel/tests/homebuttonapplettest.cpp (+2/-1)
To merge this branch: bzr merge lp:~osomon/unity-2d/natty-panel-backport-oneiric-changes
Reviewer Review Type Date Requested Status
unity-2d-team Pending
Review via email: mp+74223@code.launchpad.net

Commit message

[panel] Backport an interface change from the oneiric branch (4.0): pass the panel as a parameter to the constructors of the applets.

To post a comment you must log in.
Alberto Mardegan (mardy) wrote :

Thanks for this contribution!

The merge of code from the Oneiric branch is obviously fine.

About the ready() signal, while reviewing your code I started thinking about the emission of the signal from the panelManager; I was thinking of having it emitted by the panel subclass after loading the plugins (maybe with QMetaObject::invokeMethod() with a queued connection). And this led me to wonder, do we really need this signal at all? Why can't the plugins themselves call their lengthy methods with a queued connection?

Olivier Tilloy (osomon) wrote :

You are right, on second thought this ready() signal is probably not really useful, especially since its implementation is a tad clumsy.

Do we still want to merge the first revision of this branch (the backport from the oneiric branch)? Is there a way to have tarmac merge a selected revision only, or should I undo my last revision, or resubmit another merge request, or even merge it manually?

Florian Boucault (fboucault) wrote :

> You are right, on second thought this ready() signal is probably not really
> useful, especially since its implementation is a tad clumsy.
>
> Do we still want to merge the first revision of this branch (the backport from
> the oneiric branch)? Is there a way to have tarmac merge a selected revision
> only, or should I undo my last revision, or resubmit another merge request, or
> even merge it manually?

Just undoing your last revision is easiest.

690. By Olivier Tilloy on 2011-09-09

Undo the previous revision.
After discussion (see https://code.launchpad.net/~osomon/unity-2d/natty-panel-notify-loaded/+merge/74223), this has been identified as not necessary.

Olivier Tilloy (osomon) wrote :

I have reverted the last revision.
I have also updated the name of the branch and the commit message accordingly.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libunity-2d-private/src/panelapplet.cpp'
--- libunity-2d-private/src/panelapplet.cpp 2011-08-17 09:21:18 +0000
+++ libunity-2d-private/src/panelapplet.cpp 2011-09-09 06:56:54 +0000
@@ -3,12 +3,30 @@
3namespace Unity2d3namespace Unity2d
4{4{
55
6PanelApplet::PanelApplet(QWidget* parent) :6class PanelAppletPrivate
7 QWidget(parent)7{
8{8 Unity2dPanel* m_panel;
9
10 PanelApplet* q_ptr;
11 Q_DECLARE_PUBLIC(PanelApplet)
12};
13
14PanelApplet::PanelApplet(Unity2dPanel* panel) :
15 QWidget(),
16 d_ptr(new PanelAppletPrivate)
17{
18 Q_D(PanelApplet);
19
20 d->m_panel = panel;
9 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);21 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Minimum);
10}22}
1123
24Unity2dPanel* PanelApplet::panel() const
25{
26 Q_D(const PanelApplet);
27 return d->m_panel;
28}
29
12} // namespace Unity2d30} // namespace Unity2d
1331
14#include "panelapplet.moc"32#include "panelapplet.moc"
1533
=== modified file 'libunity-2d-private/src/panelapplet.h'
--- libunity-2d-private/src/panelapplet.h 2011-08-16 12:58:45 +0000
+++ libunity-2d-private/src/panelapplet.h 2011-09-09 06:56:54 +0000
@@ -23,20 +23,28 @@
23#ifndef PANELAPPLET_H23#ifndef PANELAPPLET_H
24#define PANELAPPLET_H24#define PANELAPPLET_H
2525
26// Local
27class Unity2dPanel;
28
26// Qt29// Qt
27#include <QWidget>30#include <QWidget>
2831
29namespace Unity2d32namespace Unity2d
30{33{
3134
35class PanelAppletPrivate;
32class PanelApplet : public QWidget36class PanelApplet : public QWidget
33{37{
34 Q_OBJECT38 Q_OBJECT
35public:39public:
36 explicit PanelApplet(QWidget* parent = 0);40 explicit PanelApplet(Unity2dPanel* panel);
41
42 Unity2dPanel* panel() const;
3743
38private:44private:
39 Q_DISABLE_COPY(PanelApplet)45 Q_DISABLE_COPY(PanelApplet)
46 PanelAppletPrivate* d_ptr;
47 Q_DECLARE_PRIVATE(PanelApplet)
40};48};
4149
42} // namespace Unity2d50} // namespace Unity2d
4351
=== modified file 'libunity-2d-private/src/panelappletproviderinterface.h'
--- libunity-2d-private/src/panelappletproviderinterface.h 2011-08-16 12:58:45 +0000
+++ libunity-2d-private/src/panelappletproviderinterface.h 2011-09-09 06:56:54 +0000
@@ -31,7 +31,7 @@
31{31{
32public:32public:
33 virtual QString appletName() const = 0;33 virtual QString appletName() const = 0;
34 virtual PanelApplet* createApplet() const = 0;34 virtual PanelApplet* createApplet(Unity2dPanel* panel) const = 0;
35};35};
3636
37} // namespace Unity2d37} // namespace Unity2d
3838
=== modified file 'panel/app/panelmanager.cpp'
--- panel/app/panelmanager.cpp 2011-08-19 10:42:32 +0000
+++ panel/app/panelmanager.cpp 2011-09-09 06:56:54 +0000
@@ -130,7 +130,7 @@
130 return appletsConfig.toStringList();130 return appletsConfig.toStringList();
131}131}
132132
133static Unity2dPanel* instantiatePanel(int screen)133Unity2dPanel* PanelManager::instantiatePanel(int screen)
134{134{
135 Unity2dPanel* panel = new Unity2dPanel;135 Unity2dPanel* panel = new Unity2dPanel;
136 panel->setEdge(Unity2dPanel::TopEdge);136 panel->setEdge(Unity2dPanel::TopEdge);
@@ -156,7 +156,7 @@
156 << "installed plugin providing it.";156 << "installed plugin providing it.";
157 } else {157 } else {
158 if (screen == leftmost || !onlyLeftmost) {158 if (screen == leftmost || !onlyLeftmost) {
159 QWidget *applet = provider->createApplet();159 QWidget *applet = provider->createApplet(panel);
160 if (applet == 0) {160 if (applet == 0) {
161 qWarning() << "The panel applet plugin for" << appletName161 qWarning() << "The panel applet plugin for" << appletName
162 << "did not return a valid plugin.";162 << "did not return a valid plugin.";
163163
=== modified file 'panel/app/panelmanager.h'
--- panel/app/panelmanager.h 2011-04-04 16:41:15 +0000
+++ panel/app/panelmanager.h 2011-09-09 06:56:54 +0000
@@ -40,6 +40,8 @@
40 Q_DISABLE_COPY(PanelManager)40 Q_DISABLE_COPY(PanelManager)
41 QList<Unity2dPanel*> m_panels;41 QList<Unity2dPanel*> m_panels;
4242
43 Unity2dPanel* instantiatePanel(int screen);
44
43private Q_SLOTS:45private Q_SLOTS:
44 void onScreenCountChanged(int newCount);46 void onScreenCountChanged(int newCount);
45};47};
4648
=== modified file 'panel/applets/appindicator/appindicatorapplet.cpp'
--- panel/applets/appindicator/appindicatorapplet.cpp 2011-01-15 01:41:03 +0000
+++ panel/applets/appindicator/appindicatorapplet.cpp 2011-09-09 06:56:54 +0000
@@ -37,7 +37,8 @@
37static const char* WATCHER_PATH = "/StatusNotifierWatcher";37static const char* WATCHER_PATH = "/StatusNotifierWatcher";
38static const char* WATCHER_IFACE = "org.kde.StatusNotifierWatcher";38static const char* WATCHER_IFACE = "org.kde.StatusNotifierWatcher";
3939
40AppIndicatorApplet::AppIndicatorApplet()40AppIndicatorApplet::AppIndicatorApplet(Unity2dPanel* panel)
41: Unity2d::PanelApplet(panel)
41{42{
42 setupDBus();43 setupDBus();
43 setupUi();44 setupUi();
4445
=== modified file 'panel/applets/appindicator/appindicatorapplet.h'
--- panel/applets/appindicator/appindicatorapplet.h 2011-08-16 12:58:45 +0000
+++ panel/applets/appindicator/appindicatorapplet.h 2011-09-09 06:56:54 +0000
@@ -33,7 +33,7 @@
33{33{
34Q_OBJECT34Q_OBJECT
35public:35public:
36 AppIndicatorApplet();36 AppIndicatorApplet(Unity2dPanel* panel);
3737
38private:38private:
39 Q_DISABLE_COPY(AppIndicatorApplet)39 Q_DISABLE_COPY(AppIndicatorApplet)
4040
=== modified file 'panel/applets/appindicator/plugin.cpp'
--- panel/applets/appindicator/plugin.cpp 2011-08-16 10:44:38 +0000
+++ panel/applets/appindicator/plugin.cpp 2011-09-09 06:56:54 +0000
@@ -29,9 +29,9 @@
29 return QString("appindicator");29 return QString("appindicator");
30}30}
3131
32PanelApplet* AppIndicatorPlugin::createApplet() const32PanelApplet* AppIndicatorPlugin::createApplet(Unity2dPanel* panel) const
33{33{
34 return new AppIndicatorApplet();34 return new AppIndicatorApplet(panel);
35}35}
3636
37Q_EXPORT_PLUGIN2(panelplugin-appindicator, AppIndicatorPlugin)37Q_EXPORT_PLUGIN2(panelplugin-appindicator, AppIndicatorPlugin)
3838
=== modified file 'panel/applets/appindicator/plugin.h'
--- panel/applets/appindicator/plugin.h 2011-08-16 12:58:45 +0000
+++ panel/applets/appindicator/plugin.h 2011-09-09 06:56:54 +0000
@@ -34,7 +34,7 @@
3434
35public:35public:
36 QString appletName() const;36 QString appletName() const;
37 PanelApplet* createApplet() const;37 PanelApplet* createApplet(Unity2dPanel* panel) const;
38};38};
3939
40#endif // APPINDICATOR_PLUGIN_H40#endif // APPINDICATOR_PLUGIN_H
4141
=== modified file 'panel/applets/appname/appnameapplet.cpp'
--- panel/applets/appname/appnameapplet.cpp 2011-08-17 09:21:18 +0000
+++ panel/applets/appname/appnameapplet.cpp 2011-09-09 06:56:54 +0000
@@ -212,8 +212,9 @@
212 }212 }
213};213};
214214
215AppNameApplet::AppNameApplet()215AppNameApplet::AppNameApplet(Unity2dPanel* panel)
216: d(new AppNameAppletPrivate)216: Unity2d::PanelApplet(panel)
217, d(new AppNameAppletPrivate)
217{218{
218 d->q = this;219 d->q = this;
219 setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum);220 setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Minimum);
220221
=== modified file 'panel/applets/appname/appnameapplet.h'
--- panel/applets/appname/appnameapplet.h 2011-08-16 12:58:45 +0000
+++ panel/applets/appname/appnameapplet.h 2011-09-09 06:56:54 +0000
@@ -33,7 +33,7 @@
33{33{
34Q_OBJECT34Q_OBJECT
35public:35public:
36 AppNameApplet();36 AppNameApplet(Unity2dPanel* panel);
37 ~AppNameApplet();37 ~AppNameApplet();
3838
39protected:39protected:
4040
=== modified file 'panel/applets/appname/plugin.cpp'
--- panel/applets/appname/plugin.cpp 2011-08-16 10:56:09 +0000
+++ panel/applets/appname/plugin.cpp 2011-09-09 06:56:54 +0000
@@ -29,9 +29,9 @@
29 return QString("appname");29 return QString("appname");
30}30}
3131
32PanelApplet* AppNamePlugin::createApplet() const32PanelApplet* AppNamePlugin::createApplet(Unity2dPanel* panel) const
33{33{
34 return new AppNameApplet();34 return new AppNameApplet(panel);
35}35}
3636
37Q_EXPORT_PLUGIN2(panelplugin-appname, AppNamePlugin)37Q_EXPORT_PLUGIN2(panelplugin-appname, AppNamePlugin)
3838
=== modified file 'panel/applets/appname/plugin.h'
--- panel/applets/appname/plugin.h 2011-08-16 12:58:45 +0000
+++ panel/applets/appname/plugin.h 2011-09-09 06:56:54 +0000
@@ -34,7 +34,7 @@
3434
35public:35public:
36 QString appletName() const;36 QString appletName() const;
37 PanelApplet* createApplet() const;37 PanelApplet* createApplet(Unity2dPanel* panel) const;
38};38};
3939
40#endif // APPNAME_PLUGIN_H40#endif // APPNAME_PLUGIN_H
4141
=== modified file 'panel/applets/homebutton/homebuttonapplet.cpp'
--- panel/applets/homebutton/homebuttonapplet.cpp 2011-08-11 15:52:38 +0000
+++ panel/applets/homebutton/homebuttonapplet.cpp 2011-09-09 06:56:54 +0000
@@ -38,8 +38,9 @@
38static const char* DBUS_PATH = "/Dash";38static const char* DBUS_PATH = "/Dash";
39static const char* DBUS_IFACE = "com.canonical.Unity2d.Dash";39static const char* DBUS_IFACE = "com.canonical.Unity2d.Dash";
4040
41HomeButtonApplet::HomeButtonApplet()41HomeButtonApplet::HomeButtonApplet(Unity2dPanel* panel)
42: m_button(new HomeButton)42: Unity2d::PanelApplet(panel)
43, m_button(new HomeButton)
43, m_dashInterface(NULL)44, m_dashInterface(NULL)
44, m_launcherClient(new LauncherClient(this))45, m_launcherClient(new LauncherClient(this))
45{46{
4647
=== modified file 'panel/applets/homebutton/homebuttonapplet.h'
--- panel/applets/homebutton/homebuttonapplet.h 2011-08-16 12:58:45 +0000
+++ panel/applets/homebutton/homebuttonapplet.h 2011-09-09 06:56:54 +0000
@@ -35,7 +35,7 @@
35{35{
36Q_OBJECT36Q_OBJECT
37public:37public:
38 HomeButtonApplet();38 HomeButtonApplet(Unity2dPanel* panel);
3939
40protected:40protected:
41 void enterEvent(QEvent*);41 void enterEvent(QEvent*);
4242
=== modified file 'panel/applets/homebutton/plugin.cpp'
--- panel/applets/homebutton/plugin.cpp 2011-08-16 10:44:38 +0000
+++ panel/applets/homebutton/plugin.cpp 2011-09-09 06:56:54 +0000
@@ -29,9 +29,9 @@
29 return QString("homebutton");29 return QString("homebutton");
30}30}
3131
32PanelApplet* HomeButtonPlugin::createApplet() const32PanelApplet* HomeButtonPlugin::createApplet(Unity2dPanel* panel) const
33{33{
34 return new HomeButtonApplet();34 return new HomeButtonApplet(panel);
35}35}
3636
37Q_EXPORT_PLUGIN2(panelplugin-homebutton, HomeButtonPlugin)37Q_EXPORT_PLUGIN2(panelplugin-homebutton, HomeButtonPlugin)
3838
=== modified file 'panel/applets/homebutton/plugin.h'
--- panel/applets/homebutton/plugin.h 2011-08-16 12:58:45 +0000
+++ panel/applets/homebutton/plugin.h 2011-09-09 06:56:54 +0000
@@ -34,7 +34,7 @@
3434
35public:35public:
36 QString appletName() const;36 QString appletName() const;
37 PanelApplet* createApplet() const;37 PanelApplet* createApplet(Unity2dPanel* panel) const;
38};38};
3939
40#endif // HOMEBUTTON_PLUGIN_H40#endif // HOMEBUTTON_PLUGIN_H
4141
=== modified file 'panel/applets/indicator/indicatorapplet.cpp'
--- panel/applets/indicator/indicatorapplet.cpp 2011-06-22 14:49:34 +0000
+++ panel/applets/indicator/indicatorapplet.cpp 2011-09-09 06:56:54 +0000
@@ -39,7 +39,8 @@
39#include <gdk/gdk.h>39#include <gdk/gdk.h>
40#include <gtk/gtk.h>40#include <gtk/gtk.h>
4141
42IndicatorApplet::IndicatorApplet()42IndicatorApplet::IndicatorApplet(Unity2dPanel* panel)
43: Unity2d::PanelApplet(panel)
43{44{
44 setupUi();45 setupUi();
45 loadIndicators();46 loadIndicators();
4647
=== modified file 'panel/applets/indicator/indicatorapplet.h'
--- panel/applets/indicator/indicatorapplet.h 2011-08-16 12:58:45 +0000
+++ panel/applets/indicator/indicatorapplet.h 2011-09-09 06:56:54 +0000
@@ -37,7 +37,7 @@
37{37{
38Q_OBJECT38Q_OBJECT
39public:39public:
40 IndicatorApplet();40 IndicatorApplet(Unity2dPanel* panel);
4141
42private Q_SLOTS:42private Q_SLOTS:
43 void loadIndicators();43 void loadIndicators();
4444
=== modified file 'panel/applets/indicator/plugin.cpp'
--- panel/applets/indicator/plugin.cpp 2011-08-16 10:44:38 +0000
+++ panel/applets/indicator/plugin.cpp 2011-09-09 06:56:54 +0000
@@ -29,9 +29,9 @@
29 return QString("indicator");29 return QString("indicator");
30}30}
3131
32PanelApplet* IndicatorPlugin::createApplet() const32PanelApplet* IndicatorPlugin::createApplet(Unity2dPanel* panel) const
33{33{
34 return new IndicatorApplet();34 return new IndicatorApplet(panel);
35}35}
3636
37Q_EXPORT_PLUGIN2(panelplugin-indicator, IndicatorPlugin)37Q_EXPORT_PLUGIN2(panelplugin-indicator, IndicatorPlugin)
3838
=== modified file 'panel/applets/indicator/plugin.h'
--- panel/applets/indicator/plugin.h 2011-08-16 12:58:45 +0000
+++ panel/applets/indicator/plugin.h 2011-09-09 06:56:54 +0000
@@ -34,7 +34,7 @@
3434
35public:35public:
36 QString appletName() const;36 QString appletName() const;
37 PanelApplet* createApplet() const;37 PanelApplet* createApplet(Unity2dPanel* panel) const;
38};38};
3939
40#endif // INDICATOR_PLUGIN_H40#endif // INDICATOR_PLUGIN_H
4141
=== modified file 'panel/applets/legacytray/legacytrayapplet.cpp'
--- panel/applets/legacytray/legacytrayapplet.cpp 2011-02-02 16:57:00 +0000
+++ panel/applets/legacytray/legacytrayapplet.cpp 2011-09-09 06:56:54 +0000
@@ -33,8 +33,9 @@
33#include <QApplication>33#include <QApplication>
34#include <QHBoxLayout>34#include <QHBoxLayout>
3535
36LegacyTrayApplet::LegacyTrayApplet()36LegacyTrayApplet::LegacyTrayApplet(Unity2dPanel* panel)
37: m_selectionManager(new SystemTray::FdoSelectionManager)37: Unity2d::PanelApplet(panel)
38, m_selectionManager(new SystemTray::FdoSelectionManager)
38{39{
39 QApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);40 QApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings);
4041
4142
=== modified file 'panel/applets/legacytray/legacytrayapplet.h'
--- panel/applets/legacytray/legacytrayapplet.h 2011-08-16 12:58:45 +0000
+++ panel/applets/legacytray/legacytrayapplet.h 2011-09-09 06:56:54 +0000
@@ -35,7 +35,7 @@
35{35{
36Q_OBJECT36Q_OBJECT
37public:37public:
38 LegacyTrayApplet();38 LegacyTrayApplet(Unity2dPanel* panel);
39 virtual ~LegacyTrayApplet();39 virtual ~LegacyTrayApplet();
4040
41private Q_SLOTS:41private Q_SLOTS:
4242
=== modified file 'panel/applets/legacytray/plugin.cpp'
--- panel/applets/legacytray/plugin.cpp 2011-08-16 10:44:38 +0000
+++ panel/applets/legacytray/plugin.cpp 2011-09-09 06:56:54 +0000
@@ -29,9 +29,9 @@
29 return QString("legacytray");29 return QString("legacytray");
30}30}
3131
32PanelApplet* LegacyTrayPlugin::createApplet() const32PanelApplet* LegacyTrayPlugin::createApplet(Unity2dPanel* panel) const
33{33{
34 return new LegacyTrayApplet();34 return new LegacyTrayApplet(panel);
35}35}
3636
37Q_EXPORT_PLUGIN2(panelplugin-legacytray, LegacyTrayPlugin)37Q_EXPORT_PLUGIN2(panelplugin-legacytray, LegacyTrayPlugin)
3838
=== modified file 'panel/applets/legacytray/plugin.h'
--- panel/applets/legacytray/plugin.h 2011-08-16 12:58:45 +0000
+++ panel/applets/legacytray/plugin.h 2011-09-09 06:56:54 +0000
@@ -34,7 +34,7 @@
3434
35public:35public:
36 QString appletName() const;36 QString appletName() const;
37 PanelApplet* createApplet() const;37 PanelApplet* createApplet(Unity2dPanel* panel) const;
38};38};
3939
40#endif // LEGACYTRAY_PLUGIN_H40#endif // LEGACYTRAY_PLUGIN_H
4141
=== modified file 'panel/applets/separator/plugin.cpp'
--- panel/applets/separator/plugin.cpp 2011-08-16 10:44:38 +0000
+++ panel/applets/separator/plugin.cpp 2011-09-09 06:56:54 +0000
@@ -29,9 +29,9 @@
29 return QString("separator");29 return QString("separator");
30}30}
3131
32PanelApplet* SeparatorPlugin::createApplet() const32PanelApplet* SeparatorPlugin::createApplet(Unity2dPanel* panel) const
33{33{
34 return new SeparatorApplet();34 return new SeparatorApplet(panel);
35}35}
3636
37Q_EXPORT_PLUGIN2(panelplugin-separator, SeparatorPlugin)37Q_EXPORT_PLUGIN2(panelplugin-separator, SeparatorPlugin)
3838
=== modified file 'panel/applets/separator/plugin.h'
--- panel/applets/separator/plugin.h 2011-08-16 12:58:45 +0000
+++ panel/applets/separator/plugin.h 2011-09-09 06:56:54 +0000
@@ -34,7 +34,7 @@
3434
35public:35public:
36 QString appletName() const;36 QString appletName() const;
37 PanelApplet* createApplet() const;37 PanelApplet* createApplet(Unity2dPanel* panel) const;
38};38};
3939
40#endif // SEPARATOR_PLUGIN_H40#endif // SEPARATOR_PLUGIN_H
4141
=== modified file 'panel/applets/separator/separatorapplet.cpp'
--- panel/applets/separator/separatorapplet.cpp 2011-08-11 09:56:53 +0000
+++ panel/applets/separator/separatorapplet.cpp 2011-09-09 06:56:54 +0000
@@ -29,8 +29,9 @@
29#include <QPixmap>29#include <QPixmap>
30#include <QHBoxLayout>30#include <QHBoxLayout>
3131
32SeparatorApplet::SeparatorApplet()32SeparatorApplet::SeparatorApplet(Unity2dPanel* panel) :
33 : m_separator(new QLabel())33 Unity2d::PanelApplet(panel),
34 m_separator(new QLabel())
34{35{
35 QPixmap pix(unity2dDirectory() + "/panel/artwork/divider.png");36 QPixmap pix(unity2dDirectory() + "/panel/artwork/divider.png");
36 m_separator->setPixmap(pix);37 m_separator->setPixmap(pix);
3738
=== modified file 'panel/applets/separator/separatorapplet.h'
--- panel/applets/separator/separatorapplet.h 2011-08-16 12:58:45 +0000
+++ panel/applets/separator/separatorapplet.h 2011-09-09 06:56:54 +0000
@@ -34,7 +34,7 @@
34{34{
35Q_OBJECT35Q_OBJECT
36public:36public:
37 SeparatorApplet();37 SeparatorApplet(Unity2dPanel* panel);
3838
39private:39private:
40 Q_DISABLE_COPY(SeparatorApplet)40 Q_DISABLE_COPY(SeparatorApplet)
4141
=== modified file 'panel/tests/homebuttonapplettest.cpp'
--- panel/tests/homebuttonapplettest.cpp 2011-08-11 15:52:38 +0000
+++ panel/tests/homebuttonapplettest.cpp 2011-09-09 06:56:54 +0000
@@ -32,7 +32,8 @@
32private Q_SLOTS:32private Q_SLOTS:
33 void testCreateButton()33 void testCreateButton()
34 {34 {
35 HomeButtonApplet applet;35 Unity2dPanel* panel = 0;
36 HomeButtonApplet applet(panel);
36 }37 }
37};38};
3839

Subscribers

People subscribed via source and target branches