tdf#160961: hide open remote file button from startcenter if the
.uno:OpenRemote command is not available (e.g disabled in a config file). We also hide the Open remote file (and other) buttons in the Menubar if they are settled to disable. Change-Id: Ieb45c63b5d6aaf81d0eb7fa8947a9e109bee86f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167040 Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Tested-by: Jenkins
This commit is contained in:
committed by
Samuel Mehrbrodt
parent
f840d3c939
commit
2fdcdad742
@@ -28,6 +28,7 @@
|
||||
|
||||
#include <unotools/historyoptions.hxx>
|
||||
#include <unotools/moduleoptions.hxx>
|
||||
#include <unotools/cmdoptions.hxx>
|
||||
#include <unotools/configmgr.hxx>
|
||||
#include <svtools/openfiledroptargetlistener.hxx>
|
||||
#include <svtools/colorcfg.hxx>
|
||||
@@ -307,7 +308,14 @@ void BackingWindow::initControls()
|
||||
mxExtensionsButton->connect_clicked(LINK(this, BackingWindow, ExtLinkClickHdl));
|
||||
|
||||
mxOpenButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
|
||||
mxRemoteButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
|
||||
|
||||
// Hide OpenRemote button on startpage if the OpenRemote uno command is not available
|
||||
SvtCommandOptions aCmdOptions;
|
||||
if (SvtCommandOptions().HasEntriesDisabled() && aCmdOptions.LookupDisabled("OpenRemote"))
|
||||
mxRemoteButton->set_visible(false);
|
||||
else
|
||||
mxRemoteButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
|
||||
|
||||
mxWriterAllButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
|
||||
mxDrawAllButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
|
||||
mxCalcAllButton->connect_clicked(LINK(this, BackingWindow, ClickHdl));
|
||||
|
Reference in New Issue
Block a user