After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 134595 - postponing a voluntary sets the timeout down to 3mins
postponing a voluntary sets the timeout down to 3mins
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: [obsolete] Typing break
2.4.x
Other Linux
: Normal normal
: ---
Assigned To: Richard Hult
Control-Center Maintainers
: 339116 536066 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-02-17 05:19 UTC by Martin Pool
Modified: 2008-06-15 13:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
Patch fixes the bug. (1.45 KB, patch)
2005-01-13 11:14 UTC, Vinay M R
rejected Details | Review
Patch fixes the bug. (6.61 KB, patch)
2005-02-01 07:09 UTC, Vinay M R
needs-work Details | Review
Patch fixes the bug as per suggestions given. (5.35 KB, patch)
2005-02-02 06:12 UTC, Vinay M R
none Details | Review
Proposed Patch (6.73 KB, patch)
2005-03-27 21:15 UTC, Benjamin LeMasurier
none Details | Review
Rework of the last patch (1.63 KB, patch)
2005-03-28 23:02 UTC, Benjamin LeMasurier
none Details | Review
Save working time patch (3.66 KB, patch)
2008-06-14 15:00 UTC, Andrey Gusev
committed Details | Review

Description Martin Pool 2004-02-17 05:19:35 UTC
To reproduce:

Set work/break times to, say, 40 minutes.  The timer should show 40 minutes
remaining.  Now choose "take a break", then immediately postpone it. 
Observe that the indicator is now flashing, and shows just three minutes
remaining.  This seems silly.

I think I would prefer that when a temporary break is cancelled, the timer
just went back to what it was before.  

Thanks -- this is a great program.
Comment 1 Richard Hult 2004-02-17 09:49:05 UTC
Good idea, but will have to wait until after 2.6, since we're in
freeze now.
Comment 2 Vinay M R 2005-01-13 11:14:09 UTC
Created attachment 35944 [details] [review]
Patch fixes the bug.
Comment 3 Richard Hult 2005-01-13 11:43:17 UTC
This is not what the bug reporter requested... he wanted just a break he
manually started to behave like this (at least as I understood it). I don't want
to make all postponed breaks go to start, that would make it way too easy to
"cheat".
Comment 4 Vinay M R 2005-02-01 07:09:47 UTC
Created attachment 36804 [details] [review]
Patch fixes the bug.
Comment 5 Vinay M R 2005-02-01 07:57:33 UTC
Below is the table which shows different scenarios handled in the patch.

Scenario           Action               Result
--------           ------               -------
Manual break       Postpone break       Timer should go back to what it was
                                        before.

Manual break       Complete the break   Timer should go back to what it was    
            
                                        before.

Complete interval  Postpone             Goes back to warn state.

Complete interval  Complete the break   Goes to Start.
Comment 6 Richard Hult 2005-02-01 09:53:59 UTC
Hi, thanks a lot! I have a suggestion, maybe it's better to go back to Start
after a complete manual break?

Also, couldn't the type be added to the struct instead of using set_data?
Comment 7 Vinay M R 2005-02-02 06:12:35 UTC
Created attachment 36856 [details] [review]
Patch fixes the bug as per suggestions given.
Comment 8 Richard Hult 2005-02-03 23:00:14 UTC
Nice, thanks! I modified the patch slightly, to use the typedef for the added
enum instead of a gboolean, and I also made the tooltip update immediately after
a break is completed.
Comment 9 Richard Hult 2005-02-03 23:21:53 UTC
Actually the patch is not correct after all, I revert the commit. The patch does
regular breaks not work, it makes the break window never show.
Comment 10 Vinay M R 2005-03-23 10:52:43 UTC
Richard, apologies for coming back late here. With this patch, typing break is
working fine on my machine for the test cases I mentioned above. You suggest
that you slightly modified the patch, if by any chance you still have that patch
around, could you please upload it here so that I can play around with it.
Comment 11 Benjamin LeMasurier 2005-03-27 21:15:12 UTC
Created attachment 39315 [details] [review]
Proposed Patch

This was bugging me as well, I also made a patch. It's kinda messy but it does
work.
Comment 12 Richard Hult 2005-03-27 21:19:50 UTC
Thanks for the patch Benjamin, I think it's a bit bad to duplicate the code like
that though. I think fixing the original patch would be better, it shouldn't be
that difficult.

Vinay, if I remember correctly, your patch had that bug as well, but I'll try it
again to make sure.
Comment 13 Martin Pool 2005-03-27 23:07:01 UTC
I think the table should be:

Scenario           Action               Result
--------           ------               -------
Manual break       Postpone break       Timer should go back to what it was
                                        before.

Manual break       Complete the break   Goes to Start.

Complete interval  Postpone             Goes back to warn state.

Complete interval  Complete the break   Goes to Start.


The whole point (to me) of taking a manual break is that you have reached a good
point to take your break, and if you complete it, you should then be able to
work for n minutes without interruption.  If I manually took a break 5 minutes
before the counter ran out it would be silly to make me take another in 5 minutes.
Comment 14 Richard Hult 2005-03-28 08:49:35 UTC
I think that's exactly what we've already arrived at above ;)
Comment 15 Benjamin LeMasurier 2005-03-28 23:02:05 UTC
Created attachment 39365 [details] [review]
Rework of the last patch

This one is much cleaner code but lacks the ability to go back to the original
time minus the break time
Comment 16 Jens Granseuer 2007-03-02 20:07:40 UTC
*** Bug 339116 has been marked as a duplicate of this bug. ***
Comment 17 Rodrigo Moya 2007-08-21 12:27:20 UTC
Richard, could you review the last patch please, and commit (before 2.19.91) if it looks ok to you?
Comment 18 Richard Hult 2007-08-22 07:43:46 UTC
I don't have a 2.19 development environment set up, sorry. But the patch looks alright. If someone wants to test it and it seems to work, I wouldn't mind if it was applied.
Comment 19 Jens Granseuer 2008-06-02 07:22:49 UTC
*** Bug 536066 has been marked as a duplicate of this bug. ***
Comment 20 Andrey Gusev 2008-06-14 15:00:58 UTC
Created attachment 112731 [details] [review]
Save working time patch

I offer this patch. It save time before break and if user cancel break, restore time.
Comment 21 Jens Granseuer 2008-06-15 13:57:31 UTC
In my limited testing this patch seems to work quite well. Thanks, Andrey. In the future, please also use the -p parameter to diff which helps enormously when reviewing patches.

2008-06-15  Jens Granseuer  <jensgr@gmx.net>

        Patch by: Andrey Gusev <ronne@list.ru>

        * drwright.c: (update_icon), (blink_timeout_cb),
        (maybe_change_state), (update_tooltip), (break_window_postpone_cb):
        when postponing a voluntary break, go back to the state before taking
        the break instead of going to warn state as we do when a regular
        break is postponed (bug #134595)