~francesco-marella/specto/blacklist-plugins

« back to all changes in this revision

Viewing changes to spectlib/balloons.py

  • Committer: Jean-François Fortin Tam
  • Date: 2009-12-29 21:02:37 UTC
  • mfrom: (98.3.84 specto-woutc)
  • Revision ID: nekohayo@gmail.com-20091229210237-pt7k7v2shsun2z49
Merge Wout's fixes and new features
- DBUS watches (including Pidgin, Evolution, Rhythmbox, and a bunch of others)
- Integration with Ubuntu's indicator applet
- Use GStreamer for playing sounds (fixes issue 289)
- Fix the Google Reader watch (issue 283)
- Various other enhancements

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
 
77
77
        if notifyInitialized:
78
78
            sleep(0.5)  # FIXME: issue #43, associate the balloon with the notification icon properly. Currently, this is a hack to leave time for the tray icon to appear before getting its coordinates
79
 
            tray_x = self.notifier.tray.get_x()
80
 
            tray_y = self.notifier.tray.get_y()
 
79
            if self.notifier.tray:
 
80
                tray_x = self.notifier.tray.get_x()
 
81
                tray_y = self.notifier.tray.get_y()
 
82
            else:
 
83
                tray_x = 0
 
84
                tray_y = 0
81
85
            self.toast = pynotify.Notification(summary, body)
82
86
            if name:
83
87
                # If name is not None and exists in specto.watch_db, a button is added to the notification