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>
40 static const char description
[] = I18N_NOOP("VNC-compatible server to share "
44 int main(int argc
, char *argv
[])
46 KAboutData
aboutData( "krfb", I18N_NOOP("Desktop Sharing"),
47 VERSION
, description
, KAboutData::License_GPL
,
48 "(c) 2007, Alessandro Praduroux\n"
49 "(c) 2001-2003, Tim Jansen\n"
50 "(c) 2001, Johannes E. Schindelin\n"
51 "(c) 2000, heXoNet Support GmbH, D-66424 Homburg\n"
52 "(c) 2000-2001, Const Kaplinsky\n"
53 "(c) 2000, Tridia Corporation\n"
54 "(c) 1999, AT&T Laboratories Cambridge\n");
55 aboutData
.addAuthor("Alessandro Praduroux", I18N_NOOP("KDE4 porting"), "pradu@pradu.it");
56 aboutData
.addAuthor("Tim Jansen", "", "tim@tjansen.de");
57 aboutData
.addAuthor("Ian Reinhart Geiser", I18N_NOOP("DCOP interface"), "geiseri@kde.org");
58 aboutData
.addCredit("Johannes E. Schindelin",
59 I18N_NOOP("libvncserver"));
60 aboutData
.addCredit("Const Kaplinsky",
61 I18N_NOOP("TightVNC encoder"));
62 aboutData
.addCredit("Tridia Corporation",
63 I18N_NOOP("ZLib encoder"));
64 aboutData
.addCredit("AT&T Laboratories Cambridge",
65 I18N_NOOP("original VNC encoders and "
67 aboutData
.addCredit("Jens Wagner (heXoNet Support GmbH)",
68 I18N_NOOP("X11 update scanner, "
69 "original code base"));
70 aboutData
.addCredit("Jason Spisak",
71 I18N_NOOP("Connection side image"),
73 aboutData
.addCredit("Karl Vogel",
74 I18N_NOOP("KDesktop background deactivation"));
75 KCmdLineArgs::init(argc
, argv
, &aboutData
);
79 TrayIcon
trayicon(new ManageInvitationsDialog
);
81 KrfbServer
*server
= KrfbServer::self(); // initialize the server manager
82 if (!server
->checkX11Capabilities()) {
86 QObject::connect(&trayicon
, SIGNAL(enableDesktopControl(bool)),
87 server
, SLOT(enableDesktopControl(bool)));
88 QObject::connect(server
, SIGNAL(sessionEstablished(QString
)),
89 &trayicon
, SLOT(showConnectedMessage(QString
)));
90 QObject::connect(server
, SIGNAL(sessionFinished()),
91 &trayicon
, SLOT(showDisconnectedMessage()));
92 QObject::connect(server
, SIGNAL(desktopControlSettingChanged(bool)),
93 &trayicon
, SLOT(setDesktopControlSetting(bool)));
94 QObject::connect(&trayicon
, SIGNAL(quitSelected()),
95 server
, SLOT(disconnectAndQuit()));
96 QObject::connect(server
, SIGNAL(quitApp()),
101 sigaddset(&sigs
, SIGPIPE
);
102 sigprocmask(SIG_BLOCK
, &sigs
, 0);