37 #include "aboutdata.h"
38 #include "certmanager.h"
40 #include <kleo/cryptobackendfactory.h>
42 #include <tdeapplication.h>
43 #include <tdecmdlineargs.h>
44 #include <tdemessagebox.h>
45 #include <tdelocale.h>
46 #include <tdeglobal.h>
47 #include <kiconloader.h>
49 int main( int argc, char** argv )
53 TDECmdLineArgs::init(argc, argv, &aboutData);
54 static const TDECmdLineOptions options[] = {
55 { "external" , I18N_NOOP( "Search for external certificates initially"), 0 },
56 { "query " , I18N_NOOP( "Initial query string"), 0 },
57 { "import-certificate ", I18N_NOOP( "Name of certificate file to import"), 0 },
60 TDECmdLineArgs::addCmdLineOptions( options );
64 TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
66 TDEGlobal::locale()->insertCatalogue( "libkleopatra" );
67 TDEGlobal::iconLoader()->addAppDir( "libkleopatra" );
69 if( !Kleo::CryptoBackendFactory::instance()->smime() ) {
71 i18n( "<qt>The crypto plugin could not be initialized.<br>"
72 "Certificate Manager will terminate now.</qt>") );
76 CertManager* manager = new CertManager( args->isSet( "external"),
77 TQString::fromLocal8Bit(args->getOption( "query")),
78 TQString::fromLocal8Bit(args->getOption( "import-certificate")) );
|