? ~a.diff
Index: mailcheck.c
===================================================================
RCS file: /cvs/gnome/gnome-applets/mailcheck/mailcheck.c,v
retrieving revision 1.139
diff -u -r1.139 mailcheck.c
--- mailcheck.c	16 Sep 2003 21:05:28 -0000	1.139
+++ mailcheck.c	19 Dec 2003 15:22:20 -0000
@@ -84,6 +84,8 @@
 	/* execute a command when the applet is clicked (launch email prog) */
 	char *clicked_cmd;
 	gboolean clicked_enabled;
+	GdkEventType click_type;
+	
 
 	/* execute a command when new mail arrives (play a sound etc.) */
 	char *newmail_cmd;
@@ -1209,7 +1211,7 @@
 	MailCheck *mc = data;
 	gboolean retval = FALSE;
 
-	if (event->button == 1 && event->type == GDK_2BUTTON_PRESS) {
+	if (event->button == 1 && event->type == mc->click_type) {
 
 		if (mc->clicked_enabled && mc->clicked_cmd && (strlen(mc->clicked_cmd) > 0))
 			mailcheck_execute_shell (mc, mc->clicked_cmd);
@@ -2242,7 +2244,10 @@
 		if ( ! key_writable (mc->applet, "newmail_command"))
 			hard_set_sensitive (mc->newmail_cmd_entry, FALSE);
 
-		l = gtk_check_button_new_with_mnemonic (_("When double clicke_d:"));
+	        if (mc->click_type == GDK_BUTTON_PRESS )
+	          l = gtk_check_button_new_with_mnemonic (_("When clicke_d:"));
+ 		else 
+	          l = gtk_check_button_new_with_mnemonic (_("When double clicke_d:"));
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(l), mc->clicked_enabled);
 		g_signal_connect(G_OBJECT(l), "toggled",
 				 G_CALLBACK(clicked_toggled), mc);
@@ -2393,6 +2398,9 @@
 static void
 applet_load_prefs(MailCheck *mc)
 {
+       gchar *click_type;       
+	GConfClient *client; 
+
 	panel_applet_gconf_set_string(mc->applet, "remote_password", "", NULL);
 
 	mc->animation_file = panel_applet_gconf_get_string(mc->applet, "animation_file", NULL);
@@ -2420,6 +2428,17 @@
 	mc->mailbox_type = panel_applet_gconf_get_int(mc->applet, "mailbox_type", NULL);
 	mc->mail_file = panel_applet_gconf_get_string (mc->applet, "mail_file", NULL);
 	mc->play_sound = panel_applet_gconf_get_bool(mc->applet, "play_sound", NULL);
+	
+	client = gconf_client_get_default ();
+	click_type = gconf_client_get_string (client, "/apps/nautilus/preferences/click_policy", NULL);
+
+	if (click_type && g_strrstr (click_type, "single"))
+	   mc->click_type = GDK_BUTTON_PRESS;
+        else 
+	   mc->click_type = GDK_2BUTTON_PRESS;
+	   
+	g_free (click_type);
+	g_object_unref(client);
 }
 
 static void
