add option for local cursor
authorChristian Pulvermacher <christian@hazel.(none)>
Thu, 16 Sep 2010 02:02:50 +0000 (04:02 +0200)
committerChristian Pulvermacher <christian@hazel.(none)>
Thu, 16 Sep 2010 02:02:50 +0000 (04:02 +0200)
src/mainwindow.cpp
src/preferences.cpp
src/preferences.h
src/vncview.cpp

index b69182f..2f6a7c3 100644 (file)
@@ -91,8 +91,8 @@ MainWindow::MainWindow(QString url, int quality):
        session_menu->addAction(connect_action);
        session_menu->addAction(disconnect_action);
        session_menu->addSeparator();
-       //session_menu->addAction(pref_action);
-       //session_menu->addSeparator();
+       session_menu->addAction(pref_action);
+       session_menu->addSeparator();
        session_menu->addAction(tr("&Quit"), this, SLOT(close()));
 
        QMenu* view_menu = menuBar()->addMenu(tr("&View"));
index 91d72b9..013c005 100644 (file)
@@ -123,6 +123,10 @@ Preferences::Preferences(QWidget *parent):
        layout2->addWidget(disable_tapping);
 #endif
 
+       always_show_local_cursor = new QCheckBox(tr("Always show local cursor"), this);
+       always_show_local_cursor->setChecked(settings.value("always_show_local_cursor", false).toBool());
+       layout2->addWidget(always_show_local_cursor);
+
        QPushButton *ok = new QPushButton(tr("Done"));
        ok->setMaximumWidth(100);
 
@@ -145,6 +149,7 @@ void Preferences::save()
        settings.setValue("right_zoom", rightzoom_selector->currentIndex());
        settings.setValue("disable_tapping", disable_tapping->isChecked());
 #endif
+       settings.setValue("always_show_local_cursor", always_show_local_cursor->isChecked());
 
        settings.sync();
 }
index 4891b32..1065ec4 100644 (file)
@@ -34,9 +34,12 @@ private slots:
        void save();
 private:
        QSettings settings;
+#ifdef Q_WS_MAEMO_5
        QMaemo5ListPickSelector *rotation_selector;
        QMaemo5ListPickSelector *leftzoom_selector;
        QMaemo5ListPickSelector *rightzoom_selector;
        QCheckBox *disable_tapping;
+#endif
+       QCheckBox *always_show_local_cursor;
 };
 #endif
index 79e3b7e..691ad86 100644 (file)
@@ -718,8 +718,6 @@ void VncView::unpressModifiers()
 
 void VncView::clipboardSelectionChanged()
 {
-    //kDebug(5011);
-
     if (m_status != Connected)
         return;
 
@@ -733,8 +731,6 @@ void VncView::clipboardSelectionChanged()
 
 void VncView::clipboardDataChanged()
 {
-    //kDebug(5011);
-
     if (m_status != Connected)
         return;
 
@@ -863,6 +859,10 @@ void VncView::reloadSettings()
        left_zoom = settings.value("left_zoom", 0).toInt();
        right_zoom = settings.value("right_zoom", 1).toInt();
        disable_tapping = settings.value("disable_tapping", false).toBool();
+
+       bool always_show_local_cursor = settings.value("always_show_local_cursor", false).toBool();
+       if(always_show_local_cursor)
+               showDotCursor(CursorOn);
 }
 
 //convert commitString into keyevents