[X2Go-Commits] x2goclient.git - build-baikal (branch) updated: 4.0.1.0-28-g512b85b
X2Go dev team
git-admin at x2go.org
Wed Sep 11 12:08:03 CEST 2013
The branch, build-baikal has been updated
via 512b85b24ca11d37c422d009fb3190c35d30d03e (commit)
from b9e540ce5fb9b4e4ea44a26bbc6dc68cde1e5bb5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
debian/changelog | 3 +++
sessionbutton.cpp | 7 +++++++
settingswidget.cpp | 31 +++++++++++++++++++++++--------
settingswidget.h | 2 --
4 files changed, 33 insertions(+), 10 deletions(-)
The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 9f1e098..84daa74 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,9 @@ x2goclient (4.0.1.1-0~x2go1) UNRELEASED; urgency=low
#165).
- Use the session icon as tray icon, pop up notification bubble that informs
about current session actions. (Fixes: #177).
+ - Allow for setting maximum available desktop size as window size via the
+ session profile card. Unfortunately, this feature is for now only available
+ on Linux. (Fixes: #214).
[ Otto Kjell ]
* New upstream version (4.0.1.1):
diff --git a/sessionbutton.cpp b/sessionbutton.cpp
index 576d491..65351bc 100644
--- a/sessionbutton.cpp
+++ b/sessionbutton.cpp
@@ -433,8 +433,15 @@ void SessionButton::redraw()
for (uint i=0;i<displays;++i)
{
geomBox->addItem ( tr( "Display " )+QString::number(i+1));
+
+ //add maximun available area
+ geomBox->addItem( QString::number(QApplication::desktop()->availableGeometry(i).width()) + "x" + QString::number(QApplication::desktop()->availableGeometry(i).height()));
+
+
}
#ifndef Q_WS_HILDON
+
+
geomBox->addItem ( "1440x900" );
geomBox->addItem ( "1280x1024" );
geomBox->addItem ( "1024x768" );
diff --git a/settingswidget.cpp b/settingswidget.cpp
index 98cb9b0..15eb91e 100644
--- a/settingswidget.cpp
+++ b/settingswidget.cpp
@@ -68,16 +68,12 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw,
custom=new QRadioButton ( tr ( "Window" ),dgb );
#endif
display=new QRadioButton ( tr ( "Use whole display" ),dgb );
-#ifdef Q_OS_LINUX
maxRes=new QRadioButton ( tr ( "Maximum available" ),dgb );
-#endif
radio->addButton ( fs );
radio->addButton ( custom );
radio->setExclusive ( true );
radio->addButton(display);
-#ifdef Q_OS_LINUX
radio->addButton(maxRes);
-#endif
width=new QSpinBox ( dgb );
height=new QSpinBox ( dgb );
cbSetDPI=new QCheckBox ( tr ( "Set display DPI" ),dgb );
@@ -110,9 +106,7 @@ SettingsWidget::SettingsWidget ( QString id, ONMainWindow * mw,
dwLay->addStretch();
dispLay->addWidget(display);
-#ifdef Q_OS_LINUX
dispLay->addWidget(maxRes);
-#endif
dispLay->addSpacing(15);
dispLay->addWidget(lDisplay=new QLabel(tr("&Display:"),dgb));
dispLay->addWidget(displayNumber=new QSpinBox(dgb));
@@ -665,8 +659,6 @@ void SettingsWidget::saveSettings()
st.setting()->setValue ( sessionId+"/fullscreen",
( QVariant ) fs->isChecked() );
- st.setting()->setValue ( sessionId+"/width",
- ( QVariant ) width->value() );
st.setting()->setValue ( sessionId+"/multidisp",
( QVariant ) display->isChecked() );
st.setting()->setValue ( sessionId+"/display",
@@ -687,8 +679,31 @@ void SettingsWidget::saveSettings()
( QVariant ) params->text());
#endif
#endif
+
+ st.setting()->setValue ( sessionId+"/width",
+ ( QVariant ) width->value() );
+
st.setting()->setValue ( sessionId+"/height",
( QVariant ) height->value() );
+
+ //if maxRes is checked width and height are setted to max area available
+ if (maxRes->isChecked()
+ || st.setting()->value(sessionId + "/multidisp", (QVariant) false).toBool()
+ || st.setting()->value(sessionId + "/maxdim", (QVariant) false).toBool()) {
+
+ //get screen number
+ int selectedScreen = st.setting()->value(sessionId + "/display", (QVariant) -1).toInt();
+
+ //get max available desktop area for selected screen
+ int height = QApplication::desktop()->availableGeometry(selectedScreen).height();
+ int width = QApplication::desktop()->availableGeometry(selectedScreen).width();
+
+ //save max resolution
+ st.setting()->setValue (sessionId + "/width", (QVariant) width);
+ st.setting()->setValue (sessionId + "/height", (QVariant) height);
+ }
+
+
st.setting()->setValue ( sessionId+"/dpi",
( QVariant ) DPI->value() );
st.setting()->setValue ( sessionId+"/setdpi",
diff --git a/settingswidget.h b/settingswidget.h
index 590e728..75d6724 100644
--- a/settingswidget.h
+++ b/settingswidget.h
@@ -68,9 +68,7 @@ private:
QLineEdit* type;
QRadioButton* custom;
QRadioButton* display;
-#ifdef Q_OS_LINUX
QRadioButton* maxRes;
-#endif
QRadioButton* arts;
QRadioButton* pulse;
QRadioButton* esd;
hooks/post-receive
--
x2goclient.git (X2Go Client)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goclient.git" (X2Go Client).
More information about the x2go-commits
mailing list