[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kabc
From: Tobias Koenig <tokoe () kde ! org>
Date: 2004-07-25 21:04:28
Message-ID: 20040725210428.C01309976 () office ! kde ! org
[Download RAW message or body]
CVS commit by tokoe:
Don't show the error message when no old kab2 address book file is found.
CCMAIL:85459@bugs.kde.org
M +12 -4 kab2kabc.cpp 1.22
M +1 -1 kab2kabc.desktop 1.86
--- kdelibs/kabc/kab2kabc.cpp #1.21:1.22
@@ -41,4 +41,5 @@ static const KCmdLineOptions options[] =
{
{"disable-autostart", I18N_NOOP("Disable automatic startup on login"), 0},
+ {"quiet", "", 0},
{"o", 0, 0},
{"override", I18N_NOOP("Override existing entries"),"1"},
@@ -287,11 +288,13 @@ void readKAddressBookEntries( const QStr
}
-void importKab( KABC::AddressBook *ab, bool override )
+void importKab( KABC::AddressBook *ab, bool override, bool quiet )
{
QString fileName = KGlobal::dirs()->saveLocation( "data", "kab/" );
fileName += "addressbook.kab";
if (!QFile::exists( fileName )) {
+ if ( !quiet ) {
KMessageBox::error( 0, "<qt>" + i18n( "Address book file <b>%1</b> not found! \
Make sure the old address book is located there and you have read permission for this \
file." )
.arg( fileName ) + "</qt>" );
+ }
kdDebug(5700) << "No KDE 2 addressbook found." << endl;
return;
@@ -459,4 +462,9 @@ int main(int argc,char **argv)
}
+ bool quiet = false;
+
+ if ( args->isSet( "quiet" ) )
+ quiet = true;
+
if ( args->isSet( "disable-autostart" ) ) {
kdDebug() << "Disable autostart." << endl;
@@ -471,5 +479,5 @@ int main(int argc,char **argv)
importKMailAddressBook( kabcBook );
- importKab( kabcBook, override );
+ importKab( kabcBook, override, quiet );
StdAddressBook::save();
--- kdelibs/kabc/kab2kabc.desktop #1.85:1.86
@@ -15,5 +15,5 @@
Name[xx]=xxkab2kabcxx
Name[zu]=i-kab2kabc
-Exec=kab2kabc --disable-autostart
+Exec=kab2kabc --disable-autostart --quiet
Icon=misc
Type=Application
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic