Merge lp:~saviq/unity-2d/desktop-title into lp:unity-2d

Proposed by Michał Sawicz
Status: Merged
Approved by: Alberto Mardegan
Approved revision: 749
Merged at revision: 749
Proposed branch: lp:~saviq/unity-2d/desktop-title
Merge into: lp:unity-2d
Diff against target: 37 lines (+7/-3)
1 file modified
panel/applets/appname/appnameapplet.cpp (+7/-3)
To merge this branch: bzr merge lp:~saviq/unity-2d/desktop-title
Reviewer Review Type Date Requested Status
Alberto Mardegan (community) Approve
Łukasz Zemczak functional Approve
Review via email: mp+77694@code.launchpad.net

Commit message

[panel] display "Desktop" label when no application is active

To post a comment you must log in.
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Works fine for me!

review: Approve (functional)
Revision history for this message
Alberto Mardegan (mardy) wrote :

Works fine for me too, and the code looks great.
I've only one concern: when you open the Dash, the title bar still shows "Desktop". But I suppose I will fix that with bug 860400, so I think that the current behaviour is acceptable.

review: Approve
Revision history for this message
Florian Boucault (fboucault) wrote :

The code does not seem specific enough to the desktop being focused.
@Alberto: I don't see why this issue is acceptable and how bug #860400 relates.

Revision history for this message
Michał Sawicz (saviq) wrote :

@fboucault - bug 860400 relates in the sense that this part of code will be reworked anyway to provide dash window buttons.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'panel/applets/appname/appnameapplet.cpp'
2--- panel/applets/appname/appnameapplet.cpp 2011-09-28 13:08:41 +0000
3+++ panel/applets/appname/appnameapplet.cpp 2011-09-30 12:40:31 +0000
4@@ -36,6 +36,7 @@
5 #include <hotkey.h>
6 #include <hotkeymonitor.h>
7 #include <indicatorentrywidget.h>
8+#include <unity2dtr.h>
9
10 // Bamf
11 #include <bamf-application.h>
12@@ -244,12 +245,13 @@
13 );
14 bool showMenu = isOpened && !d->m_menuBarWidget->isEmpty() && isUserVisibleApp;
15 bool showWindowButtons = isOpened && isMaximized;
16- bool showLabel = !(isMaximized && showMenu) && isUserVisibleApp && isOnSameScreen;
17+ bool showAppLabel = !(isMaximized && showMenu) && isUserVisibleApp && isOnSameScreen;
18+ bool showDesktopLabel = !isUserVisibleApp;
19
20 d->m_windowButtonWidget->setVisible(showWindowButtons);
21
22- d->m_label->setVisible(showLabel);
23- if (showLabel) {
24+ d->m_label->setVisible(showAppLabel || showDesktopLabel);
25+ if (showAppLabel) {
26 // Define text
27 QString text;
28 if (app) {
29@@ -272,6 +274,8 @@
30 } else {
31 d->m_label->setMaximumWidth(QWIDGETSIZE_MAX);
32 }
33+ } else if (showDesktopLabel) {
34+ d->m_label->setText(u2dTr("Desktop", "nautilus"));
35 }
36
37 d->m_menuBarWidget->setVisible(showMenu);

Subscribers

People subscribed via source and target branches