~doctormo/lab-session-manager/trunk

« back to all changes in this revision

Viewing changes to lib/labsession/manager.py

  • Committer: Martin Owens
  • Date: 2013-04-12 17:40:13 UTC
  • Revision ID: doctormo@gmail.com-20130412174013-oc9yd3twv2liq11p
Repair for some changes in various versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        self.started = False
43
43
        self.hostname = socket.gethostname()
44
44
        self.username = getpass.getuser()
 
45
        Notify.init("lab-session-manager")
45
46
        self.max_length = None
46
47
        self.warnings = []
47
48
        self.gnome_session = None
272
273
            desc = warning.get('description', '') % jar
273
274
            icon = warning.get('icon', 'gtk-info')
274
275
            # Send a notification to the system notifier.
275
 
            Notify.Notification.new(mesg, desc, icon, None).show()
 
276
            try:
 
277
                Notify.Notification.new(mesg, desc, icon, None).show()
 
278
            except TypeError:
 
279
                Notify.Notification.new(mesg, desc, icon).show()
276
280
 
277
281
    def end_clicked(self, widget=None):
278
282
        """User clicked quit in the menu."""
314
318
 
315
319
        self.ind.set_menu(self.menu)
316
320
        # Time so gtk main loop has a chance to load before it's killed.
317
 
        GObject.timeout_add(1000, self.update_timeitem, None)
 
321
        try:
 
322
            GObject.timeout_add(1000, self.update_timeitem, None)
 
323
        except TypeError:
 
324
            GObject.timeout_add(1000, self.update_timeitem)
318
325