Skip to content

Commit

Permalink
Create the status icon and add the timeout in the Monitor's __init__ …
Browse files Browse the repository at this point in the history
…method
  • Loading branch information
flavioamieiro committed Feb 21, 2010
1 parent 418b8d6 commit cf9870b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dojotools.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ def __init__(self, directory, commands, patterns):
self.commands = commands
self.patterns = patterns

self.status_icon = gtk.StatusIcon()
self.status_icon.set_from_stock(gtk.STOCK_OK)
self.status_icon.set_visible(True)

gobject.timeout_add(1000, self.check)

def run_command(self, test_cmd):
"""
As the name says, runs a command and wait for it to finish
Expand Down Expand Up @@ -175,12 +181,6 @@ def parse_options():

monitor = Monitor(options.directory, args, options.patterns)

status_icon = gtk.StatusIcon()
status_icon.set_from_stock(gtk.STOCK_OK)
status_icon.set_visible(True)

gobject.timeout_add(1000, monitor.check)

gtk.main()

except KeyboardInterrupt:
Expand Down

0 comments on commit cf9870b

Please sign in to comment.