Blob Blame History Raw
diff -up gnome-control-center-2.23.2/capplets/about-me/gnome-about-me.c.passwd gnome-control-center-2.23.2/capplets/about-me/gnome-about-me.c
--- gnome-control-center-2.23.2/capplets/about-me/gnome-about-me.c.passwd	2008-05-17 12:47:00.000000000 -0400
+++ gnome-control-center-2.23.2/capplets/about-me/gnome-about-me.c	2008-05-27 23:20:51.000000000 -0400
@@ -35,7 +35,6 @@
 #include <libebook/e-book.h>
 
 #include "e-image-chooser.h"
-#include "gnome-about-me-password.h"
 
 #include "capplet-util.h"
 
@@ -850,10 +849,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
@@ -865,10 +865,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);
 
@@ -937,34 +934,14 @@ about_me_setup_dialog (void)
 		about_me_setup_email (me);
 	}
 
-	/************************************************/
-	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 || *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 || *tok[0] == '\0') {
-		str = g_strdup_printf ("<b><span size=\"xx-large\">%s</span></b>", me->login);
-	} else {
-		str = g_strdup_printf ("<b><span size=\"xx-large\">%s</span></b>", tok[0]);
-	}
+	str = g_strdup_printf ("<b><span size=\"xx-large\">%s</span></b>", me->username);
 
 	gtk_label_set_markup (GTK_LABEL (widget), str);
 	g_free (str);
@@ -972,14 +949,9 @@ about_me_setup_dialog (void)
 	widget = WID ("login");
 	gtk_label_set_text (GTK_LABEL (widget), me->login);
 
-	if (tok[0] == NULL || *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 (widget, "clicked",