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 607051 - Switch User item should be hidden when VT switching is disabled
Switch User item should be hidden when VT switching is disabled
Status: RESOLVED FIXED
Product: gdm
Classification: Core
Component: general
2.29.x
Other All
: Normal major
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-15 08:26 UTC by Halton Huo
Modified: 2010-01-27 16:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Hide "Switch User" item when CanActivateSessions return false (6.03 KB, patch)
2010-01-15 08:36 UTC, Halton Huo
committed Details | Review

Description Halton Huo 2010-01-15 08:26:41 UTC
The user switch applet always show "Switch User" item, but on OpenSolaris it is not true. Please check https://bugs.freedesktop.org/show_bug.cgi?id=26055.

The applet should be hidden if VT switching disabled.
Comment 1 Halton Huo 2010-01-15 08:36:18 UTC
Created attachment 151454 [details] [review]
Hide "Switch User" item when CanActivateSessions return false

The applet should call CanActivateSessions or check vtdaemon status, since CanActivateSessions is more generic(gnome-session also uses that interface).

I added gdm_user_manager_can_switch() to GdmUserManager for two intents:

1. There are duplicated codes of calling "CanActivateSessions" in _get_primary_user_session_id() and _get_login_window_session_id()

2. The applet can just simply call this function rather than writing duplicated codes.
Comment 2 Ray Strode [halfline] 2010-01-27 16:46:59 UTC
Review of attachment 151454 [details] [review]:

Looks good, thanks.