src/updatemanagernotifier.py
changeset 1228 07ef6e279231
parent 1217 1e2405e83d3a
child 1516 8c950a3b4171
--- a/src/updatemanagernotifier.py	Thu Jul 16 09:35:26 2009 -0700
+++ b/src/updatemanagernotifier.py	Thu Jul 16 18:19:39 2009 +0100
@@ -51,6 +51,7 @@
 import pkg.client.progress as progress
 import pkg.misc as misc
 import pkg.gui.misc as gui_misc
+import pkg.gui.enumerations as enumerations
 
 # Put _() in the global namespace
 import __builtin__
@@ -62,7 +63,7 @@
 IMAGE_DIRECTORY_DEFAULT = "/"
 LASTCHECK_DIR_NAME = os.path.join(os.path.expanduser("~"),'.updatemanager/notify')
 IMAGE_DIR_COMMAND = "svcprop -p update/image_dir svc:/application/pkg/update"
-CHECK_FOR_UPDATES = "/usr/lib/um-checkforupdates"
+CHECK_FOR_UPDATES = "/usr/lib/pm-checkforupdates"
 
 ICON_LOCATION = "/usr/share/update-manager/icons"
 NOTIFY_ICON_NAME = "notify_update"
@@ -285,11 +286,11 @@
                 if len(image_directory) == 0:
                         image_directory = IMAGE_DIRECTORY_DEFAULT
                 return_code = subprocess.call([CHECK_FOR_UPDATES,
-                    image_directory])
+                    '--nice', image_directory])
                 if debug:
                         print "return from subprocess is %d" % return_code
                 self.set_last_check_time()
-                if return_code == 0:
+                if return_code == enumerations.UPDATES_AVAILABLE:
                         self.show_status_icon(True)
                 else:
                         self.show_status_icon(False)