This is an automated email from the git hooks/post-receive script. x2go pushed a change to branch master in repository x2goclient. from 16302a4 Add Estonian translation file. new 5e48b9c Save folder icons Base64 coded. Save icons under General\icon_<PATH>. The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Summary of changes: debian/changelog | 1 + folderbutton.cpp | 4 ++-- sessionexplorer.cpp | 12 ++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git
This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2goclient. commit 5e48b9cd0d17c6e3cc8c84bfae7f0596268107df Author: Oleksandr Shneyder <o.shneyder@phoca-gmbh.de> Date: Wed Sep 10 15:50:31 2014 +0200 Save folder icons Base64 coded. Save icons under General\icon_<PATH>. --- debian/changelog | 1 + folderbutton.cpp | 4 ++-- sessionexplorer.cpp | 12 ++++++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/debian/changelog b/debian/changelog index 6a40f48..cf0b377 100644 --- a/debian/changelog +++ b/debian/changelog @@ -40,6 +40,7 @@ x2goclient (4.0.3.0-0x2go1) UNRELEASED; urgency=low - Disable sessions explorer "back" button if user sessions disabled. - Include <QDir> in sessionexplorer.cpp. - Remove deprecated workaround in wapi.cpp. + - Save folder icons Base64 coded. Save icons under General\icon_<PATH>. [ Mike DePaulo ] * New upstream release (4.0.3.0): diff --git a/folderbutton.cpp b/folderbutton.cpp index 1c12f97..9c673a2 100644 --- a/folderbutton.cpp +++ b/folderbutton.cpp @@ -111,8 +111,8 @@ void FolderButton::loadIcon() QString normPath=(path+"/"+name).split("/",QString::SkipEmptyParts).join("::"); - QByteArray picture=st->setting()->value ( normPath, - ( QVariant )QByteArray()).toByteArray(); + QByteArray picture = QByteArray::fromBase64( st->setting()->value ( "icon_"+normPath, + ( QVariant )QString()).toString().toLocal8Bit()); if(!picture.size()) { pix=new QPixmap( sessIcon ); diff --git a/sessionexplorer.cpp b/sessionexplorer.cpp index 8173e57..209ee99 100644 --- a/sessionexplorer.cpp +++ b/sessionexplorer.cpp @@ -111,9 +111,13 @@ void SessionExplorer::getFoldersFromConfig() QString folder; foreach(folder,folders) { - folder.replace("::","/"); - if(findFolder(folder)==-1) - createFolder(folder); + if(folder.indexOf("icon_")==0) + { + folder=folder.mid(strlen("icon_")); + folder.replace("::","/"); + if(findFolder(folder)==-1) + createFolder(folder); + } } } @@ -431,7 +435,7 @@ void SessionExplorer::setFolderIcon(QString path, QString icon) buffer.open(QIODevice::WriteOnly); pix.save(&buffer,"PNG"); x2goDebug<<"Save: "<<path; - st->setting()->setValue(path, bytes); + st->setting()->setValue("icon_"+path, QString(bytes.toBase64())); st->setting()->sync(); FolderButton* b; foreach(b, folders) -- Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goclient.git