Index: button-widget.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/button-widget.c,v
retrieving revision 1.137
diff -u -p -r1.137 button-widget.c
--- button-widget.c	28 Sep 2004 08:33:24 -0000	1.137
+++ button-widget.c	29 Oct 2004 12:58:23 -0000
@@ -286,6 +286,10 @@ button_widget_finalize (GObject *object)
 	g_free (button->stock_id);
 	button->stock_id = NULL;
 	
+	if (button->activate_timeout_id)
+		g_source_remove (button->activate_timeout_id);
+	button->activate_timeout_id = 0;
+
 	parent_class->finalize (object);
 }
 
@@ -658,14 +662,45 @@ button_widget_size_allocate (GtkWidget  
 	}
 }
 
+#define DEFAULT_IGNORE_TIME 1000
+
+static gboolean
+button_widget_activate_timeout (gpointer data)
+{
+	ButtonWidget *button_widget;
+	
+	button_widget = (ButtonWidget *) data;
+
+	button_widget->activate_timeout_id = 0;
+	return FALSE;
+}
+
 static void
 button_widget_activate (GtkButton *button)
 {
-	ButtonWidget *button_widget = BUTTON_WIDGET (button);
+	ButtonWidget *button_widget;
+	int           ignore_time;
+	GError       *error;
+
+	button_widget = BUTTON_WIDGET (button);
 
-	if (!button_widget->activatable)
+	if (!button_widget->activatable || button_widget->activate_timeout_id)
 		return;
 
+	error = NULL;
+	ignore_time = gconf_client_get_int (
+				panel_gconf_get_client (),
+				"/desktop/gnome/peripherals/mouse/double_click",
+				&error);
+	if (error) {
+		ignore_time = DEFAULT_IGNORE_TIME;
+		g_error_free (error);
+	}
+
+	button_widget->activate_timeout_id = g_timeout_add (ignore_time,
+							    button_widget_activate_timeout,
+							    button_widget);
+
 	if (GTK_BUTTON_CLASS (parent_class)->activate)
 		GTK_BUTTON_CLASS (parent_class)->activate (button);
 }
@@ -728,6 +763,8 @@ button_widget_instance_init (ButtonWidge
 	button->dnd_highlight = FALSE;
 
 	button->size = 0;
+
+	button->activate_timeout_id = 0;
 
 	g_signal_connect_object (panel_icon_theme, "changed",
 				 G_CALLBACK (button_widget_icon_theme_changed),
Index: button-widget.h
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/button-widget.h,v
retrieving revision 1.43
diff -u -p -r1.43 button-widget.h
--- button-widget.h	21 Jan 2004 13:22:41 -0000	1.43
+++ button-widget.h	29 Oct 2004 12:58:23 -0000
@@ -30,6 +30,9 @@ struct _ButtonWidget {
 	PanelOrientation  orientation;
 
 	int               size;
+	/* This is to prevent the "double-click effect" when people
+	 * think they have to double-click to launch something. */
+	guint             activate_timeout_id;
 
 	guint             activatable   : 1;
 	guint             ignore_leave  : 1;
