00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 #include <tdecmdlineargs.h>
00020 #include <tdeaboutdata.h>
00021 #include <kuniqueapplication.h>
00022 #include <tdelocale.h>
00023 #include <kdebug.h>
00024 
00025 
00026 #include "uniqueapp.h"
00027 #include "kshowmail.h"
00028 #include "constants.h"
00029 
00030 using namespace Constants;
00031 
00032 
00033 static const char *description = I18N_NOOP("A powerful pop3 mail checker");
00034 
00035 
00036 
00037 static TDECmdLineOptions kshowmailOptions[] =
00038   {
00039     { CMDLINE_REFRESH_SHORT, 0, 0},
00040     { CMDLINE_REFRESH, I18N_NOOP("Refresh messages now"), 0 },
00041     { CMDLINE_CONFIG_SHORT, 0, 0},
00042     { CMDLINE_CONFIG, I18N_NOOP("Launch configure dialog"), 0 },
00043     TDECmdLineLastOption
00044   };
00045 
00046 int main(int argc, char *argv[])
00047 {
00048   
00049   KShowMailApp::m_pAbout = new TDEAboutData (
00050                               "kshowmail",
00051                               "KShowmail",
00052                               VERSION,
00053                               description,
00054                               TDEAboutData::License_GPL_V2,
00055                               "(C) 2000-2005, Eggert Ehmke",
00056                               0,
00057                               "http://sourceforge.net/projects/kshowmail",
00058                               "eggert.ehmke@berlin.de");
00059 
00060   
00061   KShowMailApp::m_pAbout->addAuthor ("Eggert Ehmke", 0, "eggert.ehmke@berlin.de", "http://kshowmail.sourceforge.net");
00062   KShowMailApp::m_pAbout->addAuthor ("Allistar Melville", 0, "allistar@silvermoon.co.nz", 0);
00063   KShowMailApp::m_pAbout->addAuthor ("Oleg Ivanov", 0, "saruman@unigsm.com", 0);
00064   KShowMailApp::m_pAbout->addAuthor( "Ulrich Weigelt", 0, "ulrich.weigelt@gmx.de", 0 );
00065   KShowMailApp::m_pAbout->setTranslator(I18N_NOOP("_: NAME OF TRANSLATORS\nYour names") ,I18N_NOOP("_: EMAIL OF TRANSLATORS\nYour emails"));
00066 
00067   
00068   TDECmdLineArgs::init(argc, argv, KShowMailApp::m_pAbout);
00069   
00070   TDECmdLineArgs::addCmdLineOptions(kshowmailOptions);
00071 
00072   
00073 #if 0
00074 
00075   kdDebug () << "KShowmail running in debug mode" << endl;
00076   TDEApplication::addCmdLineOptions();
00077 
00078   TDEApplication app;
00079   KShowMailApp* kshow = new KShowMailApp ();
00080   kshow->show();
00081   app.exec();
00082 
00083 #else
00084 
00085   
00086   kdDebug () << "KShowmail running in normal mode" << endl;
00087 
00088   
00089   KUniqueApplication::addCmdLineOptions();
00090 
00091   
00092   if (KUniqueApplication::start())
00093   {
00094     
00095 
00096     
00097     
00098     
00099     UniqueApp* app = new UniqueApp ();
00100 
00101     
00102     app->exec ();
00103   }
00104   else
00105   {
00106     
00107     kdWarning() << I18N_NOOP ("Kshowmail is already running!") << endl;
00108   }
00109 
00110 #endif
00111 
00112   return 0;
00113 }
00114