Bug 158152 - Make Presenter Console window be renamed from "file" to "Console: file"
Summary: Make Presenter Console window be renamed from "file" to "Console: file"
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
24.2.0.0 alpha0+
Hardware: All All
: low enhancement
Assignee: Baole Fang
URL:
Whiteboard: target:24.8.0
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
Depends on:
Blocks: Presenter-Console
  Show dependency treegraph
 
Reported: 2023-11-09 17:55 UTC by Timur
Modified: 2024-03-25 18:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2023-11-09 17:55:34 UTC
Presenter Console window should be named "Console: file", similar as Presenting window is named "Presenting: file".
Now Console window shows the same name as the file.
Comment 1 Stéphane Guillou (stragu) 2023-11-23 20:38:03 UTC
Confirmed in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7d357628d6e8ce3f9e3c3a567ada21f02bce8d42
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Makes perfect sense, thanks Timur.
Hossein, I assume "difficultyBeginner"?
Comment 2 Hossein 2023-11-24 02:22:30 UTC
(In reply to Stéphane Guillou (stragu) from comment #1)
> Makes perfect sense, thanks Timur.
> Hossein, I assume "difficultyBeginner"?

This is an EasyHack, but I should say difficultyMedium is better suited.

As the improvement is described as being similar to choosing the title "Presenting: file" while presenting, it is good to start from that string. Searching for a string literal starting with "Presenting, leads to a few results:

$ git grep -F "\"Presenting"
sd/inc/strings.hrc:#define STR_FULLSCREEN_SLIDESHOW                        NC_("STR_FULLSCREEN_SLIDESHOW", "Presenting: %s")
...

It is clear that STR_FULLSCREEN_SLIDESHOW is the symbolic constant used to set the title in this case. Searching for it leads to the function SlideShow::StartFullscreenPresentation() in sd/source/ui/slideshow/slideshow.cxx source code:

$ git grep STR_FULLSCREEN_SLIDESHOW
...
sd/source/ui/slideshow/slideshow.cxx:    OUString Title(SdResId(STR_FULLSCREEN_SLIDESHOW));

This function handles creation of extra window for presentation, and setting its title and other attributes. Setting the title is done via the SetText() function of the window object:

pWorkWindow->SetText(Title);

The source code for Console is inside sd/source/console folder. There are various C++ files inside this folder. But, searching for the SetText() function only returns another file, which is FullScreenPane.cxx.

$ git grep -i "window->SetText" sd
sd/source/ui/framework/factories/FullScreenPane.cxx:        mpWorkWindow->SetText(pSystemWindow->GetText());
sd/source/ui/slideshow/slideshow.cxx:    pWorkWindow->SetText(Title);

The console is displayed in a FullScreenPane. The title of the Window is taken from the parent window, as described in FullScreenPane constructor. This should be changed to achieve the desired improvement here. 

Note:
As described in LibreOffice help, one needs 2 displays to see the presenter console on the auxiliary display. Also, it is important to make sure that the appropriate option is activated via "Tools > Options > LibreOffice Impress > General". There, "Enable Presenter Console" should be checked.
https://help.libreoffice.org/latest/en-US/text/simpress/guide/presenter_console.html

It is also possible to use a specific configuration inside /org.openoffice.Office.PresenterScreen/ section of the LibreOffice expert configuration to force the console to be always activated.
To enable this option, one has to go to "Tools > Options > LibreOffice > Advanced > Open Expert Configuration", search for "StartAlways", and then change the option to "true". After clicking on "OK", the console will be always displayed, even if there is only 1 display available. This behavior is handled in sd/source/console/PresenterScreen.cxx.
Comment 3 Baole Fang 2024-03-06 01:15:19 UTC
start working on this
Comment 4 Commit Notification 2024-03-11 21:56:31 UTC
Baole Fang committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1999e2b35c8106fa959f04bbd381ddb49d257a1d

tdf#158152: Make presenter console to "Console: file"

It will be available in 24.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.