--- gdm2/ChangeLog.org	2006-12-10 17:19:16.000000000 +0000
+++ gdm2/ChangeLog	2006-12-10 17:20:29.000000000 +0000
@@ -0,0 +1,5 @@
+2006-12-10  Lukasz Zalewski  <lukas@dcs.qmul.ac.uk>
+
+	* Additional fixes for bug/feature request #334186
+	* Fixed some of the compiler warings
+	
--- gdm2/vicious-extensions/ve-nongnome.c.org	2006-12-10 19:28:10.000000000 +0000
+++ gdm2/vicious-extensions/ve-nongnome.c	2006-12-10 19:28:36.000000000 +0000
@@ -222,10 +222,10 @@
 {
   GList *retval = NULL;
 
-  gchar *language;
-  gchar *territory;
-  gchar *codeset;
-  gchar *modifier;
+  gchar *language = NULL;
+  gchar *territory = NULL;
+  gchar *codeset = NULL;
+  gchar *modifier = NULL;
 
   guint mask;
   guint i;
--- gdm2/gui/gdmsetup.c.org	2006-12-10 10:04:03.000000000 +0000
+++ gdm2/gui/gdmsetup.c	2006-12-10 19:17:23.000000000 +0000
@@ -411,12 +411,12 @@
 radiogroup_timeout (GtkWidget *toggle)
 {	
 	const char *key = g_object_get_data (G_OBJECT (toggle), "key");
-	GList *radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (toggle));
+	GSList *radio_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (toggle));
 		
 	if (strcmp (ve_sure_string (key), GDM_KEY_RELAX_PERM) == 0) {
-		GList *tmp;
+		GSList *tmp;
 		gint val;
-		gint selected;
+		gint selected = 0;
 		gint i = 0;
 		gint list_size;
 		
@@ -531,7 +531,7 @@
 			
 			value = gdm_config_get_string ((gchar *)key);
 									
-			new_val = g_strdup ((gchar*) g_slist_nth_data (sessions, selected));					
+			new_val = g_strdup ((gchar*) g_list_nth_data (sessions, selected));					
 			
 			if (strcmp (ve_sure_string (value), ve_sure_string (new_val)) != 0)				
 				gdm_setup_config_set_string (key, ve_sure_string (new_val));
@@ -1544,7 +1544,7 @@
 		gchar *new_val = NULL;
 		
 		val = gdm_config_get_string ((gchar *)key);
-		new_val = g_strdup ((gchar*) g_slist_nth_data (sessions, selected));
+		new_val = g_strdup ((gchar*) g_list_nth_data (sessions, selected));
 		
 		if (strcmp (ve_sure_string (val), ve_sure_string (new_val)) != 0)
 			gdm_setup_config_set_string (key,  ve_sure_string (new_val));
@@ -2742,7 +2742,7 @@
 static void
 command_apply (GtkWidget *button, gpointer data)
 {
-	gchar *command = NULL;
+	const gchar *command = NULL;
 	GtkWidget *cmd_path_entry = NULL;
 	GtkWidget *command_combobox = (GtkWidget*)data;
 	gboolean command_exists = FALSE;
@@ -3446,8 +3446,8 @@
 	GtkWidget *command_combobox;
 	gint selected;
 
-	const char *key = g_object_get_data (G_OBJECT (entry), "key");
-	gchar *val      = gtk_entry_get_text (GTK_ENTRY (entry));
+	const char  *key  = g_object_get_data (G_OBJECT (entry), "key");
+	const gchar *val  = gtk_entry_get_text (GTK_ENTRY (entry));
 	
 	apply_cmd_changes = glade_helper_get (xml, "command_apply_button", GTK_TYPE_BUTTON);
 	command_combobox = glade_helper_get (xml, "cmd_type_combobox", GTK_TYPE_COMBO_BOX);
@@ -6355,6 +6355,9 @@
 	/* Setup Deny TCP connections to Xserver */
 	setup_notify_toggle ("disallow_tcp", GDM_KEY_DISALLOW_TCP);
 
+	/* Setup never place cookies on NFS */
+	setup_notify_toggle ("never_cookies_NFS_checkbutton", GDM_KEY_NEVER_PLACE_COOKIES_ON_NFS);
+
 	/* Setup Retry delay */
 	setup_intspin ("retry_delay", GDM_KEY_RETRY_DELAY);
 
@@ -6385,10 +6388,7 @@
 	setup_notify_toggle ("allowremoteauto", GDM_KEY_ALLOW_REMOTE_AUTOLOGIN);
 
 	/* Setup check dir owner */
-	setup_notify_toggle ("check_dir_owner_checkbutton", GDM_KEY_CHECK_DIR_OWNER);
-
-	/* Setup never place cookies on NFS */
-	setup_notify_toggle ("never_cookies_NFS_checkbutton", GDM_KEY_NEVER_PLACE_COOKIES_ON_NFS);
+	setup_notify_toggle ("check_dir_owner_checkbutton", GDM_KEY_CHECK_DIR_OWNER);	
 	
 	/* Setup Relax permissions */
 	setup_radio_group ("relax_permissions0_radiobutton", GDM_KEY_RELAX_PERM, 0);
@@ -6399,10 +6399,7 @@
 	setup_intspin ("minimal_uid_spinbutton", GDM_KEY_MINIMAL_UID);
 
 	/* Setup always login current session */
-	setup_notify_toggle ("a_login_curr_session_checkbutton", GDM_KEY_ALWAYS_LOGIN_CURRENT_SESSION);
-
-	/* Setup always restart server */
-	setup_notify_toggle ("a_restart_server_checkbutton", GDM_KEY_ALWAYS_RESTART_SERVER);
+	setup_notify_toggle ("a_login_curr_session_checkbutton", GDM_KEY_ALWAYS_LOGIN_CURRENT_SESSION);	
 
 	/* Setup Configure XDMCP button */
 	XDMCPbutton = glade_helper_get (xml, "config_xserverbutton",
@@ -7250,19 +7247,31 @@
 		if (!ve_string_empty (session->clearname)) {
 			gtk_combo_box_append_text (GTK_COMBO_BOX (default_session_combobox), 
 						   session->clearname);
-			sessions = g_slist_prepend (sessions, file);
+			sessions = g_list_prepend (sessions, file);
 		}
+		/* This is a sort of safety fallback
+		   if session does not have the clearname defined
+		   we will use name instead*/		
+		else if (!ve_string_empty (session->name)) {
+			gtk_combo_box_append_text (GTK_COMBO_BOX (default_session_combobox), 
+						   session->name);
+			sessions = g_list_prepend (sessions, file);
+		}
+		
 	}
 
-	sessions = g_slist_reverse (sessions);	
+	sessions = g_list_reverse (sessions);	
 
-	/* some cleanup */
-	g_slist_free (org_sessions);
+	/* some cleanup */	
+	g_list_free (org_sessions);
 	g_hash_table_remove_all (sessnames);
 	
-	gtk_widget_set_sensitive (default_session_combobox, TRUE);
-
-	gtk_combo_box_set_active (GTK_COMBO_BOX (default_session_combobox), active);
+	if (!ve_string_empty (org_val)) {
+		gtk_widget_set_sensitive (default_session_combobox, TRUE);		
+		gtk_combo_box_set_active (GTK_COMBO_BOX (default_session_combobox), active);
+	}
+	else
+		gtk_widget_set_sensitive (default_session_combobox, FALSE);
 	
 	g_object_set_data_full (G_OBJECT (default_session_combobox), "key",
 	                        g_strdup (GDM_KEY_DEFAULT_SESSION),
@@ -7315,6 +7324,9 @@
 
 	/* Setup use circles in the password entry */
 	setup_notify_toggle ("use_circles_passwd_checkbox", GDM_KEY_ENTRY_CIRCLES);
+
+	/* Setup always restart server */
+	setup_notify_toggle ("a_restart_server_checkbutton", GDM_KEY_ALWAYS_RESTART_SERVER);
 	
 	/* Setup default session */
 	setup_default_session ();
@@ -7777,6 +7789,9 @@
 	/* Plain background settings */
 	hookup_remote_plain_background ();
 
+	/* Plain behaviour settings */
+	hookup_remote_plain_behaviour ();
+	
 	/* Plain logo settings */
 	hookup_remote_plain_logo ();
 
@@ -7984,8 +7999,6 @@
 	glade_helper_tagify_label (xml, "autologin", "b");
 	glade_helper_tagify_label (xml, "timedlogin", "b");
 	glade_helper_tagify_label (xml, "security_label", "b");
-	glade_helper_tagify_label (xml, "xforwarding_label", "i");
-	glade_helper_tagify_label (xml, "xforwarding_label", "small");
 	glade_helper_tagify_label (xml, "fb_informationlabel", "i");
 	glade_helper_tagify_label (xml, "fb_informationlabel", "small");
 	
--- gdm2/gui/gdmsetup.glade.org	2006-12-10 10:03:55.000000000 +0000
+++ gdm2/gui/gdmsetup.glade	2006-12-10 19:09:23.000000000 +0000
@@ -202,6 +202,26 @@
 		  </child>
 
 		  <child>
+		    <widget class="GtkCheckButton" id="a_restart_server_checkbutton">
+		      <property name="visible">True</property>
+		      <property name="tooltip" translatable="yes">Does not reuse existing X servers, but kills them and starts over. Normally, just reinitializing is a nicer way to go but if the X server memory usage keeps growing this may be a safer option.</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Always _restart server</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
 		    <widget class="GtkTable" id="table25">
 		      <property name="visible">True</property>
 		      <property name="n_rows">1</property>
@@ -583,7 +603,7 @@
 		  <child>
 		    <widget class="GtkVBox" id="commands_vbox">
 		      <property name="width_request">320</property>
-		      <property name="height_request">236</property>
+		      <property name="height_request">206</property>
 		      <property name="visible">True</property>
 		      <property name="homogeneous">False</property>
 		      <property name="spacing">6</property>
@@ -1225,8 +1245,8 @@
 			</widget>
 			<packing>
 			  <property name="padding">0</property>
-			  <property name="expand">True</property>
-			  <property name="fill">True</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
 			</packing>
 		      </child>
 		    </widget>
@@ -6020,7 +6040,7 @@
 				  <child>
 				    <widget class="GtkCheckButton" id="disallow_tcp">
 				      <property name="visible">True</property>
-				      <property name="tooltip" translatable="yes">Always append -nolisten tcp to the command line of local X servers, thus disallowing TCP connection.  This is useful if you do not care for allowing remote connections, since the X protocol could really be potentially a security hazard to leave open, even though no known security problems exist.</property>
+				      <property name="tooltip" translatable="yes">Always append -nolisten tcp to the command line of local X servers, thus disallowing TCP connection.  This is useful if you do not care for allowing remote connections, since the X protocol could really be potentially a security hazard to leave open, even though no known security problems exist. Also disables X forwarding, but does not affect XDMCP.</property>
 				      <property name="can_focus">True</property>
 				      <property name="label" translatable="yes">_Deny TCP connections to Xserver</property>
 				      <property name="use_underline">True</property>
@@ -6069,22 +6089,17 @@
 				      </child>
 
 				      <child>
-					<widget class="GtkLabel" id="xforwarding_label">
+					<widget class="GtkCheckButton" id="never_cookies_NFS_checkbutton">
 					  <property name="visible">True</property>
-					  <property name="label" translatable="yes">Disables X forwarding, but does not affect XDMCP.</property>
-					  <property name="use_underline">False</property>
-					  <property name="use_markup">True</property>
-					  <property name="justify">GTK_JUSTIFY_LEFT</property>
-					  <property name="wrap">False</property>
-					  <property name="selectable">False</property>
-					  <property name="xalign">0.5</property>
-					  <property name="yalign">0.5</property>
-					  <property name="xpad">0</property>
-					  <property name="ypad">0</property>
-					  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
-					  <property name="width_chars">-1</property>
-					  <property name="single_line_mode">False</property>
-					  <property name="angle">0</property>
+					  <property name="tooltip" translatable="yes">Does not place cookies into the users home directory if this directory is on NFS.</property>
+					  <property name="can_focus">True</property>
+					  <property name="label" translatable="yes">Ne_ver place cookies on NFS</property>
+					  <property name="use_underline">True</property>
+					  <property name="relief">GTK_RELIEF_NORMAL</property>
+					  <property name="focus_on_click">True</property>
+					  <property name="active">False</property>
+					  <property name="inconsistent">False</property>
+					  <property name="draw_indicator">True</property>
 					</widget>
 					<packing>
 					  <property name="padding">0</property>
@@ -6269,26 +6284,6 @@
 				  </child>
 
 				  <child>
-				    <widget class="GtkCheckButton" id="never_cookies_NFS_checkbutton">
-				      <property name="visible">True</property>
-				      <property name="tooltip" translatable="yes">Does not place cookies into the users home directory if this directory is on NFS.</property>
-				      <property name="can_focus">True</property>
-				      <property name="label" translatable="yes">Ne_ver place cookies on NFS</property>
-				      <property name="use_underline">True</property>
-				      <property name="relief">GTK_RELIEF_NORMAL</property>
-				      <property name="focus_on_click">True</property>
-				      <property name="active">False</property>
-				      <property name="inconsistent">False</property>
-				      <property name="draw_indicator">True</property>
-				    </widget>
-				    <packing>
-				      <property name="padding">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
-				  </child>
-
-				  <child>
 				    <widget class="GtkCheckButton" id="a_login_curr_session_checkbutton">
 				      <property name="visible">True</property>
 				      <property name="tooltip" translatable="yes">When the user logs in and already has an existing session, they are connected to that session rather than starting a new session.  This only works for session's running on VT's (Virtual Terminals) started with gdmflexiserver, and not with XDMCP.</property>
@@ -6309,26 +6304,6 @@
 				  </child>
 
 				  <child>
-				    <widget class="GtkCheckButton" id="a_restart_server_checkbutton">
-				      <property name="visible">True</property>
-				      <property name="tooltip" translatable="yes">Does not reuse existing X servers, but kills them and starts over. Normally, just reinitializing is a nicer way to go but if the X server memory usage keeps growing this may be a safer option.</property>
-				      <property name="can_focus">True</property>
-				      <property name="label" translatable="yes">Always _restart server</property>
-				      <property name="use_underline">True</property>
-				      <property name="relief">GTK_RELIEF_NORMAL</property>
-				      <property name="focus_on_click">True</property>
-				      <property name="active">False</property>
-				      <property name="inconsistent">False</property>
-				      <property name="draw_indicator">True</property>
-				    </widget>
-				    <packing>
-				      <property name="padding">0</property>
-				      <property name="expand">False</property>
-				      <property name="fill">False</property>
-				    </packing>
-				  </child>
-
-				  <child>
 				    <widget class="GtkVBox" id="vbox130">
 				      <property name="visible">True</property>
 				      <property name="homogeneous">False</property>
--- gdm2/gui/greeter/greeter_canvas_item.c.org	2006-12-10 18:38:50.000000000 +0000
+++ gdm2/gui/greeter/greeter_canvas_item.c	2006-12-10 18:39:10.000000000 +0000
@@ -37,8 +37,8 @@
 #include "greeter_parser.h"
 
 /* Keep track of buttons so they can be set sensitive/insensitive */
-extern GtkButton *gtk_ok_button = NULL;
-extern GtkButton *gtk_start_again_button = NULL;
+GtkButton *gtk_ok_button = NULL;
+GtkButton *gtk_start_again_button = NULL;
 
 static void
 apply_tint (GdkPixbuf *pixbuf, guint32 tint_color)
--- gdm2/gui/greeter/greeter_item_customlist.c.org	2006-12-10 16:26:25.000000000 +0000
+++ gdm2/gui/greeter/greeter_item_customlist.c	2006-12-10 16:29:13.000000000 +0000
@@ -163,7 +163,7 @@
   GtkListStore *lang_model = greeter_language_get_model ();
   GtkTreeIter iter;
   gboolean valid;
-  char *name, *locale_name;
+  char *locale_name;
   int i=0;
 
   /* Do nothing if there is no language widget */
@@ -254,7 +254,6 @@
     {
       GtkTreeIter loopiter;
       GtkTreeModel *tm = GTK_TREE_MODEL (object);
-      gchar *to_display;
 
       gtk_list_store_append (GTK_LIST_STORE (tm), &loopiter);
 
@@ -389,7 +388,6 @@
 static void
 combo_selected (GtkComboBox *combo, GreeterItemInfo *item)
 {
-  GList *tmp;
   char  *id = NULL;
   char  *file;
   char  *active;
--- gdm2/gui/greeter/greeter_item_pam.c.org	2006-12-10 16:30:11.000000000 +0000
+++ gdm2/gui/greeter/greeter_item_pam.c	2006-12-10 16:31:07.000000000 +0000
@@ -125,9 +125,9 @@
   GreeterItemInfo *error_info;
 
   if (gtk_ok_button != NULL)
-     gtk_widget_set_sensitive (gtk_ok_button, FALSE);
+	  gtk_widget_set_sensitive (GTK_WIDGET (gtk_ok_button), FALSE);
   if (gtk_start_again_button != NULL)
-     gtk_widget_set_sensitive (gtk_start_again_button, FALSE);
+	  gtk_widget_set_sensitive (GTK_WIDGET (gtk_start_again_button), FALSE);
 
   greeter_ignore_buttons (TRUE);
 
@@ -200,9 +200,9 @@
               */
              login_string = gtk_entry_get_text (GTK_ENTRY (entry));
              if (login_string != NULL && login_string[0] != '\0')
-                 gtk_widget_set_sensitive (gtk_ok_button, TRUE);
+		     gtk_widget_set_sensitive (GTK_WIDGET (gtk_ok_button), TRUE);
              else
-                 gtk_widget_set_sensitive (gtk_ok_button, FALSE);
+		     gtk_widget_set_sensitive (GTK_WIDGET (gtk_ok_button), FALSE);
           }
     }
   return FALSE;
--- gdm2/gui/greeter/greeter.c.org	2006-12-10 16:07:29.000000000 +0000
+++ gdm2/gui/greeter/greeter.c	2006-12-10 16:10:43.000000000 +0000
@@ -198,14 +198,14 @@
 					gdm_config_get_bool (GDM_KEY_SOUND_ON_LOGIN));
 		greeter_probably_login_prompt = TRUE;
 		if (gtk_start_again_button != NULL)
-	                gtk_widget_set_sensitive (gtk_start_again_button, FALSE);
+	                gtk_widget_set_sensitive (GTK_WIDGET (gtk_start_again_button), FALSE);
 	} else {
 		greeter_probably_login_prompt = FALSE;
 		if (gtk_start_again_button != NULL)
-                	gtk_widget_set_sensitive (gtk_start_again_button, TRUE);
+                	gtk_widget_set_sensitive (GTK_WIDGET (gtk_start_again_button), TRUE);
 	}
 	if (gtk_ok_button != NULL)
-                gtk_widget_set_sensitive (gtk_ok_button, FALSE);
+                gtk_widget_set_sensitive (GTK_WIDGET (gtk_ok_button), FALSE);
 
 	greeter_ignore_buttons (FALSE);
 
@@ -223,14 +223,14 @@
 
 	if (tmp != NULL && strcmp (tmp, _("Password:")) == 0) {
 		if (gtk_start_again_button != NULL)
-                	gtk_widget_set_sensitive (gtk_start_again_button, TRUE);
+                	gtk_widget_set_sensitive (GTK_WIDGET (gtk_start_again_button), TRUE);
 		greeter_probably_login_prompt = FALSE;
 	} else {
 		if (gtk_start_again_button != NULL)
-                	gtk_widget_set_sensitive (gtk_start_again_button, FALSE);
+                	gtk_widget_set_sensitive (GTK_WIDGET (gtk_start_again_button), FALSE);
 	}
 	if (gtk_ok_button != NULL)
-                gtk_widget_set_sensitive (gtk_ok_button, FALSE);
+                gtk_widget_set_sensitive (GTK_WIDGET (gtk_ok_button), FALSE);
 
 	greeter_ignore_buttons (FALSE);
 	greeter_item_pam_prompt (tmp, PW_ENTRY_SIZE, FALSE);
@@ -380,9 +380,9 @@
     case GDM_RESETOK:
 
 	if (gtk_ok_button != NULL)
-                gtk_widget_set_sensitive (gtk_ok_button, FALSE);
+                gtk_widget_set_sensitive (GTK_WIDGET (gtk_ok_button), FALSE);
 	if (gtk_start_again_button != NULL)
-                gtk_widget_set_sensitive (gtk_start_again_button, FALSE);
+                gtk_widget_set_sensitive (GTK_WIDGET (gtk_start_again_button), FALSE);
 
 	conversation_info = greeter_lookup_id ("pam-conversation");
 	
--- gdm2/gui/greeter/greeter_geometry.c.org	2006-12-10 16:37:23.000000000 +0000
+++ gdm2/gui/greeter/greeter_geometry.c	2006-12-10 16:40:41.000000000 +0000
@@ -454,7 +454,7 @@
 			   GnomeCanvas     *canvas)
 {
   GtkRequisition *req;
-  GtkRequisition box_requisition; 
+  GtkRequisition box_requisition = {0, 0}; 
   int set_width = 0;
   int set_height = 0;
   
--- gdm2/gui/gdmlogin.c.org	2006-12-10 16:17:36.000000000 +0000
+++ gdm2/gui/gdmlogin.c	2006-12-10 16:20:19.000000000 +0000
@@ -2207,7 +2207,7 @@
 	time_til_next_min = 60 - the_tm->tm_sec;
 	time_til_next_min = (time_til_next_min>=0?time_til_next_min:0);
 
-	g_timeout_add (time_til_next_min*1000, update_clock, NULL);
+	g_timeout_add (time_til_next_min*1000, (GSourceFunc)update_clock, NULL);
 	return FALSE;
 }
 
--- gdm2/gui/gdmchooser.c.org	2006-12-10 16:49:26.000000000 +0000
+++ gdm2/gui/gdmchooser.c	2006-12-10 17:15:24.000000000 +0000
@@ -1798,6 +1798,8 @@
 	gdm_config_get_bool   (GDM_KEY_MULTICAST);
 
 	gdmcomm_comm_bulk_stop ();
+
+	return FALSE;
 }
 
 static gboolean
@@ -2065,7 +2067,7 @@
 	    }
     }
     gdm_chooser_xdmcp_init (hosts_opt);
-    g_strfreev (chooser_hosts);
+    g_strfreev (hosts_opt);
 
     sid = g_signal_lookup ("event",
 				 GTK_TYPE_WIDGET);
--- gdm2/gui/gdmsession.c.org	2006-12-10 15:54:41.000000000 +0000
+++ gdm2/gui/gdmsession.c	2006-12-10 16:06:15.000000000 +0000
@@ -347,7 +347,7 @@
 	(GHFunc) gdm_session_list_from_hash_table_func, sessions);
 
     /* Prioritize and sort the list */
-    sessions = g_list_sort (*sessions, (GCompareFunc) gdm_session_sort_func);
+    *sessions = g_list_sort (*sessions, (GCompareFunc) gdm_session_sort_func);
 
     if (default_session != NULL)
 	    if G_UNLIKELY (*default_session == NULL) {
@@ -479,7 +479,7 @@
   return save_session;
 }
 
-gint
+void
 gdm_set_save_session (const gint session)
 {
 	save_session = session;
--- gdm2/gui/gdmcommon.c.org	2006-12-10 16:52:29.000000000 +0000
+++ gdm2/gui/gdmcommon.c	2006-12-10 16:54:37.000000000 +0000
@@ -274,7 +274,7 @@
 
 	sid = g_signal_lookup ("activate",
 			       GTK_TYPE_MENU_ITEM);
-	if (sid != NULL) {
+	if (sid != 0) {
 	   g_signal_add_emission_hook (sid,
 				       0 /* detail */,
 				       delay_noblink,
@@ -284,7 +284,7 @@
 
 	sid = g_signal_lookup ("key_press_event",
 			       GTK_TYPE_WIDGET);
-	if (sid != NULL) {
+	if (sid != 0) {
 	   g_signal_add_emission_hook (sid,
 				       0 /* detail */,
 				       delay_noblink,
@@ -294,7 +294,7 @@
 
 	sid = g_signal_lookup ("button_press_event",
 			       GTK_TYPE_WIDGET);
-	if (sid != NULL) {
+	if (sid != 0) {
 	   g_signal_add_emission_hook (sid,
 				       0 /* detail */,
 				       delay_noblink,
--- gdm2/gui/gdmsession.h.org	2006-12-10 16:03:05.000000000 +0000
+++ gdm2/gui/gdmsession.h	2006-12-10 16:03:19.000000000 +0000
@@ -56,7 +56,7 @@
 
 gint		gdm_get_save_session 		(void);
 
-gint		gdm_set_save_session 		(const gint session);
+void		gdm_set_save_session 		(const gint session);
 
 const char *    gdm_get_default_session         (void);
 
