summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (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,7 +1,5 @@
-TEMPLATE = app
-CONFIG += qt warn_on release
-DESTDIR = $(OPIEDIR)/bin
+CONFIG += qt warn_on release quick-app
HEADERS = d3des.h \
krfbbuffer.h \
krfbcanvas.h \
krfbconnection.h \
@@ -26,13 +24,15 @@ SOURCES = d3des.c \
kvncbookmarkdlg.cpp \
main.cpp
INTERFACES = kvncconndlgbase.ui \
kvncbookmarkdlgbase.ui
-TARGET = keypebble
+
INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lqpe
+TARGET = keypebble
+
TRANSLATIONS = ../../../i18n/de/keypebble.ts \
../../../i18n/nl/keypebble.ts \
../../../i18n/da/keypebble.ts \
../../../i18n/xx/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
@@ -333,9 +333,9 @@ void KRFBDecoder::sendAllowedEncodings()
static CARD8 padding[1];
con->write( &SetEncodingsId, 1 );
con->write( padding, 1 );
- static CARD16 noEncodings = con->options()->encodings();
+ CARD16 noEncodings = con->options()->encodings();
noEncodings = Swap16IfLE( noEncodings );
con->write( &noEncodings, 2 );
if ( con->options()->corre )
@@ -558,10 +558,13 @@ void KRFBDecoder::gotRawRectChunk()
currentState = AwaitingRectHeader;
connect( con, SIGNAL( gotEnoughData() ), SLOT( gotRectHeader() ) );
con->waitForData( RectHeaderLength );
}
- else
+ else {
+ // we are now ready for the next update - no need to wait for the timer
currentState = Idle;
+ sendUpdateRequest (1);
+ }
}
}
//
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
@@ -26,10 +26,10 @@
#include "kvncconndlg.h"
#include "krfbserver.h"
static int u_id = 1;
-static int get_unique_id()
-{
+static int get_unique_id()
+{
return u_id++;
}
@@ -55,9 +55,9 @@ static char * menu_xpm[] = {
" "};
const int StatusTextId = 0;
-KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp)
+KVNC::KVNC( QWidget *parent, const char *name, WFlags f) : QMainWindow( 0, name ,WStyle_ContextHelp)
{
setCaption( tr("VNC Viewer") );
fullscreen = false;
@@ -65,9 +65,9 @@ KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp)
setCentralWidget( stack );
bookmarkSelector=new KVNCBookmarkDlg();
stack->addWidget(bookmarkSelector,get_unique_id());
- stack->raiseWidget( bookmarkSelector );
+ stack->raiseWidget( bookmarkSelector );
canvas = new KRFBCanvas( stack, "canvas" );
stack->addWidget(canvas,get_unique_id());
setCentralWidget( stack );
@@ -102,9 +102,9 @@ KVNC::KVNC( const char *name ) : QMainWindow( 0, name ,WStyle_ContextHelp)
QString::null, 0, this, 0 );
connect( n, SIGNAL( activated() ),
this, SLOT( newConnection() ) );
n->addTo( bar );
-
+
QAction *o = new QAction( tr( "Open Bookmark" ), Resource::loadPixmap( "fileopen" ),
QString::null, 0, this, 0 );
connect( o, SIGNAL( activated() ),
this, SLOT( openConnection() ) );
@@ -219,13 +219,13 @@ void KVNC::toggleFullScreen()
canvas->raise();
canvas->setFocus();
canvas->grabKeyboard();
canvas->show();
-
+
fullScreenAction->setText( tr("Stop Full Screen") );
}
-
-
+
+
fullscreen = !fullscreen;
}
void KVNC::closeConnection()
@@ -265,9 +265,9 @@ void KVNC::loggedIn()
void KVNC::disconnected()
{
- if ( fullscreen )
+ if ( fullscreen )
toggleFullScreen();
static QString msg = tr( "Connection closed" );
statusMessage( msg );
ctlAltDelAction->setEnabled(false);
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
@@ -21,11 +21,11 @@ class QToolBar;
*/
class KVNC : public QMainWindow
{
Q_OBJECT
-public:
- KVNC( const char *name = 0 );
- ~KVNC();
+public:
+ KVNC( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
+ ~KVNC();
public slots:
void newConnection();
void deleteBookmark();
@@ -33,8 +33,9 @@ public slots:
void openConnection(QString);
void openConnection(void);
void toggleFullScreen();
void closeConnection();
+ static QString appName() { return QString::fromLatin1("keypebble"); }
protected:
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 @@
-#include <qurl.h>
+
#include <qpe/qpeapplication.h>
#include "kvnc.h"
+#include <opie/oapplicationfactory.h>
-int main( int argc, char **argv )
-{
- QPEApplication app( argc, argv );
- KVNC *view = new KVNC( "Keypebble" );
- app.showMainWidget( view );
- return app.exec();
-}
+OPIE_EXPORT_APP( OApplicationFactory<KVNC> )