51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <QtGui>
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <QtGui>
- if(config_ver == 2) //config file up-to-date
+ const int current_ver = 3;
+ if(config_ver == current_ver) //config file up-to-date
+ return;
+ if(config_ver > current_ver) {
+ std::cout << "Warning: Config file was created by a newer version of Presence VNC. This may break things.\n";
+ if(config_ver == 2) {
+ bool rescale = settings.value("rescale", false).toBool();
+ settings.remove("rescale");
+
+ int zoomlevel;
+ if(rescale)
+ zoomlevel = 0;
+ else
+ zoomlevel = 95;
+
+ settings.setValue("zoomlevel", zoomlevel);
+
+ config_ver = 3;
+ }
+ Q_ASSERT(config_ver == current_ver);
QMaemo5ValueButton *rotation = new QMaemo5ValueButton(tr("Screen Rotation"), this);
rotation_selector = new QMaemo5ListPickSelector(this);
QStandardItemModel *model = new QStandardItemModel(0, 1, this);
QMaemo5ValueButton *rotation = new QMaemo5ValueButton(tr("Screen Rotation"), this);
rotation_selector = new QMaemo5ListPickSelector(this);
QStandardItemModel *model = new QStandardItemModel(0, 1, this);
disable_tapping = new QCheckBox(tr("Disable Tapping"), this);
disable_tapping->setChecked(settings.value("disable_tapping", false).toBool());
layout2->addWidget(disable_tapping);
disable_tapping = new QCheckBox(tr("Disable Tapping"), this);
disable_tapping->setChecked(settings.value("disable_tapping", false).toBool());
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);
settings.setValue("screen_rotation", rotation_selector->currentIndex());
settings.setValue("left_zoom", leftzoom_selector->currentIndex());
settings.setValue("right_zoom", rightzoom_selector->currentIndex());
settings.setValue("disable_tapping", disable_tapping->isChecked());
settings.setValue("screen_rotation", rotation_selector->currentIndex());
settings.setValue("left_zoom", leftzoom_selector->currentIndex());
settings.setValue("right_zoom", rightzoom_selector->currentIndex());
settings.setValue("disable_tapping", disable_tapping->isChecked());