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
=== modified file 'panel/applets/appname/appnameapplet.cpp'
--- panel/applets/appname/appnameapplet.cpp 2011-09-28 13:08:41 +0000
+++ panel/applets/appname/appnameapplet.cpp 2011-09-30 12:40:31 +0000
@@ -36,6 +36,7 @@
36#include <hotkey.h>36#include <hotkey.h>
37#include <hotkeymonitor.h>37#include <hotkeymonitor.h>
38#include <indicatorentrywidget.h>38#include <indicatorentrywidget.h>
39#include <unity2dtr.h>
3940
40// Bamf41// Bamf
41#include <bamf-application.h>42#include <bamf-application.h>
@@ -244,12 +245,13 @@
244 );245 );
245 bool showMenu = isOpened && !d->m_menuBarWidget->isEmpty() && isUserVisibleApp;246 bool showMenu = isOpened && !d->m_menuBarWidget->isEmpty() && isUserVisibleApp;
246 bool showWindowButtons = isOpened && isMaximized;247 bool showWindowButtons = isOpened && isMaximized;
247 bool showLabel = !(isMaximized && showMenu) && isUserVisibleApp && isOnSameScreen;248 bool showAppLabel = !(isMaximized && showMenu) && isUserVisibleApp && isOnSameScreen;
249 bool showDesktopLabel = !isUserVisibleApp;
248250
249 d->m_windowButtonWidget->setVisible(showWindowButtons);251 d->m_windowButtonWidget->setVisible(showWindowButtons);
250252
251 d->m_label->setVisible(showLabel);253 d->m_label->setVisible(showAppLabel || showDesktopLabel);
252 if (showLabel) {254 if (showAppLabel) {
253 // Define text255 // Define text
254 QString text;256 QString text;
255 if (app) {257 if (app) {
@@ -272,6 +274,8 @@
272 } else {274 } else {
273 d->m_label->setMaximumWidth(QWIDGETSIZE_MAX);275 d->m_label->setMaximumWidth(QWIDGETSIZE_MAX);
274 }276 }
277 } else if (showDesktopLabel) {
278 d->m_label->setText(u2dTr("Desktop", "nautilus"));
275 }279 }
276280
277 d->m_menuBarWidget->setVisible(showMenu);281 d->m_menuBarWidget->setVisible(showMenu);

Subscribers

People subscribed via source and target branches