Example #1
0
int main(int argc, char **argv)
{
    KLocale::setMainCatalogue("korganizer");
    KAboutData aboutData("korgac", I18N_NOOP("KOrganizer Reminder Daemon"),
                         korgacVersion, I18N_NOOP("KOrganizer Reminder Daemon"),
                         KAboutData::License_GPL,
                         "(c) 2003 Cornelius Schumacher",
                         0, "http://pim.kde.org");
    aboutData.addAuthor("Cornelius Schumacher", I18N_NOOP("Maintainer"),
                        "*****@*****.**");
    aboutData.addAuthor("Reinhold Kainhofer", I18N_NOOP("Maintainer"),
                        "*****@*****.**");

    KCmdLineArgs::init(argc, argv, &aboutData);
    KCmdLineArgs::addCmdLineOptions(options);
    KUniqueApplication::addCmdLineOptions();

    if(!MyApp::start()) exit(0);

    MyApp app;
    app.disableSessionManagement();
    KGlobal::locale()->insertCatalogue("libkcal");

    return app.exec();
}
Example #2
0
int main(int argc, char **argv) {
	static KCmdLineOptions options[] = {
		{"show", I18N_NOOP("Show window on startup"), 0},
		{"kwalletd", I18N_NOOP("For use by kwalletd only"), 0},
		{"+name", I18N_NOOP("A wallet name"), 0},
		KCmdLineLastOption
	};

	KAboutData about("kwalletmanager", I18N_NOOP("KDE Wallet Manager"), "1.1",
		I18N_NOOP("KDE Wallet Management Tool"),
		KAboutData::License_GPL,
		I18N_NOOP("(c) 2003,2004 George Staikos"), 0,
		"http://www.kde.org/");

	about.addAuthor("George Staikos", I18N_NOOP("Primary author and maintainer"), "*****@*****.**");
	about.addAuthor("Isaac Clerencia", I18N_NOOP("Developer"), "*****@*****.**");

	KCmdLineArgs::init(argc, argv, &about);
	KCmdLineArgs::addCmdLineOptions(options);

	if (!KUniqueApplication::start()) {
		return 0;
	}

	MyApp a;

	KWalletManager wm;
	wm.setCaption(i18n("KDE Wallet Manager"));

	a.setMainWidget(&wm);

	KGlobal::dirs()->addResourceType("kwallet", "share/apps/kwallet");

	KCmdLineArgs *args = KCmdLineArgs::parsedArgs();

	if (args->isSet("show")) {
		wm.show();
	}

	if (args->isSet("kwalletd")) {
		wm.kwalletdLaunch();
	}

	for (int i = 0; i < args->count(); ++i) {
		QString fn = QFileInfo(args->arg(i)).absFilePath();
		KMimeType::Ptr ptr;
		if (QFile::exists(fn) &&
			(ptr = KMimeType::findByFileContent(fn)) &&
			ptr->is("application/x-kde-wallet")) {
			wm.openWalletFile(fn);
		} else {
			wm.openWallet(args->arg(i));
		}
	}
	args->clear();
	return a.exec();
}
Example #3
0
int main (int argc, char **argv)
{
  KAboutData aboutData( "kfax", I18N_NOOP("KFax"),
      KFAXVERSION, description, KAboutData::License_GPL,
      "(c) 1997-98 Bernd Johannes Wuebben");
  aboutData.addAuthor( "Bernd Johannes Wuebben", 0, "*****@*****.**" );
  aboutData.addCredit( "Nadeem Hasan", I18N_NOOP( "UI Rewrite, lots of code "
      "cleanups and fixes" ), "*****@*****.**" );
  aboutData.addCredit( "Helge Deller", I18N_NOOP( "Printing Rewrite, lots of code "
      "cleanups and fixes"), "*****@*****.**" );

  KCmdLineArgs::init(argc, argv, &aboutData);
  KCmdLineArgs::addCmdLineOptions( options );

  MyApp a;

  qtdisplay = qt_xdisplay();

  viewfaxmain();

  toplevel = new TopLevel();
  toplevel->show();

  startingup = 1;
  a.processEvents();
  a.flushX();

  startingup = 0;

  faxinit();
  if(!have_no_fax){

    thispage = firstpage;

    toplevel->newPage();
    toplevel->resizeView();
    //TODO : I don't think I need this putImage();
    toplevel->putImage();
  }

  toplevel->uiUpdate();

  return a.exec ();
}