summaryrefslogtreecommitdiff
path: root/core/settings/launcher/inputmethodsettings.cpp
Unidiff
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
@@ -31,6 +31,7 @@
31/* OPIE */ 31/* OPIE */
32#include <qpe/config.h> 32#include <qpe/config.h>
33#include <opie2/odebug.h> 33#include <opie2/odebug.h>
34#include <qpe/qcopenvelope_qws.h>
34 35
35/* QT */ 36/* QT */
36#include <qspinbox.h> 37#include <qspinbox.h>
@@ -56,9 +57,17 @@ InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QW
56 57
57 Config cfg( "Launcher" ); 58 Config cfg( "Launcher" );
58 cfg.setGroup( "InputMethods" ); 59 cfg.setGroup( "InputMethods" );
59 _resize->setChecked( cfg.readBoolEntry( "Resize", true ) ); 60
60 _float->setChecked( cfg.readBoolEntry( "Float", false ) ); 61 /*
61 _size->setValue( cfg.readNumEntry( "Width", 100 ) ); 62 * load the values to see if something was changed
63 */
64 _wasResize = cfg.readBoolEntry( "Resize", true );
65 _wasFloat = cfg.readBoolEntry( "Float", false );
66 _wasWidth = cfg.readNumEntry( "Width", 100 );
67
68 _resize->setChecked( _wasResize );
69 _float ->setChecked( _wasFloat );
70 _size ->setValue( _wasWidth );
62 71
63 lay->addWidget( _resize ); 72 lay->addWidget( _resize );
64 lay->addWidget( _float ); 73 lay->addWidget( _float );
@@ -71,8 +80,15 @@ InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QW
71 QWhatsThis::add( _size, tr( "Specify the percentage of the screen width for the input method" ) ); 80 QWhatsThis::add( _size, tr( "Specify the percentage of the screen width for the input method" ) );
72} 81}
73 82
74void InputMethodSettings::appletChanged() 83bool InputMethodSettings::changed()const{
75{ 84 if ( _wasResize != _resize->isChecked() )
85 return true;
86 else if ( _wasFloat != _float->isChecked() )
87 return true;
88 else if ( _wasWidth != _size->value() )
89 return true;
90 else
91 return false;
76} 92}
77 93
78void InputMethodSettings::accept() 94void InputMethodSettings::accept()
@@ -84,5 +100,8 @@ void InputMethodSettings::accept()
84 cfg.writeEntry( "Float", _float->isChecked() ); 100 cfg.writeEntry( "Float", _float->isChecked() );
85 cfg.writeEntry( "Width", _size->value() ); 101 cfg.writeEntry( "Width", _size->value() );
86 cfg.write(); 102 cfg.write();
103
104 if ( changed() )
105 QCopEnvelope( "QPE/TaskBar", "reloadInputMethods()" );
87} 106}
88 107