[gnome-control-center/extensible-shell] Optionally allow the "userpasswd" utility to be used in about-me
- From: Thomas Wood <thos src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-control-center/extensible-shell] Optionally allow the "userpasswd" utility to be used in about-me
- Date: Thu, 11 Feb 2010 15:49:27 +0000 (UTC)
commit 544e03e1e819638d86abb4e9a7e50942d4f4d428
Author: Thomas Wood <thomas wood intel com>
Date: Thu Feb 11 15:49:08 2010 +0000
Optionally allow the "userpasswd" utility to be used in about-me
Based on a patch from Fedora:
http://cvs.fedoraproject.org/viewvc/F-12/control-center/gnome-control-center-2.25.2-passwd.patch?revision=1.4&view=markup
capplets/about-me/gnome-about-me.c | 4 ++++
configure.ac | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/capplets/about-me/gnome-about-me.c b/capplets/about-me/gnome-about-me.c
index 58af30b..c057215 100644
--- a/capplets/about-me/gnome-about-me.c
+++ b/capplets/about-me/gnome-about-me.c
@@ -821,10 +821,14 @@ about_me_button_clicked_cb (GtkDialog *dialog, gint response_id, GnomeAboutMe *m
static void
about_me_passwd_clicked_cb (GtkWidget *button, GnomeAboutMe *me)
{
+#ifdef HAVE_USERPASSWD
+ g_spawn_command_line_async ("/usr/bin/userpasswd", NULL);
+#else
GtkBuilder *dialog;
dialog = me->dialog;
gnome_about_me_password (GTK_WINDOW (WID ("about-me-dialog")));
+#endif
}
static void
diff --git a/configure.ac b/configure.ac
index 818be22..e8fde4b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -248,6 +248,22 @@ AS_IF([test "x$with_window_manager" == "xmetacity"],
PKG_CHECK_MODULES(WINDOW_MANAGER, $WM_REQUIRES)
+
+dnl ==============================================
+dnl Allow "userpasswd" to be used in about-me
+dnl ==============================================
+
+AC_ARG_WITH([userpasswd],
+ [AS_HELP_STRING([--with-userpasswd],
+ [use the "userpasswd" utility to change passwords in about-me])],
+ [with_userpasswd=${withval}],
+ [with_userpasswd=no])
+
+AS_IF([test "x$with_userpasswd" == "xyes"],
+ [AC_DEFINE(HAVE_USERPASSWD, 1, [defined if using userpasswd])],
+ [])
+
+
dnl ==============================================
dnl End: Check that we meet the dependencies
dnl ==============================================
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]