[kupfer] browser: Use gtk.widget_get_default_direction



commit 3c640997391a0efe3f1cafcb9d6686e22579f340
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date:   Thu Dec 10 00:32:01 2009 +0100

    browser: Use gtk.widget_get_default_direction
    
    This is the normal way to get the current text direction.

 kupfer/browser.py |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/kupfer/browser.py b/kupfer/browser.py
index 4c40d52..41c4aa8 100644
--- a/kupfer/browser.py
+++ b/kupfer/browser.py
@@ -35,9 +35,8 @@ def escape_markup_str(mstr):
 	"""
 	return tounicode(mstr).translate(_escape_table)
 
-_text_direction = gtk.HBox().get_direction() != gtk.TEXT_DIR_RTL
 def text_direction_is_ltr():
-	return _text_direction
+	return gtk.widget_get_default_direction() != gtk.TEXT_DIR_RTL
 
 # State Constants
 class State (object):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]