From 07b8cad5b973718b283562ae788be31d706e64df Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Mon, 19 Mar 2007 14:24:35 +0100 Subject: [PATCH] Set the DPI on activity startup. In the future we should have a xsetting for this. --- sugar/activity/activity.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sugar/activity/activity.py b/sugar/activity/activity.py index 20e3dcbc..937d6864 100644 --- a/sugar/activity/activity.py +++ b/sugar/activity/activity.py @@ -21,6 +21,7 @@ import os import gtk import hippo +import _sugar from sugar.presence import PresenceService from sugar.activity.activityservice import ActivityService from sugar.graphics.window import Window @@ -31,6 +32,11 @@ class Activity(Window, gtk.Container): def __init__(self, handle): Window.__init__(self) + # FIXME: This will work only for activities in python. We need a xsetting. + display = gtk.gdk.display_manager_get().get_default_display() + screen = display.get_default_screen() + screen.set_resolution(_sugar.get_screen_dpi()) + self.connect('destroy', self._destroy_cb) self._shared = False