[X2Go-Commits] [x2gokdriveclient] 01/01: add --noresize option to disable size changing of the window for user.
git-admin at x2go.org
git-admin at x2go.org
Wed Aug 17 17:22:33 CEST 2022
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch master
in repository x2gokdriveclient.
commit a3134d6ddfe571c65ab4d363499a767ebef55483
Author: Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
Date: Wed Aug 17 10:22:20 2022 -0500
add --noresize option to disable size changing of the window for user.
---
client.cpp | 14 +++++++++++++-
client.h | 1 +
debian/changelog | 1 +
menuframe.cpp | 5 ++++-
menuframe.h | 1 +
5 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/client.cpp b/client.cpp
index dbf1a9e..82e49d2 100644
--- a/client.cpp
+++ b/client.cpp
@@ -228,7 +228,6 @@ void Client::initDesktopMode()
QMenu* menuCon=menuBar()->addMenu(tr("&Connection"));
menu=menuBar()->addMenu(tr("&View"));
FSMenuBar=new MenuFrame(this, menu);
- // FSMenuBar->hide();
menuBar()->hide();
connect(FSMenuBar, SIGNAL(editCaption()), this, SLOT(editWindowTitle()));
@@ -253,6 +252,13 @@ void Client::initDesktopMode()
actDisconnect->setToolTip(tr("Disconnect"));
connect(menu,SIGNAL(aboutToShow()), this, SLOT(slotSetupMenu()));
setWindowTitle(mainWndTitle);
+ FSMenuBar->enableViewMenu(!noresize);
+ if(noresize)
+ {
+ setFixedSize(QSize(width,height));
+ setWindowFlag(Qt::MSWindowsFixedSizeDialogHint);
+ }
+
}
@@ -552,6 +558,12 @@ void Client::parseOptions()
KDRStdErr()<<"Running in debug mode";
continue;
}
+ if(args[i]=="--noresize")
+ {
+ noresize=true;
+ KDRStdErr()<<"Disable resizing";
+ continue;
+ }
if(args[i]=="--connect")
{
host=args[++i];
diff --git a/client.h b/client.h
index 05525c2..146e98e 100644
--- a/client.h
+++ b/client.h
@@ -294,6 +294,7 @@ private:
int dispNumber=1;
bool serverExtSelection=false;
bool rootless=false;
+ bool noresize=false;
QString cookie;
QString mainWndTitle;
diff --git a/debian/changelog b/debian/changelog
index 6df6a0d..ad9e55e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -55,5 +55,6 @@ x2gokdriveclient (0.0.0.1-0x2go1) UNRELEASED; urgency=medium
- rootles mode for Windows: disable resize animation,
change background of display area,
don't show window content and don't send geometry events while moving/resizing.
+ - add --noresize option to disable size changing of the window for user.
-- Mike Gabriel <mike.gabriel at das-netzwerkteam.de> Tue, 04 Jun 2019 11:10:43 +0200
diff --git a/menuframe.cpp b/menuframe.cpp
index 62018af..4cdf5be 100644
--- a/menuframe.cpp
+++ b/menuframe.cpp
@@ -520,4 +520,7 @@ void MenuFrame::setPinned(bool toggled)
s.setValue("pinned",isPinned);
}
-
+void MenuFrame::enableViewMenu(bool enabled)
+{
+ viewMenu->setEnabled(enabled);
+}
diff --git a/menuframe.h b/menuframe.h
index a15c991..8b7862a 100644
--- a/menuframe.h
+++ b/menuframe.h
@@ -53,6 +53,7 @@ class MenuFrame : public QFrame
public:
MenuFrame(QWidget* parent, QMenu* menu);
void setHasPointer(bool hasPointer);
+ void enableViewMenu(bool enabled);
private:
void applyStyle();
--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2gokdriveclient.git
More information about the x2go-commits
mailing list