|
|
2183e2a |
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
|
|
|
2183e2a |
--- gnome-control-center-2.23.2/capplets/about-me/gnome-about-me.c.passwd 2008-05-17 12:47:00.000000000 -0400
|
|
|
2183e2a |
+++ gnome-control-center-2.23.2/capplets/about-me/gnome-about-me.c 2008-05-27 23:20:51.000000000 -0400
|
|
|
2183e2a |
@@ -35,7 +35,6 @@
|
|
|
2183e2a |
#include <libebook/e-book.h>
|
|
|
2183e2a |
|
|
|
2183e2a |
#include "e-image-chooser.h"
|
|
|
2183e2a |
-#include "gnome-about-me-password.h"
|
|
|
2183e2a |
|
|
|
2183e2a |
#include "capplet-util.h"
|
|
|
2183e2a |
|
|
|
2183e2a |
@@ -850,10 +849,11 @@ about_me_button_clicked_cb (GtkDialog *d
|
|
|
2183e2a |
static void
|
|
|
2183e2a |
about_me_passwd_clicked_cb (GtkWidget *button, GnomeAboutMe *me)
|
|
|
2183e2a |
{
|
|
|
2183e2a |
- GladeXML *dialog;
|
|
|
2183e2a |
+ gchar *argv[2];
|
|
|
2183e2a |
|
|
|
2183e2a |
- dialog = me->dialog;
|
|
|
2183e2a |
- gnome_about_me_password (GTK_WINDOW (WID ("about-me-dialog")));
|
|
|
2183e2a |
+ argv[0] = "/usr/bin/userpasswd";
|
|
|
2183e2a |
+ argv[1] = NULL;
|
|
|
2183e2a |
+ g_spawn_async (NULL, argv, NULL, 0, NULL, NULL, NULL, NULL);
|
|
|
2183e2a |
}
|
|
|
2183e2a |
|
|
|
2183e2a |
static gint
|
|
|
2183e2a |
@@ -865,10 +865,7 @@ about_me_setup_dialog (void)
|
|
|
2183e2a |
GladeXML *dialog;
|
|
|
2183e2a |
GError *error = NULL;
|
|
|
2183e2a |
GList *chain;
|
|
|
2183e2a |
-
|
|
|
2183e2a |
- struct passwd *pwent;
|
|
|
2183e2a |
- gchar *str;
|
|
|
2183e2a |
- gchar **tok;
|
|
|
2183e2a |
+ gchar *str;
|
|
|
2183e2a |
|
|
|
2183e2a |
me = g_new0 (GnomeAboutMe, 1);
|
|
|
2183e2a |
|
|
|
2183e2a |
@@ -937,34 +934,14 @@ about_me_setup_dialog (void)
|
|
|
2183e2a |
about_me_setup_email (me);
|
|
|
2183e2a |
}
|
|
|
2183e2a |
|
|
|
2183e2a |
- /************************************************/
|
|
|
2183e2a |
- me->login = get_user_login ();
|
|
|
2183e2a |
- setpwent ();
|
|
|
2183e2a |
- pwent = getpwnam (me->login);
|
|
|
2183e2a |
- if (pwent == NULL) {
|
|
|
2183e2a |
- about_me_error (GTK_WINDOW (WID ("about-me-dialog")),
|
|
|
2183e2a |
- _("Unknown login ID, the user database might be corrupted"));
|
|
|
2183e2a |
- about_me_destroy (me);
|
|
|
2183e2a |
- return -1;
|
|
|
2183e2a |
- }
|
|
|
2183e2a |
- tok = g_strsplit (pwent->pw_gecos, ",", 0);
|
|
|
2183e2a |
-
|
|
|
2183e2a |
- /************************************************/
|
|
|
2183e2a |
-
|
|
|
2183e2a |
- if (tok[0] == NULL || *tok[0] == '\0')
|
|
|
2183e2a |
- me->username = NULL;
|
|
|
2183e2a |
- else
|
|
|
2183e2a |
- me->username = g_strdup (tok[0]);
|
|
|
2183e2a |
+ me->login = g_strdup (g_get_user_name ());
|
|
|
2183e2a |
+ me->username = g_strdup (g_get_real_name ());
|
|
|
2183e2a |
|
|
|
2183e2a |
/* Contact Tab */
|
|
|
2183e2a |
about_me_load_photo (me, me->contact);
|
|
|
2183e2a |
|
|
|
2183e2a |
widget = WID ("fullname");
|
|
|
2183e2a |
- if (tok[0] == NULL || *tok[0] == '\0') {
|
|
|
2183e2a |
- str = g_strdup_printf ("%s", me->login);
|
|
|
2183e2a |
- } else {
|
|
|
2183e2a |
- str = g_strdup_printf ("%s", tok[0]);
|
|
|
2183e2a |
- }
|
|
|
2183e2a |
+ str = g_strdup_printf ("%s", me->username);
|
|
|
2183e2a |
|
|
|
2183e2a |
gtk_label_set_markup (GTK_LABEL (widget), str);
|
|
|
2183e2a |
g_free (str);
|
|
|
2183e2a |
@@ -972,14 +949,9 @@ about_me_setup_dialog (void)
|
|
|
2183e2a |
widget = WID ("login");
|
|
|
2183e2a |
gtk_label_set_text (GTK_LABEL (widget), me->login);
|
|
|
2183e2a |
|
|
|
2183e2a |
- if (tok[0] == NULL || *tok[0] == '\0') {
|
|
|
2183e2a |
- str = g_strdup_printf (_("About %s"), me->login);
|
|
|
2183e2a |
- } else {
|
|
|
2183e2a |
- str = g_strdup_printf (_("About %s"), tok[0]);
|
|
|
2183e2a |
- }
|
|
|
2183e2a |
+ str = g_strdup_printf (_("About %s"), me->username);
|
|
|
2183e2a |
gtk_window_set_title (GTK_WINDOW (main_dialog), str);
|
|
|
2183e2a |
g_free (str);
|
|
|
2183e2a |
- g_strfreev (tok);
|
|
|
2183e2a |
|
|
|
2183e2a |
widget = WID ("password");
|
|
|
2183e2a |
g_signal_connect (widget, "clicked",
|