Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xoircactivity.py10
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
+