[uim-commit] r2482 - branches/1.0/qt
ekato at freedesktop.org
ekato at freedesktop.org
Fri Dec 9 01:37:56 PST 2005
Author: ekato
Date: 2005-12-09 01:37:44 -0800 (Fri, 09 Dec 2005)
New Revision: 2482
Modified:
branches/1.0/qt/pref-qt.cpp
branches/1.0/qt/pref-qt.h
Log:
* qt/pref-qt.cpp
* qt/pref-qt.h
- Port r2481 from trunk.
Modified: branches/1.0/qt/pref-qt.cpp
===================================================================
--- branches/1.0/qt/pref-qt.cpp 2005-12-09 09:36:02 UTC (rev 2481)
+++ branches/1.0/qt/pref-qt.cpp 2005-12-09 09:37:44 UTC (rev 2482)
@@ -212,15 +212,24 @@
*/
void UimPrefDialog::slotSelectionChanged( QListViewItem * item )
{
+ /*
+ * Don't confirm on each change in slot selection according to
+ * [Anthy-dev 1795].
+ * Dec 09 2005 ekato
+ */
+#if 0
/* confirm if save the change */
if( m_isValueChanged )
confirmChange();
+#endif
/* switch group widget */
QString grpname = item->text( 0 );
m_groupWidgetStack->raiseWidget( m_groupWidgetsDict[grpname] );
+#if 0
m_applyButton->setEnabled( false );
+#endif
}
void UimPrefDialog::slotCustomValueChanged()
@@ -247,6 +256,27 @@
}
}
+void UimPrefDialog::confirmQuit()
+{
+ int result = QMessageBox::question( this,
+ _("Quit Confirm"),
+ _("Some value(s) have been changed.\n"
+ "Do you realy quit this program?"),
+ _("Yes"),
+ _("No"),
+ QString::null, 0, 1);
+ switch(result)
+ {
+ case 0:
+ reject();
+ break;
+ case 1:
+ break;
+ default:
+ break;
+ }
+}
+
void UimPrefDialog::slotSetDefault()
{
QWidget *w = m_groupWidgetStack->visibleWidget();
@@ -282,11 +312,14 @@
void UimPrefDialog::slotCancel()
{
/*
+ * Enable confirmation since each change in slot selection is not
+ * checked strictly according to [Anthy-dev 1795].
+ * Dec 09 2005 ekato
+ */
if( m_isValueChanged )
- confirmChange();
- */
-
- reject();
+ confirmQuit();
+ else
+ reject();
}
//-------------------------------------------------------------------------------------
Modified: branches/1.0/qt/pref-qt.h
===================================================================
--- branches/1.0/qt/pref-qt.h 2005-12-09 09:36:02 UTC (rev 2481)
+++ branches/1.0/qt/pref-qt.h 2005-12-09 09:37:44 UTC (rev 2482)
@@ -68,6 +68,7 @@
void createGroupWidgets();
void confirmChange();
+ void confirmQuit();
protected slots:
void slotSetDefault();
More information about the uim-commit
mailing list