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 338731 - Send DBUS signal when break is active
Send DBUS signal when break is active
Status: RESOLVED WONTFIX
Product: DrWright
Classification: Other
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: drwright-maint
drwright-maint
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2006-04-16 20:03 UTC by Reinout van Schouwen
Modified: 2018-07-11 22:40 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Proposed patch (3.02 KB, patch)
2008-05-11 16:22 UTC, Ben LeMasurier
needs-work Details | Review

Description Reinout van Schouwen 2006-04-16 20:03:54 UTC
It would be nice if, for instance, instant messengers or xchat-gnome could listen to a typing break DBUS signal to set the user status to Away.
Comment 1 Ben LeMasurier 2008-05-11 16:22:45 UTC
Created attachment 110720 [details] [review]
Proposed patch

Simple dbus support - sends a message on break activation and completion.
Comment 2 Ben LeMasurier 2008-05-11 16:27:58 UTC
spam
Comment 3 Jens Granseuer 2008-05-11 16:41:43 UTC
I don't think this is a good idea. If we create custom signals for all applications that might have some sort of "user is away" awareness, those said instant messengers would have look after an entire zoo. Maybe we could reuse existing standardized signals like what the screensavers use? At the very least we should create a generic away signal rather than a number of app-specific ones.
Comment 4 Ben LeMasurier 2008-05-11 17:52:05 UTC
That makes sense, I'll look around for a more generic form already in use. I'm a newb so point me in the right direction if you know a good place to look.
Comment 5 Jens Knutson 2009-01-04 02:39:12 UTC
In general, being more generic and avoiding a dbus "zoo" are virtues.  However, taking a typing break is semantically a very unique state - I think it cannot and should not be shoehorned into a more generic "away" notification, like for a screensaver.

A screensaver kicks in when the user is simply idle, i.e.: they've walked away from the machine/aren't paying attention to it.  However, the typing break just *pops up* to the user.  They don't initiate the event; it's something that happens *to* them.

A typing break appearing is not a generic "away" state, but a special type of "be right back" state, and should thus be handled specially.
Comment 6 Jens Granseuer 2009-01-07 12:16:25 UTC
(In reply to comment #5)
> A screensaver kicks in when the user is simply idle, i.e.: they've walked away
> from the machine/aren't paying attention to it.  However, the typing break just
> *pops up* to the user.  They don't initiate the event; it's something that
> happens *to* them.

I agree that it shouldn't use the same ones as the screensaver, and I never requested that. I only said to look for similar signals that might already exist and could be reused. Assuming that the result of all that looking is "none found", creating a new one for typing break is a valid option.

If we do create that signal, what should it look like? The one Ben used in his patch looks a bit suboptimal to me. We have the signal type, plus a fixed string that is basically the same as the signal type. Is that useful? Shouldn't the message be at least something that could potentially be shown to a user, somewhere along the lines of: "Typing break started, will regularly end in x minutes."? That would also have to be translatable, of course. In its current form, the msg parameter looks redundant to me.

(Aside from that there are a few minor quibbles like inconsistent indentation (tabs vs. spaces), terminology ("Break ended" sounds so much better than "Break done"...), and I think the first dbus_notify call isn't placed correctly, but I haven't checked too closely.)
Comment 7 Jens Knutson 2009-01-08 01:01:50 UTC
(In reply to comment #6)
> (In reply to comment #5)
> I agree that it shouldn't use the same ones as the screensaver, and I never
> requested that. I only said to look for similar signals that might already
> exist and could be reused. Assuming that the result of all that looking is
> "none found", creating a new one for typing break is a valid option.

Ah, ok.  I opened all my installed desktop applications (hooray for 4GB RAM!), and using d-feet, I looked through the current signals being offered through d-bus on my system.  (I have a pretty typical but heavily-loaded GNOME 2.24 desktop).  I found nothing semantically similar currently in place.

> If we do create that signal, what should it look like? The one Ben used in his
> patch looks a bit suboptimal to me. We have the signal type, plus a fixed
> string that is basically the same as the signal type. Is that useful? Shouldn't
> the message be at least something that could potentially be shown to a user,

Agreed, the current signals aren't quite right.

At most, there could be the following signals:
BreakStartingIn(UInt16 minutes) - minutes: number of minutes until a break begins
BreakStarted(UInt16 minutes) - minutes: duration of break
BreakEnded() - bare signal, no message needed
BreakPostponed() - bare signal, no message needed

I don't think any user-exposed strings should be set here - I think that should be left up to the applications that want to listen for the signals.  The apps are what the user is interacting with, so they are in the best position to decide what they want to do with the information.
Comment 8 Jens Granseuer 2009-01-08 17:00:58 UTC
Does the difference between BreakEnded and BreakPostponed matter?
Comment 9 Jens Knutson 2009-01-08 19:01:09 UTC
(In reply to comment #8)
> Does the difference between BreakEnded and BreakPostponed matter?
> 

Not from the standpoint of most apps.  I included a BreakPostponed signal for the sake of completeness and that one might want to trigger some other action based on skipping/postponing a break.  (Like for myself, I might want to have a program tally up the number of breaks I've skipped - naughty! - and record them somewhere, or perhaps run some program or pop up a message, etc.)

In fact, now that I think about it, the following might be better:

BreakStartingIn(UInt16 minutes)
BreakStarted(UInt16 minutes)
BreakEnded(String message) - message: "Expired" or "Postponed" - Expired if it ran its course normally, Postponed if the "postpone break" button was hit"
Comment 10 Bastien Nocera 2010-11-21 00:11:12 UTC
Mass move to DrWright module. The code has been removed from the control-center, and put back in the drwright module as its interaction with the GNOME 3.x experience was not defined.

See http://git.gnome.org/browse/drwright
Comment 11 André Klapper 2018-07-11 22:40:52 UTC
DrWright is not under active development anymore, has not seen code changes for about five years, and saw its last tarball release in the year 2012.
Its codebase has been archived: https://gitlab.gnome.org/Archive/drwright/commits/master

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Please feel free to reopen this ticket (or rather transfer the project to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the responsibility for active development again.