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 566832 - Don't reset status to available unlocking the screen
Don't reset status to available unlocking the screen
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: empathy-maint
empathy-maint
: 575898 599077 601880 603226 603907 606577 611755 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-01-06 21:38 UTC by Luca Ferretti
Modified: 2010-03-15 12:49 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
empathy_idle.c patch (585 bytes, patch)
2010-03-04 17:37 UTC, Brian Curtis
none Details | Review
patch to empathy-idle.c so users status is unchanged when manually preset before becoming idle (847 bytes, patch)
2010-03-10 18:49 UTC, Brian Curtis
none Details | Review
updated empathy-idle.c patch (1.57 KB, patch)
2010-03-10 23:35 UTC, Brian Curtis
needs-work Details | Review
empathy-idle.c patch updated (1.38 KB, patch)
2010-03-11 00:02 UTC, Brian Curtis
none Details | Review
patch for emapthy-idle.c v5 (1.50 KB, patch)
2010-03-11 00:17 UTC, Brian Curtis
none Details | Review

Description Luca Ferretti 2009-01-06 21:38:53 UTC
Empathy restores the "available" status after unlocking the screen.

Steps to reproduce:
 * Set empathy to "Busy" or to a custom status
 * Lock the screen (Ctrl+Alt+L)
 * Unlock the screen

Current result:
 Empathy status is available

Expected result:
 Empathy status should be the last one you choose.

Other notes:
 While the screen is locked, what currently is and what should be
 the proper status? "Away"? The last one if it's different from "available"?
Comment 1 Milo Casagrande 2009-01-06 21:43:04 UTC
I've witnessed the same behavior even when the screen goes blank or goes off for gnome-power-manger settings, didn't test with the screensaver though.
Comment 2 Adam Schreiber 2009-04-05 14:35:13 UTC
Confirmed on Ubuntu Jaunty with Empathy 2.26.0.1.
Comment 3 Adam Schreiber 2009-04-05 14:56:16 UTC
This is due to a call in src/empathy.c:main() that sets auto_away in the idle handler to TRUE.  If this weren't set the away message would remain unchanged when the screensaver changed states.  The idle functionality seems to confuse an automatically set away message/status when the computer goes idle that should change the status when the system is no longer idle with a user set away message/status that should be persistant.

Note: The busy status is persistant after unlocking the screensaver.

I think this could be fixed by altering libempathy/empathy-idle.c:201 to not change the status and presence if in the extended away state.  I don't quite understand MissionControl states so I'll have to look into it if that's the state when the user sets presence as away.
Comment 4 Adam Schreiber 2009-04-05 15:18:24 UTC
This appears to be an architectural flaw and there doesn't appear to be a way in the preferences UI to disable the auto away functionality.
Comment 5 Danielle Madeley 2009-04-24 08:02:01 UTC
*** Bug 575898 has been marked as a duplicate of this bug. ***
Comment 6 Danielle Madeley 2009-04-24 08:05:19 UTC
This is actually intentional. It leaves the 'Away' state because you are no longer Away from your computer.

It might however be an idea to have Empathy return to the previous state it was in before you manually set the Away state.

Zdra, cassidy: thoughts?
Comment 7 Xavier Claessens 2009-04-24 08:42:23 UTC
Maybe we should have a "lieing-mode" for empathy, to disable automatic presence changes. If you unlock the screen your are obviously not away anymore, but some people like to lie and pretend they are still away...
Comment 8 Xavier Claessens 2009-04-24 08:45:28 UTC
(In reply to comment #6)
> It might however be an idea to have Empathy return to the previous state it was
> in before you manually set the Away state.

It was intential to return to available instead of previous state. Ask sjoerd for more details, but I think the reason was: You were either busy or away as previous state. If you were away it's obvious you are not anymore. If you were busy then went away, there is little chance you come back to work on the same think... but that's debatable I guess.
Comment 9 Guillaume Desmottes 2009-04-24 09:01:15 UTC
That seems weird to me. Restoring the previsous state seems more logical to me.
Comment 10 Luca Ferretti 2009-04-24 10:25:39 UTC
(In reply to comment #6)
> This is actually intentional. It leaves the 'Away' state because you are no
> longer Away from your computer.
> 

Currently I don't have latest Empathy to try, but when this bug was reported the "auto-back to available" behavior occured if I was on a custom status too.

IMHO the Empathy behavior should be something like:

# Case 1
  - set your status to "Busy" custom message "Cooking"
  - screensaver starts
  - Empathy status should remain "Busy - Cooking"
  - unlock/unblank the screen
  - Empathy status should remain "Busy - Cooking"

Reason: maybe I'm just doing a quick check for my loved recipe on Internet, but don't want to chat. It's an user choise declare the end-of-busy.

# Case 3
  - No status change, or "Available"
  - screensaver starts
  - Empathy status should switch to "Away"
  - unlock/unblank the screen
  - Empaty reverts previous status

Reason: it's the right way, isn't it? Auto-away, auto-available.

# Case 3
  - set your status to "Away" with or without custom message
  - screensaver starts
  - Empathy status should remain Away" with or without custom message
  - unlock/unblank the screen
  - Empathy status should ??????????

Reason: well, dunno. This case could really depend on user feeling and current mood. Adding a preference for this is crazy: a timed alert with "Keep away status" and "Switch to available" buttons?
Comment 11 Will Thompson 2009-11-20 15:36:38 UTC
*** Bug 601880 has been marked as a duplicate of this bug. ***
Comment 12 Will Thompson 2009-11-20 15:37:14 UTC
There's a difference between wanting to lie about your status, and having some hysteresis so that if I open my laptop screen to check the tube map, my carefully-set away message doesn't get cleared.

There's also a difference between clearing an auto-set status, and clearing an explicitly-set status.
Comment 13 seniormota 2009-11-21 06:50:46 UTC
I would also very much like the option to control my own away status without empathy changing it based on my monitor turning off.  I like to stay hidden on aim because I do not always wish to speak with everyone on my contacts list.  The option to leave my away message as it is would be awesome.
Comment 14 Guillaume Desmottes 2009-11-30 09:45:59 UTC
*** Bug 599077 has been marked as a duplicate of this bug. ***
Comment 15 Guillaume Desmottes 2009-11-30 09:46:05 UTC
*** Bug 603226 has been marked as a duplicate of this bug. ***
Comment 16 Guillaume Desmottes 2009-12-07 11:52:41 UTC
*** Bug 603907 has been marked as a duplicate of this bug. ***
Comment 17 Conscious User 2009-12-18 19:38:48 UTC
> It was intential to return to available instead of previous state. Ask sjoerd
> for more details, but I think the reason was: You were either busy or away as
> previous state. If you were away it's obvious you are not anymore. If you were
> busy then went away, there is little chance you come back to work on the same
> think... but that's debatable I guess.

Wait, I'm using Empathy on Ubuntu Karmic and, when I set to "busy" before
locking the screen, it *does* return to "busy" after locking the screen.
The only state that is overriden by "available" in my machine is a manually
set "away". But the mechanisms to restore the previous state seems to have
been already implemented. I suggest using it to restore a manually set
"away" as well.

> # Case 1
>   - set your status to "Busy" custom message "Cooking"
>   - screensaver starts
>   - Empathy status should remain "Busy - Cooking"
>   - unlock/unblank the screen
>   - Empathy status should remain "Busy - Cooking"
>
> Reason: maybe I'm just doing a quick check for my loved recipe on Internet,
> but don't want to chat. It's an user choise declare the end-of-busy.

I'm not sure if I agree on "busy" on this case. "Away" seems more adequate.
I always interpreted "busy" as "I don't want to talk right now, so only send
me messages if they are *really* important". If you are out of your computer
cooking, the moments when you will check the internet for the recipe are
unpredictable or might not happen at all, so you are in a state where you are
ignoring even urgent messages.
Comment 18 Adam Schreiber 2009-12-20 18:38:32 UTC
I admit in the transition from Gaim/Pidgin this behavior was jarring, but it no longer bothers me and I admit it makes sense.  It more requires a change in behavior to use the busy status instead of the away status when I'm busy instead of truly away.  I'll keep my CC on the bug, but I'd recommend using empathy for a while before jumping on the bandwagon.  Try not to bring your assumptions from other apps to empathy.
Comment 19 Andre Terra 2009-12-23 15:47:18 UTC
(In reply to comment #17)
> > It was intential to return to available instead of previous state. Ask sjoerd
> > for more details, but I think the reason was: You were either busy or away as
> > previous state. If you were away it's obvious you are not anymore. If you were
> > busy then went away, there is little chance you come back to work on the same
> > think... but that's debatable I guess.
> 
> Wait, I'm using Empathy on Ubuntu Karmic and, when I set to "busy" before
> locking the screen, it *does* return to "busy" after locking the screen.
> The only state that is overriden by "available" in my machine is a manually
> set "away". But the mechanisms to restore the previous state seems to have
> been already implemented. I suggest using it to restore a manually set
> "away" as well.
> 
> > # Case 1
> >   - set your status to "Busy" custom message "Cooking"
> >   - screensaver starts
> >   - Empathy status should remain "Busy - Cooking"
> >   - unlock/unblank the screen
> >   - Empathy status should remain "Busy - Cooking"
> >
> > Reason: maybe I'm just doing a quick check for my loved recipe on Internet,
> > but don't want to chat. It's an user choise declare the end-of-busy.
> 
> I'm not sure if I agree on "busy" on this case. "Away" seems more adequate.
> I always interpreted "busy" as "I don't want to talk right now, so only send
> me messages if they are *really* important". If you are out of your computer
> cooking, the moments when you will check the internet for the recipe are
> unpredictable or might not happen at all, so you are in a state where you are
> ignoring even urgent messages.

You are correct in the sense that the user is not technically busy, but away from the computer. But then you also have to consider the possibility that the user is both busy and away and therefore it is up to the user to choose his state.

I understand that some people want everything automated and having that option is a viable request. But TBQH, personally I'd prefer if the program didn't change anything I have manually set as this can give the false impression I'm available to chat. Maybe I set "away - off to my friend's house", got up and got dressed but then I realized I needed instructions on how to get there. Should a simple google maps search be considered proof that I'm back on the computer? Yes, I may be physically in front of it, but that doesn't mean I'm willing/able to chat right now.

I'd rather have empathy not ever touch my status state and messages, or at least have the option to disable anything 'auto'. Furthermore, I think this should be stressed as the default behavior. Explicit is always better then implicit. If you're looking for more automation, you can dig through preferences, but respecting the users' choices should is how I'd expect a machine to behave.
Comment 20 Conscious User 2009-12-24 15:42:18 UTC
> I understand that some people want everything automated and having that option
> is a viable request. But TBQH, personally I'd prefer if the program didn't
> change anything I have manually set as this can give the false impression I'm
> available to chat. Maybe I set "away - off to my friend's house", got up and
> got dressed but then I realized I needed instructions on how to get there.
> Should a simple google maps search be considered proof that I'm back on the
> computer? Yes, I may be physically in front of it, but that doesn't mean I'm
> willing/able to chat right now.

I pretty much agree. While I questioned setting "busy" when you are physically
away, I have nothing against setting "away" when you are physically present.
Because, at least for me, "away" means "away from instant messaging", or
"send me a message if you want, but I offer no guarantee that I will reply,
or even read it, any time soon". This is adequate, for example, when you are
watching a movie in full screen.

I support the idea of returning to whatever state the user previously was,
even if this state was a manually set away. Like I've mentioned before, in
the version I'm using this works for "busy", so I believe the mechanisms are
already there.
Comment 21 Guillaume Desmottes 2010-01-11 12:30:36 UTC
*** Bug 606577 has been marked as a duplicate of this bug. ***
Comment 22 Tomasz Torcz 2010-01-30 12:45:30 UTC
Additionally, Empathy auto-change of status erases any status message I may have entered. Which is as bad as changing from Do Not Disturb to Available without my consent.
Comment 23 Guillaume Desmottes 2010-03-04 14:29:13 UTC
*** Bug 611755 has been marked as a duplicate of this bug. ***
Comment 24 Brian Curtis 2010-03-04 15:02:44 UTC
I don't think ever in the history of IM clients, has a users status been changed by the computer.  I constantly go to and from my laptop here at work and it will go into lock screen every once in a while.  I come back to unlock it and check for a quick e-mail and I have no intention of staying at the computer... I don't EVER want my status to change unless I am the one to change it.

The computer should never assume something for the user.  Computers should only do what you tell them to do, not try to think for you.

I really want to see this fixed before 2.30
Comment 25 Guillaume Desmottes 2010-03-04 15:31:16 UTC
(In reply to comment #10)
> # Case 1
>   - set your status to "Busy" custom message "Cooking"
>   - screensaver starts
>   - Empathy status should remain "Busy - Cooking"
>   - unlock/unblank the screen
>   - Empathy status should remain "Busy - Cooking"
> 
> Reason: maybe I'm just doing a quick check for my loved recipe on Internet, but
> don't want to chat. It's an user choise declare the end-of-busy.

Currently once the sreen is locked, Empathy changes the status to : "Away - Cooking" and will restore it to "Busy - cooking" once the screen is unlocked.

So, should it stay "Busy" or not? If we agree that "away == not in front of my computer" and  "busy == in front of it but too busy to chat" then Empathy's behaviour makes sense.

> # Case 2
>   - No status change, or "Available"
>   - screensaver starts
>   - Empathy status should switch to "Away"
>   - unlock/unblank the screen
>   - Empaty reverts previous status
> 
> Reason: it's the right way, isn't it? Auto-away, auto-available.

Agreed.

> # Case 3
>   - set your status to "Away" with or without custom message
>   - screensaver starts
>   - Empathy status should remain Away" with or without custom message
>   - unlock/unblank the screen
>   - Empathy status should ??????????
> 
> Reason: well, dunno. This case could really depend on user feeling and current
> mood. Adding a preference for this is crazy: a timed alert with "Keep away
> status" and "Switch to available" buttons?

I think that in that case if you manually set your status Empathy shouldn't change it; you know best what you are doing. Especially, not being away doesn't mean I'm available; I could be busy or wanting to be invisible for example.

Oth, some people seem to like to have their status automatically set to available when they come back.
I guess having an option for that could make sense.

I also think that Empathy should have a timer before restoring the state, to avoid the "I quickly check something on my laptop before leaving" problem. Gossip used to do that IIRC.
Comment 26 Conscious User 2010-03-04 16:10:34 UTC
I think the best course of action would be to restore whatever status Empathy had before the idle timeout. If it was a manually set "away", then so be it.

Also, it shouldn't touch the message at all, as a lot of people I know post "permanent" stuff like links or "I'm happy" and those are supposed to stay regardless of status.

Currently, Empathy *almost* does that, the only case where it does something different is when the user has set "away" with a custom message... in this case it goes back to "available" without any message. For me, this is particularly annoying when I set "away" with "sleeping" and then accidentaly wake the machine, thus losing the "sleeping" message. I'm not even talking about "having to check something quick", I'm talking about accidentaly moving the mouse.
Comment 27 Andre Terra 2010-03-04 16:59:31 UTC
In regards to the issue of accidentally changing status and their messages, I think what needs to be emphasized is that the harm caused by empathy's automatic behavior is greater than whatever good provided it. If a "let empathy change your status based on your behavior" preference isn't viable in the short term, and, as such, no compromise can be achieved, I sincerely believe said behavior should be stripped completely for the time being.

While it is *comfortable* to have empathy set your status to away or busy, it is *frustrating* to have it set it to anything different from what you really want. See the difference? We can't have amenities that incur frustrations.
Comment 28 Brian Curtis 2010-03-04 17:37:24 UTC
Created attachment 155246 [details] [review]
empathy_idle.c patch

Patch

Appeared to work for me in each test case, but since I am new at this, I hope my patch holds.
Comment 29 Conscious User 2010-03-04 17:39:13 UTC
I honestly believe that the minimal change I am suggesting (respect a manually set away and keep everything else as it is now) preserves convenience and does not cause frustration.

The *only* case it would not cover is a person trying to pretend he is at the computer (available/busy) when he is actually not, and I seriously cannot think of any valid use case where a person would like to mislead a contact into sending messages that might be read only later.
Comment 30 Conscious User 2010-03-04 18:04:26 UTC
Brian, I didn't test the patch, but from looking at the source code of empathy-idle.c it seems like a more complicated approach than it is necessary: you are forcing the "odd case" mentioned some lines below. Plus, it seems the status message is still blanked.

An easier way would be simply getting rid of that if/else clause altogether and replace it by "new_status = priv->status;" (in other words, make the "else" code the only possibility).

At the risk of being wrong (as this came only from a peek at the code), this seems *exactly* what is needed: the if clause is treating a manually set "away" as a special case. It shouldn't.
Comment 31 Brian Curtis 2010-03-10 18:49:09 UTC
Created attachment 155776 [details] [review]
patch to empathy-idle.c so users status is unchanged when manually preset before becoming idle

This takes ConsousUsers idea and implements it.  Tested with all use cases stated above and it still applies.
Comment 32 Conscious User 2010-03-10 18:57:22 UTC
Brian, this is great, thank you very much for taking me seriously. :) And I'm sorry I couldn't create the patch myself.

Just to confirm, the status message of a manually set "away" does not disappear anymore?
Comment 33 Brian Curtis 2010-03-10 18:58:11 UTC
yes I also confirmed status messages are not effected.
Comment 34 Brian Curtis 2010-03-10 23:35:55 UTC
Created attachment 155802 [details] [review]
updated empathy-idle.c patch

added ideas from danni
Comment 35 Danielle Madeley 2010-03-10 23:44:36 UTC
Review of attachment 155802 [details] [review]:

::: libempathy/empathy-idle.c
@@ -228,3 @@
 	} else if (!is_idle && priv->is_idle) {
-		const gchar *new_status;
-		/* We are no more idle, restore state */

We want to keep this comment

@@ -245,3 @@
-		 * result, we couldn't save the current state at that time.
-		 */
-		if (priv->away_saved_state != TP_CONNECTION_PRESENCE_TYPE_UNSET) {

We want to keep this bit too. It's a check against not knowing what the away_saved_state is.
Comment 36 Brian Curtis 2010-03-11 00:02:02 UTC
Created attachment 155809 [details] [review]
empathy-idle.c patch updated

Danni mentioned this one was better.
Comment 37 Brian Curtis 2010-03-11 00:17:51 UTC
Created attachment 155810 [details] [review]
patch for emapthy-idle.c v5

Sorry about the mail spam.  My own mistake for not compiling the previous one.  This one's been fixed.
Comment 38 Guillaume Desmottes 2010-03-15 12:49:48 UTC
Merged to master; thanks a lot for your work on this.

commit 0d1cf12a9eae8334778e51934d5e6a3b0cb58b4a
Author: Brian Curtis <briancurtis.wx@gmail.com>
Date:   Mon Mar 15 13:47:51 2010 +0100

    idle: Only restore state but not status message when getting back from idle (#566832)


This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.