Index: panel-profile.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-profile.c,v
retrieving revision 1.35
diff -u -r1.35 panel-profile.c
--- panel-profile.c	6 Jul 2004 07:33:33 -0000	1.35
+++ panel-profile.c	10 Aug 2004 06:33:39 -0000
@@ -609,6 +609,43 @@
 
 TOPLEVEL_IS_WRITABLE_FUNC ("orientation", toplevel, orientation)
 
+PanelAnimationSpeed
+panel_profile_get_toplevel_animation_speed (PanelToplevel *toplevel)
+{
+      int animation_speed = PANEL_ANIMATION_MEDIUM;
+      GConfClient      *client;
+      const char       *key;
+      char             *str;
+      
+      client = panel_gconf_get_client ();
+      key = panel_profile_get_toplevel_key (toplevel, "panel_animation_speed");
+      str = gconf_client_get_string (client, key, NULL);
+      gconf_string_to_enum (panel_animation_speed_map, str, &animation_speed);
+      g_free (str);
+      
+      return animation_speed;
+}
+
+void
+panel_profile_set_toplevel_animation_speed (PanelToplevel *toplevel, GtkOptionMenu *option)
+{
+	GConfClient      *client;
+        char		 *speed;
+	const char       *key;
+
+	client = panel_gconf_get_client ();
+
+	key = panel_profile_get_toplevel_key (toplevel, "panel_animation_speed");
+	speed = gconf_enum_to_string (panel_animation_speed_map,
+                    gtk_option_menu_get_history (GTK_OPTION_MENU (option)));
+	gconf_client_set_string (client, key, speed, NULL);
+	panel_toplevel_set_animation_speed(toplevel, gtk_option_menu_get_history (GTK_OPTION_MENU (option)));
+
+	return;
+}
+
+TOPLEVEL_IS_WRITABLE_FUNC ("animation_speed", toplevel, animation_speed)
+
 #define TOPLEVEL_GET_SET_FUNCS(k, p, t, s, a)                         \
 	void                                                          \
 	panel_profile_set_##p##_##s (PanelToplevel *toplevel, a s)    \
@@ -637,6 +674,7 @@
 TOPLEVEL_GET_SET_FUNCS ("auto_hide",          toplevel,   bool, auto_hide,      gboolean)
 TOPLEVEL_GET_SET_FUNCS ("enable_buttons",     toplevel,   bool, enable_buttons, gboolean)
 TOPLEVEL_GET_SET_FUNCS ("enable_arrows",      toplevel,   bool, enable_arrows,  gboolean)
+TOPLEVEL_GET_SET_FUNCS ("enable_animations",      toplevel,   bool, enable_animations,  gboolean)
 TOPLEVEL_GET_SET_FUNCS ("background/fit",     background, bool, fit,            gboolean)
 TOPLEVEL_GET_SET_FUNCS ("background/stretch", background, bool, stretch,        gboolean)
 TOPLEVEL_GET_SET_FUNCS ("background/rotate",  background, bool, rotate,         gboolean)
@@ -1156,7 +1194,7 @@
 	else UPDATE_INT ("hide_delay", hide_delay)
 	else UPDATE_INT ("unhide_delay", unhide_delay)
 	else UPDATE_INT ("auto_hide_size", auto_hide_size)
-	else UPDATE_STRING ("animation_speed", animation_speed)
+	else UPDATE_STRING ("panel_animation_speed", animation_speed)
 }
 
 static void
@@ -1621,7 +1659,7 @@
 	GET_INT ("hide_delay", hide_delay);
 	GET_INT ("unhide_delay", unhide_delay);
 	GET_INT ("auto_hide_size", auto_hide_size);
-	GET_STRING ("animation_speed", animation_speed);
+	GET_STRING ("panel_animation_speed", animation_speed);
 
 #define GET_POSITION(a, c, fn)                                                      \
 	{                                                                           \
Index: panel-profile.h
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-profile.h,v
retrieving revision 1.14
diff -u -r1.14 panel-profile.h
--- panel-profile.h	6 Jul 2004 07:33:33 -0000	1.14
+++ panel-profile.h	10 Aug 2004 06:33:39 -0000
@@ -87,6 +87,12 @@
             panel_profile_get_toplevel_orientation    (PanelToplevel *toplevel);
 gboolean    panel_profile_is_writable_toplevel_orientation (PanelToplevel *toplevel);
 
+void        panel_profile_set_toplevel_animation_speed    (PanelToplevel *toplevel,
+						       GtkOptionMenu *option);
+PanelAnimationSpeed
+            panel_profile_get_toplevel_animation_speed    (PanelToplevel *toplevel);
+gboolean    panel_profile_is_writable_toplevel_animation_speed (PanelToplevel *toplevel);
+
 void        panel_profile_set_toplevel_size           (PanelToplevel *toplevel,
 						       int            size);
 int         panel_profile_get_toplevel_size           (PanelToplevel *toplevel);
@@ -111,6 +117,11 @@
 						       gboolean       enable_arrows);
 gboolean    panel_profile_get_toplevel_enable_arrows  (PanelToplevel *toplevel);
 gboolean    panel_profile_is_writable_toplevel_enable_arrows (PanelToplevel *toplevel);
+
+void        panel_profile_set_toplevel_enable_animations  (PanelToplevel *toplevel,
+						       gboolean       enable_arrows);
+gboolean    panel_profile_get_toplevel_enable_animations  (PanelToplevel *toplevel);
+gboolean    panel_profile_is_writable_toplevel_enable_animations (PanelToplevel *toplevel);
 
 /* We don't set this in the panel, so there is no set accessor */
 void        panel_profile_set_background_type         (PanelToplevel       *toplevel,
Index: panel-properties-dialog.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-properties-dialog.c,v
retrieving revision 1.21
diff -u -r1.21 panel-properties-dialog.c
--- panel-properties-dialog.c	24 Mar 2004 07:21:34 -0000	1.21
+++ panel-properties-dialog.c	10 Aug 2004 06:33:39 -0000
@@ -59,6 +59,9 @@
 	GtkWidget     *autohide_toggle;
 	GtkWidget     *hidebuttons_toggle;
 	GtkWidget     *arrows_toggle;
+	GtkWidget     *animations_toggle;
+	GtkWidget     *animations_hbox;
+	GtkWidget     *animation_speed;
 	GtkWidget     *default_radio;
 	GtkWidget     *color_radio;
 	GtkWidget     *image_radio;
@@ -256,6 +259,31 @@
 }
 
 static void
+panel_properties_dialog_setup_animation_speed_menu (PanelPropertiesDialog *dialog,
+						GladeXML              *gui)
+{
+	PanelAnimationSpeed animation_speed;
+
+	dialog->animation_speed = glade_xml_get_widget (gui, "panel_animation_speed");
+	g_return_if_fail (dialog->animation_speed != NULL);
+
+	animation_speed = panel_profile_get_toplevel_animation_speed (dialog->toplevel);
+
+        panel_toplevel_set_animation_speed (dialog->toplevel, animation_speed);
+	gtk_option_menu_set_history (GTK_OPTION_MENU (dialog->animation_speed),
+				     animation_speed);
+
+	g_signal_connect_swapped (dialog->animation_speed, "changed",
+				  G_CALLBACK (panel_profile_set_toplevel_animation_speed),
+				  dialog->toplevel);
+
+	if ( ! panel_profile_is_writable_toplevel_animation_speed (dialog->toplevel)) {
+		gtk_widget_set_sensitive (dialog->animations_hbox, FALSE);
+		gtk_widget_show (dialog->writability_warn_general);
+	}
+}
+
+static void
 panel_properties_dialog_size_changed (PanelPropertiesDialog *dialog,
 				      GtkSpinButton         *spin_button)
 {
@@ -399,6 +427,7 @@
 SETUP_TOGGLE_BUTTON ("autohide_toggle",    autohide_toggle,    auto_hide)
 SETUP_TOGGLE_BUTTON ("hidebuttons_toggle", hidebuttons_toggle, enable_buttons)
 SETUP_TOGGLE_BUTTON ("arrows_toggle",      arrows_toggle,      enable_arrows)
+SETUP_TOGGLE_BUTTON ("enable_animations",   animations_toggle,   enable_animations)
 
 static void
 panel_properties_dialog_color_changed (PanelPropertiesDialog *dialog,
@@ -630,6 +659,17 @@
 }
 
 static void
+panel_properties_update_animation_speed_visible (PanelPropertiesDialog *dialog,
+					         GtkToggleButton       *toggle)
+{
+	if (gtk_toggle_button_get_active (toggle))
+		gtk_widget_set_sensitive (dialog->animations_hbox,
+					  panel_profile_is_writable_toplevel_enable_animations (dialog->toplevel));
+	else
+		gtk_widget_set_sensitive (dialog->animations_hbox, FALSE);
+}
+
+static void
 panel_properties_dialog_response (PanelPropertiesDialog *dialog,
 				  int                    response,
 				  GtkWidget             *properties_dialog)
@@ -728,6 +768,7 @@
 	else UPDATE_TOGGLE ("auto_hide",      autohide_toggle)
 	else UPDATE_TOGGLE ("enable_buttons", hidebuttons_toggle)
 	else UPDATE_TOGGLE ("enable_arrows",  arrows_toggle)
+	else UPDATE_TOGGLE ("enable_animations",  animations_toggle)
 }
 
 static void
@@ -958,6 +999,16 @@
 		dialog, GTK_TOGGLE_BUTTON (dialog->hidebuttons_toggle));
 	g_signal_connect_swapped (dialog->hidebuttons_toggle, "toggled",
 				  G_CALLBACK (panel_properties_update_arrows_toggle_visible),
+				  dialog);
+
+	panel_properties_dialog_setup_animations_toggle (dialog, gui);
+	dialog->animations_hbox  = glade_xml_get_widget (gui, "panel_animation_hbox");
+	panel_properties_dialog_setup_animation_speed_menu (dialog, gui);
+
+	panel_properties_update_animation_speed_visible (
+		dialog, GTK_TOGGLE_BUTTON (dialog->animations_toggle));
+	g_signal_connect_swapped (dialog->animations_toggle, "toggled",
+				  G_CALLBACK (panel_properties_update_animation_speed_visible),
 				  dialog);
 
 	dialog->toplevel_notify =
Index: panel-properties-dialog.glade
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-properties-dialog.glade,v
retrieving revision 1.14
diff -u -r1.14 panel-properties-dialog.glade
--- panel-properties-dialog.glade	11 Feb 2004 15:33:49 -0000	1.14
+++ panel-properties-dialog.glade	10 Aug 2004 06:33:40 -0000
@@ -510,6 +510,119 @@
 		      <property name="fill">True</property>
 		    </packing>
 		  </child>
+	  <child>
+	    <widget class="GtkCheckButton" id="enable_animations">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Drawer and panel _animation</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</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="GtkHBox" id="panel_animation_hbox">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">12</property>
+		      <child>
+			<widget class="GtkLabel" id="label3">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">    </property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</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>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="panel_animation_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Animation _speed:</property>
+		  <property name="use_underline">True</property>
+		  <property name="use_markup">False</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="mnemonic_widget">panel_animation_speed</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkOptionMenu" id="panel_animation_speed">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="history">0</property>
+
+		  <child internal-child="menu">
+		    <widget class="GtkMenu" id="menu1">
+
+		      <child>
+			<widget class="GtkMenuItem" id="slow1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Slow</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="medium1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Medium</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="fast1">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Fast</property>
+			  <property name="use_underline">True</property>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+          </child>
 		</widget>
 		<packing>
 		  <property name="padding">0</property>
Index: panel-toplevel.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/panel-toplevel.c,v
retrieving revision 1.66
diff -u -r1.66 panel-toplevel.c
--- panel-toplevel.c	23 Jun 2004 07:06:44 -0000	1.66
+++ panel-toplevel.c	10 Aug 2004 06:33:41 -0000
@@ -4517,7 +4517,6 @@
 			    gboolean       animate)
 {
 	g_return_if_fail (PANEL_IS_TOPLEVEL (toplevel));
-
 	animate = animate != FALSE;
 
 	if (toplevel->priv->animate == animate)
