summaryrefslogtreecommitdiff
path: root/inputmethods
authorzecke <zecke>2004-01-18 13:26:43 (UTC)
committer zecke <zecke>2004-01-18 13:26:43 (UTC)
commit7d94c9b04f8702d0f94c6c64454d159a186a2576 (patch) (unidiff)
treea5989f07e02e610abab7cf7514737a67c78b1d68 /inputmethods
parenta2a3aabf21655cc9c7df8e2ed0d420d2b208fd3d (diff)
downloadopie-7d94c9b04f8702d0f94c6c64454d159a186a2576.zip
opie-7d94c9b04f8702d0f94c6c64454d159a186a2576.tar.gz
opie-7d94c9b04f8702d0f94c6c64454d159a186a2576.tar.bz2
Comit the "Mono" patch by
Brad Campbell <brad@wasp.net.au>
Diffstat (limited to 'inputmethods') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenchar.cpp5
-rw-r--r--inputmethods/handwriting/qimpenchar.h3
-rw-r--r--inputmethods/handwriting/qimpenprofile.cpp25
-rw-r--r--inputmethods/handwriting/qimpenprofile.h2
-rw-r--r--inputmethods/handwriting/qimpensetup.cpp3
5 files changed, 35 insertions, 3 deletions
diff --git a/inputmethods/handwriting/qimpenchar.cpp b/inputmethods/handwriting/qimpenchar.cpp
index 0c37e5c..929f370 100644
--- a/inputmethods/handwriting/qimpenchar.cpp
+++ b/inputmethods/handwriting/qimpenchar.cpp
@@ -348,3 +348,3 @@ bool QIMPenCharSet::load( const QString &fn, Domain d )
348 } 348 }
349 349 setHidden ( false );
350 return ok; 350 return ok;
@@ -360,2 +360,5 @@ bool QIMPenCharSet::save( Domain d )
360 360
361 if ( hidden() )
362 return TRUE;
363
361 bool ok = FALSE; 364 bool ok = FALSE;
diff --git a/inputmethods/handwriting/qimpenchar.h b/inputmethods/handwriting/qimpenchar.h
index efd6f16..e4e7645 100644
--- a/inputmethods/handwriting/qimpenchar.h
+++ b/inputmethods/handwriting/qimpenchar.h
@@ -119,2 +119,4 @@ public:
119 QIMPenChar *at( int i ); 119 QIMPenChar *at( int i );
120 void setHidden ( const bool &b ) { phidden = &b; }
121 bool hidden() const { return phidden; }
120 122
@@ -151,2 +153,3 @@ protected:
151 QIMPenCharMatchList matches; 153 QIMPenCharMatchList matches;
154 bool phidden : 1;
152}; 155};
diff --git a/inputmethods/handwriting/qimpenprofile.cpp b/inputmethods/handwriting/qimpenprofile.cpp
index 3b1b5e9..b1a6592 100644
--- a/inputmethods/handwriting/qimpenprofile.cpp
+++ b/inputmethods/handwriting/qimpenprofile.cpp
@@ -50,2 +50,5 @@ QIMPenProfile::QIMPenProfile( const QString &fn )
50 50
51 QString t = config.readEntry( "Mono", "Dual" );
52 pmono = (QString::fromLatin1("Mono") == t );
53
51 msTimeout = config.readNumEntry( "MultiTimeout", 500 ); 54 msTimeout = config.readNumEntry( "MultiTimeout", 500 );
@@ -121,3 +124,3 @@ void QIMPenProfile::loadData()
121 s = config.readEntry( "Uppercase" ); 124 s = config.readEntry( "Uppercase" );
122 if ( !s.isEmpty() ) { 125 if ( !s.isEmpty() && !mono() ) {
123 cs = new QIMPenCharSet( baseDir + "qimpen/" + s ); 126 cs = new QIMPenCharSet( baseDir + "qimpen/" + s );
@@ -135,2 +138,22 @@ void QIMPenProfile::loadData()
135 if ( !s.isEmpty() ) { 138 if ( !s.isEmpty() ) {
139 if ( mono() ) {
140 cs = new QIMPenCharSet ( baseDir + "qimpen/" + s );
141 cs->load( Global::applicationFileName("qimpen",s), QIMPenCharSet::User );
142 if ( !cs->isEmpty() ) {
143 cs->setTitle( cs->title().upper() );
144 cs->setType( QIMPenCharSet::Upper );
145 cs->setHidden ( true );
146 QIMPenCharIterator it( cs->characters() );
147 for ( ; it.current(); ++it ) {
148 uint ch = it.current()->character();
149 if ( ch >= 'a' && ch <= 'z' )
150 it.current()->setCharacter( QChar(ch).upper() );
151 }
152 if ( combining )
153 combining->addCombined( cs );
154 sets.append( cs );
155 } else {
156 delete cs;
157 }
158 }
136 cs = new QIMPenCharSet( baseDir + "qimpen/" + s ); 159 cs = new QIMPenCharSet( baseDir + "qimpen/" + s );
diff --git a/inputmethods/handwriting/qimpenprofile.h b/inputmethods/handwriting/qimpenprofile.h
index 4ce4367..adfa866 100644
--- a/inputmethods/handwriting/qimpenprofile.h
+++ b/inputmethods/handwriting/qimpenprofile.h
@@ -35,2 +35,3 @@ public:
35 Style style() const { return pstyle; } 35 Style style() const { return pstyle; }
36 bool mono() const { return pmono; }
36 void setStyle( Style s ); 37 void setStyle( Style s );
@@ -67,2 +68,3 @@ private:
67 bool wordMatch; 68 bool wordMatch;
69 bool pmono;
68}; 70};
diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp
index 2441102..d0f9ffd 100644
--- a/inputmethods/handwriting/qimpensetup.cpp
+++ b/inputmethods/handwriting/qimpensetup.cpp
@@ -403,3 +403,4 @@ void QIMPenEdit::setProfile( QIMPenProfile *p )
403 for ( ; it.current(); ++it ) { 403 for ( ; it.current(); ++it ) {
404 charSetCombo->insertItem( it.current()->description() ); 404 if ( ! it.current()->hidden() )
405 charSetCombo->insertItem( it.current()->description() );
405 } 406 }