Merge lp:~agateau/unity-2d/keep-launcher-when-menu-is-visible into lp:unity-2d/3.0

Proposed by Aurélien Gâteau
Status: Merged
Approved by: Florian Boucault
Approved revision: 447
Merged at revision: 453
Proposed branch: lp:~agateau/unity-2d/keep-launcher-when-menu-is-visible
Merge into: lp:unity-2d/3.0
Diff against target: 50 lines (+11/-13)
2 files modified
launcher/UnityApplications/launchermenu.cpp (+10/-11)
launcher/UnityApplications/launchermenu.h (+1/-2)
To merge this branch: bzr merge lp:~agateau/unity-2d/keep-launcher-when-menu-is-visible
Reviewer Review Type Date Requested Status
Florian Boucault Pending
Review via email: mp+53397@code.launchpad.net

Commit message

[launcher] Fix regression introduced after this branch was merged: visibleChanged() was not emitted reliably.

See https://bugs.launchpad.net/unity-2d/+bug/722713

Description of the change

Fix regression introduced after this branch was merged: visibleChanged() was not emitted reliably.

See https://bugs.launchpad.net/unity-2d/+bug/722713

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/UnityApplications/launchermenu.cpp'
--- launcher/UnityApplications/launchermenu.cpp 2011-03-14 17:17:27 +0000
+++ launcher/UnityApplications/launchermenu.cpp 2011-03-15 10:37:24 +0000
@@ -247,15 +247,14 @@
247}247}
248248
249void249void
250LauncherContextualMenu::showEvent(QShowEvent* event)250LauncherContextualMenu::setVisible(bool value)
251{251{
252 QMenu::showEvent(event);252 bool changed = isVisible() != value;
253 visibleChanged(true);253 // The call to QMenu::setVisible() could probably be skipped if 'changed'
254}254 // is false, but I'd rather keep the class behavior as close to the default
255255 // setVisible() implementation as possible.
256void256 QMenu::setVisible(value);
257LauncherContextualMenu::hideEvent(QHideEvent* event)257 if (changed) {
258{258 visibleChanged(value);
259 QMenu::hideEvent(event);259 }
260 visibleChanged(false);
261}260}
262261
=== modified file 'launcher/UnityApplications/launchermenu.h'
--- launcher/UnityApplications/launchermenu.h 2011-03-14 16:04:14 +0000
+++ launcher/UnityApplications/launchermenu.h 2011-03-15 10:37:24 +0000
@@ -49,6 +49,7 @@
49 void setFolded(int folded);49 void setFolded(int folded);
50 void setLauncherItem(LauncherItem* launcherItem);50 void setLauncherItem(LauncherItem* launcherItem);
51 void setTitle(const QString& title);51 void setTitle(const QString& title);
52 void setVisible(bool value);
5253
53 Q_INVOKABLE void show(int x, int y);54 Q_INVOKABLE void show(int x, int y);
54 Q_INVOKABLE void hide();55 Q_INVOKABLE void hide();
@@ -58,8 +59,6 @@
58 void resizeEvent(QResizeEvent* event);59 void resizeEvent(QResizeEvent* event);
59 void leaveEvent(QEvent* event);60 void leaveEvent(QEvent* event);
60 void enterEvent(QEvent* event);61 void enterEvent(QEvent* event);
61 void showEvent(QShowEvent* event);
62 void hideEvent(QHideEvent* event);
6362
64Q_SIGNALS:63Q_SIGNALS:
65 void foldedChanged(bool);64 void foldedChanged(bool);

Subscribers

People subscribed via source and target branches