summaryrefslogtreecommitdiffstats
path: root/krdc/krdc.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-13 06:26:27 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-12-13 06:26:27 +0000
commit9fab5b8a216e283e563f3457315715672bc8b55a (patch)
treec1251952e4e0e28fad0bca829d49335ff15b6e98 /krdc/krdc.cpp
parentbcb704366cb5e333a626c18c308c7e0448a8e69f (diff)
downloadtdenetwork-9fab5b8a216e283e563f3457315715672bc8b55a.tar.gz
tdenetwork-9fab5b8a216e283e563f3457315715672bc8b55a.zip
Update to Trinity 3.5.11
Will need to watch for commit warnings and rebuild test git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1061808 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krdc/krdc.cpp')
-rw-r--r--krdc/krdc.cpp30
1 files changed, 20 insertions, 10 deletions
diff --git a/krdc/krdc.cpp b/krdc/krdc.cpp
index d7ded0fe..36939c91 100644
--- a/krdc/krdc.cpp
+++ b/krdc/krdc.cpp
@@ -119,6 +119,7 @@ bool KRDC::start()
QString userName, password;
QString serverHost;
int serverPort = 5900;
+ int ret_status;
if (!m_host.isNull() &&
(m_host != "vnc:/") &&
@@ -204,7 +205,9 @@ bool KRDC::start()
connect(m_keyCaptureDialog, SIGNAL(keyPressed(XEvent*)),
m_view, SLOT(pressKey(XEvent*)));
- return m_view->start();
+ ret_status = m_view->start();
+
+ return ret_status;
}
void KRDC::changeProgress(RemoteViewStatus s) {
@@ -244,6 +247,10 @@ void KRDC::changeProgress(RemoteViewStatus s) {
this, SIGNAL(disconnectedError()));
connect(m_view, SIGNAL(disconnectedError()),
SIGNAL(disconnected()));
+ if (m_view->startFullscreen()) {
+ // m_view instance is asking to start in fullscreen mode
+ enableFullscreen(true);
+ }
}
else if (m_isFullscreen == WINDOW_MODE_FULLSCREEN)
switchToNormal(m_view->scaling());
@@ -462,6 +469,7 @@ void KRDC::switchToFullscreen(bool scaling)
KToolBar *t = new KToolBar(m_fsToolbar);
m_fsToolbarWidget = t;
+ t->setIconSize(KIcon::Panel);
QIconSet pinIconSet;
pinIconSet.setPixmap(m_pinup, QIconSet::Automatic, QIconSet::Normal, QIconSet::On);
@@ -471,8 +479,7 @@ void KRDC::switchToFullscreen(bool scaling)
pinButton->setIconSet(pinIconSet);
QToolTip::add(pinButton, i18n("Autohide on/off"));
t->setToggle(FS_AUTOHIDE_ID);
- t->setButton(FS_AUTOHIDE_ID, false);
- t->addConnection(FS_AUTOHIDE_ID, SIGNAL(clicked()), this, SLOT(toggleFsToolbarAutoHide()));
+ t->addConnection(FS_AUTOHIDE_ID, SIGNAL(toggled(bool)), this, SLOT(setFsToolbarAutoHide(bool)));
t->insertButton("window_nofullscreen", FS_FULLSCREEN_ID);
KToolBarButton *fullscreenButton = t->getButton(FS_FULLSCREEN_ID);
@@ -485,7 +492,6 @@ void KRDC::switchToFullscreen(bool scaling)
t->insertButton("configure", FS_ADVANCED_ID, m_popup, true, i18n("Advanced options"));
KToolBarButton *advancedButton = t->getButton(FS_ADVANCED_ID);
QToolTip::add(advancedButton, i18n("Advanced options"));
- //advancedButton->setPopupDelay(0);
QLabel *hostLabel = new QLabel(t);
hostLabel->setName("kde toolbar widget");
@@ -516,7 +522,6 @@ void KRDC::switchToFullscreen(bool scaling)
m_fsToolbar->setChild(t);
repositionView(true);
- showFullScreen();
setMaximumSize(m_fullscreenResolution.width(),
m_fullscreenResolution.height());
@@ -525,8 +530,12 @@ void KRDC::switchToFullscreen(bool scaling)
KWin::setState(winId(), NET::StaysOnTop);
- m_ftAutoHide = !m_ftAutoHide;
- setFsToolbarAutoHide(!m_ftAutoHide);
+ if (m_ftAutoHide == false) {
+ showFullscreenToolbar();
+ }
+ else {
+ t->setButton(FS_AUTOHIDE_ID, true);
+ }
if (!fromFullscreen) {
if (m_oldResolution.valid)
@@ -534,7 +543,9 @@ void KRDC::switchToFullscreen(bool scaling)
m_view->grabKeyboard();
}
- m_view->switchFullscreen( true );
+ showFullScreen();
+
+ m_view->switchFullscreen( true );
}
void KRDC::switchToNormal(bool scaling)
@@ -603,7 +614,6 @@ void KRDC::switchToNormal(bool scaling)
t->insertButton("configure", 3, m_popup, true, i18n("Advanced"));
KToolBarButton *advancedButton = t->getButton(3);
QToolTip::add(advancedButton, i18n("Advanced options"));
- //advancedButton->setPopupDelay(0);
if (m_layout)
delete m_layout;
@@ -683,7 +693,7 @@ void KRDC::toolbarChanged() {
bool KRDC::event(QEvent *e) {
-/* used to change resolution when fullscreen was minimized */
+ /* used to change resolution when fullscreen was minimized */
if ((!m_fullscreenMinimized) || (e->type() != QEvent::WindowActivate))
return QWidget::event(e);