[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#560004: patch for the user-list bug



To keep you informed what happens in the inofficial lxdm-packaging:

Zdenek Prikryl sent me a patch for the user list bug which I applied
to my lxdm-package at apt.klaumikli.de - works like a charm: only the
name and login of the users are displayed without commas and other
information.

Patch attached.

The hope never dies that lxdm finally will reach Debian ;-)

Klaumi

--- 
Klaus-Michael Klingsporn            
mail: klaumikli@gmx.de
web: www.klaumikli.de
--- lxdm-0.4.1.orig/src/greeter.c	2011-07-29 15:42:33.000000000 +0200
+++ lxdm-0.4.1/src/greeter.c	2012-05-08 20:52:22.000000000 +0200
@@ -911,13 +911,16 @@ static gboolean load_user_list(GtkWidget
 	}
 	for(i=0;i<count;i++)
 	{		
-		char *gecos,*face_path,*display;
+		char *gecos,*face_path,*display,*comma;
 		gboolean login;
 		GdkPixbuf *face=NULL;
 		gtk_list_store_append(model,&iter);
 		gecos=g_key_file_get_string(kf,users[i],"gecos",0);
 		face_path=g_key_file_get_string(kf,users[i],"face",0);
 		login=g_key_file_get_boolean(kf,users[i],"login",0);
+		comma=gecos?g_strstr_len(gecos, strlen(gecos), ","):NULL;
+		if (comma)
+			*comma='\0';
 		if(face_path)
 			face=gdk_pixbuf_new_from_file_at_scale(face_path,48,48,TRUE,NULL);
 		if(!face)

Reply to: