Changeset 7183594


Ignore:
Timestamp:
08/19/14 06:49:44 (5 weeks ago)
Author:
Ken Moore <ken@…>
Branches:
master, releng/10.0.3
Children:
d423fcd9
Parents:
2e04a09
Message:

Update Lumina-desktop to have a couple new systems:
1) Change the mouse cursor to have a "loading" icon when starting up an application. Return it to the original cursor as soon as a window is added to the taskmanager.
2) Add in the keybord-shortcuts framework. It appears that Fluxbox is intercepting the keyboard presses before Lumina can, so implement a custom fluxbox keys file specifically for Lumina.

Location:
lumina/lumina-desktop
Files:
1 added
14 edited

Legend:

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

    r0e927e0 r7183594  
    66//=========================================== 
    77#include "AppMenu.h" 
     8#include "LSession.h" 
    89 
    910AppMenu::AppMenu(QWidget* parent) : QMenu(parent){ 
     
    9293 
    9394void AppMenu::launchStore(){ 
    94   QProcess::startDetached("lumina-open \""+appstorelink+"\""); 
     95  LSession::LaunchApplication("lumina-open \""+appstorelink+"\""); 
     96  //QProcess::startDetached("lumina-open \""+appstorelink+"\""); 
    9597} 
    9698 
    9799void AppMenu::launchControlPanel(){ 
    98   QProcess::startDetached("lumina-open \""+controlpanellink+"\""); 
     100  LSession::LaunchApplication("lumina-open \""+controlpanellink+"\""); 
     101  //QProcess::startDetached("lumina-open \""+controlpanellink+"\""); 
    99102} 
    100103 
    101104void AppMenu::launchFileManager(){ 
    102   QProcess::startDetached("lumina-fm"); 
     105  LSession::LaunchApplication("lumina-fm"); 
     106  //QProcess::startDetached("lumina-fm"); 
    103107} 
    104108 
    105109void AppMenu::launchApp(QAction *act){ 
    106110  QString appFile = act->whatsThis(); 
    107   QProcess::startDetached("lumina-open \""+appFile+"\""); 
     111  LSession::LaunchApplication("lumina-open \""+appFile+"\""); 
     112  //QProcess::startDetached("lumina-open \""+appFile+"\""); 
    108113} 
  • lumina/lumina-desktop/AppMenu.h

    r0e927e0 r7183594  
    1919#include <QHash> 
    2020#include <QAction> 
    21 #include <QProcess> 
     21//#include <QProcess> 
    2222 
    2323// libLumina includes 
  • lumina/lumina-desktop/LDesktop.cpp

    r0e927e0 r7183594  
    7272void LDesktop::SystemTerminal(){  
    7373  QString term = settings->value("default-terminal","xterm").toString(); 
    74   QProcess::startDetached(term);  
     74  LSession::LaunchApplication(term); 
    7575} 
    7676 
    7777void LDesktop::SystemFileManager(){ 
    78   QProcess::startDetached("lumina-fm");  
     78  LSession::LaunchApplication("lumina-fm");      
    7979} 
    8080 
    8181void LDesktop::SystemApplication(QAction* act){ 
    8282  if(!act->whatsThis().isEmpty() && act->parent()==deskMenu){ 
    83     QProcess::startDetached("lumina-open \""+act->whatsThis()+"\""); 
     83    LSession::LaunchApplication("lumina-open \""+act->whatsThis()+"\""); 
    8484  } 
    8585} 
  • lumina/lumina-desktop/LSession.cpp

    r5bf46fd r7183594  
    184184     
    185185  } 
     186  //Check the fluxbox configuration files 
     187  dset = QDir::homePath()+"/.lumina/"; 
     188  bool fluxcopy = false; 
     189  if(!QFile::exists(dset+"fluxbox-init")){ fluxcopy=true; } 
     190  else if(!QFile::exists(dset+"fluxbox-keys")){fluxcopy=true; } 
     191  else if(oldversion < 60){ fluxcopy=true; qDebug() << "Current fluxbox settings obsolete: Re-implementing defaults"; } 
     192  if(fluxcopy){ 
     193    if(QFile::exists(dset+"fluxbox-init")){ QFile::remove(dset+"fluxbox-init"); } 
     194    if(QFile::exists(dset+"fluxbox-keys")){ QFile::remove(dset+"fluxbox-keys"); } 
     195    QFile::copy(":/fluxboxconf/fluxbox-init-rc", dset+"fluxbox-init"); 
     196    QFile::copy(":/fluxboxconf/fluxbox-keys", dset+"fluxbox-keys"); 
     197    QFile::setPermissions(dset+"fluxbox-init", QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::ReadOther | QFile::ReadGroup); 
     198    QFile::setPermissions(dset+"fluxbox-keys", QFile::ReadOwner | QFile::WriteOwner | QFile::ReadUser | QFile::ReadOther | QFile::ReadGroup); 
     199  }        
    186200   
    187201  if(firstrun){ qDebug() << "First time using Lumina!!"; } 
     
    260274          }   
    261275        break; 
     276    case KeyPress: 
     277    case KeyRelease: 
     278        qDebug() << "Got Key Event"; 
     279        //event-> 
     280        break; 
    262281  } 
    263282  // ----------------------- 
     
    269288//  SYSTEM ACCESS 
    270289//=============== 
     290void LSession::LaunchApplication(QString cmd){ 
     291  LSession::setOverrideCursor(QCursor(Qt::BusyCursor)); 
     292  QProcess::startDetached(cmd); 
     293} 
     294 
    271295AppMenu* LSession::applicationMenu(){ 
    272296  return appmenu; 
  • lumina/lumina-desktop/LSession.h

    r5bf46fd r7183594  
    5656 
    5757        //System Access 
     58        static void LaunchApplication(QString cmd); 
    5859        static AppMenu* applicationMenu(); 
    5960        static void systemWindow(); 
  • lumina/lumina-desktop/Lumina-DE.qrc

    r214f3d5 r7183594  
    33    <file>images/desktop-background.jpg</file> 
    44    <file>fluxboxconf/fluxbox-init-rc</file> 
     5    <file>fluxboxconf/fluxbox-keys</file> 
    56  </qresource> 
    67</RCC> 
  • lumina/lumina-desktop/SettingsMenu.cpp

    r3a6a8d6 r7183594  
    66//=========================================== 
    77#include "SettingsMenu.h" 
     8#include "LSession.h" 
    89 
    910SettingsMenu::SettingsMenu() : QMenu(){ 
     
    2829         
    2930} 
     31 
     32void SettingsMenu::runApp(QAction* act){ 
     33  LSession::LaunchApplication(act->whatsThis()); 
     34} 
  • lumina/lumina-desktop/SettingsMenu.h

    r214f3d5 r7183594  
    2121                 
    2222private slots: 
    23         void runApp(QAction* act){ 
    24           QProcess::startDetached(act->whatsThis()); 
    25         } 
     23        void runApp(QAction* act); 
     24 
    2625}; 
    2726 
  • lumina/lumina-desktop/SystemWindow.cpp

    r5bf46fd r7183594  
    3737    QApplication::processEvents(); 
    3838  } 
     39  //Now go through the list again and kill any remaining windows 
     40  usleep(60); //60 ms pause 
     41  WL = LX11::WindowList(); 
     42  for(int i=0; i<WL.length(); i++){ 
     43    LX11::KillWindow(WL[i]); 
     44    QApplication::processEvents(); 
     45  } 
    3946  QApplication::processEvents(); 
    4047} 
  • lumina/lumina-desktop/fluxboxconf/fluxbox-init-rc

    r51dc66f r7183594  
    7474session.tabsAttachArea: Window 
    7575session.tabPadding:     0 
    76 session.keyFile:        ~/.fluxbox/keys 
     76session.keyFile:        ~/.lumina/fluxbox-keys 
    7777session.configVersion:  13 
    7878session.autoRaiseDelay: 250 
  • lumina/lumina-desktop/panel-plugins/desktopbar/LDeskBar.cpp

    r3a6a8d6 r7183594  
    66//=========================================== 
    77#include "LDeskBar.h" 
     8#include "../../LSession.h" 
    89 
    910LDeskBarPlugin::LDeskBarPlugin(QWidget *parent, QString id, bool horizontal) : LPPlugin(parent, id, horizontal){ 
     
    124125 QString cmd = "lumina-open \""+act->whatsThis()+"\""; 
    125126 qDebug() << "Open File:" << cmd; 
    126  QProcess::startDetached(cmd); 
     127 LSession::LaunchApplication(cmd); 
    127128} 
    128129 
  • lumina/lumina-desktop/panel-plugins/taskmanager/LTaskManagerPlugin.cpp

    ree2bcf0 r7183594  
    7777        //qDebug() << "Add Window to Button:" << b; 
    7878        BUTTONS[b]->addWindow(winlist[i]); 
     79        LSession::restoreOverrideCursor(); //restore the mouse cursor back to normal (since the new window is now available) 
    7980        break; 
    8081      } 
     
    9293      this->layout()->addWidget(but); 
    9394      BUTTONS << but; 
     95      LSession::restoreOverrideCursor(); //restore the mouse cursor back to normal (since the new window is now available) 
    9496    } 
    9597  } 
  • lumina/lumina-desktop/panel-plugins/userbutton/LUserButton.cpp

    rdf636dd r7183594  
    3838  //Clear the main menu and rebuild it 
    3939  mainMenu->clear(); 
    40     //add the app menu 
     40    //add the app/settings menus 
    4141    mainMenu->addMenu( LSession::applicationMenu() ); 
     42    mainMenu->addMenu(LSession::settingsMenu()); 
    4243    mainMenu->addSeparator(); 
    4344    //Now add the home directory 
     
    7273      mainMenu->addAction(act); 
    7374    } 
    74      
    75     //Now add the settings menu 
    76     mainMenu->addSeparator(); 
    77     mainMenu->addMenu(LSession::settingsMenu()); 
     75 
    7876     
    7977    //Now add the close menu 
    8078    // -- rebuild it in case the icon theme has changed 
    81     mainMenu->addSeparator(); 
    82     mainMenu->addAction( LXDG::findIcon("system-log-out",":/images/user-logout.png"), tr("Logout"), this, SLOT(Logout()) ); 
     79    //mainMenu->addSeparator(); 
     80    //mainMenu->addAction( LXDG::findIcon("system-log-out",":/images/user-logout.png"), tr("Logout"), this, SLOT(Logout()) ); 
    8381    /*closeMenu->clear(); 
    8482      closeMenu->setIcon( LXDG::findIcon("system-run", ":/images/default-shutdown.png") ); 
     
    9189 
    9290void LUserButton::goToDir(QString dir){ 
    93   QProcess::startDetached("lumina-open "+dir); 
     91  LSession::LaunchApplication("lumina-open "+dir); 
    9492} 
    9593 
  • lumina/lumina-desktop/panel-plugins/userbutton/LUserButton.h

    rdf636dd r7183594  
    2323#include "../../Globals.h" 
    2424#include "../LPPlugin.h" //main plugin widget 
    25 //#include "../LTBWidget.h" //visual plugin button 
    2625 
    2726// libLumina includes 
Note: See TracChangeset for help on using the changeset viewer.