--- a/src/gui/modules/installupdate.py Tue Sep 01 09:54:15 2009 -0700
+++ b/src/gui/modules/installupdate.py Wed Sep 02 13:59:04 2009 +0100
@@ -56,7 +56,7 @@
class InstallUpdate(progress.GuiProgressTracker):
- def __init__(self, list_of_packages, parent, api_o,
+ def __init__(self, list_of_packages, parent, image_directory,
ips_update = False, action = -1, be_name = None,
parent_name = "", pkg_list = None, main_window = None,
icon_confirm_dialog = None, title = None, web_install = False,
@@ -66,9 +66,11 @@
progress.GuiProgressTracker.__init__(self)
self.web_install = web_install
self.web_updates_list = None
- api_o.progresstracker = self
- self.api_o = api_o
self.parent = parent
+ self.api_o = gui_misc.get_api_object(image_directory,
+ self, main_window)
+ if self.api_o == None:
+ return
self.be_list = None
self.be_name = be_name
self.parent_name = parent_name
--- a/src/gui/modules/webinstall.py Tue Sep 01 09:54:15 2009 -0700
+++ b/src/gui/modules/webinstall.py Wed Sep 02 13:59:04 2009 +0100
@@ -319,10 +319,7 @@
if debug:
print "Install Packages: %s" % all_package_stems
- #TBD: Having to get new api object, self.api_o.reset() is not working
- self.api_o = gui_misc.get_api_object(self.image_dir, self.pr,
- self.w_webinstall_dialog)
- installupdate.InstallUpdate(all_package_stems, self, self.api_o,
+ installupdate.InstallUpdate(all_package_stems, self, self.image_dir,
action = enumerations.INSTALL_UPDATE,
parent_name = _("Package Manager"),
main_window = self.w_webinstall_dialog,
--- a/src/packagemanager.py Tue Sep 01 09:54:15 2009 -0700
+++ b/src/packagemanager.py Wed Sep 02 13:59:04 2009 +0100
@@ -2548,8 +2548,9 @@
self.__remove_cache()
installupdate.InstallUpdate(install_update, self, \
- self.api_o, ips_update = False, \
- action = enumerations.INSTALL_UPDATE)
+ self.image_directory, ips_update = False, \
+ action = enumerations.INSTALL_UPDATE,
+ main_window = self.w_main_window)
def __on_update_all(self, widget):
self.api_o.reset()
@@ -2557,7 +2558,7 @@
if self.api_o.root != IMAGE_DIRECTORY_DEFAULT:
skip_be_dlg = True
installupdate.InstallUpdate([], self,
- self.api_o, ips_update = False,
+ self.image_directory, ips_update = False,
action = enumerations.IMAGE_UPDATE, be_name = self.ua_be_name,
parent_name = _("Package Manager"),
pkg_list = ["SUNWipkg", "SUNWipkg-gui"],
@@ -2606,8 +2607,9 @@
self.__remove_cache()
installupdate.InstallUpdate(remove_list, self,
- self.api_o, ips_update = False,
- action = enumerations.REMOVE)
+ self.image_directory, ips_update = False,
+ action = enumerations.REMOVE,
+ main_window = self.w_main_window)
def __on_reload(self, widget):
self.w_searchentry.grab_focus()
--- a/src/updatemanager.py Tue Sep 01 09:54:15 2009 -0700
+++ b/src/updatemanager.py Wed Sep 02 13:59:04 2009 +0100
@@ -629,7 +629,7 @@
if self.__get_image_path() != IMAGE_DIRECTORY_DEFAULT:
skip_be_dlg = True
installupdate.InstallUpdate([], self,
- self.api_obj, ips_update = False,
+ self.__get_image_path(), ips_update = False,
action = enumerations.IMAGE_UPDATE,
be_name = self.ua_be_name,
parent_name = _("Update Manager"),