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 661272 - [user menu] Wrong displayed IM status
[user menu] Wrong displayed IM status
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: telepathy
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Shell Telepathy maintainer(s)
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-10-08 16:32 UTC by Guillaume Desmottes
Modified: 2011-10-09 19:24 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Deal with saved-im-presence being unset (1.37 KB, patch)
2011-10-08 16:48 UTC, Guillaume Desmottes
reviewed Details | Review
default saved-im-presence ot Offline (986 bytes, patch)
2011-10-08 21:31 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2011-10-08 16:32:33 UTC
- Be connected to IM
- Start gnome-shell
- The Shell user menu statu is 'Unavailable' while I'm still connected.
Comment 1 Florian Müllner 2011-10-08 16:39:06 UTC
Assuming that this is with gnome-shell from git - were you disconnected the last time you 'shut down' shell?
Comment 2 Guillaume Desmottes 2011-10-08 16:48:14 UTC
Created attachment 198614 [details] [review]
Deal with saved-im-presence being unset

The default for this key is TP_CONNECTION_PRESENCE_TYPE_UNSET which doesn't
make sense as a presence. When we get this key from gsettings we should define
the current presence as the default one.
Comment 3 Florian Müllner 2011-10-08 17:14:50 UTC
Review of attachment 198614 [details] [review]:

Does the UNSET status potentially screw something up, or is this merely about supporting the "I started gnome-shell from another desktop for the first time while connected to telepathy" use case? In case of the former, the patch looks good, but I'm not so sure about that if the latter is the case. It's a bit weird to preserve IM status from $other_desktop once and change it after having set a "real" status from the user menu for the first time (random example: you set your status to "away" before starting the shell, but the shell has stored "available") - so if we really want to support that use case, we'll have to have different code paths for "run in the (main) desktop session" and "started from an existing desktop session".
Comment 4 Guillaume Desmottes 2011-10-08 19:46:52 UTC
My problem was savedPresence == UNSET and presence == AVAILABLE; so the Shell was calling set_all_requested_presences(UNSET) which was obviously failing and so the menu was never set to available.

I agree that the "start Shell from another desktop" isn't really a problem but anyway we shouldn't try setting our presence to UNSET. Another option could be to change the default of key ot AVAILABLE or OFFLINE I guess.
Comment 5 Florian Müllner 2011-10-08 20:46:38 UTC
OFFLINE sounds like the correct choice to me.
Comment 6 Guillaume Desmottes 2011-10-08 21:31:48 UTC
Created attachment 198635 [details] [review]
default saved-im-presence ot Offline

Unset is not a valid presence type so the Shell shouldn't try setting it when
starting for the first time.
Comment 7 Florian Müllner 2011-10-08 21:50:58 UTC
Review of attachment 198635 [details] [review]:

Looks good, thanks!
(Subject line should be fixed up to something like "Change default of saved-im-presence to Offline" before pushing)
Comment 8 Guillaume Desmottes 2011-10-09 19:24:40 UTC
Merged to master.