summaryrefslogtreecommitdiff
path: root/core/settings/launcher/inputmethodsettings.cpp
Side-by-side diff
Diffstat (limited to 'core/settings/launcher/inputmethodsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/launcher/inputmethodsettings.cpp29
1 files changed, 24 insertions, 5 deletions
diff --git a/core/settings/launcher/inputmethodsettings.cpp b/core/settings/launcher/inputmethodsettings.cpp
index 0422075..125b178 100644
--- a/core/settings/launcher/inputmethodsettings.cpp
+++ b/core/settings/launcher/inputmethodsettings.cpp
@@ -30,8 +30,9 @@
/* OPIE */
#include <qpe/config.h>
#include <opie2/odebug.h>
+#include <qpe/qcopenvelope_qws.h>
/* QT */
#include <qspinbox.h>
#include <qcheckbox.h>
@@ -55,11 +56,19 @@ InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QW
hbox->addStretch();
Config cfg( "Launcher" );
cfg.setGroup( "InputMethods" );
- _resize->setChecked( cfg.readBoolEntry( "Resize", true ) );
- _float->setChecked( cfg.readBoolEntry( "Float", false ) );
- _size->setValue( cfg.readNumEntry( "Width", 100 ) );
+
+ /*
+ * load the values to see if something was changed
+ */
+ _wasResize = cfg.readBoolEntry( "Resize", true );
+ _wasFloat = cfg.readBoolEntry( "Float", false );
+ _wasWidth = cfg.readNumEntry( "Width", 100 );
+
+ _resize->setChecked( _wasResize );
+ _float ->setChecked( _wasFloat );
+ _size ->setValue( _wasWidth );
lay->addWidget( _resize );
lay->addWidget( _float );
lay->addWidget( new QLabel( tr( "<b>Note:</b> Changing these settings may need restarting Opie to become effective." ), this ) );
@@ -70,10 +79,17 @@ InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QW
QWhatsThis::add( _float, tr( "Check, if you want to move and/or resize input methods" ) );
QWhatsThis::add( _size, tr( "Specify the percentage of the screen width for the input method" ) );
}
-void InputMethodSettings::appletChanged()
-{
+bool InputMethodSettings::changed()const{
+ if ( _wasResize != _resize->isChecked() )
+ return true;
+ else if ( _wasFloat != _float->isChecked() )
+ return true;
+ else if ( _wasWidth != _size->value() )
+ return true;
+ else
+ return false;
}
void InputMethodSettings::accept()
{
@@ -83,6 +99,9 @@ void InputMethodSettings::accept()
cfg.writeEntry( "Resize", _resize->isChecked() );
cfg.writeEntry( "Float", _float->isChecked() );
cfg.writeEntry( "Width", _size->value() );
cfg.write();
+
+ if ( changed() )
+ QCopEnvelope( "QPE/TaskBar", "reloadInputMethods()" );
}