author | zautrix <zautrix> | 2004-10-21 22:20:39 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-21 22:20:39 (UTC) |
commit | d6f9bd535e8cabe653bdff329500f9153e5e11fb (patch) (side-by-side diff) | |
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 ) int count = mAddressBook->importFromFile( fn, true ); + if ( count ) + setModified( true ); mViewManager->refreshView(); @@ -2881,3 +2883,5 @@ void KABCore::getFile( bool success ) } - mAddressBook->importFromFile( sentSyncFile() , false, true ); + int count = mAddressBook->importFromFile( sentSyncFile() , false, true ); + if ( count ) + setModified( true ); 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 @@ +#include <qtextcodec.h> #include <kstandarddirs.h> @@ -86,3 +87,3 @@ int main( int argc, char **argv ) m.show(); -#endif +#endif a.exec(); @@ -94,122 +95 @@ int main( int argc, char **argv ) -/* -#include <stdlib.h> - -#include <qstring.h> - -#include <kabc/stdaddressbook.h> -#include <kaboutdata.h> -#include <kcmdlineargs.h> -#include <kcrash.h> -#include <kdebug.h> -#include <klocale.h> -#include <kstartupinfo.h> -#include <kuniqueapplication.h> -#include <kwin.h> - -#include "kaddressbookmain.h" -#include "kabcore.h" - -extern "C" { - -void crashHandler( int ) -{ - KABC::StdAddressBook::handleCrash(); - ::exit( 0 ); -} - -} - -class KAddressBookApp : public KUniqueApplication { - public: - KAddressBookApp() : mMainWin( 0 ) {} - ~KAddressBookApp() {} - - int newInstance(); - - private: - KAddressBookMain *mMainWin; -}; - -int KAddressBookApp::newInstance() -{ - if ( isRestored() ) { - // There can only be one main window - if ( KMainWindow::canBeRestored( 1 ) ) { - mMainWin = new KAddressBookMain; - mMainWin->show(); - mMainWin->restore( 1 ); - } - } else { - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - - QCString addrStr = args->getOption( "addr" ); - QCString uidStr = args->getOption( "uid" ); - QString addr; - QString uid; - if ( !addrStr.isEmpty() ) - addr = QString::fromLocal8Bit( addrStr ); - if ( !uidStr.isEmpty() ) - uid = QString::fromLocal8Bit( uidStr ); - - - if ( args->isSet( "editor-only" ) ) { - if ( !mMainWin ) - mMainWin = new KAddressBookMain; - KStartupInfo::appStarted(); - mMainWin->hide(); - } else { - if ( mMainWin ) { - mMainWin->show(); - KWin::setActiveWindow( mMainWin->winId() ); - } else { - mMainWin = new KAddressBookMain; - mMainWin->show(); - } - } - // 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 - if ( !addr.isEmpty() ) - mMainWin->addEmail( addr ); - - if ( !uid.isEmpty() ) - mMainWin->showContactEditor( uid ); - if ( args->isSet( "new-contact" ) ) { - mMainWin->newContact(); - } - } - - KCrash::setEmergencySaveFunction( crashHandler ); - - return 0; -} - -// the dummy argument is required, because KMail apparently sends an empty -// argument. -static KCmdLineOptions kmoptions[] = -{ - { "a", 0 , 0 }, - { "addr <email>", I18N_NOOP( "Shows contact editor with given email address" ), 0 }, - { "uid <uid>", I18N_NOOP( "Shows contact editor with given uid" ), 0 }, - { "editor-only", I18N_NOOP( "Launches in editor only mode" ), 0 }, - { "new-contact", I18N_NOOP( "Launches editor for the new contact" ), 0 }, - { "+[argument]", I18N_NOOP( "dummy argument" ), 0}, - { 0, 0, 0} -}; - -int main( int argc, char *argv[] ) -{ - KLocale::setMainCatalogue( "kaddressbook" ); - - KCmdLineArgs::init( argc, argv, KABCore::createAboutData() ); - KCmdLineArgs::addCmdLineOptions( kmoptions ); - KUniqueApplication::addCmdLineOptions(); - - if ( !KAddressBookApp::start() ) - exit( 0 ); - - KAddressBookApp app; - KGlobal::locale()->insertCatalogue( "libkdepim" ); - - return app.exec(); -} -*/ 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 { +#ifndef DESKTOP_VERSION int lan = KGlobal::locale()->language(); @@ -196,2 +197,3 @@ QString ContactListViewItem::key(int column, bool ascending) const else +#endif 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 ) bool shortDate = KOPrefs::instance()->mShortDateInViewer; - if (mode == 0 ) + if (mode == 0 ) { addTag("h2",i18n("Journal from: ")); + } else { @@ -505,3 +506,2 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) } - addTag("h3",i18n( "Last modified " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); } @@ -509,2 +509,3 @@ void KOEventViewer::appendJournal(Journal *jour, int mode ) mText.append(i18n("<h3> %1 </h3> ").arg(jour->dtStartDateStr(KOPrefs::instance()->mShortDateInViewer))); + addTag("b",i18n( "Last modified: " ) + KGlobal::locale()->formatDateTime(jour->lastModified(),shortDate ) ); 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 @@ #include <qdir.h> +#include <qregexp.h> @@ -167,3 +168,7 @@ bool ListItemVisitor::visit(Journal * j) { - mItem->setText(0,i18n("Journal")); + QString des = j->description().left(50); + des = des.simplifyWhiteSpace (); + des.replace (QRegExp ("\\n"),"" ); + des.replace (QRegExp ("\\r"),"" ); + mItem->setText(0,i18n("Journal")+": "+des.left(25)); mItem->setText(1,j->dtStartDateStr()); @@ -177,2 +182,3 @@ bool ListItemVisitor::visit(Journal * j) mItem->setText(9,"---"); + mItem->setText(10,i18n("Last Modified: ")+ KGlobal::locale()->formatDateTime( j->lastModified() , true) ); @@ -691,2 +697,3 @@ void KOListView::showDates(const QDate &start, const QDate &end) QDate date = start; + QPtrList<Journal> j_list; while( date <= end ) { @@ -694,4 +701,8 @@ void KOListView::showDates(const QDate &start, const QDate &end) addTodos(calendar()->todos(date)); + Journal* jo = calendar()->journal(date); + if ( jo ) + j_list.append( jo ); date = date.addDays( 1 ); } + addJournals(j_list); 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 @@ #endif +#include <qtextcodec.h> @@ -99,2 +100,3 @@ int main( int argc, char **argv ) } + 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$ #include <qpushbutton.h> +#include <qapplication.h> @@ -67,4 +68,10 @@ getMasterPwWnd::getMasterPwWnd( QWidget* parent, const char* name) #ifndef DESKTOP_VERSION - numberBox->setFixedHeight(150); - numberBox->setFixedWidth(150); + if ( QApplication::desktop()->width() > 320 ) { + numberBox->setFixedHeight(250); + numberBox->setFixedWidth(200); + } + else{ + numberBox->setFixedHeight(150); + numberBox->setFixedWidth(150); + } #endif |