Marco Pesenti Gritti wrote:

> we need to get the hardware-manager part of this in before, otherwise we 
> will traceback on startup.

Sorry, I sent the patches in reverse order.  Did you get
the next one?


>> +        # Unfreeze the display when it's stable
>> +        get_hardware_manager().set_dcon_freeze(0)
>> +
> 
> Is this actually working? You need something like:
> 
> from hardware import hardwaremanager
> ....

Oh, and actually I had that part too, but I've lost this hunk
while copying them to the sandbox.  That's what you get for
editing code right on the target.

Updated patch attached.


>From b7bfbb7cc628afe29734557f56d92044d2d336d4 Mon Sep 17 00:00:00 2001
From: Bernardo Innocenti <[EMAIL PROTECTED]>
Date: Wed, 13 Jun 2007 19:56:22 -0400
Subject: [PATCH] unfreeze DCON when Sugar UI is (almost) ready to show
Organization: One Laptop Per Child

This is part of a masterplan to implement #621 .
---
 shell/hardware/hardwaremanager.py |    6 ++++++
 shell/view/Shell.py               |    5 +++++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/shell/hardware/hardwaremanager.py 
b/shell/hardware/hardwaremanager.py
index f23af25..c962b28 100644
--- a/shell/hardware/hardwaremanager.py
+++ b/shell/hardware/hardwaremanager.py
@@ -69,6 +69,12 @@ class HardwareManager(object):
             logging.error('Cannot mute the audio channel')
         self._mixer.set_mute(self._master, mute)
 
+    def set_dcon_freeze(self, frozen):
+        if not self._service:
+            return
+
+        self._service.set_dcon_freeze(frozen)
+
     def set_display_mode(self, mode):
         if not self._service:
             return
diff --git a/shell/view/Shell.py b/shell/view/Shell.py
index 892123c..d73fe10 100644
--- a/shell/view/Shell.py
+++ b/shell/view/Shell.py
@@ -38,6 +38,8 @@ from view.keyhandler import KeyHandler
 from view.home.HomeWindow import HomeWindow
 from model import bundleregistry
 
+from hardware.hardwaremanager import get_hardware_manager
+
 class Shell(gobject.GObject):
     def __init__(self, model):
         gobject.GObject.__init__(self)
@@ -68,6 +70,9 @@ class Shell(gobject.GObject):
 
         self.start_activity('org.laptop.JournalActivity')
 
+        # Unfreeze the display when it's stable
+        get_hardware_manager().set_dcon_freeze(0)
+
     def _activity_started_cb(self, home_model, home_activity):
         activity_host = ActivityHost(home_activity)
         self._hosts[activity_host.get_xid()] = activity_host
-- 
1.5.2



-- 
   // Bernardo Innocenti
 \X/  http://www.codewiz.org/
_______________________________________________
Sugar mailing list
[email protected]
http://lists.laptop.org/listinfo/sugar

Reply via email to