gdm r5995 - in trunk: . gui/simple-greeter gui/user-switch-applet
- From: mccann svn gnome org
- To: svn-commits-list gnome org
- Subject: gdm r5995 - in trunk: . gui/simple-greeter gui/user-switch-applet
- Date: Tue, 11 Mar 2008 02:10:52 +0000 (GMT)
Author: mccann
Date: Tue Mar 11 02:10:51 2008
New Revision: 5995
URL: http://svn.gnome.org/viewvc/gdm?rev=5995&view=rev
Log:
2008-03-10 William Jon McCann <jmccann redhat com>
* gui/simple-greeter/gdm-user-manager.c: (process_ck_history_line):
* gui/user-switch-applet/applet.c: (fill_applet):
Handle case where we can't lookup a GdmUser (for whatever reason).
Could be gone, excluded, etc...
Modified:
trunk/ChangeLog
trunk/gui/simple-greeter/gdm-user-manager.c
trunk/gui/user-switch-applet/applet.c
Modified: trunk/gui/simple-greeter/gdm-user-manager.c
==============================================================================
--- trunk/gui/simple-greeter/gdm-user-manager.c (original)
+++ trunk/gui/simple-greeter/gdm-user-manager.c Tue Mar 11 02:10:51 2008
@@ -1115,6 +1115,11 @@
}
user = gdm_user_manager_get_user (manager, username);
+ if (user == NULL) {
+ g_debug ("GdmUserManager: unable to lookup user '%s'", username);
+ return;
+ }
+
g_object_set (user, "login-frequency", frequency, NULL);
g_signal_emit (manager, signals [USER_LOGIN_FREQUENCY_CHANGED], 0, user);
}
Modified: trunk/gui/user-switch-applet/applet.c
==============================================================================
--- trunk/gui/user-switch-applet/applet.c (original)
+++ trunk/gui/user-switch-applet/applet.c Tue Mar 11 02:10:51 2008
@@ -1082,14 +1082,23 @@
gtk_widget_show (hbox);
{
- GdmUser *user;
+ GdmUser *user;
+ const char *name;
user = gdm_user_manager_get_user_by_uid (adata->manager, getuid ());
- adata->imglabel = gtk_label_new (gdm_user_get_real_name (user));
- adata->user_notify_id = g_signal_connect (user,
- "notify::display-name",
- G_CALLBACK (user_notify_display_name_cb),
- adata->imglabel);
+ if (user != NULL) {
+ name = gdm_user_get_real_name (user);
+ } else {
+ name = _("Unknown");
+ }
+
+ adata->imglabel = gtk_label_new (name);
+ if (user != NULL) {
+ adata->user_notify_id = g_signal_connect (user,
+ "notify::display-name",
+ G_CALLBACK (user_notify_display_name_cb),
+ adata->imglabel);
+ }
gtk_box_pack_start (GTK_BOX (hbox), adata->imglabel, TRUE, TRUE, 0);
gtk_widget_show (adata->imglabel);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]