[Libreoffice-commits] core.git: uui/source

Andreas Heinisch (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 9 19:46:38 UTC 2021


 uui/source/passworddlg.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 17694c906f94a195a2d5086e0e87afa1c852107b
Author:     Andreas Heinisch <andreas.heinisch at yahoo.de>
AuthorDate: Mon Jun 7 14:00:23 2021 +0200
Commit:     Andreas Heinisch <andreas.heinisch at yahoo.de>
CommitDate: Wed Jun 9 21:45:53 2021 +0200

    tdf#66553 - Add file/product name to title bar for password managers
    
    Change-Id: I6a16e654edcbc3511ee8cbea0889d858e22f2a2c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116782
    Tested-by: Jenkins
    Reviewed-by: Andreas Heinisch <andreas.heinisch at yahoo.de>

diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 3e8d1550f6cd..694e717216b1 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -21,6 +21,7 @@
 #include <strings.hrc>
 
 #include <unotools/resmgr.hxx>
+#include <unotools/configmgr.hxx>
 #include <tools/urlobj.hxx>
 #include <tools/debug.hxx>
 #include <vcl/svapp.hxx>
@@ -78,6 +79,14 @@ PasswordDialog::PasswordDialog(weld::Window* pParent,
     const char* pStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN;
     OUString aMessage(Translate::get(pStrId, rResLocale));
     INetURLObject url(aDocURL);
+
+    // tdf#66553 - add file name to title bar for password managers
+    OUString aFileName = url.getName(INetURLObject::LAST_SEGMENT, true,
+                                     INetURLObject::DecodeMechanism::Unambiguous);
+    if (!aFileName.isEmpty())
+        aFileName += " - " + utl::ConfigManager::getProductName();
+    m_xDialog->set_title(aTitle + " - " + aFileName);
+
     aMessage += url.HasError()
         ? aDocURL : url.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);
     m_xFTPassword->set_label(aMessage);


More information about the Libreoffice-commits mailing list