1 /***************************************************************************
4 begin : Sat Dec 8 03:23:02 CET 2001
5 copyright : (C) 2001-2003 by Tim Jansen
7 ***************************************************************************/
9 /***************************************************************************
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
16 ***************************************************************************/
19 //#include "configuration.h"
20 #include "krfbserver.h"
21 #include "manageinvitationsdialog.h"
26 #include <KNotification>
27 #include <ksystemtrayicon.h>
28 #include <kcmdlineargs.h>
29 #include <kaboutdata.h>
30 #include <kaboutapplicationdialog.h>
32 #include <kapplication.h>
33 #include <kmessagebox.h>
34 #include <qwindowdefs.h>
41 static const char description
[] = I18N_NOOP("VNC-compatible server to share "
45 int main(int argc
, char *argv
[])
47 KAboutData
aboutData( "krfb", 0, ki18n("Desktop Sharing"),
48 VERSION
, ki18n(description
), KAboutData::License_GPL
,
49 ki18n("(c) 2007, Alessandro Praduroux\n"
50 "(c) 2001-2003, Tim Jansen\n"
51 "(c) 2001, Johannes E. Schindelin\n"
52 "(c) 2000, heXoNet Support GmbH, D-66424 Homburg\n"
53 "(c) 2000-2001, Const Kaplinsky\n"
54 "(c) 2000, Tridia Corporation\n"
55 "(c) 1999, AT&T Laboratories Boston\n"));
56 aboutData
.addAuthor(ki18n("Alessandro Praduroux"), ki18n("KDE4 porting"), "pradu@pradu.it");
57 aboutData
.addAuthor(ki18n("Tim Jansen"), KLocalizedString(), "tim@tjansen.de");
58 aboutData
.addAuthor(ki18n("Ian Reinhart Geiser"), ki18n("DCOP interface"), "geiseri@kde.org");
59 aboutData
.addCredit(ki18n("Johannes E. Schindelin"),
60 ki18n("libvncserver"));
61 aboutData
.addCredit(ki18n("Const Kaplinsky"),
62 ki18n("TightVNC encoder"));
63 aboutData
.addCredit(ki18n("Tridia Corporation"),
64 ki18n("ZLib encoder"));
65 aboutData
.addCredit(ki18n("AT&T Laboratories Boston"),
66 ki18n("original VNC encoders and "
68 aboutData
.addCredit(ki18n("Jens Wagner (heXoNet Support GmbH)"),
69 ki18n("X11 update scanner, "
70 "original code base"));
71 aboutData
.addCredit(ki18n("Jason Spisak"),
72 ki18n("Connection side image"),
74 aboutData
.addCredit(ki18n("Karl Vogel"),
75 ki18n("KDesktop background deactivation"));
76 KCmdLineArgs::init(argc
, argv
, &aboutData
);
79 QApplication::setWindowIcon(KIcon("krfb"));
80 TrayIcon
trayicon(new ManageInvitationsDialog
);
82 KrfbServer
*server
= KrfbServer::self(); // initialize the server manager
83 if (!server
->checkX11Capabilities()) {
87 QObject::connect(&trayicon
, SIGNAL(enableDesktopControl(bool)),
88 server
, SLOT(enableDesktopControl(bool)));
89 QObject::connect(server
, SIGNAL(sessionEstablished(QString
)),
90 &trayicon
, SLOT(showConnectedMessage(QString
)));
91 QObject::connect(server
, SIGNAL(sessionFinished()),
92 &trayicon
, SLOT(showDisconnectedMessage()));
93 QObject::connect(server
, SIGNAL(desktopControlSettingChanged(bool)),
94 &trayicon
, SLOT(setDesktopControlSetting(bool)));
95 QObject::connect(&trayicon
, SIGNAL(quitSelected()),
96 server
, SLOT(disconnectAndQuit()));
97 QObject::connect(server
, SIGNAL(quitApp()),
102 sigaddset(&sigs
, SIGPIPE
);
103 sigprocmask(SIG_BLOCK
, &sigs
, 0);