Hello. I'm attaching a small patch that causes the logo filename to be run through gdm_parse_enhanced_string as well as the greeting. I use this to provide system specific logos in a shared NFSroot environment. Unfortunatly I had to disable what appeare to be a little sanity checking to get it to work. I hope it meets your approval - Nick Lopez kimo_sabe atdot org
--- gdmlogin.c Fri Mar 17 09:47:53 2000 +++ gdmlogin.c.mine Fri Mar 17 09:47:22 2000 @@ -241,10 +241,10 @@ if (!s) return(NULL); - display = getenv ("DISPLAY"); + display = g_getenv ("DISPLAY"); - if(!display) - return(NULL); +/* if(!display) + return(NULL);*/ temp1 = strchr (display, '.'); temp2 = strchr (display, ':'); @@ -253,8 +253,8 @@ *temp1 = '\0'; else if (temp2) *temp2 = '\0'; - else - return (NULL); +/* else + return (NULL);*/ gethostname (hostbuf, 255); hostname = g_strdup (hostbuf); @@ -415,7 +415,7 @@ /* Disable System menu on non-local displays */ - display = getenv ("DISPLAY"); + display = g_getenv ("DISPLAY"); if (!display) gdm_login_abort ("gdm_login_parse_config: DISPLAY variable not set!"); @@ -1013,7 +1013,7 @@ GtkWidget *bbox = NULL; GtkWidget *logoframe = NULL; GtkStyle *style; - gchar *greeting; + gchar *greeting, *logofile; gint cols, rows; struct stat statbuf; @@ -1112,7 +1112,8 @@ else rows = 1; - if (GdmLogo && ! stat (GdmLogo, &statbuf)) + logofile = gdm_parse_enriched_string( GdmLogo ); + if (logofile && ! stat (logofile, &statbuf)) cols = 2; else cols = 1; @@ -1176,7 +1177,7 @@ (gint) gdk_screen_height () * 0.25); } - if (GdmLogo && !access (GdmLogo, R_OK)) { + if (logofile && !access (logofile, R_OK)) { GtkWidget *logo; logoframe = gtk_frame_new (NULL); @@ -1186,7 +1187,7 @@ gtk_widget_show (logoframe); gtk_frame_set_shadow_type (GTK_FRAME (logoframe), GTK_SHADOW_IN); - logo = gnome_pixmap_new_from_file (GdmLogo); + logo = gnome_pixmap_new_from_file (logofile); gtk_container_add (GTK_CONTAINER (logoframe), logo); gtk_widget_show (GTK_WIDGET (logo)); } @@ -1274,7 +1275,7 @@ /* Put it nicely together */ - if (GdmBrowser && GdmLogo) { + if (GdmBrowser && logofile) { gtk_table_attach (GTK_TABLE (table), bbox, 0, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); @@ -1293,7 +1294,7 @@ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_FILL), 0, 0); } - else if (GdmLogo) { + else if (logofile) { gtk_table_attach (GTK_TABLE (table), logoframe, 0, 1, 0, 1, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0);
Attachment:
pgpynKpQPtE8x.pgp
Description: PGP signature