diff -up gnome-control-center-2.21.92/capplets/about-me/gnome-about-me.c.passwd gnome-control-center-2.21.92/capplets/about-me/gnome-about-me.c --- gnome-control-center-2.21.92/capplets/about-me/gnome-about-me.c.passwd 2008-02-26 04:16:37.000000000 -0500 +++ gnome-control-center-2.21.92/capplets/about-me/gnome-about-me.c 2008-02-26 12:14:00.000000000 -0500 @@ -35,7 +35,6 @@ #include #include "e-image-chooser.h" -#include "gnome-about-me-password.h" #include "capplet-util.h" @@ -793,10 +792,11 @@ about_me_button_clicked_cb (GtkDialog *d static void about_me_passwd_clicked_cb (GtkWidget *button, GnomeAboutMe *me) { - GladeXML *dialog; + gchar *argv[2]; - dialog = me->dialog; - gnome_about_me_password (GTK_WINDOW (WID ("about-me-dialog"))); + argv[0] = "/usr/bin/userpasswd"; + argv[1] = NULL; + g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL); } static gint @@ -808,10 +808,7 @@ about_me_setup_dialog (void) GladeXML *dialog; GError *error = NULL; GList *chain; - - struct passwd *pwent; - gchar *str; - gchar **tok; + gchar *str; me = g_new0 (GnomeAboutMe, 1); @@ -880,34 +877,14 @@ about_me_setup_dialog (void) about_me_setup_email (me->contact); } - /************************************************/ - me->login = get_user_login (); - setpwent (); - pwent = getpwnam (me->login); - if (pwent == NULL) { - about_me_error (GTK_WINDOW (WID ("about-me-dialog")), - _("Unknown login ID, the user database might be corrupted")); - about_me_destroy (me); - return -1; - } - tok = g_strsplit (pwent->pw_gecos, ",", 0); - - /************************************************/ - - if (tok[0] == NULL || strlen (tok[0]) == 0) - me->username = NULL; - else - me->username = g_strdup (tok[0]); + me->login = g_strdup (g_get_user_name ()); + me->username = g_strdup (g_get_real_name ()); /* Contact Tab */ about_me_load_photo (me, me->contact); widget = WID ("fullname"); - if (tok[0] == NULL || strlen (tok[0]) == 0) { - str = g_strdup_printf ("%s", me->login); - } else { - str = g_strdup_printf ("%s", tok[0]); - } + str = g_strdup_printf ("%s", me->username); gtk_label_set_markup (GTK_LABEL (widget), str); g_free (str); @@ -915,14 +892,9 @@ about_me_setup_dialog (void) widget = WID ("login"); gtk_label_set_text (GTK_LABEL (widget), me->login); - if (tok[0] == NULL || strlen (tok[0]) == 0) { - str = g_strdup_printf (_("About %s"), me->login); - } else { - str = g_strdup_printf (_("About %s"), tok[0]); - } + str = g_strdup_printf (_("About %s"), me->username); gtk_window_set_title (GTK_WINDOW (main_dialog), str); g_free (str); - g_strfreev (tok); widget = WID ("password"); g_signal_connect (G_OBJECT (widget), "clicked",