--------------Boundary-00=_26OJIH769I2TJIWJV124 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable On Saturday 13 April 2002 04:26 am, Matthias Elter wrote: > Hi > > I have commited KXConfig to kdeadmin. KXConfig is a XFree86 4 configura= tion > utillity written by Matthias H=F6lzer Kl=FCpfel, Cornelius Schuhmacher,= Simon > Hausmann and me. Developement happened for and sponsored by Caldera > Deutschland GmbH. KXConfig is licensed under the GPL. > > I'm searching for a new maintainer because neither of us will have much > time for it. So if you are interested, please contact me. Nice tool. I pretty quickly found a bug with the keyboard selection. If= you=20 go to the keyboard menu, change your layout, try it in the test area and = then=20 cancel you will still have the changed keyboard. =20 This patch fixes that. Maybe the non-maintainer can have a look? :-) Also, just out of curiosity, is there any reason that this wasn't done as= a=20 KConfig module? =20 -Scott --------------Boundary-00=_26OJIH769I2TJIWJV124 Content-Type: text/x-diff; charset="iso-8859-1"; name="kxconfig-keyboard.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kxconfig-keyboard.patch" Index: keyboardpageimpl.cpp =================================================================== RCS file: /home/kde/kdeadmin/kxconfig/keyboardpageimpl.cpp,v retrieving revision 1.1 diff -u -3 -p -r1.1 keyboardpageimpl.cpp --- keyboardpageimpl.cpp 2002/04/13 08:22:02 1.1 +++ keyboardpageimpl.cpp 2002/04/14 06:08:40 @@ -17,6 +17,9 @@ KeyboardPage::KeyboardPage( QWidget *parent, const char *name ) : KeyboardPageBase( parent, name ) { + originalLayout = new KXKeyboardLayout( m_data->currentKeyboards()[ 0 ].layout() ); + originalModel = new KXKeyboardModel( m_data->currentKeyboards()[ 0 ].model() ); + connect( m_models, SIGNAL( currentChanged( QListBoxItem * ) ), this, SIGNAL( changed() ) ); connect( m_layouts, SIGNAL( currentChanged( QListBoxItem * ) ), @@ -27,6 +30,8 @@ KeyboardPage::KeyboardPage( QWidget *par KeyboardPage::~KeyboardPage() { + delete originalLayout; + delete originalModel; } bool @@ -164,6 +169,12 @@ void KeyboardPage::save() } item = item->next(); } +} + +void KeyboardPage::revert() +{ + kdDebug() << "KeyboardPage::revert()" << endl; + set( originalLayout->id(), originalModel->id() ); } void KeyboardPage::set( const QString &layout, const QString &model ) Index: keyboardpageimpl.h =================================================================== RCS file: /home/kde/kdeadmin/kxconfig/keyboardpageimpl.h,v retrieving revision 1.1 diff -u -3 -p -r1.1 keyboardpageimpl.h --- keyboardpageimpl.h 2002/04/13 08:22:02 1.1 +++ keyboardpageimpl.h 2002/04/14 06:08:40 @@ -30,12 +30,19 @@ public: virtual void load(); virtual void save(); +public slots: + void revert(); + signals: void changed(); void enableForward( bool ); protected: void set( const QString &layout, const QString &model ); + +private: + KXKeyboardLayout *originalLayout; + KXKeyboardModel *originalModel; }; #endif Index: toplevel.cpp =================================================================== RCS file: /home/kde/kdeadmin/kxconfig/toplevel.cpp,v retrieving revision 1.3 diff -u -3 -p -r1.3 toplevel.cpp --- toplevel.cpp 2002/04/13 09:08:04 1.3 +++ toplevel.cpp 2002/04/14 06:08:40 @@ -293,6 +293,9 @@ void TopLevel::itemSelected(ListViewItem connect( p, SIGNAL( enableForward( bool ) ), m_wizard, SLOT( setForwardEnabled( bool ) ) ); + + connect( m_wizard, SIGNAL( reject() ), + p, SLOT( revert() ) ); } // pointer device page --------------Boundary-00=_26OJIH769I2TJIWJV124--