Beispiel #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;
}
Beispiel #2
0
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
    //  GS 5/2001 - I changed the name to "KDE" to make it look better
    //              in the titles of dialogs which are displayed.
    KAboutData aboutdata("kuiserver", "kdelibs4", ki18n("Job Manager"),
                         "0.8", ki18n("KDE Job Manager"),
                         KAboutData::License_GPL_V2, ki18n("(C) 2000-2009, KDE Team"));

    aboutdata.addAuthor(ki18n("Shaun Reich"), ki18n("Maintainer"), "*****@*****.**");
    aboutdata.addAuthor(ki18n("Rafael Fernández López"), ki18n("Former Maintainer"), "*****@*****.**");
    aboutdata.addAuthor(ki18n("David Faure"), ki18n("Former maintainer"), "*****@*****.**");
    aboutdata.addAuthor(ki18n("Matej Koss"), ki18n("Developer"), "*****@*****.**");

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

    if (!KUniqueApplication::start()) {
        kDebug(7024) << "kuiserver is already running!";
        return 0;
    }

    KUniqueApplication app;

    // This app is started automatically, no need for session management
    app.disableSessionManagement();
    app.setQuitOnLastWindowClosed(false);

    ProgressListModel model;

    return app.exec();
}
Beispiel #3
0
int main(int argc, char **argv)
{
    KAboutData aboutdata("ksyndaemon", "kcm_touchpad", ki18n("KSyndaemon"),
                         "0.1", ki18n("KDE Synaptics touchpad activity monitor"),
                         KAboutData::License_GPL, ki18n("(C) 2009"));
    aboutdata.addAuthor(ki18n("Andrey Borzenkov"),ki18n("Author"),"*****@*****.**");
    aboutdata.setBugAddress("http://kde-apps.org/content/show.php/kcm_touchpad?content=113335");

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

    // initialize application
    if ( !KSyndaemon::start() ) {
        kDebug() << "Running ksyndaemon found";
        return 0;
    }

    // do not connect to ksmserver at all, ksyndaemon is launched on demand
    // and doesn't need to know about logout
    unsetenv( "SESSION_MANAGER" ); 
    KSyndaemon(app);
    
    // start syndaemon
    // listen to D-Bus reconfiguration events
    app.exec();
}
Beispiel #4
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();
}
Beispiel #5
0
int main(int argc, char **argv)
{
    KAboutData aboutdata("knotify", "knotify4", ki18n("KNotify"),
                         "4.0", ki18n("KDE Notification Daemon"),
                         KAboutData::License_GPL, ki18n("(C) 1997-2008, KDE Developers"));
    aboutdata.addAuthor(ki18n("Olivier Goffart"),ki18n("Current Maintainer"),"*****@*****.**");
    aboutdata.addAuthor(ki18n("Carsten Pfeiffer"),ki18n("Previous Maintainer"),"*****@*****.**");
    aboutdata.addAuthor(ki18n("Christian Esken"),KLocalizedString(),"*****@*****.**");
    aboutdata.addAuthor(ki18n("Stefan Westerfeld"),ki18n("Sound support"),"*****@*****.**");
    aboutdata.addAuthor(ki18n("Charles Samuels"),ki18n("Previous Maintainer"),"*****@*****.**");
    aboutdata.addAuthor(ki18n("Allan Sandfeld Jensen"),ki18n("Porting to KDE 4"),"*****@*****.**");

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

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

    // do not connect to ksmserver at all, knotify is launched on demand and doesn't need
    // to know about logout, and moreover it may be ksmserver who tries to launch knotify,
    // in which case there is a deadlock with ksmserver waiting for knotify to finish
    // startup and knotify waiting to register with ksmserver
    unsetenv( "SESSION_MANAGER" ); 
    KUniqueApplication app;
    
    /*
     * the default KMessageBoxMessageHandler will do messagesbox that notify
     * so we have a deadlock if one debug message is shown as messagebox.
     * that's why we're forced to change the default handler
     */
    KMessage::setMessageHandler( new KPassivePopupMessageHandler(0) );

    // start notify service
    KNotify notify;

    return app.exec();
}
Beispiel #6
0
extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
    {
    // Disable Session Management the right way (C)
    //
    // ksmserver has global shortcuts. disableSessionManagement() does not prevent Qt from
    // registering the app with the session manager. We remove the address to make sure we do not
    // get a hang on kglobalaccel restart (kglobalaccel tries to register with ksmserver,
    // ksmserver tries to register with kglobalaccel).
    unsetenv( "SESSION_MANAGER" );
#ifdef Q_OS_MAC
    CFBundleRef mainBundle = CFBundleGetMainBundle();
    if (mainBundle) {
        // get the application's Info Dictionary. For app bundles this would live in the bundle's Info.plist,
        // for regular executables it is obtained in another way.
        CFMutableDictionaryRef infoDict = (CFMutableDictionaryRef) CFBundleGetInfoDictionary(mainBundle);
        if (infoDict) {
            // Add or set the "LSUIElement" key with/to value "1". This can simply be a CFString.
            CFDictionarySetValue(infoDict, CFSTR("LSUIElement"), CFSTR("1"));
            // That's it. We're now considered as an "agent" by the window server, and thus will have
            // neither menubar nor presence in the Dock or App Switcher.
        }
    }
#endif

    KAboutData aboutdata(
            "kglobalaccel",
            0,
            ki18n("KDE Global Shortcuts Service"),
            "0.2",
            ki18n("KDE Global Shortcuts Service"),
            KAboutData::License_LGPL,
            ki18n("(C) 2007-2009  Andreas Hartmetz, Michael Jansen"));
    aboutdata.addAuthor(ki18n("Andreas Hartmetz"),ki18n("Maintainer"),"*****@*****.**");
    aboutdata.addAuthor(ki18n("Michael Jansen"),ki18n("Maintainer"),"*****@*****.**");

    aboutdata.setProgramIconName("kglobalaccel");

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

    // check if kglobalaccel is disabled
    if (!isEnabled())
        {
        kDebug() << "kglobalaccel is disabled!";
        return 0;
        }

    if (!KUniqueApplication::start())
        {
        kDebug() << "kglobalaccel is already running!";
        return (0);
        }

    // As in the KUniqueApplication example only create a instance AFTER
    // calling KUniqueApplication::start()
    KUniqueApplication app;

    // This app is started automatically, no need for session management
    app.disableSessionManagement();
    app.setQuitOnLastWindowClosed( false );

    // Stop gracefully
    //There is no SIGINT and SIGTERM under wince
#ifndef _WIN32_WCE
    KDE_signal(SIGINT, sighandler);
    KDE_signal(SIGTERM, sighandler);
#endif
    KDE_signal(SIGHUP, sighandler);

    // Restart on a crash
    KCrash::setFlags(KCrash::AutoRestart);

    KGlobalAccelD globalaccel;
    if (!globalaccel.init()) {
        return -1;
    }

    return app.exec();
    }