From 6f9ae0c769fad8e8e75484d21dc96fc3208f4f0c Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Thu, 6 Jul 2006 16:06:07 +0200 Subject: [PATCH] Initialize the console --- activities/chat/ChatActivity.py | 4 ---- sugar/activity/Activity.py | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/activities/chat/ChatActivity.py b/activities/chat/ChatActivity.py index 07d87626..694e100f 100644 --- a/activities/chat/ChatActivity.py +++ b/activities/chat/ChatActivity.py @@ -8,7 +8,6 @@ import gtk import gobject from sugar.activity.Activity import Activity -from sugar.LogWriter import LogWriter from sugar.presence import Service from sugar.chat.Chat import Chat from sugar.chat.BuddyChat import BuddyChat @@ -105,9 +104,6 @@ class ChatShell: chat.connect_to_shell() return False -log_writer = LogWriter("Chat") -log_writer.start() - chat_shell = ChatShell.get_instance() chat_shell.start() diff --git a/sugar/activity/Activity.py b/sugar/activity/Activity.py index 8d86f7d7..b9dbd44a 100644 --- a/sugar/activity/Activity.py +++ b/sugar/activity/Activity.py @@ -8,6 +8,8 @@ import pygtk pygtk.require('2.0') import gtk, gobject +from sugar.LogWriter import LogWriter + SHELL_SERVICE_NAME = "com.redhat.Sugar.Shell" SHELL_SERVICE_PATH = "/com/redhat/Sugar/Shell" @@ -81,7 +83,11 @@ def create(activity_name, service = None, args = None): def main(activity_name, activity_class): """Starts the activity main loop.""" + log_writer = LogWriter(activity_name) + log_writer.start() + factory = ActivityFactory(activity_name, activity_class) + gtk.main() class ActivityDbusService(dbus.service.Object):