From da501ad185ee35ac85724866035b813fe08d8717 Mon Sep 17 00:00:00 2001 From: Rafael Dominguez Date: Sun, 29 Jul 2012 22:35:50 -0430 Subject: Show/Hide template delete action depending on the view. Change-Id: Ia414e9c2ea8d1944b378e373e77607fad531b45f --- sfx2/source/doc/templatedlg.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index 3b327dfcb66a..9d0cd285183a 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -868,6 +868,9 @@ void SfxTemplateManagerDlg::switchMainView(bool bDisplayLocal) mpViewBar->ShowItem(TBI_TEMPLATE_ONLINE); mpViewBar->HideItem(TBI_TEMPLATE_LOCAL); + // Enable deleting items from the filesystem + mpTemplateBar->ShowItem(TBI_TEMPLATE_DELETE); + mpOnlineView->Hide(); maView->Show(); } @@ -878,6 +881,9 @@ void SfxTemplateManagerDlg::switchMainView(bool bDisplayLocal) mpViewBar->ShowItem(TBI_TEMPLATE_LOCAL); mpViewBar->HideItem(TBI_TEMPLATE_ONLINE); + // Disable deleting items from remote repositories + mpTemplateBar->HideItem(TBI_TEMPLATE_DELETE); + maView->Hide(); mpOnlineView->Show(); } -- cgit