Summary: | Applet display property blocks kicker | ||
---|---|---|---|
Product: | [Unmaintained] ksysguard | Reporter: | Esben Mose Hansen <kde> |
Component: | general | Assignee: | Tobias Koenig <tokoe> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Esben Mose Hansen
2005-02-06 17:26:25 UTC
TODO: change the properties dialog to non-modal SVN commit 610286 by johnflux: * Make both the Fancy Plotter Settings, and the System guard applet settings Non-Modal * Set the title of the system guard applet to be "System Guard Settings" CCBUG: 98708 M +2 -2 KSGAppletSettings.cc M +11 -6 KSysGuardApplet.cc M +1 -0 KSysGuardApplet.h M +10 -3 SensorDisplayLib/FancyPlotter.cc M +1 -0 SensorDisplayLib/FancyPlotter.h M +1 -1 SensorDisplayLib/FancyPlotterSettings.cc --- branches/KDE/3.5/kdebase/ksysguard/gui/KSGAppletSettings.cc #610285:610286 @@ -28,10 +28,10 @@ #include "KSGAppletSettings.h" KSGAppletSettings::KSGAppletSettings( QWidget *parent, const char *name ) - : KDialogBase( parent, name, true, QString::null, Ok|Apply|Cancel, + : KDialogBase( parent, name, false, QString::null, Ok|Apply|Cancel, Ok, true ) { - setCaption( i18n( "KSysGuard Applet Settings" ) ); + setCaption( i18n( "System Guard Settings" ) ); QWidget *page = new QWidget( this ); setMainWidget( page ); --- branches/KDE/3.5/kdebase/ksysguard/gui/KSysGuardApplet.cc #610285:610286 @@ -115,21 +115,26 @@ void KSysGuardApplet::preferences() { + if(mSettingsDlg) { + return; + } mSettingsDlg = new KSGAppletSettings( this ); connect( mSettingsDlg, SIGNAL( applyClicked() ), SLOT( applySettings() ) ); + connect( mSettingsDlg, SIGNAL( okClicked() ), SLOT( applySettings() ) ); + connect( mSettingsDlg, SIGNAL( finished() ), SLOT( preferencesFinished() ) ); mSettingsDlg->setNumDisplay( mDockCount ); mSettingsDlg->setSizeRatio( (int) ( mSizeRatio * 100.0 + 0.5 ) ); mSettingsDlg->setUpdateInterval( updateInterval() ); - if ( mSettingsDlg->exec() ) - applySettings(); - - delete mSettingsDlg; - mSettingsDlg = 0; + mSettingsDlg->show(); } - +void KSysGuardApplet::preferencesFinished() +{ + mSettingsDlg->delayedDestruct(); + mSettingsDlg = 0; +} void KSysGuardApplet::applySettings() { updateInterval( mSettingsDlg->updateInterval() ); --- branches/KDE/3.5/kdebase/ksysguard/gui/KSysGuardApplet.h #610285:610286 @@ -63,6 +63,7 @@ private slots: void applySettings(); void sensorDisplayModified( bool ); + void preferencesFinished(); private: void layout(); --- branches/KDE/3.5/kdebase/ksysguard/gui/SensorDisplayLib/FancyPlotter.cc #610285:610286 @@ -42,6 +42,7 @@ : KSGRD::SensorDisplay( parent, name, title, nf, isApplet ) { mBeams = 0; + mSettingsDialog = 0; if ( noFrame() ) { mPlotter = new SignalPlotter( this ); @@ -67,6 +68,9 @@ void FancyPlotter::configureSettings() { + if(mSettingsDialog) { + return; + } mSettingsDialog = new FancyPlotterSettings( this ); mSettingsDialog->setTitle( title() ); @@ -107,11 +111,14 @@ mSettingsDialog->setSensors( list ); connect( mSettingsDialog, SIGNAL( applyClicked() ), SLOT( applySettings() ) ); + connect( mSettingsDialog, SIGNAL( okClicked() ), SLOT( applySettings() ) ); + connect( mSettingsDialog, SIGNAL( finished() ), SLOT( killDialog() ) ); - if ( mSettingsDialog->exec() ) - applySettings(); + mSettingsDialog->show(); +} - delete mSettingsDialog; +void FancyPlotter::killDialog() { + mSettingsDialog->delayedDestruct(); mSettingsDialog = 0; } --- branches/KDE/3.5/kdebase/ksysguard/gui/SensorDisplayLib/FancyPlotter.h #610285:610286 @@ -79,6 +79,7 @@ public slots: void applySettings(); virtual void applyStyle(); + void killDialog(); protected: virtual void resizeEvent( QResizeEvent* ); --- branches/KDE/3.5/kdebase/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.cc #610285:610286 @@ -45,7 +45,7 @@ FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, const char* name ) : KDialogBase( Tabbed, i18n( "Signal Plotter Settings" ), Ok | Apply | Cancel, - Ok, parent, name, true, true ) + Ok, parent, name, false, true ) { QFrame *page = 0; QGridLayout *pageLayout = 0; SVN commit 610289 by johnflux: This is a forward port of revision 610286 * Make both the Fancy Plotter Settings, and the System guard applet settings Non-Modal * Set the title of the system guard applet to be "System Guard Settings" BUG: 98708 M +1 -1 DancingBarsSettings.cc M +10 -3 FancyPlotter.cc M +2 -0 FancyPlotter.h M +1 -1 FancyPlotterSettings.cc --- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/DancingBarsSettings.cc #610288:610289 @@ -42,7 +42,7 @@ setCaption( i18n( "Edit BarGraph Preferences" ) ); setButtons( Ok | Cancel ); setObjectName( name ); - setModal( true ); + setModal( false ); showButtonSeparator( true ); mModel->setHasLabel( true ); --- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/FancyPlotter.cc #610288:610289 @@ -40,6 +40,7 @@ { mBeams = 0; mNumAccountedFor = 0; + mSettingsDialog = 0; mPlotter = new KSignalPlotter( this ); mPlotter->setVerticalLinesColor(KSGRD::Style->firstForegroundColor()); mPlotter->setHorizontalLinesColor(KSGRD::Style->secondForegroundColor()); @@ -81,6 +82,8 @@ void FancyPlotter::configureSettings() { + if(mSettingsDialog) + return; mSettingsDialog = new FancyPlotterSettings( this, mSharedSettings->locked ); mSettingsDialog->setTitle( title() ); @@ -122,11 +125,15 @@ mSettingsDialog->setSensors( list ); connect( mSettingsDialog, SIGNAL( applyClicked() ), this, SLOT( applySettings() ) ); + connect( mSettingsDialog, SIGNAL( okClicked() ), this, SLOT( applySettings() ) ); + connect( mSettingsDialog, SIGNAL( finished() ), this, SLOT( settingsFinished() ) ); + mSettingsDialog->show(); +} - if( mSettingsDialog->exec() ) - applySettings(); - delete mSettingsDialog; +void FancyPlotter::settingsFinished() +{ + mSettingsDialog->delayedDestruct(); mSettingsDialog = 0; } --- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/FancyPlotter.h #610288:610289 @@ -77,6 +77,8 @@ public Q_SLOTS: virtual void applyStyle(); + private Q_SLOTS: + void settingsFinished(); void applySettings(); protected: --- trunk/KDE/kdebase/workspace/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.cc #610288:610289 @@ -47,7 +47,7 @@ setCaption( i18n( "Signal Plotter Settings" ) ); setButtons( Ok | Apply | Cancel ); setObjectName( "FancyPlotterSettings" ); - setModal( true ); + setModal( false ); showButtonSeparator( true ); QFrame *page = 0; |