From 0394411a5c589b3c19fd3ecd2a6b4836f1a74a88 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 17 Oct 2014 08:41:49 -0400 Subject: Adjust how the backend for the system tray works: 1) Now the Lumina session registeres the system-wide tray, and just keeps track of the windows that should be visible (preventing any loss of service or apps starting up before the tray is registered). 2) The system tray plugin is now just a "visual tray" for embedding the applications in the panel. The Session only allows a single visual tray to be registered at a time, but sends out signals whenever there is an opening for a visual tray (allowing near-instant transfer of tray applications from one visual tray to another). Also fix a quick bug in lumina-config where the save button was getting activated simply by changing the appearance/plugins tab in the panel configuration (without actually changing anything). --- lumina-config/mainUI.cpp | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'lumina-config') diff --git a/lumina-config/mainUI.cpp b/lumina-config/mainUI.cpp index 756fc016..e4490659 100644 --- a/lumina-config/mainUI.cpp +++ b/lumina-config/mainUI.cpp @@ -823,17 +823,23 @@ void MainUI::adjustpanel1(){ if(loading){ return; } qDebug() << "Adjust Panel 1:"; ui->toolBox_panel1->setCurrentIndex( ui->toolBox_panel2->currentIndex() ); + bool changed = false; + int newindex=0; switch(ui->combo_panel2_loc->currentIndex()){ case 0: - ui->combo_panel1_loc->setCurrentIndex(1); break; + newindex = 1; break; case 1: - ui->combo_panel1_loc->setCurrentIndex(0); break; + newindex = 0; break; case 2: - ui->combo_panel1_loc->setCurrentIndex(3); break; + newindex = 3; break; case 3: - ui->combo_panel1_loc->setCurrentIndex(2); break; + newindex = 2; break; } - if(!loading){ ui->push_save->setEnabled(true); modpan = true; } + if(newindex != ui->combo_panel1_loc->currentIndex()){ + changed = true; + ui->combo_panel1_loc->setCurrentIndex(newindex); + } + if(!loading && changed){ ui->push_save->setEnabled(true); modpan = true; } } void MainUI::adjustpanel2(){ @@ -841,17 +847,23 @@ void MainUI::adjustpanel2(){ //Adjust panel 2 to complement a panel 1 change qDebug() << "Adjust Panel 2:"; ui->toolBox_panel2->setCurrentIndex( ui->toolBox_panel1->currentIndex() ); + bool changed = false; + int newindex=0; switch(ui->combo_panel1_loc->currentIndex()){ case 0: - ui->combo_panel2_loc->setCurrentIndex(1); break; + newindex = 1; break; case 1: - ui->combo_panel2_loc->setCurrentIndex(0); break; + newindex = 0; break; case 2: - ui->combo_panel2_loc->setCurrentIndex(3); break; + newindex = 3; break; case 3: - ui->combo_panel2_loc->setCurrentIndex(2); break; + newindex = 2; break; } - if(!loading){ ui->push_save->setEnabled(true); modpan = true; } + if(newindex != ui->combo_panel2_loc->currentIndex()){ + changed = true; + ui->combo_panel2_loc->setCurrentIndex(newindex); + } + if(!loading && changed){ ui->push_save->setEnabled(true); modpan = true; } } -- cgit