Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/python
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2007-06-02 21:46:25 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2007-06-02 21:46:25 (GMT)
commit79836c7a0f9785867ff3232102d7ac4f0d717838 (patch)
tree0b6142ba7f72d0456dc91e947e2f591598025f99 /python
parent6ff99c9cbc7dbd8ef5f544c778d907f846d22ff5 (diff)
Add $prefix/lib/mozilla/plugins to the plugin path.
Fix dpi calculation.
Diffstat (limited to 'python')
-rw-r--r--python/__init__.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/python/__init__.py b/python/__init__.py
index 35ac97a..a30a891 100644
--- a/python/__init__.py
+++ b/python/__init__.py
@@ -22,7 +22,7 @@ import gtk
from hulahop._hulahop import shutdown
from hulahop import _hulahop
-_XO_DPI = 200.0
+_XO_DPI = 200
def startup(profile_path, components_dirs=[]):
_hulahop.set_profile_path(profile_path)
@@ -45,10 +45,11 @@ def startup(profile_path, components_dirs=[]):
branch.setIntPref('layout.css.dpi', _get_layout_dpi())
def _get_layout_dpi():
- _screen_dpi = gtk.settings_get_default().get_property('gtk-xft-dpi')
+ gtk_xft_dpi = gtk.settings_get_default().get_property('gtk-xft-dpi')
+ screen_dpi = gtk_xft_dpi / 1024
screen_width = gtk.gdk.screen_width()
- if _screen_dpi != _XO_DPI or screen_width != 1200:
+ if screen_dpi != _XO_DPI or screen_width != 1200:
return -1
# Layout: