# HG changeset patch # User KarstenBock@gmx.net # Date 1318177368 -7200 # Node ID 2d671e57badb328c6c84e329472dc9803f4f742d # Parent 7f03365c098d70d78e0a04d1f044728f03f53e90 Removed source_container value from data_drag. diff -r 7f03365c098d -r 2d671e57badb src/parpg/gui/containergui.py --- a/src/parpg/gui/containergui.py Sun Oct 09 14:43:47 2011 +0200 +++ b/src/parpg/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 7f03365c098d -r 2d671e57badb src/parpg/gui/containergui_base.py --- a/src/parpg/gui/containergui_base.py Sun Oct 09 14:43:47 2011 +0200 +++ b/src/parpg/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 7f03365c098d -r 2d671e57badb src/parpg/gui/drag_drop_data.py --- a/src/parpg/gui/drag_drop_data.py Sun Oct 09 14:43:47 2011 +0200 +++ b/src/parpg/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 7f03365c098d -r 2d671e57badb src/parpg/gui/inventorygui.py --- a/src/parpg/gui/inventorygui.py Sun Oct 09 14:43:47 2011 +0200 +++ b/src/parpg/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