22 #include <KAboutApplicationDialog>
25 #include <KApplication>
26 #include <KCmdLineArgs>
29 #include <KMessageBox>
30 #include <KNotification>
32 #include <QtGui/QPixmap>
33 #include <QtGui/qwindowdefs.h>
35 #ifdef KRFB_WITH_TELEPATHY_TUBES
40 #include <X11/extensions/XTest.h>
42 static const char description[] = I18N_NOOP(
"VNC-compatible server to share "
47 int bp1, bp2, majorv, minorv;
48 Bool r = XTestQueryExtension(QX11Info::display(), &bp1, &bp2,
51 if ((!r) || (((majorv * 1000) + minorv) < 2002)) {
53 i18n(
"Your X11 Server does not support the required XTest extension "
54 "version 2.2. Sharing your desktop is not possible."),
55 i18n(
"Desktop Sharing Error"));
62 int main(
int argc,
char *argv[])
64 KAboutData aboutData(
"krfb", 0, ki18n(
"Desktop Sharing"), KDE_VERSION_STRING,
66 ki18n(
"(c) 2009-2010, Collabora Ltd.\n"
67 "(c) 2007, Alessandro Praduroux\n"
68 "(c) 2001-2003, Tim Jansen\n"
69 "(c) 2001, Johannes E. Schindelin\n"
70 "(c) 2000-2001, Const Kaplinsky\n"
71 "(c) 2000, Tridia Corporation\n"
72 "(c) 1999, AT&T Laboratories Boston\n"));
73 aboutData.addAuthor(ki18n(
"George Goldberg"),
74 ki18n(
"Telepathy tubes support"),
75 "george.goldberg@collabora.co.uk");
76 aboutData.addAuthor(ki18n(
"George Kiagiadakis"),
78 "george.kiagiadakis@collabora.co.uk");
79 aboutData.addAuthor(ki18n(
"Alessandro Praduroux"), ki18n(
"KDE4 porting"),
"pradu@pradu.it");
80 aboutData.addAuthor(ki18n(
"Tim Jansen"), ki18n(
"Original author"),
"tim@tjansen.de");
81 aboutData.addCredit(ki18n(
"Johannes E. Schindelin"),
82 ki18n(
"libvncserver"));
83 aboutData.addCredit(ki18n(
"Const Kaplinsky"),
84 ki18n(
"TightVNC encoder"));
85 aboutData.addCredit(ki18n(
"Tridia Corporation"),
86 ki18n(
"ZLib encoder"));
87 aboutData.addCredit(ki18n(
"AT&T Laboratories Boston"),
88 ki18n(
"original VNC encoders and "
90 KCmdLineArgs::init(argc, argv, &aboutData);
92 KCmdLineOptions options;
93 options.add(
"nodialog", ki18n(
"Do not show the invitations management dialog at startup"));
94 KCmdLineArgs::addCmdLineOptions(options);
97 app.setQuitOnLastWindowClosed(
false);
106 #ifdef KRFB_WITH_TELEPATHY_TUBES
112 TrayIcon trayicon(&invitationsDialog);
114 if (app.isSessionRestored() && KMainWindow::canBeRestored(1)) {
115 invitationsDialog.restore(1,
false);
116 }
else if (KCmdLineArgs::parsedArgs()->isSet(
"dialog")) {
117 invitationsDialog.show();
122 sigaddset(&sigs, SIGPIPE);
123 sigprocmask(SIG_BLOCK, &sigs, 0);
static const char description[]
int main(int argc, char *argv[])
static bool checkX11Capabilities()