From 79836c7a0f9785867ff3232102d7ac4f0d717838 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Sat, 02 Jun 2007 21:46:25 +0000 Subject: Add $prefix/lib/mozilla/plugins to the plugin path. Fix dpi calculation. --- (limited to 'python') 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: -- cgit v0.9.1