Changeset 405554c0


Ignore:
Timestamp:
04/16/14 12:57:16 (17 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, releng/10.2, stable/10
Children:
03d90a0
Parents:
9bc8c2a
Message:

Extend the settings file watcher so that all the items that need to update based on saved settings will get the signal now instead of just the background.

Location:
lumina/lumina-desktop
Files:
2 edited

Legend:

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

    r9bc8c2a r405554c0  
    2626    bgtimer->setSingleShot(true); 
    2727  watcher = new QFileSystemWatcher(this); 
    28     connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(UpdateBackground()) ); 
     28    connect(watcher, SIGNAL(fileChanged(QString)), this, SLOT(SettingsChanged()) ); 
    2929    watcher->addPath(settings->fileName()); 
    3030  
     
    5353//     PRIVATE SLOTS  
    5454// ===================== 
     55void LDesktop::SettingsChanged(){ 
     56  QTimer::singleShot(1,this, SLOT(UpdateMenu()) ); 
     57  QTimer::singleShot(1,this, SLOT(UpdateBackground()) ); 
     58  QTimer::singleShot(1,this, SLOT(UpdateDesktop()) ); 
     59  QTimer::singleShot(1,this, SLOT(UpdatePanels()) ); 
     60  //Now send the signal on to all the panels as needed 
     61  for(int i=0; i<PANELS.length(); i++){ 
     62    QTimer::singleShot(1,PANELS[i], SLOT(UpdatePanel()) ); 
     63  } 
     64} 
     65 
    5566void LDesktop::UpdateMenu(){ 
    56   qDebug() << " - Update Menu"; 
     67  qDebug() << " - Update Menu:" << desktopnumber; 
    5768  deskMenu->clear(); 
    5869  //Add in the system applications menu 
     
    6778 
    6879void LDesktop::UpdateDesktop(){ 
    69   qDebug() << " - Update Desktop"; 
     80  qDebug() << " - Update Desktop:" << desktopnumber; 
    7081  QStringList plugins = settings->value(DPREFIX+"pluginlist", QStringList()).toStringList(); 
    7182  if(defaultdesktop && plugins.isEmpty()){ 
     
    107118 
    108119void LDesktop::UpdatePanels(){ 
    109   qDebug() << " - Update Panels"; 
     120  qDebug() << " - Update Panels:" << desktopnumber; 
    110121  int panels = settings->value(DPREFIX+"panels", 0).toInt(); 
    111122  //if(panels==0 && defaultdesktop){ panels=1; } //need at least 1 panel on the primary desktop 
     
    126137void LDesktop::UpdateBackground(){ 
    127138  //Get the current Background 
    128   qDebug() << " - Update Background for desktop:"<<desktopnumber; 
     139  qDebug() << " - Update Background:" << desktopnumber; 
    129140  //Get the list of background(s) to show 
    130141  settings->sync(); //make sure to catch external settings changes 
  • lumina/lumina-desktop/LDesktop.h

    r49640df r405554c0  
    5656         
    5757private slots: 
     58        void SettingsChanged(); 
    5859        void UpdateMenu(); 
    5960        void ShowMenu(){ 
Note: See TracChangeset for help on using the changeset viewer.