PERFORCE change 125080 for review

Andrew Turner andrew at FreeBSD.org
Sun Aug 12 04:47:27 PDT 2007


http://perforce.freebsd.org/chv.cgi?CH=125080

Change 125080 by andrew at andrew_hermies on 2007/08/12 11:47:17

	Empty the update list when changing what item is selected on the computer tree
	When no updates are avaliable on the back end don't raise an exception
	When asking to remove updates get the directory correctly and call removeUpdates rather than installUpdates

Affected files ...

.. //depot/projects/soc2007/andrew-update/frontend/facund/controller.py#6 edit
.. //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#10 edit

Differences ...

==== //depot/projects/soc2007/andrew-update/frontend/facund/controller.py#6 (text+ko) ====

@@ -40,6 +40,7 @@
 
 	def onComputerTreeSelect(self, position):
 		self.__currentDirectory = None
+		self.__updateModel.empty()
 
 		computer = self.__computersModel.getComputer(position[0])
 		self.__view.setConnected(computer.getConnectionStatus())
@@ -60,12 +61,15 @@
 		command = dir.getCommands()[position[2]]
 		response = dir.runCommand(position[2])
 		data = response.getData()
+		if data is None:
+			# We can't to an install or remove when we have nothing
+			self.__view.setInstallable(False, False)
+			return
 		item = data.getData()[0]
 		# Each item will be a pair of <dir, update list>
 		pair = item.getData()
 		theDir = pair[0].getData()
 
-		self.__updateModel.empty()
 		for update in pair[1].getData():
 			self.__updateModel.addUpdate(update)
 

==== //depot/projects/soc2007/andrew-update/frontend/facund/gui/main_window.py#10 (text+ko) ====

@@ -114,7 +114,8 @@
 		self.__controller.installUpdates((dir.getName(), 'base'))
 
 	def onRemoveClick(self, widget):
-		self.__controller.installUpdates((dir.getName(), 'all'))
+		dir = self.__controller.getCurrentDirectory()
+		self.__controller.removeUpdates((dir.getName(), 'base'))
 
 	def onSelectComputer(self, widget):
 		'''Signal handler for when the selected item is changed'''


More information about the p4-projects mailing list