remove connect/disconnect items because of crash
authorchristian <christian@christian-laptop.(none)>
Sun, 1 Aug 2010 16:40:54 +0000 (18:40 +0200)
committerchristian <christian@christian-laptop.(none)>
Sun, 1 Aug 2010 16:40:54 +0000 (18:40 +0200)
debian/changelog
debian/control
src/mainwindow.cpp
src/vncview.cpp
vnc.pro

index 3cbbb87..e608596 100644 (file)
@@ -2,4 +2,4 @@ presencevnc (0.1) unstable; urgency=low
 
   * Initial release.
 
- -- Christian Pulvermacher <pulvermacher@gmx.de>  Sun, 11 Jul 2010 22:21:32 +0200
+ -- Christian Pulvermacher <pulvermacher@gmx.de>  Sun, 01 Aug 2010 18:39:23 +0200
index abb8cc7..3d66ec3 100644 (file)
@@ -9,8 +9,15 @@ Standards-Version: 3.7.3
 Package: presencevnc
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, mce
-Description: A touch-screen friendly VNC client
- more text here
+Description: A touchscreen friendly VNC client
+ Features:
+  * Viewport can be dragged around without using scrollbars
+  * Touchpad-like mouse input: Tap the screen for a single
+    click, tap twice for a double click, single tap plus
+    dragging motion to drag objects on the remote desktop
+  * Fit remote desktop to screen
+  * Configurable zoom buttons
+  * Portrait mode support
 XB-Maemo-Display-Name: Presence VNC
 #XSBC-Bugtracker: 
 XB-Maemo-Icon-26: 
index 70ebb9c..f6e1f1e 100644 (file)
@@ -28,7 +28,7 @@ MainWindow::MainWindow(QString url, int quality):
        toolbar->addAction("Esc", this, SLOT(sendEsc()));
        toolbar->addAction("PgUp", this, SLOT(sendPgUp()));
        toolbar->addAction("PgDn", this, SLOT(sendPgDn()));
-       toolbar->addAction("IM", toolbar, SLOT(setFocus())); //doesn't work
+//     toolbar->addAction("IM", toolbar, SLOT(setFocus())); //doesn't work
        toolbar->addAction(QIcon("/usr/share/icons/hicolor/48x48/hildon/general_fullsize.png"), "", this, SLOT(toggleFullscreen()));
        addToolBar(toolbar);
        toolbar->setVisible(settings.value("show_toolbar", true).toBool());
@@ -37,9 +37,9 @@ MainWindow::MainWindow(QString url, int quality):
        QMenuBar *menu = new QMenuBar(this);
        QAction *connect_action = new QAction("Connect", this);
        disconnect_action = new QAction("Disconnect", this);
-       menu->addAction(connect_action);
-       menu->addAction(disconnect_action);
-       scaling = new QAction("Rescale Remote Screen", this);
+//     menu->addAction(connect_action);
+//     menu->addAction(disconnect_action);
+       scaling = new QAction("Fit to Screen", this);
        scaling->setCheckable(true);
        scaling->setChecked(settings.value("rescale", true).toBool());
        menu->addAction(scaling);
@@ -81,7 +81,7 @@ MainWindow::MainWindow(QString url, int quality):
                toolbar->setEnabled(false);
                connectDialog();
        } else {
-               vnc_view = new VncView(0, url, RemoteView::Quality(quality));
+               vnc_view = new VncView(this, url, RemoteView::Quality(quality));
                connect(scaling, SIGNAL(toggled(bool)),
                        vnc_view, SLOT(enableScaling(bool)));
                connect(vnc_view, SIGNAL(statusChanged(RemoteView::RemoteStatus)),
@@ -90,6 +90,9 @@ MainWindow::MainWindow(QString url, int quality):
                vnc_view->start();
                vnc_view->enableScaling(scaling->isChecked());
        }
+
+       if(!vnc_view) //not connected
+               QTimer::singleShot(100, this, SLOT(close()));
 }
 
 void MainWindow::grabZoomKeys(bool grab)
@@ -119,8 +122,8 @@ void MainWindow::closeEvent(QCloseEvent*) {
 
 void MainWindow::about() {
        QMessageBox::about(this, tr("About Presence VNC"),
-               tr("<center><h1>Presence VNC 0.1 beta</h1>\
-A touch screen friendly VNC client\
+               tr("<center><h1>Presence VNC 0.1</h1>\
+A touchscreen friendly VNC client\
 <small><p>&copy;2010 Christian Pulvermacher &lt;pulvermacher@gmx.de&gt</p>\
 <p>Based on KRDC, &copy; 2007-2008 Urs Wolfer</small></center>\
 <p>This program is free software; License: <a href=\"http://www.gnu.org/licenses/gpl-2.0.html\">GNU GPL 2</a> or later.</p>"));
@@ -165,7 +168,7 @@ void MainWindow::connectDialog()
 
        disconnectFromHost();
 
-       vnc_view = new VncView(0, url, RemoteView::Quality(2)); //TODO: get quality in dialog
+       vnc_view = new VncView(this, url, RemoteView::Quality(2)); //TODO: get quality in dialog
        scroll_area->setWidget(vnc_view);
 
        connect(scaling, SIGNAL(toggled(bool)),
@@ -183,12 +186,13 @@ void MainWindow::disconnectFromHost()
        if(!vnc_view)
                return;
 
-       vnc_view->startQuitting();
-       scroll_area->setWidget(0);
+//TODO: crashes when deleting vnc_view - no idea why
+       //vnc_view->startQuitting();
+       //scroll_area->setWidget(0);
 
-       vnc_view->disconnect(); //remove all connections
-       delete vnc_view;
-       vnc_view = 0;
+//     vnc_view->disconnect(); //remove all connections
+       //delete vnc_view;
+       //vnc_view = 0;
        disconnect_action->setEnabled(false);
        toolbar->setEnabled(false);
 }
@@ -207,6 +211,7 @@ void MainWindow::statusChanged(RemoteView::RemoteStatus status)
        case RemoteView::Disconnecting:
                if(old_status != RemoteView::Disconnected) { //Disconnecting also occurs while connecting, so check last state
                        QMaemo5InformationBox::information(this, "Connection lost");
+                       close();
                }
                break;
        case RemoteView::Disconnected:
index 38836d5..d21a4cd 100644 (file)
@@ -608,11 +608,11 @@ void VncView::keyEventHandler(QKeyEvent *e)
                        m_buttonMask &= 0xfb;
                vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
        } else if(current_zoom == 2 and pressed) { //wheel up
-               int eb = 0x10;
+               int eb = 0x8;
                vncThread.mouseEvent(cursor_x, cursor_y, eb | m_buttonMask);
                vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
        } else if(current_zoom == 3 and pressed) { //wheel down
-               int eb = 0x8;
+               int eb = 0x10;
                vncThread.mouseEvent(cursor_x, cursor_y, eb | m_buttonMask);
                vncThread.mouseEvent(cursor_x, cursor_y, m_buttonMask);
        } else if(current_zoom == 4) { //page up
diff --git a/vnc.pro b/vnc.pro
index 3edce47..e4ef7b2 100644 (file)
--- a/vnc.pro
+++ b/vnc.pro
@@ -3,7 +3,7 @@ TARGET = presencevnc-bin
 LIBS += -Llibvnc/libvncclient/.libs -lvncclient
 DEFINES += QTONLY
 QT += maemo5
-CONFIG += silent debug
+CONFIG += silent release
 
 OBJECTS_DIR = $${PWD}/tmp
 MOC_DIR = $${PWD}/tmp