basctl/inc/strings.hrc | 2 + basctl/source/basicide/macrodlg.cxx | 8 +--- basctl/source/basicide/macrodlg.hxx | 3 - basctl/uiconfig/basicide/ui/basicmacrodialog.ui | 40 +++--------------------- solenv/sanitizers/ui/modules/BasicIDE.suppr | 2 - 5 files changed, 11 insertions(+), 44 deletions(-)
New commits: commit a635742d53086db8a7edb1d7502a96494d762055 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Thu Aug 7 16:47:45 2025 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Fri Aug 8 05:49:15 2025 +0200 tdf#130857 basctl: Don't use GtkBox as GtkFrame label child This is a similar change to previous commit Change-Id: I86754be7c0ce068ceb6216fd0463657b05f4ca41 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Thu Aug 7 16:15:12 2025 +0200 tdf#130857 svx: Don't use GtkBox as GtkFrame label child , but for a different dialog. See the commit message of the above-mentioned commit for more background. The dialog adjusted in this commit can be triggered from Writer using "Tools" -> "Macros" -> "Organize Macros" -> "Basic". Change-Id: Ibe1f3ea10d27c6032906ca716859f1d961239304 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189113 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/basctl/inc/strings.hrc b/basctl/inc/strings.hrc index 8dba3f960c93..60cf263b9ac8 100644 --- a/basctl/inc/strings.hrc +++ b/basctl/inc/strings.hrc @@ -84,6 +84,8 @@ #define RID_STR_TRANSLATION_DEFAULT NC_("RID_STR_TRANSLATION_DEFAULT", "[Default Language]") #define RID_STR_DOCUMENT_OBJECTS NC_("RID_STR_DOCUMENT_OBJECTS", "Document Objects") #define RID_STR_USERFORMS NC_("RID_STR_USERFORMS", "Forms") +#define RID_STR_MACRO_FROM NC_("RID_STR_MACRO_FROM", "Macro From") +#define RID_STR_SAVE_MACRO_IN NC_("RID_STR_SAVE_MACRO_IN", "Save Macro In") #define RID_STR_NORMAL_MODULES NC_("RID_STR_NORMAL_MODULES", "Modules") #define RID_STR_CLASS_MODULES NC_("RID_STR_CLASS_MODULES", "Class Modules") #define RID_STR_DLGIMP_CLASH_RENAME NC_("RID_STR_DLGIMP_CLASH_RENAME", "Rename") diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index f6f213a7e23f..f8ba42ce4626 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -59,8 +59,7 @@ MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame , bForceStoreBasic(false) , nMode(All) , m_xMacroNameEdit(m_xBuilder->weld_entry(u"macronameedit"_ustr)) - , m_xMacroFromTxT(m_xBuilder->weld_label(u"macrofromft"_ustr)) - , m_xMacrosSaveInTxt(m_xBuilder->weld_label(u"macrotoft"_ustr)) + , m_xMacroLibsFrame(m_xBuilder->weld_frame(u"librariesframe"_ustr)) , m_xBasicBox(new SbTreeListBox(m_xBuilder->weld_tree_view(u"libraries"_ustr), m_xDialog.get())) , m_xBasicBoxIter(m_xBasicBox->make_iterator()) , m_xMacrosInTxt(m_xBuilder->weld_label(u"existingmacrosft"_ustr)) @@ -94,7 +93,7 @@ MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame m_xNewModButton->connect_clicked( LINK( this, MacroChooser, ButtonHdl ) ); m_xNewLibButton->hide(); // default m_xNewModButton->hide(); // default - m_xMacrosSaveInTxt->hide(); // default + m_xMacroLibsFrame->set_label(IDEResId(RID_STR_MACRO_FROM)); // default m_xMacroNameEdit->connect_changed( LINK( this, MacroChooser, EditModifyHdl ) ); @@ -853,11 +852,10 @@ void MacroChooser::SetMode (Mode nM) m_xDelButton->hide(); m_xNewButton->hide(); m_xOrganizeButton->hide(); - m_xMacroFromTxT->hide(); m_xNewLibButton->show(); m_xNewModButton->show(); - m_xMacrosSaveInTxt->show(); + m_xMacroLibsFrame->set_label(IDEResId(RID_STR_SAVE_MACRO_IN)); break; } diff --git a/basctl/source/basicide/macrodlg.hxx b/basctl/source/basicide/macrodlg.hxx index 0e50ee5de02b..a558c352bc1b 100644 --- a/basctl/source/basicide/macrodlg.hxx +++ b/basctl/source/basicide/macrodlg.hxx @@ -73,8 +73,7 @@ private: void RestoreMacroDescription(); std::unique_ptr<weld::Entry> m_xMacroNameEdit; - std::unique_ptr<weld::Label> m_xMacroFromTxT; - std::unique_ptr<weld::Label> m_xMacrosSaveInTxt; + std::unique_ptr<weld::Frame> m_xMacroLibsFrame; std::unique_ptr<SbTreeListBox> m_xBasicBox; std::unique_ptr<weld::TreeIter> m_xBasicBoxIter; std::unique_ptr<weld::Label> m_xMacrosInTxt; diff --git a/basctl/uiconfig/basicide/ui/basicmacrodialog.ui b/basctl/uiconfig/basicide/ui/basicmacrodialog.ui index f22617184bc1..f0c09cad8d76 100644 --- a/basctl/uiconfig/basicide/ui/basicmacrodialog.ui +++ b/basctl/uiconfig/basicide/ui/basicmacrodialog.ui @@ -178,7 +178,7 @@ </packing> </child> <child> - <object class="GtkFrame" id="frame2"> + <object class="GtkFrame" id="librariesframe"> <property name="visible">True</property> <property name="can-focus">False</property> <property name="hexpand">True</property> @@ -235,42 +235,12 @@ </object> </child> <child type="label"> - <object class="GtkBox" id="box2"> + <object class="GtkLabel"> <property name="visible">True</property> <property name="can-focus">False</property> - <property name="orientation">vertical</property> - <child> - <object class="GtkLabel" id="macrofromft"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="basicmacrodialog|macrofromft">Macro From</property> - <property name="xalign">0</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">0</property> - </packing> - </child> - <child> - <object class="GtkLabel" id="macrotoft"> - <property name="visible">True</property> - <property name="can-focus">False</property> - <property name="label" translatable="yes" context="basicmacrodialog|macrotoft">Save Macro In</property> - <property name="xalign">0</property> - <attributes> - <attribute name="weight" value="bold"/> - </attributes> - </object> - <packing> - <property name="expand">False</property> - <property name="fill">True</property> - <property name="position">1</property> - </packing> - </child> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> </object> </child> </object> diff --git a/solenv/sanitizers/ui/modules/BasicIDE.suppr b/solenv/sanitizers/ui/modules/BasicIDE.suppr index d504ecaaa2ff..76d2922ed271 100644 --- a/solenv/sanitizers/ui/modules/BasicIDE.suppr +++ b/solenv/sanitizers/ui/modules/BasicIDE.suppr @@ -1,5 +1,3 @@ -basctl/uiconfig/basicide/ui/basicmacrodialog.ui://GtkLabel[@id='macrofromft'] orphan-label -basctl/uiconfig/basicide/ui/basicmacrodialog.ui://GtkLabel[@id='macrotoft'] orphan-label basctl/uiconfig/basicide/ui/defaultlanguage.ui://GtkLabel[@id='defined'] orphan-label basctl/uiconfig/basicide/ui/defaultlanguage.ui://GtkLabel[@id='added'] orphan-label basctl/uiconfig/basicide/ui/defaultlanguage.ui://GtkLabel[@id='alttitle'] orphan-label