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

invitation mode working

svn path=/trunk/kdenetwork/krfb/; revision=146122
This commit is contained in:
Tim Jansen
2002-03-31 02:02:05 +00:00
parent 5fd7499df3
commit ef7fdad0a0
7 changed files with 32 additions and 13 deletions

View File

@@ -7,17 +7,16 @@ Version 0.6 (2002/02/18): Improved RFB backend
- dcop support
- knotify
Version 0.7: Better integration with KDE, improved GUI
Version 0.7 (2002/3/31): Better integration with KDE, improved GUI
- kded module 'kinetd' that listens on the Rfb port and starts KRfb
-> remove debug msgs, better error handling
-> fetch new services while running
-> remove debug msgs, replace with knotify
-> better error handling
-> invitation support
-> make sure request is completely ignored if password is available
- kcontrol module
-> on startup a dialog appears that allows the user to invite somebody
using email (and later other mechanisms). Dialog can be turned off forever,
of course
-> remove STDOUT/STDERR logging
- remove STDOUT/STDERR logging from libvncserver
Version 0.8:
- i18n

View File

@@ -321,6 +321,11 @@ void Configuration::showInvitationDialog() {
}
void Configuration::invDlgClosed() {
closeInvDlg();
emit invitationFinished();
}
void Configuration::closeInvDlg() {
loadFromDialogs();
saveToKConfig();
invDlg.hide();
@@ -331,7 +336,7 @@ void Configuration::invDlgClosed() {
////////////// personal invitation dialog //////////////////////////
void Configuration::showPersonalInvitationDialog() {
invDlgClosed();
closeInvDlg();
Invitation inv = createInvitation();
saveToDialogs();
@@ -345,15 +350,17 @@ void Configuration::showPersonalInvitationDialog() {
void Configuration::persInvDlgClosed() {
persInvDlg.hide();
invDlg.createInvitationButton->setEnabled(true);
emit invitationFinished();
}
////////////// invite email //////////////////////////
void Configuration::inviteEmail() {
invDlgClosed();
closeInvDlg();
Invitation inv = createInvitation();
saveToDialogs();
// TODO: start mail client
emit invitationFinished();
}
#include "configuration.moc"

View File

@@ -97,6 +97,7 @@ public:
QValueList<Invitation> &invitations();
signals:
void passwordChanged();
void invitationFinished();
public slots:
void showConfigDialog();
@@ -113,6 +114,7 @@ private:
void saveToKConfig();
void saveToDialogs();
Invitation createInvitation();
void closeInvDlg();
krfb_mode m_mode;
@@ -126,7 +128,7 @@ private:
bool allowDesktopControlFlag;
bool allowUninvitedFlag;
bool oneConnectionFlag;
bool showInvDlgOnStartupFlag;
QString passwordString;

View File

@@ -89,7 +89,6 @@ static KCmdLineOptions options[] =
*
* TODO:
* - invitations (see configuration.cc for overview)
* - implement invitation mode
* - display kcm in kinetd mode
*/
@@ -180,8 +179,9 @@ int main(int argc, char *argv[])
if (mode == KRFB_INVITATION_MODE) {
// TODO: display invitation
kdDebug() << "invitation mode" <<endl;
config->showInvitationDialog();
QObject::connect(config, SIGNAL(invitationFinished()),
&app, SLOT(quit()));
return app.exec();
}

View File

@@ -273,6 +273,7 @@ void RFBController::startServer(int inetdFd, bool xtestGrab)
int h = framebufferImage->height;
char *fb = framebufferImage->data;
rfbLogEnable(0);
server = rfbGetScreen(0, 0, w, h,
framebufferImage->bits_per_pixel,
8,

View File

@@ -34,6 +34,8 @@
MUTEX(logMutex);
int rfbEnableLogging = 1;
char rfbEndianTest = (_BYTE_ORDER == _LITTLE_ENDIAN);
/*
@@ -47,6 +49,9 @@ rfbLog(const char *format, ...)
char buf[256];
time_t log_clock;
if (!rfbEnableLogging)
return;
LOCK(logMutex);
va_start(args, format);
@@ -66,13 +71,17 @@ void rfbLogPerror(const char *str)
rfbLog("%s: %s\n", str, strerror(errno));
}
void rfbLogEnable(int enabled) {
rfbEnableLogging = enabled;
}
void rfbScheduleCopyRegion(rfbScreenInfoPtr rfbScreen,sraRegionPtr copyRegion,int dx,int dy)
{
{
rfbClientIteratorPtr iterator;
rfbClientPtr cl;
rfbUndrawCursor(rfbScreen);
iterator=rfbGetClientIterator(rfbScreen);
while((cl=rfbClientIteratorNext(iterator))) {
LOCK(cl->updateMutex);

View File

@@ -758,6 +758,7 @@ extern void rfbProcessSizeArguments(int* width,int* height,int* bpp,int* argc, c
/* main.c */
extern void rfbLogEnable(int enabled);
extern void rfbLog(const char *format, ...);
extern void rfbLogPerror(const char *str);