Revision: 6710
Author: ek.kato
Date: Tue Aug 10 17:26:46 2010
Log: * Merge r6706:6709 from trunk.
http://code.google.com/p/uim/source/detail?r=6710
Modified:
/branches/1.6
/branches/1.6/qt4/switcher/qt4.cpp
/branches/1.6/qt4/switcher/qt4.h
=======================================
--- /branches/1.6/qt4/switcher/qt4.cpp Tue Jul 20 20:46:46 2010
+++ /branches/1.6/qt4/switcher/qt4.cpp Tue Aug 10 17:26:46 2010
@@ -133,20 +133,25 @@
QGroupBox *groupBox = new QGroupBox( _( "Effective coverage" ) );
groupBox->setLayout( vbox );
- /* cancel & ok button */
- okButton = new QPushButton( this );
+ /* cancel, apply & ok button */
+ QPushButton *okButton = new QPushButton( this );
okButton->setText( _( "OK" ) );
- okButton->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
connect( okButton, SIGNAL( clicked() ),
+ this, SLOT( slotChangeInputMethodAndQuit() ) );
+
+ QPushButton *applyButton = new QPushButton( this );
+ applyButton->setText( _( "Apply" ) );
+ connect( applyButton, SIGNAL( clicked() ),
this, SLOT( slotChangeInputMethod() ) );
- cancelButton = new QPushButton( this );
+
+ QPushButton *cancelButton = new QPushButton( this );
cancelButton->setText( _( "Cancel" ) );
- cancelButton->setSizePolicy( QSizePolicy::Expanding,
QSizePolicy::Fixed );
connect( cancelButton, SIGNAL( clicked() ),
QApplication::instance(), SLOT( quit() ) );
QHBoxLayout *buttonLayout = new QHBoxLayout;
buttonLayout->addStretch( 0 );
buttonLayout->addWidget( okButton );
+ buttonLayout->addWidget( applyButton );
buttonLayout->addWidget( cancelButton );
// main layout
@@ -180,6 +185,12 @@
uim_fd = -1;
disconnect( notifier, SIGNAL( activated( int ) ), 0, 0 );
}
+
+void UimImSwitcher::slotChangeInputMethodAndQuit()
+{
+ slotChangeInputMethod();
+ QApplication::instance()->quit();
+}
void UimImSwitcher::slotChangeInputMethod()
{
@@ -192,8 +203,6 @@
sendMessageImChange( "im_change_this_application_only\n" );
else if ( textButton->isChecked() )
sendMessageImChange( "im_change_this_text_area_only\n" );
-
- QApplication::instance()->quit();
}
void UimImSwitcher::sendMessageImChange( const QString &change_type )
=======================================
--- /branches/1.6/qt4/switcher/qt4.h Tue Jul 20 20:46:46 2010
+++ /branches/1.6/qt4/switcher/qt4.h Tue Aug 10 17:26:46 2010
@@ -68,6 +68,7 @@
protected slots:
void slotStdinActivated();
+ void slotChangeInputMethodAndQuit();
void slotChangeInputMethod();
protected:
@@ -75,8 +76,6 @@
QRadioButton *wholeButton;
QRadioButton *applicationButton;
QRadioButton *textButton;
- QPushButton *okButton;
- QPushButton *cancelButton;
};
#endif /* Not def: UIM_QT_IM_SWITCHER_QT_H */