Exemplo n.º 1
0
KDE_EXPORT int kdemain(int argc, char **argv)
{
    KAboutData aboutdata("knotify", I18N_NOOP("KNotify"), "3.0", I18N_NOOP("KDE Notification Server"), KAboutData::License_GPL,
                         "(C) 1997-2003, KDE Developers");
    aboutdata.addAuthor("Carsten Pfeiffer", I18N_NOOP("Current Maintainer"), "*****@*****.**");
    aboutdata.addAuthor("Christian Esken", 0, "*****@*****.**");
    aboutdata.addAuthor("Stefan Westerfeld", I18N_NOOP("Sound support"), "*****@*****.**");
    aboutdata.addAuthor("Charles Samuels", I18N_NOOP("Previous Maintainer"), "*****@*****.**");

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


    // initialize application
    if(!KUniqueApplication::start())
    {
        kdDebug() << "Running knotify found" << endl;
        return 0;
    }

    KUniqueApplication app;
    app.disableSessionManagement();

    // start notify service
    KNotify *notify = new KNotify();

    app.dcopClient()->setDefaultObject("Notify");
    app.dcopClient()->setDaemonMode(true);
    // kdDebug() << "knotify starting" << endl;

    int ret = app.exec();
    delete notify;

    return ret;
}
Exemplo n.º 2
0
int main(int argc, char *argv[])
{
    KAboutData aboutData( "amor", I18N_NOOP("amor"),
        AMOR_VERSION, description, KAboutData::License_GPL,
        "(c) 1999, Martin R. Jones");
    aboutData.addAuthor("Martin R. Jones",0, "*****@*****.**");
    aboutData.addAuthor("Gerardo Puga", I18N_NOOP("Current maintainer"), "*****@*****.**"); 
    KCmdLineArgs::init( argc, argv, &aboutData );

    if (!KUniqueApplication::start()) {
	fprintf(stderr, "%s is already running!\n", aboutData.appName());
	exit(0);
    }
    KUniqueApplication app;

    // session management
    AmorSessionWidget *sessionWidget = new AmorSessionWidget;
    app.setTopWidget(sessionWidget);

    new Amor();

    app.dcopClient()->setDefaultObject( "AmorIface" );

    return app.exec();
}
Exemplo n.º 3
0
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
    KLocale::setMainCatalogue("kdelibs");
    //  GS 5/2001 - I changed the name to "KDE" to make it look better
    //              in the titles of dialogs which are displayed.
    KAboutData aboutdata("kio_uiserver", I18N_NOOP("KDE"), "0.8", I18N_NOOP("KDE Progress Information UI Server"), KAboutData::License_GPL,
                         "(C) 2000, David Faure & Matt Koss");
    // Who's the maintainer ? :)
    aboutdata.addAuthor("David Faure", I18N_NOOP("Developer"), "*****@*****.**");
    aboutdata.addAuthor("Matej Koss", I18N_NOOP("Developer"), "*****@*****.**");

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

    if(!KUniqueApplication::start())
    {
        kdDebug(7024) << "kio_uiserver is already running!" << endl;
        return (0);
    }

    KUniqueApplication app;

    // This app is started automatically, no need for session management
    app.disableSessionManagement();
    app.dcopClient()->setDaemonMode(true);

    uiserver = UIServer::createInstance();

    //    app.setMainWidget( uiserver );

    return app.exec();
}