rpms/koffice/devel koffice-kexi-checkbox-data-saving.patch, NONE, 1.1 koffice.spec, 1.36, 1.37

Andreas Bierfert (awjb) fedora-extras-commits at redhat.com
Tue May 30 07:44:32 UTC 2006


Author: awjb

Update of /cvs/extras/rpms/koffice/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30239/devel

Modified Files:
	koffice.spec 
Added Files:
	koffice-kexi-checkbox-data-saving.patch 
Log Message:
- add kexi checkbox patch


koffice-kexi-checkbox-data-saving.patch:

--- NEW FILE koffice-kexi-checkbox-data-saving.patch ---
Index: kexi/plugins/forms/kexidataprovider.cpp
===================================================================
--- kexi/plugins/forms/kexidataprovider.cpp	(revision 542130)
+++ kexi/plugins/forms/kexidataprovider.cpp	(revision 542131)
@@ -92,7 +92,8 @@
  	for (KexiFormDataItemInterfaceToIntMap::ConstIterator it = m_fieldNumbersForDataItems.constBegin(); 
 		it!=m_fieldNumbersForDataItems.constEnd(); ++it)
 	{
-		kexipluginsdbg << "fill data of '" << it.key()->dataSource() <<  "' at idx=" << it.data() << endl;
+		kexipluginsdbg << "fill data of '" << it.key()->dataSource() <<  "' at idx=" << it.data() 
+			<< " data=" << row.at(it.data()) << endl;
 		it.key()->setValue( row.at(it.data()) );
 	}
 }
Index: kexi/plugins/forms/widgets/kexidbautofield.cpp
===================================================================
--- kexi/plugins/forms/widgets/kexidbautofield.cpp	(revision 542130)
+++ kexi/plugins/forms/widgets/kexidbautofield.cpp	(revision 542131)
@@ -446,8 +446,11 @@
 		@todo look at makeFirstCharacterUpperCaseInAutoLabels setting [bool]
 		(see doc/dev/settings.txt) */
 			if (!text.isEmpty()) {
-				realText = text[0].upper();
-				realText += (text.mid(1) + ": ");
+				realText = text[0].upper() + text.mid(1);
+				if (m_widgetType!=Boolean) {
+//! @todo ":" suffix looks weird for checkbox; remove this condition when [x] is displayed _after_ label
+					realText += ": ";
+				}
 			}
 		}
 		else
Index: kexi/plugins/forms/widgets/kexidbcheckbox.cpp
===================================================================
--- kexi/plugins/forms/widgets/kexidbcheckbox.cpp	(revision 542130)
+++ kexi/plugins/forms/widgets/kexidbcheckbox.cpp	(revision 542131)
@@ -27,7 +27,9 @@
  : QCheckBox(text, parent, name), KexiFormDataItemInterface()
 {
 	m_invalidState = false;
+//! todo: tristate 
 	setTristate(true);
+	setFocusPolicy(QWidget::StrongFocus);
 	connect(this, SIGNAL(stateChanged(int)), this, SLOT(slotStateChanged(int)));
 }
 
@@ -56,13 +58,16 @@
 
 void KexiDBCheckBox::setValueInternal(const QVariant &add, bool )
 {
-	setState( add.isNull() ? NoChange : (add.toBool() ? On : Off) );
+//	setState( add.isNull() ? NoChange : (add.toBool() ? On : Off) );
+	setState( m_origValue.isNull() ? NoChange : (m_origValue.toBool() ? On : Off) );
 }
 
 QVariant
 KexiDBCheckBox::value()
 {
-	return QVariant( isChecked(), 3 );
+	if (state()==NoChange)
+		return QVariant();
+	return QVariant(state()==On, 1);
 }
 
 void KexiDBCheckBox::slotStateChanged(int )


Index: koffice.spec
===================================================================
RCS file: /cvs/extras/rpms/koffice/devel/koffice.spec,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- koffice.spec	30 May 2006 07:27:38 -0000	1.36
+++ koffice.spec	30 May 2006 07:44:32 -0000	1.37
@@ -12,6 +12,7 @@
 # stuff for the build configuration
 Patch0:         koffice-admin-gcc4isok.patch
 Patch1:         koffice-forms-plugins.patch
+Patch2:         koffice-kexi-checkbox-data-saving.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # BuildRequires: world-devel ;)
@@ -230,6 +231,8 @@
 cd kexi
 %patch1
 cd ..
+%patch2
+
 # this will make sure that patch0 is considered
 make -f admin/Makefile.common
 
@@ -916,6 +919,7 @@
 1.5.1-1
 - fix #191388
 - add kexi forms patch
+- add kexi checkbox patch
 - version upgrade
 - exclude x-raw.desktop again
 




More information about the fedora-extras-commits mailing list