- connect(about_action, SIGNAL(triggered()),
- this, SLOT(about()));
- connect(pref_action, SIGNAL(triggered()),
- this, SLOT(showPreferences()));
- connect(connect_action, SIGNAL(triggered()),
- this, SLOT(showConnectDialog()));
- connect(disconnect_action, SIGNAL(triggered()),
- this, SLOT(disconnectFromHost()));
- connect(show_toolbar, SIGNAL(toggled(bool)),
- toolbar, SLOT(setVisible(bool)));
- connect(show_toolbar, SIGNAL(toggled(bool)),
- this, SLOT(forceResizeDelayed()));
-
- setCentralWidget(scroll_area);
- new FullScreenExitButton(this);
-
- grabZoomKeys(true);
- reloadSettings();
-
- if(url.isNull()) {
- disconnect_action->setEnabled(false);
- toolbar->setEnabled(false);
- showConnectDialog();
- } else {
- 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)),
- this, SLOT(statusChanged(RemoteView::RemoteStatus)));
- scroll_area->setWidget(vnc_view);
- vnc_view->start();
- vnc_view->enableScaling(scaling->isChecked());
- }
+ connect(about_action, SIGNAL(triggered()),
+ this, SLOT(about()));
+ connect(pref_action, SIGNAL(triggered()),
+ this, SLOT(showPreferences()));
+ connect(connect_action, SIGNAL(triggered()),
+ this, SLOT(showConnectDialog()));
+ connect(disconnect_action, SIGNAL(triggered()),
+ this, SLOT(disconnectFromHost()));
+ connect(show_toolbar, SIGNAL(toggled(bool)),
+ toolbar, SLOT(setVisible(bool)));
+ connect(show_toolbar, SIGNAL(toggled(bool)),
+ this, SLOT(updateScreenSpaceDelayed()));
+#ifdef Q_WS_MAEMO_5
+ QDBusConnection::systemBus().connect("", MCE_SIGNAL_PATH, MCE_SIGNAL_IF, MCE_DISPLAY_SIG,
+ this, SLOT(displayStateChanged(QString)));
+#endif
+
+ setCentralWidget(scroll_area);
+
+ FullScreenExitButton* fullscreen_exit_button = new FullScreenExitButton(this);
+ connect(fullscreen_exit_button, SIGNAL(clicked()),
+ this, SLOT(toggleFullscreen()));
+
+ grabZoomKeys(true);
+ reloadSettings();
+
+ if(url.isEmpty() and listen_port == 0) {
+ disconnect_action->setEnabled(false);
+ showConnectDialog();
+ } else {
+ connectToHost(url, quality, listen_port, view_only);
+ }