Finish up chat notification, there are races but it seem
This commit is contained in:
parent
9df1c653d5
commit
bbeced56e5
@ -271,10 +271,10 @@ class Chat(activity.Activity):
|
|||||||
self.activity_shutdown()
|
self.activity_shutdown()
|
||||||
|
|
||||||
def activity_on_lost_focus(self):
|
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):
|
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)
|
self.activity_set_has_changes(False)
|
||||||
|
|
||||||
def _message_inserted(self):
|
def _message_inserted(self):
|
||||||
@ -292,8 +292,6 @@ class Chat(activity.Activity):
|
|||||||
aniter = buf.get_end_iter()
|
aniter = buf.get_end_iter()
|
||||||
buf.insert(aniter, nick + ": ")
|
buf.insert(aniter, nick + ": ")
|
||||||
|
|
||||||
self._message_inserted()
|
|
||||||
|
|
||||||
def _insert_rich_message(self, nick, msg):
|
def _insert_rich_message(self, nick, msg):
|
||||||
msg = Emoticons.get_instance().replace(msg)
|
msg = Emoticons.get_instance().replace(msg)
|
||||||
|
|
||||||
@ -325,6 +323,8 @@ class Chat(activity.Activity):
|
|||||||
aniter = buf.get_end_iter()
|
aniter = buf.get_end_iter()
|
||||||
buf.insert(aniter, "\n")
|
buf.insert(aniter, "\n")
|
||||||
|
|
||||||
|
self._message_inserted()
|
||||||
|
|
||||||
def _get_first_richtext_chunk(self, msg):
|
def _get_first_richtext_chunk(self, msg):
|
||||||
"""Scan the message for the first richtext-tagged chunk and return it."""
|
"""Scan the message for the first richtext-tagged chunk and return it."""
|
||||||
rt_last = -1
|
rt_last = -1
|
||||||
|
@ -12,7 +12,7 @@ class Activity(dbus.service.Object):
|
|||||||
""" Base Sugar activity object from which all other Activities should inherit """
|
""" Base Sugar activity object from which all other Activities should inherit """
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._has_focus = False
|
self._has_focus = True
|
||||||
|
|
||||||
def get_has_focus(self):
|
def get_has_focus(self):
|
||||||
return self._has_focus
|
return self._has_focus
|
||||||
@ -133,7 +133,6 @@ class Activity(dbus.service.Object):
|
|||||||
def got_focus(self):
|
def got_focus(self):
|
||||||
self.activity_on_got_focus()
|
self.activity_on_got_focus()
|
||||||
|
|
||||||
|
|
||||||
@dbus.service.method("com.redhat.Sugar.Activity", \
|
@dbus.service.method("com.redhat.Sugar.Activity", \
|
||||||
in_signature="", \
|
in_signature="", \
|
||||||
out_signature="")
|
out_signature="")
|
||||||
|
Loading…
Reference in New Issue
Block a user