Package application :: Package dialogs :: Module DeleteDialog
[hide private]
[frames] | no frames]

Module DeleteDialog

source code

Classes [hide private]
  DeleteDialog
Functions [hide private]
 
GetReadOnlyCollection(item, view)
Return the first read-only collection the item is in, or None.
source code
 
GetItemRemovalState(selectedCollection, item, view)
Determine how an item that's supposed to be removed ought to be handled.
source code
 
ShowDeleteDialog(view=<Locale: en_US>, selectedCollection=<Locale: en_US>, itemsAndStates=<Locale: en_US>, originalAction='remove', modal=True) source code
Variables [hide private]
  logger = logging.getLogger(__name__)
  REMOVE_NORMAL = 1
  DELETE_DASHBOARD = 2
  DELETE_LAST = 3
  IN_READ_ONLY_COLLECTION = 4
  READ_ONLY_SELECTED = 5
  DELETE_STATES = (2, 3)
  dialogTextData = {2: (u'Remove from Dashboard', u'Removing '%(...
Function Details [hide private]

GetItemRemovalState(selectedCollection, item, view)

source code 

Determine how an item that's supposed to be removed ought to be handled.

It may be simply removed, or its collection membership may indicate that it should be deleted, or it could be treated as read-only.

Variables Details [hide private]

dialogTextData

Value:
{2: (u'Remove from Dashboard',
     u'Removing '%(itemName)s' from the Dashboard will move it to the \
Trash.'),
 3: (u'Delete',
     u''%(itemName)s' only appears in '%(collectionName)s'. Removing i\
t will move it to the Trash.'),
 4: (u'View-only',
     u'You cannot delete '%(itemName)s'. It belongs to the view-only c\
...