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 | |||
@@ -390,2 +390,4 @@ void KABCore::recieve( QString fn ) | |||
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(); |
@@ -2881,3 +2883,5 @@ void KABCore::getFile( bool success ) | |||
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!") ); |
diff --git a/kaddressbook/mainembedded.cpp b/kaddressbook/mainembedded.cpp index a2ff1e9..40089a1 100644 --- a/kaddressbook/mainembedded.cpp +++ b/kaddressbook/mainembedded.cpp | |||
@@ -11,2 +11,3 @@ | |||
11 | 11 | ||
12 | #include <qtextcodec.h> | ||
12 | #include <kstandarddirs.h> | 13 | #include <kstandarddirs.h> |
@@ -86,3 +87,3 @@ int main( int argc, char **argv ) | |||
86 | m.show(); | 87 | m.show(); |
87 | #endif | 88 | #endif |
88 | a.exec(); | 89 | a.exec(); |
@@ -94,122 +95 @@ int main( int argc, char **argv ) | |||
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 | |||
@@ -170,2 +170,3 @@ 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(); |
@@ -196,2 +197,3 @@ QString ContactListViewItem::key(int column, bool ascending) const | |||
196 | else | 197 | else |
198 | #endif | ||
197 | return QListViewItem::key(column, ascending).lower(); | 199 | return QListViewItem::key(column, ascending).lower(); |
diff --git a/korganizer/koeventviewer.cpp b/korganizer/koeventviewer.cpp index e938e4e..1fcc977 100644 --- a/korganizer/koeventviewer.cpp +++ b/korganizer/koeventviewer.cpp | |||
@@ -497,4 +497,5 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) | |||
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 { |
@@ -505,3 +506,2 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) | |||
505 | } | 506 | } |
506 | addTag("h3",i18n( "Last modified " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); | ||
507 | } | 507 | } |
@@ -509,2 +509,3 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) | |||
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()) { |
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp index 9a3ba73..bafd349 100644 --- a/korganizer/kolistview.cpp +++ b/korganizer/kolistview.cpp | |||
@@ -34,2 +34,3 @@ | |||
34 | #include <qdir.h> | 34 | #include <qdir.h> |
35 | #include <qregexp.h> | ||
35 | 36 | ||
@@ -167,3 +168,7 @@ 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()); |
@@ -177,2 +182,3 @@ bool ListItemVisitor::visit(Journal * j) | |||
177 | mItem->setText(9,"---"); | 182 | mItem->setText(9,"---"); |
183 | mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); | ||
178 | 184 | ||
@@ -691,2 +697,3 @@ void KOListView::showDates(const QDate &start, const QDate &end) | |||
691 | QDate date = start; | 697 | QDate date = start; |
698 | QPtrList<Journal> j_list; | ||
692 | while( date <= end ) { | 699 | while( date <= end ) { |
@@ -694,4 +701,8 @@ void KOListView::showDates(const QDate &start, const QDate &end) | |||
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 ); |
diff --git a/korganizer/main.cpp b/korganizer/main.cpp index c8a55d2..ca53828 100644 --- a/korganizer/main.cpp +++ b/korganizer/main.cpp | |||
@@ -14,2 +14,3 @@ | |||
14 | #endif | 14 | #endif |
15 | #include <qtextcodec.h> | ||
15 | 16 | ||
@@ -99,2 +100,3 @@ int main( int argc, char **argv ) | |||
99 | } | 100 | } |
101 | |||
100 | a.exec(); | 102 | a.exec(); |
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 | |||
@@ -44,2 +44,3 @@ $Id$ | |||
44 | #include <qpushbutton.h> | 44 | #include <qpushbutton.h> |
45 | #include <qapplication.h> | ||
45 | 46 | ||
@@ -67,4 +68,10 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) | |||
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 |