From b355dfeaf3ec585a5373aaad1bf0fedd84f37c6b Mon Sep 17 00:00:00 2001 From: Jonathan Blandford Date: Wed, 26 Feb 2003 19:36:34 +0000 Subject: [PATCH] account for RTL code. Tue Feb 25 21:55:17 2003 Jonathan Blandford * gtk/gtkoptionmenu.c (gtk_option_menu_position): account for RTL code. --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-4 | 5 +++++ ChangeLog.pre-2-6 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/gtkoptionmenu.c | 4 ++++ 6 files changed, 29 insertions(+) diff --git a/ChangeLog b/ChangeLog index 837cc35004..51f6099910 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Feb 25 21:55:17 2003 Jonathan Blandford + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): account for RTL + code. + 2003-02-24 Sven Neumann * gtk/gtkmain.c (gtk_get_default_language): fixed documentation. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 837cc35004..51f6099910 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +Tue Feb 25 21:55:17 2003 Jonathan Blandford + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): account for RTL + code. + 2003-02-24 Sven Neumann * gtk/gtkmain.c (gtk_get_default_language): fixed documentation. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 837cc35004..51f6099910 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,8 @@ +Tue Feb 25 21:55:17 2003 Jonathan Blandford + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): account for RTL + code. + 2003-02-24 Sven Neumann * gtk/gtkmain.c (gtk_get_default_language): fixed documentation. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 837cc35004..51f6099910 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,8 @@ +Tue Feb 25 21:55:17 2003 Jonathan Blandford + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): account for RTL + code. + 2003-02-24 Sven Neumann * gtk/gtkmain.c (gtk_get_default_language): fixed documentation. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 837cc35004..51f6099910 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +Tue Feb 25 21:55:17 2003 Jonathan Blandford + + * gtk/gtkoptionmenu.c (gtk_option_menu_position): account for RTL + code. + 2003-02-24 Sven Neumann * gtk/gtkmain.c (gtk_get_default_language): fixed documentation. diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c index b7ee5bcbb9..c4e80f7b19 100644 --- a/gtk/gtkoptionmenu.c +++ b/gtk/gtkoptionmenu.c @@ -952,6 +952,10 @@ gtk_option_menu_position (GtkMenu *menu, children = children->next; } + if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) + menu_xpos = menu_xpos + widget->allocation.width - menu_width; + + /* Clamp the position on screen */ screen_width = gdk_screen_get_width (gtk_widget_get_screen (widget)); if (menu_xpos < 0)