Revert "Resolves tdf#131817 - Option to globally switch toolbar locking on/off"
This reverts commit 086fa727ca.
Reason for revert: Breaks possibility to lock a toolbar (is forgotten after restart)
This solution will be succeeded by 1b1577eef6a30f2643d373c450576d5244ab6af1
Change-Id: Ida73a80ecfa2a833caf1db7d625ff90dbf259c2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196780
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
This commit is contained in:
committed by
Heiko Tietze
parent
04121e1740
commit
3d79b30b7f
@@ -44,7 +44,6 @@
|
||||
#define STR_FULL_DISC_RETRY_BUTTON NC_("STR_FULL_DISC_RETRY_BUTTON", "Retry" )
|
||||
#define STR_FULL_DISC_MSG NC_("STR_FULL_DISC_MSG", "%PRODUCTNAME could not save important internal information due to insufficient free disk space at the following location:\n%PATH\n\nYou will not be able to continue working with %PRODUCTNAME without allocating more free disk space at that location.\n\nPress the 'Retry' button after you have allocated more free disk space to retry saving the data.\n\n" )
|
||||
#define STR_RESTORE_TOOLBARS NC_("STR_RESTORE_TOOLBARS", "~Reset" )
|
||||
#define STR_LOCK_TOOLBARS NC_("STR_LOCK_TOOLBARS", "~Lock Toolbars" )
|
||||
#define STR_CORRUPT_UICFG_SHARE NC_("STR_CORRUPT_UICFG_SHARE", "An error occurred while loading the user interface configuration data. The application will be terminated now.\nPlease try to reinstall the application." )
|
||||
#define STR_CORRUPT_UICFG_USER NC_("STR_CORRUPT_UICFG_USER", "An error occurred while loading the user interface configuration data. The application will be terminated now.\nPlease try to remove your user profile for the application." )
|
||||
#define STR_CORRUPT_UICFG_GENERAL NC_("STR_CORRUPT_UICFG_GENERAL", "An error occurred while loading the user interface configuration data. The application will be terminated now.\nPlease try to remove your user profile for the application first or try to reinstall the application." )
|
||||
|
||||
@@ -1892,7 +1892,10 @@ void ToolBarManager::AddCustomizeMenuItems(ToolBox const * pToolBar)
|
||||
pMenu->EnableItem(MENUITEM_TOOLBAR_DOCKALLTOOLBAR, false);
|
||||
Reference< XDockableWindow > xDockable( VCLUnoHelper::GetInterface( m_pToolBar ), UNO_QUERY );
|
||||
if( xDockable.is() )
|
||||
{
|
||||
pMenu->CheckItem(MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, xDockable->isLocked());
|
||||
pMenu->EnableItem(MENUITEM_TOOLBAR_UNDOCKTOOLBAR, !xDockable->isLocked());
|
||||
}
|
||||
}
|
||||
else
|
||||
pMenu->EnableItem(MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, false);
|
||||
|
||||
@@ -67,7 +67,6 @@ using namespace ::com::sun::star::container;
|
||||
using namespace ::com::sun::star::ui;
|
||||
|
||||
constexpr OUString CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility"_ustr;
|
||||
constexpr OUStringLiteral CMD_LOCKTOOLBARS = u".uno:ToolbarLock";
|
||||
|
||||
constexpr OUString STATIC_CMD_PART = u".uno:AvailableToolbars?Toolbar:string="_ustr;
|
||||
const char STATIC_INTERNAL_CMD_PART[] = ".cmd:";
|
||||
@@ -438,8 +437,6 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co
|
||||
|
||||
OUString aLabelStr(FwkResId(STR_RESTORE_TOOLBARS));
|
||||
addCommand( m_xPopupMenu, CMD_RESTOREVISIBILITY, aLabelStr );
|
||||
aLabelStr = FwkResId(STR_LOCK_TOOLBARS);
|
||||
addCommand( m_xPopupMenu, CMD_LOCKTOOLBARS, aLabelStr );
|
||||
}
|
||||
|
||||
// XEventListener
|
||||
|
||||
@@ -293,7 +293,6 @@ class SvxZoomItem;
|
||||
#define SID_ADDITIONS_DIALOG (SID_SFX_START + 1740)
|
||||
#define FN_PARAM_ADDITIONS_TAG TypedWhichId<SfxStringItem>(SID_SFX_START + 1741)
|
||||
#define SID_UI_PICKER (SID_SFX_START + 1742)
|
||||
#define SID_TOOLBAR_LOCK TypedWhichId<SfxBoolItem>(SID_SFX_START + 1743)
|
||||
#define SID_WIDGET_TEST_DIALOG (SID_SFX_START + 1744)
|
||||
#define FN_CHANGE_THEME (SID_SFX_START + 1745)
|
||||
#define FN_PARAM_NEW_THEME TypedWhichId<SfxStringItem>(SID_SFX_START + 1746)
|
||||
|
||||
@@ -59,9 +59,6 @@ enum RestartReason {
|
||||
// For the Calculation settings changes to take effect,
|
||||
// %PRODUCTNAME must be restarted:
|
||||
RESTART_REASON_CALCULATION,
|
||||
// To apply changes, %PRODUCTNAME,
|
||||
// %PRODUCTNAME must be restarted:
|
||||
RESTART_REASON_UI_CHANGE,
|
||||
// No particular reason:
|
||||
RESTART_REASON_NONE
|
||||
};
|
||||
|
||||
@@ -7119,17 +7119,6 @@ bit 3 (0x8): #define UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
|
||||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:ToolbarLock" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Lock Toolbars</value>
|
||||
</prop>
|
||||
<prop oor:name="TooltipLabel" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Lock or unlock all toolbars</value>
|
||||
</prop>
|
||||
<prop oor:name="Properties" oor:type="xs:int">
|
||||
<value>1</value>
|
||||
</prop>
|
||||
</node>
|
||||
<node oor:name=".uno:ClickChangeRotation" oor:op="replace">
|
||||
<prop oor:name="Label" oor:type="xs:string">
|
||||
<value xml:lang="en-US">Rotation Mode after Clicking Object</value>
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
TRUE = All toolbars should be locked by default.
|
||||
FALSE = All toolbars should never be locked by default.
|
||||
-->
|
||||
<value>true</value>
|
||||
</prop>
|
||||
<prop oor:name="Docked" oor:type="xs:boolean">
|
||||
<info>
|
||||
@@ -58,7 +57,6 @@
|
||||
<info>
|
||||
<desc>Determines if the global states set should be used or not."</desc>
|
||||
</info>
|
||||
<value>true</value>
|
||||
</prop>
|
||||
<node-ref oor:name="States" oor:node-type="GlobalWindowState">
|
||||
<info>
|
||||
|
||||
@@ -245,11 +245,6 @@ interface Application
|
||||
ExecMethod = MiscExec_Impl ;
|
||||
StateMethod = MiscState_Impl ;
|
||||
]
|
||||
SID_TOOLBAR_LOCK
|
||||
[
|
||||
ExecMethod = MiscExec_Impl ;
|
||||
StateMethod = MiscState_Impl ;
|
||||
]
|
||||
SID_EXTENSION_MANAGER
|
||||
[
|
||||
ExecMethod = MiscExec_Impl ;
|
||||
|
||||
@@ -6000,22 +6000,6 @@ SfxVoidItem AdditionsDialog SID_ADDITIONS_DIALOG
|
||||
GroupId = SfxGroupId::Application;
|
||||
]
|
||||
|
||||
SfxBoolItem ToolbarLock SID_TOOLBAR_LOCK
|
||||
[
|
||||
AutoUpdate = TRUE,
|
||||
FastCall = FALSE,
|
||||
ReadOnlyDoc = TRUE,
|
||||
Toggle = TRUE,
|
||||
Container = FALSE,
|
||||
RecordAbsolute = FALSE,
|
||||
RecordPerSet;
|
||||
|
||||
AccelConfig = FALSE,
|
||||
MenuConfig = FALSE,
|
||||
ToolBoxConfig = TRUE,
|
||||
GroupId = SfxGroupId::Application;
|
||||
]
|
||||
|
||||
SfxVoidItem WidgetTestDialog SID_WIDGET_TEST_DIALOG
|
||||
()
|
||||
[
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
#include <sal/log.hxx>
|
||||
#include <osl/file.hxx>
|
||||
#include <vcl/EnumContext.hxx>
|
||||
#include <vcl/toolbox.hxx>
|
||||
#include <vcl/themecolors.hxx>
|
||||
|
||||
#include <unotools/moduleoptions.hxx>
|
||||
@@ -1312,31 +1311,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
|
||||
aDialog.run();
|
||||
break;
|
||||
}
|
||||
case SID_TOOLBAR_LOCK:
|
||||
{
|
||||
if (SfxViewFrame* pViewFrame = SfxViewFrame::Current())
|
||||
{
|
||||
Reference<XFrame> xCurrentFrame;
|
||||
const uno::Reference<uno::XComponentContext>& xContext
|
||||
= ::comphelper::getProcessComponentContext();
|
||||
xCurrentFrame = pViewFrame->GetFrame().GetFrameInterface();
|
||||
const Reference<frame::XModuleManager> xModuleManager
|
||||
= frame::ModuleManager::create(xContext);
|
||||
const utl::OConfigurationTreeRoot aAppNode(
|
||||
xContext, u"org.openoffice.Office.UI.GlobalSettings/Toolbars/States"_ustr, true);
|
||||
if (aAppNode.isValid())
|
||||
{
|
||||
bool isLocked = comphelper::getBOOL(aAppNode.getNodeValue(u"Locked"_ustr));
|
||||
aAppNode.setNodeValue(u"Locked"_ustr, Any(!isLocked));
|
||||
aAppNode.commit();
|
||||
//TODO: apply immediately w/o restart needed
|
||||
SolarMutexGuard aGuard;
|
||||
svtools::executeRestartDialog(comphelper::getProcessComponentContext(), nullptr,
|
||||
svtools::RESTART_REASON_UI_CHANGE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1550,11 +1524,6 @@ void SfxApplication::MiscState_Impl(SfxItemSet &rSet)
|
||||
rSet.DisableItem(nWhich);
|
||||
}
|
||||
break;
|
||||
case SID_TOOLBAR_LOCK:
|
||||
{
|
||||
rSet.Put( SfxBoolItem( SID_TOOLBAR_LOCK, ToolBox::AlwaysLocked() ));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -69,9 +69,6 @@ public:
|
||||
case svtools::RESTART_REASON_CALCULATION:
|
||||
reason_ = m_xBuilder->weld_widget(u"reason_calculation"_ustr);
|
||||
break;
|
||||
case svtools::RESTART_REASON_UI_CHANGE:
|
||||
reason_ = m_xBuilder->weld_widget(u"reason_uichange"_ustr);
|
||||
break;
|
||||
default:
|
||||
assert(false); // this cannot happen
|
||||
}
|
||||
|
||||
@@ -215,21 +215,6 @@
|
||||
<property name="position">9</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="reason_uichange">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="label" translatable="yes" context="restartdialog|reason_extension_install">To apply changes, %PRODUCTNAME must be restarted.</property>
|
||||
<property name="wrap">True</property>
|
||||
<property name="max-width-chars">50</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">10</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="reason_calculation">
|
||||
<property name="can-focus">False</property>
|
||||
@@ -242,7 +227,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">11</property>
|
||||
<property name="position">10</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -256,7 +241,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">13</property>
|
||||
<property name="position">11</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -271,7 +256,7 @@
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">14</property>
|
||||
<property name="position">12</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
Reference in New Issue
Block a user