[gtk+/treeview-refactor] RTL fix for gtk_tree_view_focus_to_cursor()
- From: Kristian Rietveld <kristian src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/treeview-refactor] RTL fix for gtk_tree_view_focus_to_cursor()
- Date: Thu, 16 Dec 2010 00:47:59 +0000 (UTC)
commit 8e98333d8bab5401c2520a10cd53c9195b89b204
Author: Kristian Rietveld <kris gtk org>
Date: Wed Dec 15 21:31:35 2010 +0100
RTL fix for gtk_tree_view_focus_to_cursor()
gtk/gtktreeview.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index cf3f543..50d367d 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -10089,7 +10089,13 @@ gtk_tree_view_focus_to_cursor (GtkTreeView *tree_view)
* is no column in focus, here we explicitly focus into the first cell */
cell_area = gtk_cell_layout_get_area (GTK_CELL_LAYOUT (tree_view->priv->focus_column));
if (!gtk_cell_area_get_focus_cell (cell_area))
- gtk_cell_area_focus (cell_area, GTK_DIR_RIGHT);
+ {
+ gboolean rtl;
+
+ rtl = (gtk_widget_get_direction (GTK_WIDGET (tree_view)) == GTK_TEXT_DIR_RTL);
+ gtk_cell_area_focus (cell_area,
+ rtl ? GTK_DIR_LEFT : GTK_DIR_RIGHT);
+ }
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]