diff options
author | Ken Moore <ken@pcbsd.org> | 2015-02-17 12:27:24 -0500 |
---|---|---|
committer | Ken Moore <ken@pcbsd.org> | 2015-02-17 12:27:24 -0500 |
commit | 3fbefdde2bca0f585d13ed8a7e2ab06a7871de99 (patch) | |
tree | e6c3ff9e4a8ecaa0e5c3fde3851429f22a877630 /lumina-desktop/LPanel.cpp | |
parent | Remove some temporary debugging statements. (diff) | |
download | lumina-3fbefdde2bca0f585d13ed8a7e2ab06a7871de99.tar.gz lumina-3fbefdde2bca0f585d13ed8a7e2ab06a7871de99.tar.bz2 lumina-3fbefdde2bca0f585d13ed8a7e2ab06a7871de99.zip |
Clean up some more debugging output from the LPanel class (make it switchable in the code like most of the others). Also fix a signal/slot issue with the userbutton (minor).
Diffstat (limited to 'lumina-desktop/LPanel.cpp')
-rw-r--r-- | lumina-desktop/LPanel.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lumina-desktop/LPanel.cpp b/lumina-desktop/LPanel.cpp index 9bb42ae6..51c994a5 100644 --- a/lumina-desktop/LPanel.cpp +++ b/lumina-desktop/LPanel.cpp @@ -8,9 +8,11 @@ #include "LSession.h" #include "panel-plugins/systemtray/LSysTray.h" +#define DEBUG 1 + LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){ //Take care of inputs - qDebug() << " - Creating Panel:" << scr << num; + if(DEBUG){ qDebug() << " - Creating Panel:" << scr << num; } bgWindow = parent; //save for later //Setup the widget overlay for the entire panel to provide transparency effects panelArea = new QWidget(this); @@ -29,7 +31,7 @@ LPanel::LPanel(QSettings *file, int scr, int num, QWidget *parent) : QWidget(){ horizontal=true; //use this by default initially hidden = false; //use this by default //Setup the panel - qDebug() << " -- Setup Panel"; + if(DEBUG){ qDebug() << " -- Setup Panel"; } this->setContentsMargins(0,0,0,0); this->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); //panels cannot get keyboard focus otherwise it upsets the task manager window detection @@ -69,7 +71,7 @@ void LPanel::UpdatePanel(){ //Create/Update the panel as designated in the Settings file settings->sync(); //make sure to catch external settings changes //First set the geometry of the panel and send the EWMH message to reserve that space - qDebug() << "Update Panel"; + if(DEBUG){ qDebug() << "Update Panel"; } hidden = settings->value(PPREFIX+"hidepanel",false).toBool(); //default to true for the moment QString loc = settings->value(PPREFIX+"location","").toString(); if(loc.isEmpty() && defaultpanel){ loc="top"; } @@ -160,7 +162,7 @@ void LPanel::UpdatePanel(){ if(defaultpanel && plugins.isEmpty()){ plugins << "userbutton" << "taskmanager" << "spacer" << "systemtray" << "clock" << "systemdashboard"; } - qDebug() << " - Initialize Plugins: " << plugins; + if(DEBUG){ qDebug() << " - Initialize Plugins: " << plugins; } for(int i=0; i<plugins.length(); i++){ //Ensure this plugin has a unique ID (NOTE: this numbering does not persist between sessions) if(!plugins[i].contains("---")){ @@ -192,7 +194,7 @@ void LPanel::UpdatePanel(){ } if(!found){ //New Plugin - qDebug() << " -- New Plugin:" << plugins[i] << i; + if(DEBUG){ qDebug() << " -- New Plugin:" << plugins[i] << i; } LPPlugin *plug = NewPP::createPlugin(plugins[i], panelArea, horizontal); if(plug != 0){ PLUGINS.insert(i, plug); @@ -210,7 +212,7 @@ void LPanel::UpdatePanel(){ //qDebug() << "PLUGINS length:" << PLUGINS.length(); for(int i=0; i<PLUGINS.length(); i++){ if(plugins.contains(PLUGINS[i]->type())){ continue; } //good plugin - skip it - qDebug() << " -- Remove Plugin: " << PLUGINS[i]->type(); + if(DEBUG){ qDebug() << " -- Remove Plugin: " << PLUGINS[i]->type(); } //If this is the system tray - stop it first if( PLUGINS[i]->type().startsWith("systemtray---") ){ static_cast<LSysTray*>(PLUGINS[i])->stop(); |