author | zautrix <zautrix> | 2004-10-21 22:20:39 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-21 22:20:39 (UTC) |
commit | d6f9bd535e8cabe653bdff329500f9153e5e11fb (patch) (unidiff) | |
tree | 6f83c692713c41896a165e399f259a744f125e5c | |
parent | bb235c5a639b914574e1e247d2de6e479517585f (diff) | |
download | kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.zip kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.gz kdepimpi-d6f9bd535e8cabe653bdff329500f9153e5e11fb.tar.bz2 |
small fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 6 | ||||
-rw-r--r-- | kaddressbook/mainembedded.cpp | 124 | ||||
-rw-r--r-- | kaddressbook/views/contactlistview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koeventviewer.cpp | 5 | ||||
-rw-r--r-- | korganizer/kolistview.cpp | 13 | ||||
-rw-r--r-- | korganizer/main.cpp | 2 | ||||
-rw-r--r-- | pwmanager/pwmanager/getmasterpwwnd_emb.cpp | 11 |
7 files changed, 35 insertions, 128 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 1074a62..c4382d6 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -375,32 +375,34 @@ void KABCore::disableBR(bool b) | |||
375 | toggleBeamReceive( ); | 375 | toggleBeamReceive( ); |
376 | } | 376 | } |
377 | mBRdisabled = true; | 377 | mBRdisabled = true; |
378 | } else { | 378 | } else { |
379 | if ( mBRdisabled ) { | 379 | if ( mBRdisabled ) { |
380 | mBRdisabled = false; | 380 | mBRdisabled = false; |
381 | //toggleBeamReceive( ); | 381 | //toggleBeamReceive( ); |
382 | } | 382 | } |
383 | } | 383 | } |
384 | #endif | 384 | #endif |
385 | 385 | ||
386 | } | 386 | } |
387 | void KABCore::recieve( QString fn ) | 387 | void KABCore::recieve( QString fn ) |
388 | { | 388 | { |
389 | //qDebug("KABCore::recieve "); | 389 | //qDebug("KABCore::recieve "); |
390 | int count = mAddressBook->importFromFile( fn, true ); | 390 | int count = mAddressBook->importFromFile( fn, true ); |
391 | if ( count ) | ||
392 | setModified( true ); | ||
391 | mViewManager->refreshView(); | 393 | mViewManager->refreshView(); |
392 | message(i18n("%1 contact(s) received!").arg( count )); | 394 | message(i18n("%1 contact(s) received!").arg( count )); |
393 | topLevelWidget()->showMaximized(); | 395 | topLevelWidget()->showMaximized(); |
394 | topLevelWidget()->raise(); | 396 | topLevelWidget()->raise(); |
395 | } | 397 | } |
396 | void KABCore::restoreSettings() | 398 | void KABCore::restoreSettings() |
397 | { | 399 | { |
398 | mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; | 400 | mMultipleViewsAtOnce = KABPrefs::instance()->mMultipleViewsAtOnce; |
399 | 401 | ||
400 | bool state; | 402 | bool state; |
401 | 403 | ||
402 | if (mMultipleViewsAtOnce) | 404 | if (mMultipleViewsAtOnce) |
403 | state = KABPrefs::instance()->mDetailsPageVisible; | 405 | state = KABPrefs::instance()->mDetailsPageVisible; |
404 | else | 406 | else |
405 | state = false; | 407 | state = false; |
406 | 408 | ||
@@ -2866,33 +2868,35 @@ bool KABCore::syncPhone() | |||
2866 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); | 2868 | //abLocal.preparePhoneSync( mCurrentSyncDevice, false ); |
2867 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2869 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); |
2868 | } | 2870 | } |
2869 | } | 2871 | } |
2870 | setModified(); | 2872 | setModified(); |
2871 | } | 2873 | } |
2872 | if ( syncOK ) | 2874 | if ( syncOK ) |
2873 | mViewManager->refreshView(); | 2875 | mViewManager->refreshView(); |
2874 | return syncOK; | 2876 | return syncOK; |
2875 | } | 2877 | } |
2876 | void KABCore::getFile( bool success ) | 2878 | void KABCore::getFile( bool success ) |
2877 | { | 2879 | { |
2878 | if ( ! success ) { | 2880 | if ( ! success ) { |
2879 | message( i18n("Error receiving file. Nothing changed!") ); | 2881 | message( i18n("Error receiving file. Nothing changed!") ); |
2880 | return; | 2882 | return; |
2881 | } | 2883 | } |
2882 | mAddressBook->importFromFile( sentSyncFile() , false, true ); | 2884 | int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); |
2885 | if ( count ) | ||
2886 | setModified( true ); | ||
2883 | message( i18n("Pi-Sync successful!") ); | 2887 | message( i18n("Pi-Sync successful!") ); |
2884 | mViewManager->refreshView(); | 2888 | mViewManager->refreshView(); |
2885 | } | 2889 | } |
2886 | void KABCore::syncFileRequest() | 2890 | void KABCore::syncFileRequest() |
2887 | { | 2891 | { |
2888 | mAddressBook->export2File( sentSyncFile() ); | 2892 | mAddressBook->export2File( sentSyncFile() ); |
2889 | } | 2893 | } |
2890 | QString KABCore::sentSyncFile() | 2894 | QString KABCore::sentSyncFile() |
2891 | { | 2895 | { |
2892 | #ifdef DESKTOP_VERSION | 2896 | #ifdef DESKTOP_VERSION |
2893 | return locateLocal( "tmp", "copysyncab.vcf" ); | 2897 | return locateLocal( "tmp", "copysyncab.vcf" ); |
2894 | #else | 2898 | #else |
2895 | return QString( "/tmp/copysyncab.vcf" ); | 2899 | return QString( "/tmp/copysyncab.vcf" ); |
2896 | #endif | 2900 | #endif |
2897 | } | 2901 | } |
2898 | 2902 | ||
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index a2ff1e9..40089a1 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -1,27 +1,28 @@ | |||
1 | #ifndef DESKTOP_VERSION | 1 | #ifndef DESKTOP_VERSION |
2 | #include <qpe/qpeapplication.h> | 2 | #include <qpe/qpeapplication.h> |
3 | #include <qcopchannel_qws.h> | 3 | #include <qcopchannel_qws.h> |
4 | #include <stdlib.h> | 4 | #include <stdlib.h> |
5 | #else | 5 | #else |
6 | #include <qapplication.h> | 6 | #include <qapplication.h> |
7 | #include <qwindowsstyle.h> | 7 | #include <qwindowsstyle.h> |
8 | #include <qplatinumstyle.h> | 8 | #include <qplatinumstyle.h> |
9 | #include <qmainwindow.h> | 9 | #include <qmainwindow.h> |
10 | #endif | 10 | #endif |
11 | 11 | ||
12 | #include <qtextcodec.h> | ||
12 | #include <kstandarddirs.h> | 13 | #include <kstandarddirs.h> |
13 | #include <qregexp.h> | 14 | #include <qregexp.h> |
14 | #include <kglobal.h> | 15 | #include <kglobal.h> |
15 | #include <stdio.h> | 16 | #include <stdio.h> |
16 | #include <qdir.h> | 17 | #include <qdir.h> |
17 | #include "kaddressbookmain.h" | 18 | #include "kaddressbookmain.h" |
18 | #include "externalapphandler.h" | 19 | #include "externalapphandler.h" |
19 | #include <libkdepim/kpimglobalprefs.h> | 20 | #include <libkdepim/kpimglobalprefs.h> |
20 | 21 | ||
21 | int main( int argc, char **argv ) | 22 | int main( int argc, char **argv ) |
22 | { | 23 | { |
23 | #ifndef DESKTOP_VERSION | 24 | #ifndef DESKTOP_VERSION |
24 | QPEApplication a( argc, argv ); | 25 | QPEApplication a( argc, argv ); |
25 | a.setKeepRunning (); | 26 | a.setKeepRunning (); |
26 | #else | 27 | #else |
27 | QApplication a( argc, argv ); | 28 | QApplication a( argc, argv ); |
@@ -71,145 +72,24 @@ int main( int argc, char **argv ) | |||
71 | #endif | 72 | #endif |
72 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); | 73 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kaddressbook"))); |
73 | KAddressBookMain m ; | 74 | KAddressBookMain m ; |
74 | //US MainWindow m; | 75 | //US MainWindow m; |
75 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | 76 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); |
76 | 77 | ||
77 | { | 78 | { |
78 | KPimGlobalPrefs::instance()->setGlobalConfig(); | 79 | KPimGlobalPrefs::instance()->setGlobalConfig(); |
79 | } | 80 | } |
80 | #ifndef DESKTOP_VERSION | 81 | #ifndef DESKTOP_VERSION |
81 | a.showMainWidget( &m ); | 82 | a.showMainWidget( &m ); |
82 | 83 | ||
83 | #else | 84 | #else |
84 | a.setMainWidget( &m ); | 85 | a.setMainWidget( &m ); |
85 | m.resize (640, 480 ); | 86 | m.resize (640, 480 ); |
86 | m.show(); | 87 | m.show(); |
87 | #endif | 88 | #endif |
88 | a.exec(); | 89 | a.exec(); |
89 | 90 | ||
90 | 91 | ||
91 | } | 92 | } |
92 | qDebug("KA: Bye! "); | 93 | qDebug("KA: Bye! "); |
93 | } | 94 | } |
94 | 95 | ||
95 | /* | ||
96 | #include <stdlib.h> | ||
97 | |||
98 | #include <qstring.h> | ||
99 | |||
100 | #include <kabc/stdaddressbook.h> | ||
101 | #include <kaboutdata.h> | ||
102 | #include <kcmdlineargs.h> | ||
103 | #include <kcrash.h> | ||
104 | #include <kdebug.h> | ||
105 | #include <klocale.h> | ||
106 | #include <kstartupinfo.h> | ||
107 | #include <kuniqueapplication.h> | ||
108 | #include <kwin.h> | ||
109 | |||
110 | #include "kaddressbookmain.h" | ||
111 | #include "kabcore.h" | ||
112 | |||
113 | extern "C" { | ||
114 | |||
115 | void crashHandler( int ) | ||
116 | { | ||
117 | KABC::StdAddressBook::handleCrash(); | ||
118 | ::exit( 0 ); | ||
119 | } | ||
120 | |||
121 | } | ||
122 | |||
123 | class KAddressBookApp : public KUniqueApplication { | ||
124 | public: | ||
125 | KAddressBookApp() : mMainWin( 0 ) {} | ||
126 | ~KAddressBookApp() {} | ||
127 | |||
128 | int newInstance(); | ||
129 | |||
130 | private: | ||
131 | KAddressBookMain *mMainWin; | ||
132 | }; | ||
133 | |||
134 | int KAddressBookApp::newInstance() | ||
135 | { | ||
136 | if ( isRestored() ) { | ||
137 | // There can only be one main window | ||
138 | if ( KMainWindow::canBeRestored( 1 ) ) { | ||
139 | mMainWin = new KAddressBookMain; | ||
140 | mMainWin->show(); | ||
141 | mMainWin->restore( 1 ); | ||
142 | } | ||
143 | } else { | ||
144 | KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); | ||
145 | |||
146 | QCString addrStr = args->getOption( "addr" ); | ||
147 | QCString uidStr = args->getOption( "uid" ); | ||
148 | QString addr; | ||
149 | QString uid; | ||
150 | if ( !addrStr.isEmpty() ) | ||
151 | addr = QString::fromLocal8Bit( addrStr ); | ||
152 | if ( !uidStr.isEmpty() ) | ||
153 | uid = QString::fromLocal8Bit( uidStr ); | ||
154 | |||
155 | |||
156 | if ( args->isSet( "editor-only" ) ) { | ||
157 | if ( !mMainWin ) | ||
158 | mMainWin = new KAddressBookMain; | ||
159 | KStartupInfo::appStarted(); | ||
160 | mMainWin->hide(); | ||
161 | } else { | ||
162 | if ( mMainWin ) { | ||
163 | mMainWin->show(); | ||
164 | KWin::setActiveWindow( mMainWin->winId() ); | ||
165 | } else { | ||
166 | mMainWin = new KAddressBookMain; | ||
167 | mMainWin->show(); | ||
168 | } | ||
169 | } | ||
170 | // Can not see why anyone would pass both a uid and an email address, so I'll leave it that two contact editors will show if they do | ||
171 | if ( !addr.isEmpty() ) | ||
172 | mMainWin->addEmail( addr ); | ||
173 | |||
174 | if ( !uid.isEmpty() ) | ||
175 | mMainWin->showContactEditor( uid ); | ||
176 | if ( args->isSet( "new-contact" ) ) { | ||
177 | mMainWin->newContact(); | ||
178 | } | ||
179 | } | ||
180 | |||
181 | KCrash::setEmergencySaveFunction( crashHandler ); | ||
182 | |||
183 | return 0; | ||
184 | } | ||
185 | |||
186 | // the dummy argument is required, because KMail apparently sends an empty | ||
187 | // argument. | ||
188 | static KCmdLineOptions kmoptions[] = | ||
189 | { | ||
190 | { "a", 0 , 0 }, | ||
191 | { "addr <email>", I18N_NOOP( "Shows contact editor with given email address" ), 0 }, | ||
192 | { "uid <uid>", I18N_NOOP( "Shows contact editor with given uid" ), 0 }, | ||
193 | { "editor-only", I18N_NOOP( "Launches in editor only mode" ), 0 }, | ||
194 | { "new-contact", I18N_NOOP( "Launches editor for the new contact" ), 0 }, | ||
195 | { "+[argument]", I18N_NOOP( "dummy argument" ), 0}, | ||
196 | { 0, 0, 0} | ||
197 | }; | ||
198 | |||
199 | int main( int argc, char *argv[] ) | ||
200 | { | ||
201 | KLocale::setMainCatalogue( "kaddressbook" ); | ||
202 | |||
203 | KCmdLineArgs::init( argc, argv, KABCore::createAboutData() ); | ||
204 | KCmdLineArgs::addCmdLineOptions( kmoptions ); | ||
205 | KUniqueApplication::addCmdLineOptions(); | ||
206 | |||
207 | if ( !KAddressBookApp::start() ) | ||
208 | exit( 0 ); | ||
209 | |||
210 | KAddressBookApp app; | ||
211 | KGlobal::locale()->insertCatalogue( "libkdepim" ); | ||
212 | |||
213 | return app.exec(); | ||
214 | } | ||
215 | */ | ||
diff --git a/kaddressbook/views/contactlistview.cpp b/kaddressbook/views/contactlistview.cpp index c74f8cf..5fb4163 100644 --- a/kaddressbook/views/contactlistview.cpp +++ b/kaddressbook/views/contactlistview.cpp | |||
@@ -155,58 +155,60 @@ void DynamicTip::maybeTip( const QPoint &pos ) | |||
155 | 155 | ||
156 | /////////////////////////// | 156 | /////////////////////////// |
157 | // ContactListViewItem Methods | 157 | // ContactListViewItem Methods |
158 | 158 | ||
159 | ContactListViewItem::ContactListViewItem(const KABC::Addressee &a, | 159 | ContactListViewItem::ContactListViewItem(const KABC::Addressee &a, |
160 | ContactListView *parent, | 160 | ContactListView *parent, |
161 | KABC::AddressBook *doc, | 161 | KABC::AddressBook *doc, |
162 | const KABC::Field::List &fields ) | 162 | const KABC::Field::List &fields ) |
163 | : KListViewItem(parent), mAddressee(a), mFields( fields ), | 163 | : KListViewItem(parent), mAddressee(a), mFields( fields ), |
164 | parentListView( parent ), mDocument(doc) | 164 | parentListView( parent ), mDocument(doc) |
165 | { | 165 | { |
166 | refresh(); | 166 | refresh(); |
167 | } | 167 | } |
168 | 168 | ||
169 | QString ContactListViewItem::key(int column, bool ascending) const | 169 | QString ContactListViewItem::key(int column, bool ascending) const |
170 | { | 170 | { |
171 | #ifndef DESKTOP_VERSION | ||
171 | int lan = KGlobal::locale()->language(); | 172 | int lan = KGlobal::locale()->language(); |
172 | //qDebug("language %d ", lan); | 173 | //qDebug("language %d ", lan); |
173 | if ( lan == 1 ) { //GERMAN | 174 | if ( lan == 1 ) { //GERMAN |
174 | QString ret = QListViewItem::key(column, ascending).utf8(); | 175 | QString ret = QListViewItem::key(column, ascending).utf8(); |
175 | int start = -1; | 176 | int start = -1; |
176 | while ( (start = ret.find( 'ä', start+1)) > 0 ) { | 177 | while ( (start = ret.find( 'ä', start+1)) > 0 ) { |
177 | ret.at(start-1) = 'a'; | 178 | ret.at(start-1) = 'a'; |
178 | } | 179 | } |
179 | start = -1; | 180 | start = -1; |
180 | while ( (start = ret.find( 'ö', start+1)) > 0 ) { | 181 | while ( (start = ret.find( 'ö', start+1)) > 0 ) { |
181 | ret.at(start-1) = 'o'; | 182 | ret.at(start-1) = 'o'; |
182 | } | 183 | } |
183 | start = -1; | 184 | start = -1; |
184 | while ( (start = ret.find( 'ü', start+1)) > 0 ) { | 185 | while ( (start = ret.find( 'ü', start+1)) > 0 ) { |
185 | ret.at(start-1) = 'o'; | 186 | ret.at(start-1) = 'o'; |
186 | } | 187 | } |
187 | start = -1; | 188 | start = -1; |
188 | while ( (start = ret.find( 'ß', start+1)) > 0 ) { | 189 | while ( (start = ret.find( 'ß', start+1)) > 0 ) { |
189 | ret.at(start-1) = 's'; | 190 | ret.at(start-1) = 's'; |
190 | } | 191 | } |
191 | //qDebug("conv string %s ", ret.latin1()); | 192 | //qDebug("conv string %s ", ret.latin1()); |
192 | 193 | ||
193 | return ret; | 194 | return ret; |
194 | 195 | ||
195 | } | 196 | } |
196 | else | 197 | else |
198 | #endif | ||
197 | return QListViewItem::key(column, ascending).lower(); | 199 | return QListViewItem::key(column, ascending).lower(); |
198 | } | 200 | } |
199 | 201 | ||
200 | void ContactListViewItem::paintCell(QPainter * p, | 202 | void ContactListViewItem::paintCell(QPainter * p, |
201 | const QColorGroup & cg, | 203 | const QColorGroup & cg, |
202 | int column, | 204 | int column, |
203 | int width, | 205 | int width, |
204 | int align) | 206 | int align) |
205 | { | 207 | { |
206 | KListViewItem::paintCell(p, cg, column, width, align); | 208 | KListViewItem::paintCell(p, cg, column, width, align); |
207 | 209 | ||
208 | if ( !p ) | 210 | if ( !p ) |
209 | return; | 211 | return; |
210 | 212 | ||
211 | if (parentListView->singleLine()) { | 213 | if (parentListView->singleLine()) { |
212 | p->setPen( parentListView->alternateColor() ); | 214 | p->setPen( parentListView->alternateColor() ); |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index e938e4e..1fcc977 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -482,44 +482,45 @@ void KOEventViewer::formatAttendees(Incidence *event) | |||
482 | mText += "<IMG src=\"" + iconPath + "\">"; | 482 | mText += "<IMG src=\"" + iconPath + "\">"; |
483 | mText += "</a>\n"; | 483 | mText += "</a>\n"; |
484 | } | 484 | } |
485 | } | 485 | } |
486 | if (a->status() != Attendee::NeedsAction ) | 486 | if (a->status() != Attendee::NeedsAction ) |
487 | mText +="[" + a->statusStr() + "] "; | 487 | mText +="[" + a->statusStr() + "] "; |
488 | if (a->role() == Attendee::Chair ) | 488 | if (a->role() == Attendee::Chair ) |
489 | mText +="(" + a->roleStr().left(1) + ".)"; | 489 | mText +="(" + a->roleStr().left(1) + ".)"; |
490 | } | 490 | } |
491 | mText.append("</li></ul>"); | 491 | mText.append("</li></ul>"); |
492 | } | 492 | } |
493 | 493 | ||
494 | } | 494 | } |
495 | void KOEventViewer::appendJournal(Journal *jour, int mode ) | 495 | void KOEventViewer::appendJournal(Journal *jour, int mode ) |
496 | { | 496 | { |
497 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; | 497 | bool shortDate = KOPrefs::instance()->mShortDateInViewer; |
498 | if (mode == 0 ) | 498 | if (mode == 0 ) { |
499 | addTag("h2",i18n("Journal from: ")); | 499 | addTag("h2",i18n("Journal from: ")); |
500 | } | ||
500 | else { | 501 | else { |
501 | if ( mode == 1 ) { | 502 | if ( mode == 1 ) { |
502 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); | 503 | addTag("h2",i18n( "Local: " ) +i18n("Journal from: ")); |
503 | } else { | 504 | } else { |
504 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); | 505 | addTag("h2",i18n( "Remote: " ) +i18n("Journal from: ")); |
505 | } | 506 | } |
506 | addTag("h3",i18n( "Last modified " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); | ||
507 | } | 507 | } |
508 | topLevelWidget()->setCaption("Journal Viewer"); | 508 | topLevelWidget()->setCaption("Journal Viewer"); |
509 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); | 509 | mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); |
510 | addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); | ||
510 | if (!jour->description().isEmpty()) { | 511 | if (!jour->description().isEmpty()) { |
511 | addTag("p",jour->description()); | 512 | addTag("p",jour->description()); |
512 | } | 513 | } |
513 | setText(mText); | 514 | setText(mText); |
514 | } | 515 | } |
515 | 516 | ||
516 | void KOEventViewer::formatReadOnly(Incidence *event) | 517 | void KOEventViewer::formatReadOnly(Incidence *event) |
517 | { | 518 | { |
518 | if (event->isReadOnly()) { | 519 | if (event->isReadOnly()) { |
519 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); | 520 | addTag("p","<em>(" + i18n("read-only") + ")</em>"); |
520 | } | 521 | } |
521 | } | 522 | } |
522 | void KOEventViewer::setSyncMode( bool b ) | 523 | void KOEventViewer::setSyncMode( bool b ) |
523 | { | 524 | { |
524 | mSyncMode = b; | 525 | mSyncMode = b; |
525 | } | 526 | } |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 9a3ba73..bafd349 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -19,32 +19,33 @@ | |||
19 | 19 | ||
20 | As a special exception, permission is given to link this program | 20 | As a special exception, permission is given to link this program |
21 | with any edition of Qt, and distribute the resulting executable, | 21 | with any edition of Qt, and distribute the resulting executable, |
22 | without including the source code for Qt in the source distribution. | 22 | without including the source code for Qt in the source distribution. |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <qlistview.h> | 25 | #include <qlistview.h> |
26 | #include <qlayout.h> | 26 | #include <qlayout.h> |
27 | #include <qlabel.h> | 27 | #include <qlabel.h> |
28 | #include <qpopupmenu.h> | 28 | #include <qpopupmenu.h> |
29 | #include <qprogressbar.h> | 29 | #include <qprogressbar.h> |
30 | #include <qfileinfo.h> | 30 | #include <qfileinfo.h> |
31 | #include <qmessagebox.h> | 31 | #include <qmessagebox.h> |
32 | #include <qdialog.h> | 32 | #include <qdialog.h> |
33 | #include <qtextstream.h> | 33 | #include <qtextstream.h> |
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qregexp.h> | ||
35 | 36 | ||
36 | #include <klocale.h> | 37 | #include <klocale.h> |
37 | #include <kdebug.h> | 38 | #include <kdebug.h> |
38 | #include <kiconloader.h> | 39 | #include <kiconloader.h> |
39 | #include <kglobal.h> | 40 | #include <kglobal.h> |
40 | 41 | ||
41 | #include <libkcal/calendar.h> | 42 | #include <libkcal/calendar.h> |
42 | #include <libkcal/calendarlocal.h> | 43 | #include <libkcal/calendarlocal.h> |
43 | #include <libkcal/icalformat.h> | 44 | #include <libkcal/icalformat.h> |
44 | #include <libkcal/vcalformat.h> | 45 | #include <libkcal/vcalformat.h> |
45 | #include <libkcal/recurrence.h> | 46 | #include <libkcal/recurrence.h> |
46 | #include <libkcal/filestorage.h> | 47 | #include <libkcal/filestorage.h> |
47 | #include <libkdepim/categoryselectdialog.h> | 48 | #include <libkdepim/categoryselectdialog.h> |
48 | #ifndef DESKTOP_VERSION | 49 | #ifndef DESKTOP_VERSION |
49 | #include <qpe/qpeapplication.h> | 50 | #include <qpe/qpeapplication.h> |
50 | #else | 51 | #else |
@@ -152,42 +153,47 @@ bool ListItemVisitor::visit(Todo *t) | |||
152 | d = t->dtDue().date(); | 153 | d = t->dtDue().date(); |
153 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); | 154 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtDue().time(); |
154 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 155 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
155 | mItem->setSortKey(7,key); | 156 | mItem->setSortKey(7,key); |
156 | } | 157 | } |
157 | if ( t->hasStartDate() ) { | 158 | if ( t->hasStartDate() ) { |
158 | d = t->dtStart().date(); | 159 | d = t->dtStart().date(); |
159 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); | 160 | QTime tm = t->doesFloat() ? QTime(0,0) : t->dtStart().time(); |
160 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); | 161 | key.sprintf("%04d%02d%02d%02d%02d",d.year(),d.month(),d.day(),tm.hour(),tm.minute()); |
161 | mItem->setSortKey(1,key); | 162 | mItem->setSortKey(1,key); |
162 | } | 163 | } |
163 | return true; | 164 | return true; |
164 | } | 165 | } |
165 | 166 | ||
166 | bool ListItemVisitor::visit(Journal * j) | 167 | bool ListItemVisitor::visit(Journal * j) |
167 | { | 168 | { |
168 | mItem->setText(0,i18n("Journal")); | 169 | QString des = j->description().left(50); |
170 | des = des.simplifyWhiteSpace (); | ||
171 | des.replace (QRegExp ("\\n"),"" ); | ||
172 | des.replace (QRegExp ("\\r"),"" ); | ||
173 | mItem->setText(0,i18n("Journal")+": "+des.left(25)); | ||
169 | mItem->setText(1,j->dtStartDateStr()); | 174 | mItem->setText(1,j->dtStartDateStr()); |
170 | mItem->setText(2,"---"); | 175 | mItem->setText(2,"---"); |
171 | mItem->setText(3,"---"); | 176 | mItem->setText(3,"---"); |
172 | mItem->setText(4,"---"); | 177 | mItem->setText(4,"---"); |
173 | mItem->setText(5,"---"); | 178 | mItem->setText(5,"---"); |
174 | mItem->setText(6,"---"); | 179 | mItem->setText(6,"---"); |
175 | mItem->setText(7,j->dtStartDateStr()); | 180 | mItem->setText(7,j->dtStartDateStr()); |
176 | mItem->setText(8,"---"); | 181 | mItem->setText(8,"---"); |
177 | mItem->setText(9,"---"); | 182 | mItem->setText(9,"---"); |
183 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); | ||
178 | 184 | ||
179 | QString key; | 185 | QString key; |
180 | QDate d = j->dtStart().date(); | 186 | QDate d = j->dtStart().date(); |
181 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); | 187 | key.sprintf("%04d%02d%02d",d.year(),d.month(),d.day()); |
182 | mItem->setSortKey(1,key); | 188 | mItem->setSortKey(1,key); |
183 | mItem->setSortKey(7,key); | 189 | mItem->setSortKey(7,key); |
184 | 190 | ||
185 | return true; | 191 | return true; |
186 | } | 192 | } |
187 | 193 | ||
188 | KOListView::KOListView(Calendar *calendar, QWidget *parent, | 194 | KOListView::KOListView(Calendar *calendar, QWidget *parent, |
189 | const char *name) | 195 | const char *name) |
190 | : KOEventView(calendar, parent, name) | 196 | : KOEventView(calendar, parent, name) |
191 | { | 197 | { |
192 | mActiveItem = 0; | 198 | mActiveItem = 0; |
193 | mListView = new KOListViewListView(this); | 199 | mListView = new KOListViewListView(this); |
@@ -676,37 +682,42 @@ void KOListView::updateConfig() | |||
676 | { | 682 | { |
677 | 683 | ||
678 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); | 684 | mListView->setFont ( KOPrefs::instance()->mListViewFont ); |
679 | updateView(); | 685 | updateView(); |
680 | 686 | ||
681 | } | 687 | } |
682 | void KOListView::setStartDate(const QDate &start) | 688 | void KOListView::setStartDate(const QDate &start) |
683 | { | 689 | { |
684 | mStartDate = start; | 690 | mStartDate = start; |
685 | } | 691 | } |
686 | 692 | ||
687 | void KOListView::showDates(const QDate &start, const QDate &end) | 693 | void KOListView::showDates(const QDate &start, const QDate &end) |
688 | { | 694 | { |
689 | clear(); | 695 | clear(); |
690 | mStartDate = start; | 696 | mStartDate = start; |
691 | QDate date = start; | 697 | QDate date = start; |
698 | QPtrList<Journal> j_list; | ||
692 | while( date <= end ) { | 699 | while( date <= end ) { |
693 | addEvents(calendar()->events(date)); | 700 | addEvents(calendar()->events(date)); |
694 | addTodos(calendar()->todos(date)); | 701 | addTodos(calendar()->todos(date)); |
702 | Journal* jo = calendar()->journal(date); | ||
703 | if ( jo ) | ||
704 | j_list.append( jo ); | ||
695 | date = date.addDays( 1 ); | 705 | date = date.addDays( 1 ); |
696 | } | 706 | } |
707 | addJournals(j_list); | ||
697 | emit incidenceSelected( 0 ); | 708 | emit incidenceSelected( 0 ); |
698 | updateView(); | 709 | updateView(); |
699 | 710 | ||
700 | } | 711 | } |
701 | 712 | ||
702 | void KOListView::addEvents(QPtrList<Event> eventList) | 713 | void KOListView::addEvents(QPtrList<Event> eventList) |
703 | { | 714 | { |
704 | Event *ev; | 715 | Event *ev; |
705 | for(ev = eventList.first(); ev; ev = eventList.next()) { | 716 | for(ev = eventList.first(); ev; ev = eventList.next()) { |
706 | addIncidence(ev); | 717 | addIncidence(ev); |
707 | } | 718 | } |
708 | if ( !mListView->currentItem() ){ | 719 | if ( !mListView->currentItem() ){ |
709 | updateView(); | 720 | updateView(); |
710 | } | 721 | } |
711 | } | 722 | } |
712 | 723 | ||
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index c8a55d2..ca53828 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -1,30 +1,31 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | #ifndef DESKTOP_VERSION | 3 | #ifndef DESKTOP_VERSION |
4 | #include <qpe/qpeapplication.h> | 4 | #include <qpe/qpeapplication.h> |
5 | #include <qcopchannel_qws.h> | 5 | #include <qcopchannel_qws.h> |
6 | #include <qpe/global.h> | 6 | #include <qpe/global.h> |
7 | #include <stdlib.h> | 7 | #include <stdlib.h> |
8 | #else | 8 | #else |
9 | #include <qapplication.h> | 9 | #include <qapplication.h> |
10 | #include <qstring.h> | 10 | #include <qstring.h> |
11 | #include <qwindowsstyle.h> | 11 | #include <qwindowsstyle.h> |
12 | #include <qplatinumstyle.h> | 12 | #include <qplatinumstyle.h> |
13 | #include <qsgistyle.h> | 13 | #include <qsgistyle.h> |
14 | #endif | 14 | #endif |
15 | #include <qtextcodec.h> | ||
15 | 16 | ||
16 | #include <qdir.h> | 17 | #include <qdir.h> |
17 | #include <kstandarddirs.h> | 18 | #include <kstandarddirs.h> |
18 | #include <kglobal.h> | 19 | #include <kglobal.h> |
19 | #include <stdio.h> | 20 | #include <stdio.h> |
20 | #include "mainwindow.h" | 21 | #include "mainwindow.h" |
21 | 22 | ||
22 | int main( int argc, char **argv ) | 23 | int main( int argc, char **argv ) |
23 | { | 24 | { |
24 | #ifndef DESKTOP_VERSION | 25 | #ifndef DESKTOP_VERSION |
25 | QPEApplication a( argc, argv ); | 26 | QPEApplication a( argc, argv ); |
26 | a.setKeepRunning (); | 27 | a.setKeepRunning (); |
27 | #else | 28 | #else |
28 | QApplication a( argc, argv ); | 29 | QApplication a( argc, argv ); |
29 | QApplication::setStyle( new QPlatinumStyle ()); | 30 | QApplication::setStyle( new QPlatinumStyle ()); |
30 | QString hdir = QDir::homeDirPath(); | 31 | QString hdir = QDir::homeDirPath(); |
@@ -84,21 +85,22 @@ int main( int argc, char **argv ) | |||
84 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); | 85 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&m, SLOT(recieve( const QCString&, const QByteArray& ))); |
85 | a.showMainWidget(&m ); | 86 | a.showMainWidget(&m ); |
86 | #else | 87 | #else |
87 | a.setMainWidget(&m ); | 88 | a.setMainWidget(&m ); |
88 | m.show(); | 89 | m.show(); |
89 | //m.resize( 800, 600 ); | 90 | //m.resize( 800, 600 ); |
90 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); | 91 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); |
91 | #endif | 92 | #endif |
92 | if ( argc > 1 ) { | 93 | if ( argc > 1 ) { |
93 | QCString command = argv[1]; | 94 | QCString command = argv[1]; |
94 | if ( argc > 2 ) | 95 | if ( argc > 2 ) |
95 | command += argv[2]; | 96 | command += argv[2]; |
96 | qApp->processEvents(); | 97 | qApp->processEvents(); |
97 | m.recieve(command, QByteArray() ); | 98 | m.recieve(command, QByteArray() ); |
98 | 99 | ||
99 | } | 100 | } |
101 | |||
100 | a.exec(); | 102 | a.exec(); |
101 | 103 | ||
102 | } | 104 | } |
103 | qDebug("KO: Bye! "); | 105 | qDebug("KO: Bye! "); |
104 | } | 106 | } |
diff --git a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp index 8b6dfbc..8404c3e 100644 --- a/pwmanager/pwmanager/getmasterpwwnd_emb.cpp +++ b/pwmanager/pwmanager/getmasterpwwnd_emb.cpp | |||
@@ -29,57 +29,64 @@ $Id$ | |||
29 | 29 | ||
30 | /* | 30 | /* |
31 | #include <qvariant.h> | 31 | #include <qvariant.h> |
32 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
33 | #include <qlabel.h> | 33 | #include <qlabel.h> |
34 | #include <qlineedit.h> | 34 | #include <qlineedit.h> |
35 | #include <qlayout.h> | 35 | #include <qlayout.h> |
36 | #include <qtooltip.h> | 36 | #include <qtooltip.h> |
37 | #include <qwhatsthis.h> | 37 | #include <qwhatsthis.h> |
38 | */ | 38 | */ |
39 | 39 | ||
40 | #include <qwidget.h> | 40 | #include <qwidget.h> |
41 | #include <qlayout.h> | 41 | #include <qlayout.h> |
42 | #include <qlabel.h> | 42 | #include <qlabel.h> |
43 | #include <qlineedit.h> | 43 | #include <qlineedit.h> |
44 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
45 | #include <qapplication.h> | ||
45 | 46 | ||
46 | /* | 47 | /* |
47 | * Constructs a getMasterPwWnd as a child of 'parent', with the | 48 | * Constructs a getMasterPwWnd as a child of 'parent', with the |
48 | * name 'name' | 49 | * name 'name' |
49 | */ | 50 | */ |
50 | getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) | 51 | getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) |
51 | : KDialogBase( KDialogBase::Plain, i18n( "Master-password" ), | 52 | : KDialogBase( KDialogBase::Plain, i18n( "Master-password" ), |
52 | KDialogBase::Ok | KDialogBase::Cancel, | 53 | KDialogBase::Ok | KDialogBase::Cancel, |
53 | KDialogBase::Ok, parent, name, true ) | 54 | KDialogBase::Ok, parent, name, true ) |
54 | { | 55 | { |
55 | QWidget *page = plainPage(); | 56 | QWidget *page = plainPage(); |
56 | QVBoxLayout *pageLayout = new QVBoxLayout( page ); | 57 | QVBoxLayout *pageLayout = new QVBoxLayout( page ); |
57 | 58 | ||
58 | pwLineEdit = new QLineEdit( page, "pwLineEdit" ); | 59 | pwLineEdit = new QLineEdit( page, "pwLineEdit" ); |
59 | pwLineEdit->setEchoMode( QLineEdit::Password ); | 60 | pwLineEdit->setEchoMode( QLineEdit::Password ); |
60 | 61 | ||
61 | QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" ); | 62 | QLabel* textLabel1 = new QLabel( pwLineEdit, i18n("Please enter the master-password:"), page, "textLabel1" ); |
62 | textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); | 63 | textLabel1->setAlignment( int( QLabel::WordBreak | QLabel::AlignCenter ) ); |
63 | pageLayout->addWidget(textLabel1); | 64 | pageLayout->addWidget(textLabel1); |
64 | pageLayout->addWidget(pwLineEdit); | 65 | pageLayout->addWidget(pwLineEdit); |
65 | 66 | ||
66 | QWidget* numberBox = new QWidget( page ); | 67 | QWidget* numberBox = new QWidget( page ); |
67 | #ifndef DESKTOP_VERSION | 68 | #ifndef DESKTOP_VERSION |
68 | numberBox->setFixedHeight(150); | 69 | if ( QApplication::desktop()->width() > 320 ) { |
69 | numberBox->setFixedWidth(150); | 70 | numberBox->setFixedHeight(250); |
71 | numberBox->setFixedWidth(200); | ||
72 | } | ||
73 | else{ | ||
74 | numberBox->setFixedHeight(150); | ||
75 | numberBox->setFixedWidth(150); | ||
76 | } | ||
70 | #endif | 77 | #endif |
71 | 78 | ||
72 | QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 ); | 79 | QGridLayout* numberLayout = new QGridLayout( numberBox, 4, 3 ); |
73 | numberLayout->setMargin( 0 ); | 80 | numberLayout->setMargin( 0 ); |
74 | numberLayout->setSpacing( 0 ); | 81 | numberLayout->setSpacing( 0 ); |
75 | 82 | ||
76 | QPushButton* p1 = new QPushButton( i18n("1"), numberBox ); | 83 | QPushButton* p1 = new QPushButton( i18n("1"), numberBox ); |
77 | numberLayout->addWidget( p1, 0, 0 ); | 84 | numberLayout->addWidget( p1, 0, 0 ); |
78 | QPushButton* p2 = new QPushButton( i18n("2"), numberBox ); | 85 | QPushButton* p2 = new QPushButton( i18n("2"), numberBox ); |
79 | numberLayout->addWidget( p2, 0, 1 ); | 86 | numberLayout->addWidget( p2, 0, 1 ); |
80 | QPushButton* p3 = new QPushButton( i18n("3"), numberBox ); | 87 | QPushButton* p3 = new QPushButton( i18n("3"), numberBox ); |
81 | numberLayout->addWidget( p3, 0, 2 ); | 88 | numberLayout->addWidget( p3, 0, 2 ); |
82 | QPushButton* p4 = new QPushButton( i18n("4"), numberBox ); | 89 | QPushButton* p4 = new QPushButton( i18n("4"), numberBox ); |
83 | numberLayout->addWidget( p4, 1, 0 ); | 90 | numberLayout->addWidget( p4, 1, 0 ); |
84 | QPushButton* p5 = new QPushButton( i18n("5"), numberBox ); | 91 | QPushButton* p5 = new QPushButton( i18n("5"), numberBox ); |
85 | numberLayout->addWidget( p5, 1, 1 ); | 92 | numberLayout->addWidget( p5, 1, 1 ); |