cui/uiconfig/ui/breaknumberoption.ui | 113 +++++++++++++++++------------------ vcl/inc/qt5/QtInstanceTreeView.hxx | 6 - vcl/qt5/QtInstanceBuilder.cxx | 1 vcl/qt5/QtInstanceTreeView.cxx | 27 +++----- 4 files changed, 70 insertions(+), 77 deletions(-)
New commits: commit 37382153c480393569a0d2e29d115b80efda2f41 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Feb 21 19:57:08 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Feb 22 10:55:22 2025 +0100 cui: Resave breaknumberoption.ui with glade 3.40 Dialog can be triggered e.g. like this in Writer: * "Tools" -> "Spelling" -> "Options" * select the Hungarian dictionary * in the "Options" treeview, select "Minimal number of characters for hyphenation" * click the "Edit" button Change-Id: I47685d691ceedfe93147c21b0ac38f23354c768c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182019 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/cui/uiconfig/ui/breaknumberoption.ui b/cui/uiconfig/ui/breaknumberoption.ui index 71fa24cb7c5b..0ef7b7a0664f 100644 --- a/cui/uiconfig/ui/breaknumberoption.ui +++ b/cui/uiconfig/ui/breaknumberoption.ui @@ -1,54 +1,54 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.36.0 --> +<!-- Generated with glade 3.40.0 --> <interface domain="cui"> <requires lib="gtk+" version="3.20"/> <object class="GtkAdjustment" id="adjustment1"> <property name="lower">2</property> <property name="upper">9</property> <property name="value">1</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment2"> <property name="lower">2</property> <property name="upper">9</property> <property name="value">1</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkAdjustment" id="adjustment3"> <property name="lower">2</property> <property name="upper">9</property> <property name="value">1</property> - <property name="step_increment">1</property> - <property name="page_increment">10</property> + <property name="step-increment">1</property> + <property name="page-increment">10</property> </object> <object class="GtkDialog" id="BreakNumberOption"> - <property name="can_focus">False</property> - <property name="border_width">6</property> + <property name="can-focus">False</property> + <property name="border-width">6</property> <property name="title" translatable="yes" context="breaknumberoption|BreakNumberOption">Hyphenation</property> <property name="resizable">False</property> <property name="modal">True</property> - <property name="default_width">0</property> - <property name="default_height">0</property> - <property name="type_hint">dialog</property> + <property name="default-width">0</property> + <property name="default-height">0</property> + <property name="type-hint">dialog</property> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="orientation">vertical</property> <property name="spacing">12</property> <child internal-child="action_area"> <object class="GtkButtonBox" id="dialog-action_area1"> - <property name="can_focus">False</property> - <property name="layout_style">end</property> + <property name="can-focus">False</property> + <property name="layout-style">end</property> <child> <object class="GtkButton" id="ok"> <property name="label" translatable="yes" context="stock">_OK</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="can_default">True</property> - <property name="has_default">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="can-default">True</property> + <property name="has-default">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -61,8 +61,8 @@ <object class="GtkButton" id="cancel"> <property name="label" translatable="yes" context="stock">_Cancel</property> <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="receives_default">True</property> + <property name="can-focus">True</property> + <property name="receives-default">True</property> <property name="use-underline">True</property> </object> <packing> @@ -75,32 +75,32 @@ <packing> <property name="expand">False</property> <property name="fill">True</property> - <property name="pack_type">end</property> + <property name="pack-type">end</property> <property name="position">0</property> </packing> </child> <child> - <!-- n-columns=1 n-rows=1 --> + <!-- n-columns=1 n-rows=3 --> <object class="GtkGrid" id="grid1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="row_spacing">12</property> + <property name="can-focus">False</property> + <property name="row-spacing">12</property> <child> <object class="GtkFrame" id="beforeframe"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> <object class="GtkSpinButton" id="beforebreak"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">start</property> - <property name="activates_default">True</property> - <property name="adjustment">adjustment1</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> + <property name="adjustment">adjustment1</property> <child internal-child="accessible"> <object class="AtkObject" id="beforebreak-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="beforebreak">Sets the minimum number of characters of the word to be hyphenated that must remain at the end of the line.</property> @@ -111,7 +111,7 @@ <child type="label"> <object class="GtkLabel" id="beforelabel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="breaknumberoption|beforelabel">Characters Before Break</property> <attributes> <attribute name="weight" value="bold"/> @@ -120,26 +120,26 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="left-attach">0</property> + <property name="top-attach">0</property> </packing> </child> <child> <object class="GtkFrame" id="afterframe"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> <object class="GtkSpinButton" id="afterbreak"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">start</property> - <property name="activates_default">True</property> - <property name="adjustment">adjustment2</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> + <property name="adjustment">adjustment2</property> <child internal-child="accessible"> <object class="AtkObject" id="afterbreak-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="afterbreak">Specifies the minimum number of characters of a hyphenated word required at the next line.</property> @@ -150,7 +150,7 @@ <child type="label"> <object class="GtkLabel" id="afterlabel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="breaknumberoption|afterlabel">Characters After Break</property> <attributes> <attribute name="weight" value="bold"/> @@ -159,26 +159,26 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="left-attach">0</property> + <property name="top-attach">1</property> </packing> </child> <child> <object class="GtkFrame" id="miniframe"> - <property name="can_focus">False</property> - <property name="no_show_all">True</property> - <property name="label_xalign">0</property> - <property name="shadow_type">none</property> + <property name="can-focus">False</property> + <property name="no-show-all">True</property> + <property name="label-xalign">0</property> + <property name="shadow-type">none</property> <child> <object class="GtkSpinButton" id="wordlength"> <property name="visible">True</property> - <property name="can_focus">True</property> + <property name="can-focus">True</property> <property name="halign">start</property> - <property name="activates_default">True</property> - <property name="adjustment">adjustment3</property> <property name="margin-start">12</property> <property name="margin-top">6</property> + <property name="activates-default">True</property> <property name="truncate-multiline">True</property> + <property name="adjustment">adjustment3</property> <child internal-child="accessible"> <object class="AtkObject" id="wordlength-atkobject"> <property name="AtkObject::accessible-description" translatable="yes" context="wordlength">Specifies the minimum number of characters required for automatic hyphenation to be applied.</property> @@ -189,7 +189,7 @@ <child type="label"> <object class="GtkLabel" id="minimallabel"> <property name="visible">True</property> - <property name="can_focus">False</property> + <property name="can-focus">False</property> <property name="label" translatable="yes" context="breaknumberoption|minimallabel">Minimal Word Length</property> <attributes> <attribute name="weight" value="bold"/> @@ -198,8 +198,8 @@ </child> </object> <packing> - <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="left-attach">0</property> + <property name="top-attach">2</property> </packing> </child> </object> @@ -215,8 +215,5 @@ <action-widget response="-5">ok</action-widget> <action-widget response="-6">cancel</action-widget> </action-widgets> - <child type="titlebar"> - <placeholder/> - </child> </object> </interface> commit cd1d93a5fe73338f7c7130544585ff22355b975c Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Feb 21 19:52:16 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Feb 22 10:55:14 2025 +0100 tdf#130857 qt weld: Support QueryDeleteDictionaryDialog This means that native Qt widgets are used for that dialog now when using the qt5 or qt6 VCL plugin and starting LO with environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set. Dialog can be triggered like this in Writer: * "Tools" -> "Spelling" -> "Options" * select a dictionary and click "Delete" button Change-Id: Ied3566fffdcf515a9d6f2778c28ea88038cf9c53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182018 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/qt5/QtInstanceBuilder.cxx b/vcl/qt5/QtInstanceBuilder.cxx index 07e5498c6d34..b6f61314bf50 100644 --- a/vcl/qt5/QtInstanceBuilder.cxx +++ b/vcl/qt5/QtInstanceBuilder.cxx @@ -71,6 +71,7 @@ bool QtInstanceBuilder::IsUIFileSupported(const OUString& rUIFile) u"cui/ui/optnewdictionarydialog.ui"_ustr, u"cui/ui/password.ui"_ustr, u"cui/ui/pastespecial.ui"_ustr, + u"cui/ui/querydeletedictionarydialog.ui"_ustr, u"cui/ui/qrcodegen.ui"_ustr, u"cui/ui/querydialog.ui"_ustr, u"cui/ui/securityoptionsdialog.ui"_ustr, commit 08c8f9483312b531d7184785633f8121821d9725 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Feb 21 19:42:57 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Feb 22 10:55:07 2025 +0100 tdf#130857 qt weld: Also select item in QtInstanceTreeView::set_cursor Align the Qt implementation with `gtk_tree_view_set_cursor` (used in GtkInstanceTreeView::set_cursor), which [1] > Sets the current keyboard focus to be at path, and selects it. So far, QtInstanceTreeView::set_cursor was only setting the cursor (i.e. the item that has keyboard focus once focus moves to the tree view), but not updating the selection. The different behavior was seen in a WIP branch declaring support for the "Tools" -> "Spelling" -> "Options" -> "Edit" dialog in Writer where typing a word already in the list would not result in that word to become selected with qt6 and SAL_VCL_QT_USE_WELDED_WIDGETS=1 while it would with gen or gtk3. [1] https://docs.gtk.org/gtk3/method.TreeView.set_cursor.html Change-Id: I1b916f7f176e0a4862f8e6bee720a694e50b2972 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182017 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx index 90c8b8f5f66d..56d4be60210a 100644 --- a/vcl/qt5/QtInstanceTreeView.cxx +++ b/vcl/qt5/QtInstanceTreeView.cxx @@ -380,9 +380,8 @@ void QtInstanceTreeView::set_cursor(int nPos) { SolarMutexGuard g; - GetQtInstance().RunInMainThread([&] { - m_pSelectionModel->setCurrentIndex(modelIndex(nPos), QItemSelectionModel::NoUpdate); - }); + GetQtInstance().RunInMainThread( + [&] { m_pSelectionModel->setCurrentIndex(modelIndex(nPos), QItemSelectionModel::Select); }); } int QtInstanceTreeView::find_text(const OUString& rText) const commit f2e75bcf775c178a3ea5ece0d281c4b0f23ab8f1 Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Fri Feb 21 19:39:20 2025 +0100 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Sat Feb 22 10:55:01 2025 +0100 tdf#130857 qt weld: Forward more QtInstanceTreeView methods taking iter ... to their counterparts taking a row index param. (Some of those still trigger an assert as well, but once they're implemented, the variant taking an iter param should work just the same.) Change-Id: Ide9f03ce81dbad1cb36e67e9e30c1da76918218e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182016 Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> Tested-by: Jenkins diff --git a/vcl/inc/qt5/QtInstanceTreeView.hxx b/vcl/inc/qt5/QtInstanceTreeView.hxx index ce6c6b9b8cad..ef6fa68c5059 100644 --- a/vcl/inc/qt5/QtInstanceTreeView.hxx +++ b/vcl/inc/qt5/QtInstanceTreeView.hxx @@ -99,9 +99,9 @@ public: virtual void set_sensitive(const weld::TreeIter& rIter, bool bSensitive, int nCol = -1) override; virtual bool get_sensitive(const weld::TreeIter& rIter, int nCol) const override; - virtual void set_text_emphasis(const weld::TreeIter& rIter, bool bOn, int col) override; - virtual bool get_text_emphasis(const weld::TreeIter& rIter, int col) const override; - virtual void set_text_align(const weld::TreeIter& rIter, double fAlign, int col) override; + virtual void set_text_emphasis(const weld::TreeIter& rIter, bool bOn, int nCol) override; + virtual bool get_text_emphasis(const weld::TreeIter& rIter, int nCol) const override; + virtual void set_text_align(const weld::TreeIter& rIter, double fAlign, int nCol) override; virtual void set_toggle(const weld::TreeIter& rIter, TriState bOn, int nCol = -1) override; virtual TriState get_toggle(const weld::TreeIter& rIter, int nCol = -1) const override; virtual OUString get_text(const weld::TreeIter& rIter, int nCol = -1) const override; diff --git a/vcl/qt5/QtInstanceTreeView.cxx b/vcl/qt5/QtInstanceTreeView.cxx index 4cabfa4662b8..90c8b8f5f66d 100644 --- a/vcl/qt5/QtInstanceTreeView.cxx +++ b/vcl/qt5/QtInstanceTreeView.cxx @@ -466,10 +466,7 @@ bool QtInstanceTreeView::get_cursor(weld::TreeIter*) const return false; } -void QtInstanceTreeView::set_cursor(const weld::TreeIter&) -{ - assert(false && "Not implemented yet"); -} +void QtInstanceTreeView::set_cursor(const weld::TreeIter& rIter) { set_cursor(rowIndex(rIter)); } bool QtInstanceTreeView::get_iter_first(weld::TreeIter&) const { @@ -569,20 +566,19 @@ bool QtInstanceTreeView::get_sensitive(const weld::TreeIter& rIter, int nCol) co return get_sensitive(rowIndex(rIter), nCol); } -void QtInstanceTreeView::set_text_emphasis(const weld::TreeIter&, bool, int) +void QtInstanceTreeView::set_text_emphasis(const weld::TreeIter& rIter, bool bOn, int nCol) { - assert(false && "Not implemented yet"); + set_text_emphasis(rowIndex(rIter), bOn, nCol); } -bool QtInstanceTreeView::get_text_emphasis(const weld::TreeIter&, int) const +bool QtInstanceTreeView::get_text_emphasis(const weld::TreeIter& rIter, int nCol) const { - assert(false && "Not implemented yet"); - return false; + return get_text_emphasis(rowIndex(rIter), nCol); } -void QtInstanceTreeView::set_text_align(const weld::TreeIter&, double, int) +void QtInstanceTreeView::set_text_align(const weld::TreeIter& rIter, double fAlign, int nCol) { - assert(false && "Not implemented yet"); + return set_text_align(rowIndex(rIter), fAlign, nCol); } void QtInstanceTreeView::set_toggle(const weld::TreeIter& rIter, TriState bOn, int nCol) @@ -627,9 +623,9 @@ void QtInstanceTreeView::set_image(const weld::TreeIter& rIter, set_image(rowIndex(rIter), rImage, nCol); } -void QtInstanceTreeView::set_font_color(const weld::TreeIter&, const Color&) +void QtInstanceTreeView::set_font_color(const weld::TreeIter& rIter, const Color& rColor) { - assert(false && "Not implemented yet"); + set_font_color(rowIndex(rIter), rColor); } void QtInstanceTreeView::scroll_to_row(const weld::TreeIter& rIter)