/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to bzr-notify

  • Committer: Jelmer Vernooij
  • Date: 2008-10-22 15:50:24 UTC
  • Revision ID: jelmer@samba.org-20081022155024-z0qt44qmiwxgjmr8
Hide notify icon when not notifying.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
menu = NotifyPopupMenu()
17
17
icon = gtk.status_icon_new_from_file(icon_path("bzr-icon-64.png"))
18
18
icon.connect('popup-menu', menu.display)
 
19
icon.set_visible(False)
19
20
 
20
21
import cgi
21
22
import dbus
30
31
BROADCAST_INTERFACE = "org.bazaarvcs.plugins.dbus.Broadcast"
31
32
bus = dbus.SessionBus()
32
33
 
 
34
def hide_icon():
 
35
        icon.set_visible(False)
 
36
 
33
37
def catch_branch(revision_id, urls):
34
38
        # TODO: show all the urls, or perhaps choose the 'best'.
35
39
        url = urls[0]
60
64
                        bd.run()
61
65
                nw.add_action("inspect", "Inspect", start_viz, None)
62
66
                nw.add_action("branch", "Branch", start_branch, None)
 
67
                icon.set_visible(True)
 
68
                gobject.timeout_add(5000, hide_icon)
63
69
                nw.set_timeout(5000)
64
70
                nw.show()
65
71
        except Exception, e: