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 641236 - empty user label in top panel
empty user label in top panel
Status: RESOLVED FIXED
Product: gnome-screensaver
Classification: Deprecated
Component: dialog
CVS HEAD
Other Linux
: Normal normal
: ---
Assigned To: gnome-screensaver maintainers
gnome-screensaver maintainers
Depends on:
Blocks:
 
 
Reported: 2011-02-02 12:23 UTC by Frederic Peters
Modified: 2011-02-02 20:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use username in top panel if real name is empty (822 bytes, patch)
2011-02-02 12:24 UTC, Frederic Peters
none Details | Review
Use username in top panel if real name is empty (816 bytes, patch)
2011-02-02 20:10 UTC, Frederic Peters
accepted-commit_now Details | Review

Description Frederic Peters 2011-02-02 12:23:39 UTC
g_get_real_name is used in the top panel, unless it returns NULL or "Unknown"; the attached patch makes it also fall back to the username if the real name is the empty string.
Comment 1 Frederic Peters 2011-02-02 12:24:15 UTC
Created attachment 179873 [details] [review]
Use username in top panel if real name is empty
Comment 2 William Jon McCann 2011-02-02 18:23:21 UTC
Review of attachment 179873 [details] [review]:

::: src/gs-window-x11.c
@@ +2337,3 @@
         name = g_get_real_name ();
 
+        if (name == NULL || strcmp(name, "") == 0 || strcmp (name, "Unknown") == 0) {

The name[0] == '\0' pattern is more common and a little nicer.  The strcmp was missing a space before the ( too.
Comment 3 Frederic Peters 2011-02-02 20:10:23 UTC
Created attachment 179921 [details] [review]
Use username in top panel if real name is empty