Files
odfstudio/include
Michael Weghorn f792e696b4 weld: Pass activated item in IconView::signal_item_activated
So far, the IconView::signal_item_activated was called
with the weld::IconView itself as a parameter, i.e.
the information what item was selected wasn't directly
passed to the signal handlers.

Change that to pass a weld::TreeIter param referring to the
activated item instead of the IconView itself.

The information what item was activated is relevant
and this way, there is no need to determine it some
other way in the handlers (e.g. by using the first
selected entry).

This also aligns this more with what UI toolkits
like GTK and Qt provide.

For GTK, the GtkIconView::item-activated signal [1]
has the path of the activated entry.

For Qt, the QAbstractItemView::activated signal [2]
has the QModelIndex of the activated item.

For the vcl implementation in SalInstanceIconView::DoubleClickHdl,
use the cursor/current item.

In LOKTrigger::trigger_item_activated, use the currently selected
entry (retrieved via weld::IconView::get_selected), because the
only caller in jsdialog::ExecuteAction uses weld::IconView::select
first to select an entry before triggering the signal.

Initially, leave the logic of the existing signal handlers/callbackes
(in dialog implementations) unchanged. At least some of them
will be simplified in upcoming commits.

[1] https://docs.gtk.org/gtk3/signal.IconView.item-activated.html
[2] https://doc.qt.io/qt-6/qabstractitemview.html#activated

Change-Id: I8ca62ac32108f01e2055d5ef9301de22eb5b1931
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203317
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-04-09 10:19:36 +02:00
..
2026-02-18 13:44:22 +01:00
2025-11-18 15:51:23 +01:00
…
2026-03-18 15:01:59 +01:00
2026-03-09 11:21:15 +01:00
2026-03-24 22:20:55 +01:00
2026-03-26 13:23:37 +01:00
…
…
…
…
…