# HG changeset patch # User KarstenBock@gmx.net # Date 1318177368 -7200 # Node ID c28e290562180dab8b639c6912d97ce8e50b918a # Parent 658e06a20fa5d2d1cd389a161a30dd15fade1ef2 Removed source_container value from data_drag. diff -r 658e06a20fa5 -r c28e29056218 gui/containergui.py --- a/gui/containergui.py Sun Oct 09 14:43:47 2011 +0200 +++ b/gui/containergui.py Sun Oct 09 18:22:48 2011 +0200 @@ -67,8 +67,7 @@ # get the up and down images of the widget up_image = drag_widget.up_image down_image = drag_widget.down_image - self.setDragData(drag_widget.item, down_image, up_image, - self.container) + self.setDragData(drag_widget.item, down_image, up_image) container.take_item(self.container, drag_widget.item.slot) # after dragging the 'item', set the widgets' images @@ -99,8 +98,7 @@ if replace_item: up_image = drop_widget.up_image down_image = drop_widget.down_image - self.setDragData(replace_item, down_image, up_image, - self.container) + self.setDragData(replace_item, down_image, up_image) else: data_drag.dragging = False #reset the mouse cursor to the normal cursor diff -r 658e06a20fa5 -r c28e29056218 gui/containergui_base.py --- a/gui/containergui_base.py Sun Oct 09 14:43:47 2011 +0200 +++ b/gui/containergui_base.py Sun Oct 09 18:22:48 2011 +0200 @@ -65,14 +65,13 @@ pass - def setDragData(self, drag_item, down_image, up_image, container): + def setDragData(self, drag_item, down_image, up_image): """Set the dragging data""" # set the mouse cursor to be the widget's image self.controller.setMouseCursor(up_image.source, down_image.source) data_drag.dragged_item = drag_item data_drag.dragged_image = up_image.source data_drag.dragging = True - data_drag.source_container = container def createMenuItems(self, item, actions): """Creates context menu items for all classes based on ContainerGUI""" diff -r 658e06a20fa5 -r c28e29056218 gui/drag_drop_data.py --- a/gui/drag_drop_data.py Sun Oct 09 14:43:47 2011 +0200 +++ b/gui/drag_drop_data.py Sun Oct 09 18:22:48 2011 +0200 @@ -20,4 +20,3 @@ dragging = False dragged_image = None dragged_item = None -source_container = None diff -r 658e06a20fa5 -r c28e29056218 gui/inventorygui.py --- a/gui/inventorygui.py Sun Oct 09 14:43:47 2011 +0200 +++ b/gui/inventorygui.py Sun Oct 09 18:22:48 2011 +0200 @@ -199,7 +199,7 @@ drag_item = drag_item.containable # get the image of the widget image = drag_widget.image - self.setDragData(drag_item, image, image, self.container) + self.setDragData(drag_item, image, image) container.take_item(self.container, drag_item.slot) # after dragging the 'item', set the widgets' images @@ -229,7 +229,7 @@ #if there was no item the stop dragging and reset cursor if replace_item: image = drop_widget.image - self.setDragData(replace_item, image, image, self.container) + self.setDragData(replace_item, image, image) else: data_drag.dragging = False #reset the mouse cursor to the normal cursor