1
0
mirror of https://github.com/KDE/krfb synced 2026-07-02 00:01:18 -07:00

Compare commits

...

6 Commits

Author SHA1 Message Date
George Kiagiadakis
aa8e7eff3c Backport r877454.
Show the ManageInvitationsDialog on startup, so that users are not confused
by the absence of a main window.
CCBUG: 167953


svn path=/branches/KDE/4.1/kdenetwork/krfb/; revision=877455
2008-10-29 15:32:38 +00:00
George Kiagiadakis
b7b26c6876 Backport r877254.
Integrate the rfb event system with qt's event loop instead of running a custom event loop in KrfbServer.
This fixes the major problem that modal dialogs were closing immediately after they were shown,
which caused huge usability issues.
CCBUG: 167955


svn path=/branches/KDE/4.1/kdenetwork/krfb/; revision=877255
2008-10-29 00:21:31 +00:00
Script Kiddy
8ed3620496 SVN_SILENT made messages (.desktop file)
svn path=/branches/KDE/4.1/kdenetwork/krfb/; revision=874287
2008-10-21 06:51:23 +00:00
Script Kiddy
f7e96e7563 SVN_SILENT made messages (.desktop file)
svn path=/branches/KDE/4.1/kdenetwork/krfb/; revision=871194
2008-10-14 06:17:08 +00:00
Script Kiddy
a77f6423f4 SVN_SILENT made messages (.desktop file)
svn path=/branches/KDE/4.1/kdenetwork/krfb/; revision=853066
2008-08-27 06:05:19 +00:00
Script Kiddy
25bfb5e714 SVN_SILENT made messages (.desktop file)
svn path=/branches/KDE/4.1/kdenetwork/krfb/; revision=831631
2008-07-12 23:36:58 +00:00
5 changed files with 45 additions and 30 deletions

View File

@@ -42,7 +42,7 @@ Name[ms]=Daemon Internet KDE
Name[nb]=KDEs Internett-nisse
Name[nds]=KDE-Internetdämoon
Name[ne]=केडीई इन्टरनेट डेइमोन
Name[nn]=KDE-Internett-nisse
Name[nn]=KDE-Internett-teneste
Name[pl]=Internet/sieć
Name[pt]=Servidor de Internet do KDE
Name[pt_BR]=Servidor Internet do KDE
@@ -98,7 +98,7 @@ Comment[nb]=Internett-nisse som starter nettverkstjenester ved behov
Comment[nds]=En Internet-Dämoon, wat Nettwarkdeensten op Anfraag start
Comment[ne]=एउटा इन्टरनेट डेइमोन जसले मागमा सञ्जाल सेवा सुरु गर्दछ
Comment[nl]=Een internetdaemon die netwerkdiensten op afroep start
Comment[nn]=Internett-nisse som startar nettverkstenester når dei trengst
Comment[nn]=Internett-teneste som startar nettverkstenester når dei trengst
Comment[pl]=Uruchamianie usług na żądanie
Comment[pt]=Um servidor da Internet que inicia os serviços de rede a pedido
Comment[pt_BR]=Um servidor Internet que inicia os serviços de rede por demanda

View File

@@ -82,6 +82,7 @@ Name[pa]=ਯੂਜ਼ਰ ਨੇ ਕੁਨੈਕਸ਼ਨ ਮਨਜ਼ੂਰ ਕ
Name[pl]=Połączenie zaakceptowane przez użytkownika
Name[pt]=O Utilizador Aceita a Ligação
Name[pt_BR]=Usuário aceita conexão
Name[ru]=Пользователь принимает соединения
Name[sl]=Uporabnik sprejel povezavo
Name[sv]=Användaren accepterar anslutning
Name[tr]=Kullanıcı Bağlantıyı Kabul Etti
@@ -171,6 +172,7 @@ Name[pa]=ਯੂਜ਼ਰ ਨੇ ਕੁਨੈਕਸ਼ਨ ਤੋਂ ਇਨਕਾ
Name[pl]=Połączenie odrzucone przez użytkownika
Name[pt]=O Utilizador Recusa a Ligação
Name[pt_BR]=Usuário rejeita conexão
Name[ru]=Пользователь отклоняет соединения
Name[sl]=Uporabnik zavrnil povezavo
Name[sv]=Användaren vägrar anslutning
Name[tr]=Kullanıcı Bağlantıyı Reddetti
@@ -215,7 +217,7 @@ Comment[pa]=ਯੂਜ਼ਰ ਨੇ ਕੁਨੈਕਸ਼ਨ ਤੋਂ ਇਨਕ
Comment[pl]=Użytkownik odrzuca połączenie
Comment[pt]=O utilizador recusa a ligação
Comment[pt_BR]=O usuário rejeita a conexão
Comment[ru]=Пользователь не принимает соединения
Comment[ru]=Пользователь отклоняет соединения
Comment[sk]=Užívateľ odmietol spojenie
Comment[sl]=Uporabnik zavrnil povezavo
Comment[sv]=Användaren vägrar anslutning
@@ -260,6 +262,7 @@ Name[pa]=ਕੁਨੈਕਸ਼ਨ ਬੰਦ ਕੀਤਾ
Name[pl]=Połączenia zakończone
Name[pt]=Ligação Fechada
Name[pt_BR]=Conexão fechada
Name[ru]=Соединение закрыто
Name[sl]=Povezava zaprta
Name[sv]=Anslutning stängd
Name[tr]=Bağlantı Kapatıldı
@@ -446,6 +449,7 @@ Name[pa]=ਗਲਤ ਪਾਸਵਰਡ ਸੱਦਾ
Name[pl]=Informacja o błędnym haśle
Name[pt]=Convites de Senha Inválidos
Name[pt_BR]=Avisos de senha inválida
Name[ru]=Неверный пароль приглашения
Name[sl]=Povabila z neveljavnimi gesli
Name[sv]=Ogiltigt lösenord vid inbjudan
Name[tr]=Geçersiz Parola Daveti
@@ -473,7 +477,7 @@ Comment[gl]=A parte convidante envioulle un contrasinal non válido. A conexón
Comment[he]=הצד המוזמן שלח סיסמה שגויה. החיבור נדחה.
Comment[hi]=निमंत्रित पार्टी ने अवैध पासवर्ड भेजा. कनेक्शन अस्वीकृत.
Comment[hr]=Stranka koju ste pozvali je poslala nevažeću šifru. Veza odbijena.
Comment[hu]=A meghívott fél érvénytelen jelszót küldött. A csatlakozás nem sikerült.
Comment[hu]=A meghívott fél érvénytelen jelszót küldött. A csatlakozási kérés elutasítva.
Comment[is]=Boðinn aðili sendi ógilt lykilorð. Tengingu hafnað
Comment[it]=La parte invitata ha inviato una password non valida. Connessione rifiutata.
Comment[ja]=招待された人が無効なパスワードを送ってきました。接続を拒否しました。
@@ -489,7 +493,7 @@ Comment[nl]=De uitgenodigde partij stuurde een ongeldig wachtwoord. De verbindin
Comment[pl]=Z drugiej strony podano błędne hasło. Połączenie odrzucone.
Comment[pt]=O utilizador convidado enviou uma senha inválida. A ligação foi recusada.
Comment[pt_BR]=A parte "convidada" enviou uma senha inválida. Conexão recusada.
Comment[ru]=Удалённый пользователь ввёл неверный пароль. В доступе отказано.
Comment[ru]=Приглашенный пользователь ввёл неверный пароль. Соединение отклонено.
Comment[sk]=Pozvaný účastnik poslal zlé heslo. Spojenie zamietnuté.
Comment[sl]=Povabljena stranka je poslala neveljavno geslo. Povezava zavrnjena.
Comment[sv]=Den inbjudna personen skickade ett ogiltigt lösenord. Anslutning vägrades.
@@ -622,6 +626,7 @@ Name[pa]=ਨਵਾਂ ਕੁਨੈਕਸ਼ਨ ਆਟੋ ਮਨਜ਼ੂਰ
Name[pl]=Nowe połączenie automatycznie przyjęte
Name[pt]=Nova Ligação Aceite Automaticamente
Name[pt_BR]=Nova Conexão com aceitação automática
Name[ru]=Новое соединение принимается автоматически
Name[sl]=Nova povezava samodejno sprejeta
Name[sv]=Ny anslutning accepterades automatiskt
Name[tr]=Yeni Bağlantı Otomatik olarak Kabul Edildi
@@ -711,6 +716,7 @@ Name[pa]=ਬਹੁਤ ਸਾਰੇ ਕੁਨੈਕਸ਼ਨ
Name[pl]=Zbyt wiele połączeń
Name[pt]=Demasiadas Ligações
Name[pt_BR]=Conexões em excesso
Name[ru]=Слишком много соединений
Name[sl]=Preveč povezav
Name[sv]=För många anslutningar
Name[tr]=Çok Fazla Bağlantı
@@ -756,7 +762,7 @@ Comment[pa]=ਬਿਜ਼ੀ, ਕੁਨੈਕਸ਼ਨ ਤੋਂ ਇਨਕਾਰ
Comment[pl]=Zajęte, połączenie odrzucone
Comment[pt]=Ocupado, pelo a ligação foi recusada
Comment[pt_BR]=Ocupado; conexão recusada
Comment[ru]=Занято, соединение закрыто
Comment[ru]=Занят, соединение отклонено
Comment[sk]=Zaneprázdneny, spojenie odmietnuté
Comment[sl]=Zaposlen, povezava zavrnjena
Comment[sv]=Upptagen, anslutning vägras
@@ -804,6 +810,7 @@ Name[pa]=ਅਣਜਾਣ ਕੁਨੈਕਸ਼ਨ
Name[pl]=Niespodziewane połączenie
Name[pt]=Ligação Inesperada
Name[pt_BR]=Conexão inesperada
Name[ru]=Неожиданное соединение
Name[sl]=Nepričakovana povezava
Name[sv]=Oväntad anslutning
Name[tr]=Beklenmeyen Bağlantı

View File

@@ -122,9 +122,9 @@ class KrfbServer::KrfbServerP {
FrameBuffer *fb;
QList< QPointer<ConnectionController> > controllers;
rfbScreenInfoPtr screen;
bool running;
int numClients;
QByteArray desktopName;
QTimer rfbProcessEventTimer;
};
class KrfbServerPrivate
@@ -144,7 +144,6 @@ KrfbServer::KrfbServer()
:d(new KrfbServerP)
{
kDebug() << "starting ";
d->running = true;
d->fb = FrameBuffer::getFrameBuffer(QApplication::desktop()->winId(), this);
QTimer::singleShot(0, this, SLOT(startListening()));
connect(InvitationManager::self(), SIGNAL(invitationNumChanged(int)),SLOT(updatePassword()));
@@ -200,7 +199,9 @@ void KrfbServer::startListening()
rfbInitServer(screen);
if (!rfbIsActive(screen)) {
KMessageBox::error(0,i18n("Address already in use"),"krfb");
disconnectAndQuit();
shutdown();
qApp->quit();
return;
};
if (KrfbConfig::publishService()) {
@@ -208,19 +209,31 @@ void KrfbServer::startListening()
service->publishAsync();
}
while (d->running) {
foreach(const QRect &r, d->fb->modifiedTiles()) {
rfbMarkRectAsModified(screen, r.x(), r.y(), r.right(), r.bottom());
}
rfbProcessEvents(screen, 100);
qApp->processEvents();
/* Integrate the rfb event mechanism with qt's event loop.
* Call processRfbEvents() every time the qt event loop is run,
* so that it also processes and delivers rfb events and call
* shutdown() when QApplication exits to shutdown the rfb server
* before the X11 connection goes down.
*/
connect(&d->rfbProcessEventTimer, SIGNAL(timeout()), SLOT(processRfbEvents()));
connect(qApp, SIGNAL(aboutToQuit()), SLOT(shutdown()));
d->rfbProcessEventTimer.start(0);
}
void KrfbServer::processRfbEvents()
{
foreach(const QRect &r, d->fb->modifiedTiles()) {
rfbMarkRectAsModified(d->screen, r.x(), r.y(), r.right(), r.bottom());
}
rfbShutdownServer(screen, true);
rfbProcessEvents(d->screen, 100);
}
void KrfbServer::shutdown()
{
rfbShutdownServer(d->screen, true);
// framebuffer has to be deleted before X11 connection goes down
delete d->fb;
d->fb = 0;
emit quitApp();
}
@@ -233,11 +246,6 @@ void KrfbServer::enableDesktopControl(bool enable)
}
}
void KrfbServer::disconnectAndQuit()
{
d->running = false;
}
enum rfbNewClientAction KrfbServer::handleNewClient(struct _rfbClientRec * cl)
{
ConnectionController *cc = new ConnectionController(cl, this);

View File

@@ -36,13 +36,13 @@ signals:
void sessionEstablished(QString);
void sessionFinished();
void desktopControlSettingChanged(bool);
void quitApp();
public Q_SLOTS:
void startListening();
void processRfbEvents();
void shutdown();
void enableDesktopControl(bool);
void disconnectAndQuit();
void updateSettings();
void updatePassword();
void clientDisconnected(ConnectionController *);

View File

@@ -75,7 +75,11 @@ int main(int argc, char *argv[])
KCmdLineArgs::init(argc, argv, &aboutData);
KApplication app;
TrayIcon trayicon(new ManageInvitationsDialog);
app.setQuitOnLastWindowClosed(false);
ManageInvitationsDialog invitationsDialog;
invitationsDialog.show();
TrayIcon trayicon(&invitationsDialog);
KrfbServer *server = KrfbServer::self(); // initialize the server manager
if (!server->checkX11Capabilities()) {
@@ -90,10 +94,6 @@ int main(int argc, char *argv[])
&trayicon, SLOT(showDisconnectedMessage()));
QObject::connect(server, SIGNAL(desktopControlSettingChanged(bool)),
&trayicon, SLOT(setDesktopControlSetting(bool)));
QObject::connect(&trayicon, SIGNAL(quitSelected()),
server, SLOT(disconnectAndQuit()));
QObject::connect(server, SIGNAL(quitApp()),
&app, SLOT(quit()));
sigset_t sigs;
sigemptyset(&sigs);