? gnome-panel/panel_rtl.diff
Index: gnome-panel/applet.c
===================================================================
RCS file: /cvs/gnome/gnome-panel/gnome-panel/applet.c,v
retrieving revision 1.254
diff -u -r1.254 applet.c
--- gnome-panel/applet.c	7 Aug 2006 21:07:46 -0000	1.254
+++ gnome-panel/applet.c	12 Dec 2006 07:33:03 -0000
@@ -812,6 +812,7 @@
 	PanelToplevel     *toplevel = NULL;
 	PanelWidget       *panel_widget;
 	GSList            *l;
+	gboolean          rtl;
 
 	if (!panel_applets_to_load) {
 		panel_applet_have_load_idle = FALSE;
@@ -840,7 +841,12 @@
 
 	panel_widget = panel_toplevel_get_panel_widget (toplevel);
 
-	if (applet->right_stick) {
+	rtl = gtk_widget_get_direction (GTK_WIDGET (panel_widget)) == GTK_TEXT_DIR_RTL;
+
+	/* Automatically right flip position when the panel direction is RTL.
+	 * If direction is RTL and right_stick is set, then the position is
+	 * not changed. */
+	if (applet->right_stick != rtl) {
 		if (!panel_widget->packed)
 			applet->position = panel_widget->size - applet->position;
 		else
@@ -1018,6 +1024,7 @@
 	gboolean           right_stick;
 	gboolean           locked;
 	int                position;
+	gboolean           rtl;
 
 	g_return_if_fail (applet_info != NULL);
 
@@ -1065,8 +1072,14 @@
 	    (gconf_client_get_bool (client, key, NULL) ? 1 : 0) != right_stick)
 		gconf_client_set_bool (client, key, right_stick, NULL);
 
+	rtl = gtk_widget_get_direction (GTK_WIDGET (panel_widget)) == GTK_TEXT_DIR_RTL;
+
 	position = panel_applet_get_position (applet_info);
-	if (right_stick && !panel_widget->packed)
+
+	/* Automatically right flip position when the panel direction is RTL.
+	 * If direction is RTL and right_stick is set, then the position is
+	 * not changed. */
+	if (right_stick != rtl && !panel_widget->packed)
 		position = panel_widget->size - position;
 
 	key = panel_gconf_full_key (key_type, id, "position");
