summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/comm/keypebble/keypebble.pro8
-rw-r--r--noncore/comm/keypebble/krfbdecoder.cpp7
-rw-r--r--noncore/comm/keypebble/kvnc.cpp18
-rw-r--r--noncore/comm/keypebble/kvnc.h7
-rw-r--r--noncore/comm/keypebble/main.cpp11
5 files changed, 25 insertions, 26 deletions
diff --git a/noncore/comm/keypebble/keypebble.pro b/noncore/comm/keypebble/keypebble.pro
index 7af60f9..b3cb172 100644
--- a/noncore/comm/keypebble/keypebble.pro
+++ b/noncore/comm/keypebble/keypebble.pro
@@ -1,6 +1,4 @@
1TEMPLATE = app 1CONFIG += qt warn_on release quick-app
2CONFIG += qt warn_on release
3DESTDIR = $(OPIEDIR)/bin
4 HEADERS = d3des.h \ 2 HEADERS = d3des.h \
5 krfbbuffer.h \ 3 krfbbuffer.h \
6 krfbcanvas.h \ 4 krfbcanvas.h \
@@ -27,11 +25,13 @@ SOURCES = d3des.c \
27 main.cpp 25 main.cpp
28 INTERFACES= kvncconndlgbase.ui \ 26 INTERFACES= kvncconndlgbase.ui \
29 kvncbookmarkdlgbase.ui 27 kvncbookmarkdlgbase.ui
30TARGET = keypebble 28
31INCLUDEPATH += $(OPIEDIR)/include 29INCLUDEPATH += $(OPIEDIR)/include
32DEPENDPATH += $(OPIEDIR)/include 30DEPENDPATH += $(OPIEDIR)/include
33LIBS += -lqpe 31LIBS += -lqpe
34 32
33 TARGET = keypebble
34
35TRANSLATIONS = ../../../i18n/de/keypebble.ts \ 35TRANSLATIONS = ../../../i18n/de/keypebble.ts \
36 ../../../i18n/nl/keypebble.ts \ 36 ../../../i18n/nl/keypebble.ts \
37 ../../../i18n/da/keypebble.ts \ 37 ../../../i18n/da/keypebble.ts \
diff --git a/noncore/comm/keypebble/krfbdecoder.cpp b/noncore/comm/keypebble/krfbdecoder.cpp
index 33418ae..dc90d9c 100644
--- a/noncore/comm/keypebble/krfbdecoder.cpp
+++ b/noncore/comm/keypebble/krfbdecoder.cpp
@@ -334,7 +334,7 @@ void KRFBDecoder::sendAllowedEncodings()
334 con->write( &SetEncodingsId, 1 ); 334 con->write( &SetEncodingsId, 1 );
335 con->write( padding, 1 ); 335 con->write( padding, 1 );
336 336
337 static CARD16 noEncodings = con->options()->encodings(); 337 CARD16 noEncodings = con->options()->encodings();
338 noEncodings = Swap16IfLE( noEncodings ); 338 noEncodings = Swap16IfLE( noEncodings );
339 con->write( &noEncodings, 2 ); 339 con->write( &noEncodings, 2 );
340 340
@@ -559,8 +559,11 @@ void KRFBDecoder::gotRawRectChunk()
559 connect( con, SIGNAL( gotEnoughData() ), SLOT( gotRectHeader() ) ); 559 connect( con, SIGNAL( gotEnoughData() ), SLOT( gotRectHeader() ) );
560 con->waitForData( RectHeaderLength ); 560 con->waitForData( RectHeaderLength );
561 } 561 }
562 else 562 else {
563 // we are now ready for the next update - no need to wait for the timer
563 currentState = Idle; 564 currentState = Idle;
565 sendUpdateRequest (1);
566 }
564 } 567 }
565} 568}
566 569
diff --git a/noncore/comm/keypebble/kvnc.cpp b/noncore/comm/keypebble/kvnc.cpp
index 48a442c..c89dec5 100644
--- a/noncore/comm/keypebble/kvnc.cpp
+++ b/noncore/comm/keypebble/kvnc.cpp
@@ -27,8 +27,8 @@
27#include "krfbserver.h" 27#include "krfbserver.h"
28 28
29static int u_id = 1; 29static int u_id = 1;
30static int get_unique_id() 30static int get_unique_id()
31{ 31{
32 return u_id++; 32 return u_id++;
33} 33}
34 34
@@ -56,7 +56,7 @@ static char * menu_xpm[] = {
56 56
57const int StatusTextId = 0; 57const int StatusTextId = 0;
58 58
59KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp) 59KVNC::KVNC( QWidget *parent, const char *name, WFlags f) : QMainWindow( 0, name ,WStyle_ContextHelp)
60{ 60{
61 setCaption( tr("VNC Viewer") ); 61 setCaption( tr("VNC Viewer") );
62 fullscreen = false; 62 fullscreen = false;
@@ -66,7 +66,7 @@ KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp)
66 66
67 bookmarkSelector=new KVNCBookmarkDlg(); 67 bookmarkSelector=new KVNCBookmarkDlg();
68 stack->addWidget(bookmarkSelector,get_unique_id()); 68 stack->addWidget(bookmarkSelector,get_unique_id());
69 stack->raiseWidget( bookmarkSelector ); 69 stack->raiseWidget( bookmarkSelector );
70 70
71 canvas = new KRFBCanvas( stack, "canvas" ); 71 canvas = new KRFBCanvas( stack, "canvas" );
72 stack->addWidget(canvas,get_unique_id()); 72 stack->addWidget(canvas,get_unique_id());
@@ -103,7 +103,7 @@ KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp)
103 connect( n, SIGNAL( activated() ), 103 connect( n, SIGNAL( activated() ),
104 this, SLOT( newConnection() ) ); 104 this, SLOT( newConnection() ) );
105 n->addTo( bar ); 105 n->addTo( bar );
106 106
107 QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "fileopen" ), 107 QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "fileopen" ),
108 QString::null, 0, this, 0 ); 108 QString::null, 0, this, 0 );
109 connect( o, SIGNAL( activated() ), 109 connect( o, SIGNAL( activated() ),
@@ -220,11 +220,11 @@ void KVNC::toggleFullScreen()
220 canvas->setFocus(); 220 canvas->setFocus();
221 canvas->grabKeyboard(); 221 canvas->grabKeyboard();
222 canvas->show(); 222 canvas->show();
223 223
224 fullScreenAction->setText( tr("Stop Full Screen") ); 224 fullScreenAction->setText( tr("Stop Full Screen") );
225 } 225 }
226 226
227 227
228 fullscreen = !fullscreen; 228 fullscreen = !fullscreen;
229} 229}
230 230
@@ -266,7 +266,7 @@ void KVNC::loggedIn()
266void KVNC::disconnected() 266void KVNC::disconnected()
267{ 267{
268 268
269 if ( fullscreen ) 269 if ( fullscreen )
270 toggleFullScreen(); 270 toggleFullScreen();
271 static QString msg = tr( "Connection closed" ); 271 static QString msg = tr( "Connection closed" );
272 statusMessage( msg ); 272 statusMessage( msg );
diff --git a/noncore/comm/keypebble/kvnc.h b/noncore/comm/keypebble/kvnc.h
index 51c7151..7b7cc91 100644
--- a/noncore/comm/keypebble/kvnc.h
+++ b/noncore/comm/keypebble/kvnc.h
@@ -22,9 +22,9 @@ class QToolBar;
22class KVNC : public QMainWindow 22class KVNC : public QMainWindow
23{ 23{
24 Q_OBJECT 24 Q_OBJECT
25public: 25public:
26 KVNC( const char *name = 0 ); 26 KVNC( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
27 ~KVNC(); 27 ~KVNC();
28 28
29public slots: 29public slots:
30 void newConnection(); 30 void newConnection();
@@ -34,6 +34,7 @@ public slots:
34 void openConnection(void); 34 void openConnection(void);
35 void toggleFullScreen(); 35 void toggleFullScreen();
36 void closeConnection(); 36 void closeConnection();
37 static QString appName() { return QString::fromLatin1("keypebble"); }
37 38
38protected: 39protected:
39 void setupActions(); 40 void setupActions();
diff --git a/noncore/comm/keypebble/main.cpp b/noncore/comm/keypebble/main.cpp
index bc7782c..11f67fc 100644
--- a/noncore/comm/keypebble/main.cpp
+++ b/noncore/comm/keypebble/main.cpp
@@ -1,15 +1,10 @@
1 1
2 2
3#include <qurl.h> 3
4#include <qpe/qpeapplication.h> 4#include <qpe/qpeapplication.h>
5#include "kvnc.h" 5#include "kvnc.h"
6#include <opie/oapplicationfactory.h>
6 7
7int main( int argc, char **argv )
8{
9 QPEApplication app( argc, argv );
10 KVNC *view = new KVNC( "Keypebble" );
11 app.showMainWidget( view );
12 8
13 return app.exec();
14}
15 9
10OPIE_EXPORT_APP( OApplicationFactory<KVNC> )