diff options
author | Eduardo Silva <edsiper@monotop.(none)> | 2008-11-08 12:05:56 (GMT) |
---|---|---|
committer | Eduardo Silva <edsiper@monotop.(none)> | 2008-11-08 12:05:56 (GMT) |
commit | 73ffdc5f3438ff25c032fe56d8af2aa14afd9df8 (patch) | |
tree | e3d03756439a1c004b15e58c21c445aa8544ed78 | |
parent | 74889fa918400754d61e80efe64cb5c2067611b9 (diff) |
Emit a notification when someone addresses to us (Tomeu)
-rw-r--r-- | xoircactivity.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xoircactivity.py b/xoircactivity.py index 2a4cce3..9afe900 100644 --- a/xoircactivity.py +++ b/xoircactivity.py @@ -32,6 +32,12 @@ class XoIRCActivity(activity.Activity): logging.debug('Starting the XoIRC Activity') self.set_title(_('Xo IRC Activity')) + self.add_events(gtk.gdk.VISIBILITY_NOTIFY_MASK) + self.connect('visibility-notify-event', + self.__visibility_notify_event_cb) + + self.is_visible = False + client = purk.Client() client.add_channel('#olpc-help') client.join_server('irc.freenode.net') @@ -45,3 +51,7 @@ class XoIRCActivity(activity.Activity): toolbox = activity.ActivityToolbox(self) self.set_toolbox(toolbox) self.show_all() + + def __visibility_notify_event_cb(self, window, event): + self.is_visible = event.state != gtk.gdk.VISIBILITY_FULLY_OBSCURED + |