Bug 128964 - Add time pause/resume functions to Impress Presentation console
Summary: Add time pause/resume functions to Impress Presentation console
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: low enhancement
Assignee: Srijan Bhatia
URL:
Whiteboard: target:7.1.0
Keywords: difficultyInteresting, easyHack, skillCpp, topicUI
Depends on:
Blocks: Presenter-Console
  Show dependency treegraph
 
Reported: 2019-11-22 13:09 UTC by Timur
Modified: 2020-07-19 04:36 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Pause/Resume button in presenter console (24.77 KB, image/png)
2020-06-10 10:40 UTC, Srijan Bhatia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2019-11-22 13:09:54 UTC
Impress Presentation console is in Lo from 3.3. It had some small improvements like adding Restart button.

Here is a request for an enhancement to add two more buttons: pause/resume and exit buttons.

They are all handy if presentation is interrupted or for rehearsal or test. So I set Low.
Comment 1 Timur 2019-11-22 14:22:03 UTC
Actually, there's bug 90978 for Exit, let this one be for pause/resume.
Comment 2 Timur 2019-11-22 16:07:17 UTC
Whoever hopefully confirms this, please try to find where Restart was added. 
Could be a nice code pointer.
Comment 3 Samuel Mehrbrodt (allotropia) 2019-11-28 07:11:08 UTC
Restart timer was added with this commit: https://cgit.freedesktop.org/libreoffice/core/commit/?id=b1a6a99b9a78689c6d3649ce066fad66912188e2

This is an easy hack. Implement this feature according to the patch above.

Icons can be provided by the design team afterwards. Just use one of the existing icons for now.
Comment 4 Srijan Bhatia 2020-06-08 11:47:26 UTC
I would like to attempt this.
Comment 5 Srijan Bhatia 2020-06-09 16:46:45 UTC
Submitted a patch for this.
https://gerrit.libreoffice.org/c/core/+/95955
Marked as WIP as logo is needed.
Comment 6 Heiko Tietze 2020-06-10 08:25:03 UTC
(In reply to Srijan Bhatia from comment #5)
> Marked as WIP as logo is needed.

What exactly is missing, do you mean icon(s) for UNO command(s)?
Comment 7 Srijan Bhatia 2020-06-10 10:40:11 UTC
Created attachment 161830 [details]
Pause/Resume button in presenter console
Comment 8 Srijan Bhatia 2020-06-10 10:40:36 UTC
(In reply to Heiko Tietze from comment #6)

> What exactly is missing, do you mean icon(s) for UNO command(s)?

Yes the icon for the button is required as you can see in the attachment.
Comment 9 Heiko Tietze 2020-06-10 10:59:10 UTC
Rizal, apparently these two icons are missing

https://gerrit.libreoffice.org/c/core/+/95955/2/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu

<value>bitmaps/ButtonRestartTimerNormal.png</value>
<value>bitmaps/ButtonRestartTimerMouseOver.png</value>
Comment 10 Rizal Muttaqin 2020-06-10 11:03:32 UTC
(In reply to Heiko Tietze from comment #9)
> Rizal, apparently these two icons are missing
> 
> https://gerrit.libreoffice.org/c/core/+/95955/2/officecfg/registry/data/org/
> openoffice/Office/PresenterScreen.xcu
> 
> <value>bitmaps/ButtonRestartTimerNormal.png</value>
> <value>bitmaps/ButtonRestartTimerMouseOver.png</value>

Copy that, roger.
Comment 11 Rizal Muttaqin 2020-06-10 11:48:01 UTC
Ideally we have two variants:

1. Pause: presenterscreen-ButtonPauseTimerNormal.png & presenterscreen-ButtonPauseTimerMouseOver.png
2. Resume: presenterscreen-ButtonResumeTimerNormal.png & presenterscreen-ButtonResumeTimerMouseOver.png

It will weird if we just utilizing only one icon. So two icons in one place. Is it possible by code?(In reply to Srijan Bhatia from comment #5)
> Submitted a patch for this.
> https://gerrit.libreoffice.org/c/core/+/95955
> Marked as WIP as logo is needed.

Ideally we have two variants:

1. Pause: presenterscreen-ButtonPauseTimerNormal.png & presenterscreen-ButtonPauseTimerMouseOver.png
2. Resume: presenterscreen-ButtonResumeTimerNormal.png & presenterscreen-ButtonResumeTimerMouseOver.png

It will weird if we just utilizing only one icon. So two icons in one place. Is it possible by code?
Comment 12 Srijan Bhatia 2020-06-10 16:25:36 UTC
(In reply to Rizal Muttaqin from comment #11)

> It will weird if we just utilizing only one icon. So two icons in one place.
> Is it possible by code?

I don't think that is possible. I would try to make the button dynamic(it would show resume when paused and pause when running) if possible.
Comment 13 Rizal Muttaqin 2020-06-10 16:33:17 UTC
(In reply to Srijan Bhatia from comment #12)
> (In reply to Rizal Muttaqin from comment #11)
> 
> > It will weird if we just utilizing only one icon. So two icons in one place.
> > Is it possible by code?
> 
> I don't think that is possible. I would try to make the button dynamic(it
> would show resume when paused and pause when running) if possible.

Great, hope it will work.
Comment 14 Srijan Bhatia 2020-06-12 10:32:34 UTC
(In reply to Rizal Muttaqin from comment #11)

> 1. Pause: presenterscreen-ButtonPauseTimerNormal.png &
> presenterscreen-ButtonPauseTimerMouseOver.png
> 2. Resume: presenterscreen-ButtonResumeTimerNormal.png &
> presenterscreen-ButtonResumeTimerMouseOver.png

I made it so that the button now shows resume when paused and pause when running. Now i need the above 4 icons.
Comment 15 Rizal Muttaqin 2020-06-12 11:07:50 UTC
(In reply to Srijan Bhatia from comment #14)
> (In reply to Rizal Muttaqin from comment #11)
> 
> > 1. Pause: presenterscreen-ButtonPauseTimerNormal.png &
> > presenterscreen-ButtonPauseTimerMouseOver.png
> > 2. Resume: presenterscreen-ButtonResumeTimerNormal.png &
> > presenterscreen-ButtonResumeTimerMouseOver.png
> 
> I made it so that the button now shows resume when paused and pause when
> running. Now i need the above 4 icons.

Ah such a great work.

Better you submit your patch first and than I will make another dedicated bug report for the icon part.
Comment 16 Srijan Bhatia 2020-06-12 11:53:22 UTC
Submitted the patch.
https://gerrit.libreoffice.org/c/core/+/95955
Comment 17 Rizal Muttaqin 2020-06-12 22:33:23 UTC
(In reply to Srijan Bhatia from comment #16)
> Submitted the patch.
> https://gerrit.libreoffice.org/c/core/+/95955

From your patch: https://gerrit.libreoffice.org/c/core/+/95955/6/officecfg/registry/data/org/openoffice/Office/PresenterScreen.xcu

I could not find ButtonPauseTimer nor ButtonResumeTimer. I just can see ButtonRestartTimer and ButtonNotes. Did I missed something?
Comment 18 Srijan Bhatia 2020-06-13 06:19:26 UTC
I am sorry i forgot to add that change to git. I have updated it now.
Comment 19 Rizal Muttaqin 2020-06-13 13:31:53 UTC
The icons has been merged, FYI

https://gerrit.libreoffice.org/c/core/+/96254
Comment 20 Srijan Bhatia 2020-06-14 07:57:54 UTC
final patch
https://gerrit.libreoffice.org/c/core/+/95955
Comment 21 Commit Notification 2020-06-18 08:18:14 UTC
Srijan Bhatia committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/41d75ee814d71513922a12fae82f2e7eecbcd5f5

tdf#128964 Add time pause/resume button to Impress Presenter console

It will be available in 7.1.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.
Comment 22 Timur 2020-06-23 08:26:13 UTC
Looks good, thanks to both. 
Sometimes time count resumes differently, with 4 seconds more or 3 seconds less. 
Like, if you stop at 10 and 20 seconds, it will start OK, but next time you stop at 30, it will start from 34, and when you stop again at 40, it will start from 37.
Not straightforward, but can be seen with more stops and longer pauses.  
Srijan, please comment. 

Srijan, I think this was you r 1st bug, congrats. Please see also Bug 90978 to add Exit button, which should be easy now.
Comment 23 Srijan Bhatia 2020-06-23 12:06:04 UTC
(In reply to Timur from comment #22)
> Looks good, thanks to both. 
> Sometimes time count resumes differently, with 4 seconds more or 3 seconds
> less. 
> Like, if you stop at 10 and 20 seconds, it will start OK, but next time you
> stop at 30, it will start from 34, and when you stop again at 40, it will
> start from 37.
> Not straightforward, but can be seen with more stops and longer pauses.  
> Srijan, please comment. 
> 
> Srijan, I think this was you r 1st bug, congrats. Please see also Bug 90978
> to add Exit button, which should be easy now.

Thanks Timur. I'll look into the issue and add the exit button as well.
Comment 24 Srijan Bhatia 2020-06-23 14:12:37 UTC
(In reply to Timur from comment #22)

> Sometimes time count resumes differently, with 4 seconds more or 3 seconds
> less. 
> Like, if you stop at 10 and 20 seconds, it will start OK, but next time you
> stop at 30, it will start from 34, and when you stop again at 40, it will
> start from 37.
> Not straightforward, but can be seen with more stops and longer pauses.  
> Srijan, please comment. 
I couldn't reproduce this issue.
Comment 25 Rizal Muttaqin 2020-06-24 09:08:27 UTC
Helo Srijan congratulation for your great work.


I have a little concern, now the bottom toolbar icons and timer shift when clicking Pause/Resume button. This should not be happen. May be give toolbar a longer size.
Comment 26 Srijan Bhatia 2020-06-24 15:09:24 UTC
(In reply to Rizal Muttaqin from comment #25)
> Helo Srijan congratulation for your great work.
> 
> 
> I have a little concern, now the bottom toolbar icons and timer shift when
> clicking Pause/Resume button. This should not be happen. May be give toolbar
> a longer size.

Hi Rizal,

The toolbar size is calculated based on the components of the toolbar so it is not possible to give the toolbar a longer size. I could try to fix the pause button's width but this may cause the text to look a bit distorted. I'll try it
nevertheless.
Comment 27 Srijan Bhatia 2020-06-25 14:54:33 UTC
(In reply to Rizal Muttaqin from comment #25)
> Helo Srijan congratulation for your great work.
> 
> 
> I have a little concern, now the bottom toolbar icons and timer shift when
> clicking Pause/Resume button. This should not be happen. May be give toolbar
> a longer size.

Patch for this
https://gerrit.libreoffice.org/c/core/+/97151
Comment 28 Commit Notification 2020-06-28 06:22:06 UTC
Srijan Bhatia committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d53a4f126e9d3ec0a63684d4c7af3108f352791c

tdf#128964 fix shifting of icons when the pause/resume button changes

It will be available in 7.1.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.