Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
elapsed time for drag operations are being recorded in the dragdrop log
  • Loading branch information
mooshu1x2 committed Aug 1, 2016
1 parent eefd5bb commit 1a54afea761ac36ad043e02e20896b8e2ea9dab3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
@@ -3,6 +3,10 @@
Changelog
=========

1.0.2 (2016-08-01)
------------------
* The elapsed time for a drag event is being recorded in the ``dragdrop`` log.

1.0.1 (2016-07-29)
------------------

@@ -59,9 +59,9 @@
# built documents.
#
# The short X.Y version.
version = u'1.0.0'
version = u'1.0.2'
# The full version, including alpha/beta/rc tags.
release = u'1.0.0'
release = u'1.0.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -79,7 +79,8 @@ def __init__(self,
format='%(message)s')

# Drag/Drop - track duration
self.dd = datetime.datetime.now ()
self.dd = 0
self.timer = False

# Mapping of all events to methods
self.map = {
@@ -208,13 +209,16 @@ def handleDragEvents (self, event_type, event, object):

details = {}
if event_type == 'dragstart':
# start timer
self.dd = datetime.datetime.now ()
if self.timer == False:
# Only start the timer on the first dragstart encountered
self.dd = datetime.datetime.now ()
self.timer = True
details = {"source" : self.getSelector (event.source())}
elif event_type == 'dragdrop':
details = {"elapsed" : str (datetime.datetime.now () - self.dd),
"source" : self.getSelector (event.source())}
self.dd = datetime.datetime.now ()
self.dd = 0
self.timer = False
else:
# drag move/leave event - ignore
pass
@@ -18,4 +18,4 @@
and parsed by ``setup.py``.
"""

__version__ = "1.0.1"
__version__ = "1.0.2"

0 comments on commit 1a54afe

Please sign in to comment.