cui/source/options/personalization.cxx | 19 ++++++++++--------- cui/source/options/personalization.hxx | 8 +++++++- 2 files changed, 17 insertions(+), 10 deletions(-)
New commits: commit b6b31bbb1a9e2272ac77de127825c4ee9f71effa Author: Muhammet Kara <muhammet.k...@pardus.org.tr> AuthorDate: Tue Oct 23 21:44:37 2018 +0300 Commit: Heiko Tietze <tietze.he...@gmail.com> CommitDate: Wed Oct 24 13:46:58 2018 +0200 tdf#120746: Show the name of the persona as tooltip in the search results Change-Id: Ie6de25e93f0e96a1a5b1cf5c4d465dfb45afc7f7 Reviewed-on: https://gerrit.libreoffice.org/62249 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.he...@gmail.com> diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index e46a15454ceb..d1e3b7fcef56 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -383,10 +383,11 @@ void SelectPersonaDialog::SetProgress( const OUString& rProgress ) } } -void SelectPersonaDialog::SetImages( const Image& aImage, sal_Int32 nIndex ) +void SelectPersonaDialog::SetImages( const Image& aImage, const OUString& sName, const sal_Int32& nIndex ) { m_vResultList[nIndex]->Enable(); m_vResultList[nIndex]->SetModeImage( aImage ); + m_vResultList[nIndex]->SetQuickHelpText( sName ); } void SelectPersonaDialog::AddPersonaSetting( OUString const & rPersonaSetting ) @@ -894,11 +895,11 @@ void SearchAndParseThread::execute() INetURLObject aURLObj( aPreviewFile ); - OUString aPersonaSetting = personaInfos[nIndex].sSlug - + ";" + personaInfos[nIndex].sName - + ";" + personaInfos[nIndex].sHeaderURL - + ";" + personaInfos[nIndex].sFooterURL - + ";" + personaInfos[nIndex].sTextColor; + OUString aPersonaSetting = personaInfo.sSlug + + ";" + personaInfo.sName + + ";" + personaInfo.sHeaderURL + + ";" + personaInfo.sFooterURL + + ";" + personaInfo.sTextColor; m_pPersonaDialog->AddPersonaSetting( aPersonaSetting ); @@ -907,10 +908,10 @@ void SearchAndParseThread::execute() aFilter.ImportGraphic( aGraphic, aURLObj ); BitmapEx aBmp = aGraphic.GetBitmapEx(); - m_pPersonaDialog->SetImages( Image( aBmp ), nIndex++ ); + m_pPersonaDialog->SetImages( Image( aBmp ), personaInfo.sName, nIndex ); m_pPersonaDialog->setOptimalLayoutSize(); - if (nIndex >= MAX_RESULTS) + if (++nIndex >= MAX_RESULTS) break; } @@ -969,7 +970,7 @@ void SearchAndParseThread::execute() aFilter.ImportGraphic( aGraphic, aURLObj ); BitmapEx aBmp = aGraphic.GetBitmapEx(); - m_pPersonaDialog->SetImages( Image( aBmp ), 0 ); + m_pPersonaDialog->SetImages( Image( aBmp ), aPersonaInfo.sName, 0 ); m_pPersonaDialog->setOptimalLayoutSize(); } diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx index 4eb55b589f60..260fa9ad469a 100644 --- a/cui/source/options/personalization.hxx +++ b/cui/source/options/personalization.hxx @@ -117,7 +117,13 @@ public: OUString GetSelectedPersona() const; void SetProgress( const OUString& ); - void SetImages( const Image&, sal_Int32 ); + /** + * @brief Assings preview images to result buttons + * @param aPreviewImage Persona preview image + * @param sName Name of the persona + * @param nIndex Index number of the result button + */ + void SetImages(const Image& aPreviewImage, const OUString& sName, const sal_Int32& nIndex ); void AddPersonaSetting( OUString const & ); void ClearSearchResults(); void SetAppliedPersonaSetting( OUString const & ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits