summaryrefslogtreecommitdiffstats
path: root/krdc/rdp
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/rdp
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/rdp')
-rw-r--r--krdc/rdp/krdpview.cpp24
-rw-r--r--krdc/rdp/krdpview.h1
-rw-r--r--krdc/rdp/rdphostpref.cpp18
-rw-r--r--krdc/rdp/rdpprefs.ui7
-rw-r--r--krdc/rdp/rdpprefs.ui.h16
5 files changed, 55 insertions, 11 deletions
diff --git a/krdc/rdp/krdpview.cpp b/krdc/rdp/krdpview.cpp
index dc388e29..720293c3 100644
--- a/krdc/rdp/krdpview.cpp
+++ b/krdc/rdp/krdpview.cpp
@@ -19,6 +19,7 @@
For any questions, comments or whatever, you may mail me at: arend@auton.nl
*/
+#include <kapplication.h>
#include <kdialogbase.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -38,6 +39,7 @@
#include "rdphostpref.h"
#include "rdpprefs.h"
+bool launch_Fullscreen_rdp = false;
bool rdpAppDataConfigured = false;
extern KWallet::Wallet *wallet;
@@ -188,6 +190,7 @@ bool KRdpView::editPreferences( HostPrefPtr host )
wv = prefs->rdpWidth();
hv = prefs->rdpHeight();
+
kl = int2keymap( prefs->kbLayout() );
hp->setAskOnConnect( prefs->showPrefs() );
hp->setWidth(wv);
@@ -206,6 +209,8 @@ bool KRdpView::start()
SmartPtr<RdpHostPref> hp, rdpDefaults;
bool useKWallet = false;
+ QWidget *desktop = QApplication::desktop();
+
if(!rdpAppDataConfigured)
{
HostPreferences *hps = HostPreferences::instance();
@@ -225,7 +230,19 @@ bool KRdpView::start()
m_process = new KProcess(m_container);
*m_process << "rdesktop";
- *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(hp->height()));
+ // Check for fullscreen mode
+ if ((hp->width() == 0) && (hp->height() == 0)) {
+ launch_Fullscreen_rdp = true;
+ *m_process << "-g" << (QString::number(desktop->width()) + "x" + QString::number((desktop->height()-2)));
+ }
+ else {
+ if ((hp->height() > (desktop->height()-2)) && (hp->height() <= (desktop->height()))) {
+ *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(desktop->height()-2));
+ }
+ else {
+ *m_process << "-g" << (QString::number(hp->width()) + "x" + QString::number(hp->height()));
+ }
+ }
*m_process << "-k" << hp->layout();
if(!m_user.isEmpty()) { *m_process << "-u" << m_user; }
@@ -311,6 +328,11 @@ bool KRdpView::viewOnly()
return m_container->m_viewOnly;
}
+bool KRdpView::startFullscreen()
+{
+ return launch_Fullscreen_rdp;
+}
+
void KRdpView::setViewOnly(bool s)
{
m_container->m_viewOnly = s;
diff --git a/krdc/rdp/krdpview.h b/krdc/rdp/krdpview.h
index a54c2d96..ed3f279a 100644
--- a/krdc/rdp/krdpview.h
+++ b/krdc/rdp/krdpview.h
@@ -69,6 +69,7 @@ class KRdpView : public KRemoteView
virtual QSize framebufferSize(); // returns the size of the remote view
QSize sizeHint(); // returns the suggested size
virtual bool viewOnly();
+ virtual bool startFullscreen();
// functions regarding the connection
virtual void startQuitting(); // start closing the connection
diff --git a/krdc/rdp/rdphostpref.cpp b/krdc/rdp/rdphostpref.cpp
index 783c41e4..a8186403 100644
--- a/krdc/rdp/rdphostpref.cpp
+++ b/krdc/rdp/rdphostpref.cpp
@@ -25,9 +25,9 @@ const QString RdpHostPref::RdpType = "RDP";
RdpHostPref::RdpHostPref(KConfig *conf, const QString &host, const QString &type) :
HostPref(conf, host, type),
- m_width(800),
- m_height(600),
- m_colorDepth(8),
+ m_width(0),
+ m_height(0),
+ m_colorDepth(24),
m_layout("en-us"),
m_askOnConnect(true),
m_useKWallet(true)
@@ -70,9 +70,9 @@ void RdpHostPref::load()
{
m_config->setGroup("PerHostSettings");
QString p = prefix();
- m_width = m_config->readNumEntry(p+"width", 800);
- m_height = m_config->readNumEntry(p+"height", 600);
- m_colorDepth = m_config->readNumEntry(p+"colorDepth", 8);
+ m_width = m_config->readNumEntry(p+"width", 0);
+ m_height = m_config->readNumEntry(p+"height", 0);
+ m_colorDepth = m_config->readNumEntry(p+"colorDepth", 24);
m_layout = m_config->readEntry(p+"layout", "en-us");
m_askOnConnect = m_config->readBoolEntry(p+"askOnConnect", true);
m_useKWallet = m_config->readBoolEntry(p+"useKWallet", true);
@@ -99,9 +99,9 @@ void RdpHostPref::remove()
void RdpHostPref::setDefaults()
{
m_config->setGroup("RdpDefaultSettings");
- m_width = m_config->readNumEntry("rdpWidth", 800);
- m_height = m_config->readNumEntry("rdpHeight", 600);
- m_colorDepth = m_config->readNumEntry("rdpColorDepth", 8);
+ m_width = m_config->readNumEntry("rdpWidth", 0);
+ m_height = m_config->readNumEntry("rdpHeight", 0);
+ m_colorDepth = m_config->readNumEntry("rdpColorDepth", 24);
m_layout = m_config->readEntry("rdpKeyboardLayout", "en-us");
m_askOnConnect = m_config->readBoolEntry("rdpShowHostPreferences", true);
m_useKWallet = m_config->readBoolEntry("rdpUseKWallet", true);
diff --git a/krdc/rdp/rdpprefs.ui b/krdc/rdp/rdpprefs.ui
index 8e493d7a..0e607b90 100644
--- a/krdc/rdp/rdpprefs.ui
+++ b/krdc/rdp/rdpprefs.ui
@@ -68,6 +68,11 @@
<string>Custom (...)</string>
</property>
</item>
+ <item>
+ <property name="text">
+ <string>Full Screen (Maximized)</string>
+ </property>
+ </item>
<property name="name">
<cstring>cmbResolution</cstring>
</property>
@@ -86,7 +91,7 @@
</size>
</property>
<property name="currentItem">
- <number>1</number>
+ <number>5</number>
</property>
<property name="whatsThis" stdset="0">
<string>Here you can specify the resolution of the remote desktop. This resolution determines the size of the desktop that will be presented to you.</string>
diff --git a/krdc/rdp/rdpprefs.ui.h b/krdc/rdp/rdpprefs.ui.h
index 06efe7f4..295ea5a8 100644
--- a/krdc/rdp/rdpprefs.ui.h
+++ b/krdc/rdp/rdpprefs.ui.h
@@ -34,6 +34,13 @@ void RdpPrefs::resolutionChanged( int selection )
break;
case 3:
+ break;
+
+ case 4:
+ spinWidth->setValue(0);
+ spinHeight->setValue(0);
+ break;
+
default:
break;
}
@@ -115,6 +122,15 @@ void RdpPrefs::setResolution()
{
cmbResolution->setCurrentItem(2);
}
+ else if (cmbResolution->currentItem()==4)
+ {
+ // Fullscreen selected
+ }
+ else if (rdpWidth()==0 && rdpHeight()==0)
+ {
+ // Fullscreen selected
+ cmbResolution->setCurrentItem(4);
+ }
else
{
cmbResolution->setCurrentItem(3);