Finish up chat notification, there are races but it seem

This commit is contained in:
Marco Pesenti Gritti 2006-05-22 23:08:41 -04:00
parent 9df1c653d5
commit bbeced56e5
2 changed files with 5 additions and 6 deletions

View File

@ -271,10 +271,10 @@ class Chat(activity.Activity):
self.activity_shutdown()
def activity_on_lost_focus(self):
activity.Activity.activity_on_lost_focus()
activity.Activity.activity_on_lost_focus(self)
def activity_on_got_focus(self):
activity.Activity.activity_on_got_focus()
activity.Activity.activity_on_got_focus(self)
self.activity_set_has_changes(False)
def _message_inserted(self):
@ -292,8 +292,6 @@ class Chat(activity.Activity):
aniter = buf.get_end_iter()
buf.insert(aniter, nick + ": ")
self._message_inserted()
def _insert_rich_message(self, nick, msg):
msg = Emoticons.get_instance().replace(msg)
@ -325,6 +323,8 @@ class Chat(activity.Activity):
aniter = buf.get_end_iter()
buf.insert(aniter, "\n")
self._message_inserted()
def _get_first_richtext_chunk(self, msg):
"""Scan the message for the first richtext-tagged chunk and return it."""
rt_last = -1

View File

@ -12,7 +12,7 @@ class Activity(dbus.service.Object):
""" Base Sugar activity object from which all other Activities should inherit """
def __init__(self):
self._has_focus = False
self._has_focus = True
def get_has_focus(self):
return self._has_focus
@ -133,7 +133,6 @@ class Activity(dbus.service.Object):
def got_focus(self):
self.activity_on_got_focus()
@dbus.service.method("com.redhat.Sugar.Activity", \
in_signature="", \
out_signature="")