This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient.
commit 25370435b9da31f6c8b66dd0e7e5426c92011867 Author: Oleksandr Shneyder <o.shney...@phoca-gmbh.de> Date: Fri Nov 5 09:53:15 2021 -0600 Fix loading HTTP icon in pass dialog in broker mode. --- debian/changelog | 1 + src/onmainwindow.cpp | 27 ++++++++++++++++++++++++--- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 5d10ed9..5b3a966 100644 --- a/debian/changelog +++ b/debian/changelog @@ -30,6 +30,7 @@ x2goclient (4.1.2.3-0x2go1) UNRELEASED; urgency=medium - Set toolTip with detailed information for session button. - Show session path in session button in Favorite and Running views. - Improve synchronisation in broker mode. + - Fix loading HTTP icon in pass dialog in broker mode. [ Ryan Schmidt ] * New upstream version (4.1.2.3): diff --git a/src/onmainwindow.cpp b/src/onmainwindow.cpp index cee1e15..c580f34 100644 --- a/src/onmainwindow.cpp +++ b/src/onmainwindow.cpp @@ -2857,11 +2857,31 @@ void ONMainWindow::slotSelectedFromList ( SessionButton* session ) command=transAppName ( command ); login->setText ( userName ); x2goDebug << "Creating QPixmap with session icon: '" << sessIcon << "'."; - QPixmap pix ( sessIcon ); + QPixmap* pix; + + if (!brokerMode || sessIcon == iconsPath("/128x128/x2gosession.png")) + pix=new QPixmap( sessIcon ); + else + { + pix=new QPixmap; + if(sessIcon.indexOf("file://")!=-1) + { + //load icon from file URL + pix->load(sessIcon.replace("file://","")); + } + else + pix->loadFromData(QByteArray::fromBase64(sessIcon.toLatin1())); + if(pix->isNull()) + { + //loading icon has failed, load default icon + pix->load(iconsPath("/128x128/x2gosession.png")); + } + } + if ( !miniMode ) { fotoLabel->setPixmap ( - pix.scaled ( 64,64, + pix->scaled ( 64,64, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) ); fotoLabel->setFixedSize ( 64,64 ); @@ -2869,12 +2889,13 @@ void ONMainWindow::slotSelectedFromList ( SessionButton* session ) else { fotoLabel->setPixmap ( - pix.scaled ( 48,48, + pix->scaled ( 48,48, Qt::IgnoreAspectRatio, Qt::SmoothTransformation ) ); fotoLabel->setFixedSize ( 48,48 ); } + delete pix; if(currentKey.length()<=0) { currentKey=findSshKeyForServer(userName, server, sshPort); -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2goclient.git _______________________________________________ x2go-commits mailing list x2go-commits@lists.x2go.org https://lists.x2go.org/listinfo/x2go-commits