Changeset 92c8291


Ignore:
Timestamp:
05/09/14 13:27:06 (13 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, enter/10, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
eaea8ff
Parents:
0ccf75ef
Message:

A couple other minor fixes. Make sure to update the menu on the desktop switch when the desktop gets changes so that it properly shows which desktop is active, and also mke the main desktop menu display the current workspace number as the header for the menu.

Location:
lumina/lumina-desktop
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • lumina/lumina-desktop/LDesktop.cpp

    r77631c2 r92c8291  
    7272  deskMenu->clear(); 
    7373  //Put a label at the top  
    74   workspacelabel->setText( "<b>"+tr("Lumina Desktop")+"</b>"); 
     74  int num = LX11::GetCurrentDesktop(); 
     75  qDebug() << "Found desktop number:" << num; 
     76  if(num < 0){ workspacelabel->setText( "<b>"+tr("Lumina Desktop")+"</b>"); } 
     77  else{ workspacelabel->setText( "<b>"+QString(tr("Workspace %1")).arg(QString::number(num+1))+"</b>"); } 
    7578  deskMenu->addAction(wkspaceact); 
    7679  deskMenu->addSeparator(); 
  • lumina/lumina-desktop/LDesktop.h

    r77631c2 r92c8291  
    6363        void UpdateMenu(); 
    6464        void ShowMenu(){ 
     65          UpdateMenu(); 
    6566          deskMenu->popup(QCursor::pos()); 
    6667        } 
  • lumina/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp

    r77631c2 r92c8291  
    126126  LX11::SetCurrentDesktop(act->whatsThis().toInt()); 
    127127  label->setToolTip(QString(tr("Workspace %1")).arg(act->whatsThis().toInt() +1)); 
     128  QTimer::singleShot(500, this, SLOT(createMenu()) ); //make sure the menu gets updated 
    128129} 
Note: See TracChangeset for help on using the changeset viewer.