https://bugs.documentfoundation.org/show_bug.cgi?id=32581
Katarina Behrens (CIB) <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|difficultyBeginner |difficultyInteresting
--- Comment #31 from Katarina Behrens (CIB) <[email protected]> ---
Okay folks, no way this is an easy hack. difficultyInteresting at most and even
that might be an overstatement
It is not possible to "just display a text label" in a toolbar. For adding
something that looks like a text label (but it is a toolbar button in disguise)
you need to
1) create a fake UNO command (officecfg/*/Commands.xcu)- .uno:AVMediaURL or sth
along that line
2) set it up to be text-only (no icon) and have it contain a placeholder text
('no media selected' or sth along that line)
3) add that command to media toolbar
(sd/uiconfig/simpress/toolbar/mediaobjectbar.xml + all the other instances of
that toolbar across all the modules)
(have a look for example at .uno:SearchLabel, that's a text label in search
toolbar, for inspiration)
Next, those things need to be done:
4) When a new media is inserted, the placeholder text needs to be replaced with
real media URL. The code for that is in sd/source/ui/func/fuinsert.cxx,
FuInsertAVMedia class. You somehow need to get hold of the media toolbar, find
the button disguised as text label and change the text on it.
An useful piece of code doing just that (changing text on the label in search
toolbar) is in svx/source/dialog/srchdlg.cxx, maybe you can re-use it
5) The same needs to be done when a media object is selected in a document. I
don't know exactly where code for that is (but maybe someone else does?), I can
however quickly find out once a patch implementing points 1-4 is up for review
;-)
--
You are receiving this mail because:
You are the assignee for the bug._______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs