[Pkg-utopia-commits] r3098 - in /packages/unstable/policykit-gnome/debian: changelog patches/05-no-commas.patch patches/series

biebl at users.alioth.debian.org biebl at users.alioth.debian.org
Mon Apr 27 09:21:33 UTC 2009


Author: biebl
Date: Mon Apr 27 09:21:33 2009
New Revision: 3098

URL: http://svn.debian.org/wsvn/pkg-utopia/?sc=1&rev=3098
Log:
* debian/patches/05-no-commas.patch
  - Don't show excess commas when displaying user's real name. Patch pulled
    from Ubuntu.

Added:
    packages/unstable/policykit-gnome/debian/patches/05-no-commas.patch
Modified:
    packages/unstable/policykit-gnome/debian/changelog
    packages/unstable/policykit-gnome/debian/patches/series

Modified: packages/unstable/policykit-gnome/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/policykit-gnome/debian/changelog?rev=3098&op=diff
==============================================================================
--- packages/unstable/policykit-gnome/debian/changelog (original)
+++ packages/unstable/policykit-gnome/debian/changelog Mon Apr 27 09:21:33 2009
@@ -5,6 +5,9 @@
       "clicked" because the user is not authenticated it should emit
       "auth-start" so that the user is invited to authenticate.
       (Closes: #524836)
+  * debian/patches/05-no-commas.patch
+    - Don't show excess commas when displaying user's real name. Patch pulled
+      from Ubuntu.
 
  -- Michael Biebl <biebl at debian.org>  Mon, 27 Apr 2009 11:09:24 +0200
 

Added: packages/unstable/policykit-gnome/debian/patches/05-no-commas.patch
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/policykit-gnome/debian/patches/05-no-commas.patch?rev=3098&op=file
==============================================================================
--- packages/unstable/policykit-gnome/debian/patches/05-no-commas.patch (added)
+++ packages/unstable/policykit-gnome/debian/patches/05-no-commas.patch Mon Apr 27 09:21:33 2009
@@ -1,0 +1,37 @@
+#
+# Ubuntu: https://bugs.launchpad.net/bugs/201495
+# Upstream: http://bugzilla.gnome.org/show_bug.cgi?id=541945
+# Patch: http://bugzilla.gnome.org/attachment.cgi?id=114144&action=view
+# Description: Parse passwd gecos field to ignore excess commas
+#
+diff -Nur -x '*.orig' -x '*~' policykit-gnome-0.9/src/polkit-gnome-auth-dialog.c policykit-gnome-0.9.new/src/polkit-gnome-auth-dialog.c
+--- policykit-gnome-0.9/src/polkit-gnome-auth-dialog.c	2008-07-22 13:00:53.000000000 -0400
++++ policykit-gnome-0.9.new/src/polkit-gnome-auth-dialog.c	2009-01-22 15:19:01.000000000 -0500
+@@ -195,6 +195,7 @@
+ 
+ 	/* For each user */
+ 	for (n = 0; admin_users[n] != NULL; n++) {
++		char *gecos;
+ 		char *real_name;
+ 		GdkPixbuf *pixbuf;
+ 		struct passwd *passwd;
+@@ -208,10 +209,17 @@
+ 		}
+ 
+ 		/* Real name */
+-		if (passwd->pw_gecos != NULL && strlen (passwd->pw_gecos) > 0)
+-			real_name = g_strdup_printf (_("%s (%s)"), passwd->pw_gecos, admin_users[n]);
++		gecos = g_strdup (passwd->pw_gecos);
++		if (gecos != NULL && strlen (gecos) > 0) {
++			char *first_comma = strchr (gecos, ',');
++			if (first_comma)
++				*first_comma = '\0';
++		}
++		if (gecos != NULL && strlen (gecos) > 0)
++			real_name = g_strdup_printf (_("%s (%s)"), gecos, admin_users[n]);
+ 		else
+ 			real_name = g_strdup (admin_users[n]);
++		g_free (gecos);
+ 
+ 		/* Load users face */
+ 		pixbuf = NULL;

Modified: packages/unstable/policykit-gnome/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-utopia/packages/unstable/policykit-gnome/debian/patches/series?rev=3098&op=diff
==============================================================================
--- packages/unstable/policykit-gnome/debian/patches/series (original)
+++ packages/unstable/policykit-gnome/debian/patches/series Mon Apr 27 09:21:33 2009
@@ -1,2 +1,3 @@
 02-desktop_file_categories.patch
 05-fix-actions.patch
+05-no-commas.patch




More information about the Pkg-utopia-commits mailing list