framework/inc/classes/resource.hrc | 1 + framework/source/classes/resource.src | 5 +++++ framework/source/fwe/helper/titlehelper.cxx | 8 ++++++++ include/framework/titlehelper.hxx | 1 + 4 files changed, 15 insertions(+)
New commits: commit 291d8d4f9460f8d5292cab2ef706fd8b501641b4 Author: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> Date: Thu Nov 3 09:26:02 2016 +0100 SafeMode: Add indicator to window title when in Safe Mode Change-Id: I1d8350315768093b4c4af1cd8b732602c5217edb Reviewed-on: https://gerrit.libreoffice.org/30518 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de> diff --git a/framework/inc/classes/resource.hrc b/framework/inc/classes/resource.hrc index 49c051c..f3ad7e6 100644 --- a/framework/inc/classes/resource.hrc +++ b/framework/inc/classes/resource.hrc @@ -51,6 +51,7 @@ #define STR_CLEAR_RECENT_FILES_HELP (RID_STR_START+24) #define STR_LANGSTATUS_HINT (RID_STR_START+25) #define STR_REMOTE_TITLE (RID_STR_START+26) +#define STR_SAFEMODE_TITLE (RID_STR_START+27) #define IMG_SAVEMODIFIED_SMALL (RID_IMAGE_START+0) #define IMG_SAVEMODIFIED_LARGE (RID_IMAGE_START+1) diff --git a/framework/source/classes/resource.src b/framework/source/classes/resource.src index dd5d877..a95149f 100644 --- a/framework/source/classes/resource.src +++ b/framework/source/classes/resource.src @@ -118,6 +118,11 @@ String STR_REMOTE_TITLE Text [ en-US ] = " (Remote)"; }; +String STR_SAFEMODE_TITLE +{ + Text [ en-US ] = " (Safe Mode)"; +}; + String STR_TOOLBAR_TITLE_ADDON { Text [ en-US ] = "Add-On %num%"; diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx index cbd18f9..1e7e797 100644 --- a/framework/source/fwe/helper/titlehelper.cxx +++ b/framework/source/fwe/helper/titlehelper.cxx @@ -37,6 +37,7 @@ #include <osl/mutex.hxx> #include <tools/urlobj.hxx> #include <vcl/opengl/OpenGLWrapper.hxx> +#include <vcl/svapp.hxx> namespace framework{ @@ -492,6 +493,7 @@ void TitleHelper::impl_updateTitleForFrame (const css::uno::Reference< css::fram impl_appendModuleName (sTitle); impl_appendDebugVersion (sTitle); #endif + impl_appendSafeMode (sTitle); // SYNCHRONIZED -> aLock.reset (); @@ -579,6 +581,12 @@ void TitleHelper::impl_appendDebugVersion (OUStringBuffer&) } #endif +void TitleHelper::impl_appendSafeMode (OUStringBuffer& sTitle) +{ + if (Application::IsSafeModeEnabled()) + sTitle.append(FwkResId (STR_SAFEMODE_TITLE)); +} + void TitleHelper::impl_startListeningForModel (const css::uno::Reference< css::frame::XModel >& xModel) { css::uno::Reference< css::document::XDocumentEventBroadcaster > xBroadcaster(xModel, css::uno::UNO_QUERY); diff --git a/include/framework/titlehelper.hxx b/include/framework/titlehelper.hxx index 48c05c9..5fe23b7 100644 --- a/include/framework/titlehelper.hxx +++ b/include/framework/titlehelper.hxx @@ -160,6 +160,7 @@ class FWE_DLLPUBLIC TitleHelper : private ::cppu::BaseMutex void impl_appendProductName (OUStringBuffer& sTitle); void impl_appendModuleName (OUStringBuffer& sTitle); void impl_appendDebugVersion (OUStringBuffer& sTitle); + void impl_appendSafeMode (OUStringBuffer& sTitle); void impl_setSubTitle (const css::uno::Reference< css::frame::XTitle >& xSubTitle); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits