cleanup
authorchristian <christian@christian-laptop.(none)>
Thu, 26 Aug 2010 12:57:17 +0000 (14:57 +0200)
committerchristian <christian@christian-laptop.(none)>
Thu, 26 Aug 2010 12:57:17 +0000 (14:57 +0200)
src/main.cpp
src/mainwindow.cpp
src/mainwindow.h
src/preferences.cpp
src/preferences.h

index ccb7dc2..f26d239 100644 (file)
@@ -28,7 +28,6 @@ int main(int argc, char *argv[])
        QCoreApplication::setApplicationName("Presence VNC");
 
        QApplication app(argc, argv);
-       //app.setAutoSipEnabled(true);
 
        QString url;
        int quality = 2;
index 272101e..89e087c 100644 (file)
@@ -28,7 +28,6 @@
 #include <X11/Xlib.h>
 #include <X11/Xatom.h>
 
-#include <iostream>
 
 MainWindow::MainWindow(QString url, int quality):
        QMainWindow(0),
@@ -44,11 +43,11 @@ MainWindow::MainWindow(QString url, int quality):
 
        //set up toolbar
        toolbar = new QToolBar(0);
-       toolbar->addAction("Mod", this, SLOT(showModifierMenu()));
-       toolbar->addAction("Tab", this, SLOT(sendTab()));
-       toolbar->addAction("Esc", this, SLOT(sendEsc()));
-       toolbar->addAction("PgUp", this, SLOT(sendPgUp()));
-       toolbar->addAction("PgDn", this, SLOT(sendPgDn()));
+       toolbar->addAction(tr("Mod"), this, SLOT(showModifierMenu()));
+       toolbar->addAction(tr("Tab"), this, SLOT(sendTab()));
+       toolbar->addAction(tr("Esc"), this, SLOT(sendEsc()));
+       toolbar->addAction(tr("PgUp"), this, SLOT(sendPgUp()));
+       toolbar->addAction(tr("PgDn"), this, SLOT(sendPgDn()));
        toolbar->addAction(QIcon("/usr/share/icons/hicolor/48x48/hildon/chat_enter.png"), "", this, SLOT(sendReturn()));
        toolbar->addAction(QIcon("/usr/share/icons/hicolor/48x48/hildon/control_keyboard.png"), "", this, SLOT(showInputPanel()));
 
@@ -166,7 +165,7 @@ void MainWindow::connectToHost(QString url)
 {
        disconnectFromHost();
 
-       vnc_view = new VncView(this, url, RemoteView::Quality(2)); //TODO: get quality in dialog
+       vnc_view = new VncView(this, url, RemoteView::Quality(2));
 
        connect(scaling, SIGNAL(toggled(bool)),
                vnc_view, SLOT(enableScaling(bool)));
@@ -204,7 +203,6 @@ void MainWindow::statusChanged(RemoteView::RemoteStatus status)
        case RemoteView::Connected:
                setAttribute(Qt::WA_Maemo5ShowProgressIndicator, false);
                if(!scaling->isChecked()) {
-                       //if remote desktop is shown in full size, 2nd connection will have black screen
                        //ugly hack to force a refresh (forceFullRepaint() doesn't repaint?? -> vnc_view hidden???)
                        vnc_view->resize(scroll_area->size());
                        vnc_view->enableScaling(false);
@@ -273,8 +271,6 @@ void MainWindow::showModifierMenu()
                vnc_view->sendKey(Qt::Key_Alt);
        } else if(chosen == win) {
                vnc_view->sendKey(Qt::Key_Meta);
-       } else {
-               std::cout << "unhandled action?\n";
        }
 }
 
index 52656e8..abdd66e 100644 (file)
@@ -37,6 +37,7 @@ protected:
        }
 };
 
+
 class MainWindow : public QMainWindow {
        Q_OBJECT
 public:
index a1e66e3..ea0874b 100644 (file)
@@ -123,8 +123,6 @@ Preferences::Preferences(QWidget *parent):
                this, SLOT(save()));
 }
 
-Preferences::~Preferences() { }
-
 void Preferences::save()
 {
        settings.setValue("screen_rotation", rotation_selector->currentIndex());
index b7483f7..4891b32 100644 (file)
@@ -30,7 +30,6 @@ class Preferences : public QDialog {
        Q_OBJECT
 public:
        Preferences(QWidget *parent);
-       ~Preferences();
 private slots:
        void save();
 private: