Changeset 77631c2


Ignore:
Timestamp:
May 9, 2014 12:51:09 PM (2 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.2
Children:
17692af
Parents:
b10bac2
Message:

Update the new desktop switcher plugin a bit, put a label at the top of the desktop menu, and fix the battery detection function.

Location:
lumina/lumina-desktop
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lumina/lumina-desktop/Globals.h

    r5f42f3f r77631c2  
    4747        //Determine if there is battery support 
    4848        static bool hasBattery(){ 
    49           return (LUtils::getCmdOutput("apm -s").join("").simplified() == "1"); 
     49          return (LUtils::getCmdOutput("apm -l").join("").simplified() != "255"); 
    5050        } 
    5151         
  • lumina/lumina-desktop/LDesktop.cpp

    rf06effb r77631c2  
    1919  deskMenu = new QMenu(0); 
    2020  appmenu = new AppMenu(0); 
     21  workspacelabel = new QLabel(0); 
     22    workspacelabel->setAlignment(Qt::AlignCenter); 
     23  wkspaceact = new QWidgetAction(0); 
     24    wkspaceact->setDefaultWidget(workspacelabel); 
    2125  //Setup the internal variables 
    2226  settings = new QSettings(QSettings::UserScope, "LuminaDE","desktopsettings", this); 
     
    4953  delete appmenu; 
    5054  delete bgWindow; 
     55  delete workspacelabel; 
     56  delete wkspaceact; 
    5157} 
    5258 
     
    6571  qDebug() << " - Update Menu:" << desktopnumber; 
    6672  deskMenu->clear(); 
     73  //Put a label at the top  
     74  workspacelabel->setText( "<b>"+tr("Lumina Desktop")+"</b>"); 
     75  deskMenu->addAction(wkspaceact); 
     76  deskMenu->addSeparator(); 
    6777  //Add in the system applications menu 
    6878  deskMenu->addAction(LXDG::findIcon("utilities-terminal",""), tr("Terminal"), this, SLOT(SystemTerminal()) ); 
  • lumina/lumina-desktop/LDesktop.h

    r51ace02 r77631c2  
    1717#include <QTimer> 
    1818#include <QFileSystemWatcher> 
     19#include <QLabel> 
     20#include <QWidgetAction> 
    1921 
    2022 
     
    5153        QMenu *deskMenu; 
    5254        AppMenu *appmenu; 
     55        QLabel *workspacelabel; 
     56        QWidgetAction *wkspaceact; 
    5357        QList<LDPlugin*> PLUGINS; 
    5458        QFileSystemWatcher *watcher; 
  • lumina/lumina-desktop/fluxboxconf/fluxbox-init-rc

    r3ef1a66 r77631c2  
    1515session.screen0.toolbar.layer:  Dock 
    1616session.screen0.toolbar.height: 0 
    17 session.screen0.toolbar.tools:  prevworkspace, workspacename, nextworkspace, iconbar, systemtray 
     17session.screen0.toolbar.tools:  iconbar, systemtray 
    1818session.screen0.iconbar.iconWidth:      128 
    1919session.screen0.iconbar.alignment:      Left 
  • lumina/lumina-desktop/panel-plugins/desktopswitcher/LDesktopSwitcher.cpp

    r5f42f3f r77631c2  
    118118  for (int i = 0; i < tot; i++) { 
    119119    QString name = QString(tr("Workspace %1")).arg( QString::number(i+1) ); 
    120     if(i == cur){ name.prepend("**"); } //identify which desktop this is currently 
     120    if(i == cur){ name.prepend("*"); name.append("*");} //identify which desktop this is currently 
    121121    menu->addAction(newAction(i, name)); 
    122122  } 
Note: See TracChangeset for help on using the changeset viewer.