diff options
author | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-11-04 05:07:36 (GMT) |
---|---|---|
committer | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-11-04 05:07:36 (GMT) |
commit | 45068169ea9d3bcab585f09b7791c132c9b4ed48 (patch) | |
tree | e7cd7753f67887020fe286f1fbeaab724c1f051a /model.py | |
parent | f4934bd397f98924969fab4aa692e100da858519 (diff) |
v 37
* prevent duplicate thumbnails when shared (jedierikb)
* prevent changing modes when using timer (jedierikb, mikhak)
* fix audio mesh share (jedierikb, mikhak)
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@879 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'model.py')
-rw-r--r-- | model.py | 18 |
1 files changed, 8 insertions, 10 deletions
@@ -80,18 +80,17 @@ class Model: return self.MODE == Constants.MODE_PHOTO - def displayThumb( self, type, forceUpdating ): + def displayThumb( self, recd, forceUpdating ): #to avoid Xlib: unexpected async reply error when taking a picture on a gst callback, always call with idle_add #this happens b/c this might get called from a gstreamer callback - - if (not type == self.MODE): + if (not recd.type == self.MODE): return if (forceUpdating): self.setUpdating( True ) - hash = self.mediaHashs[type] + hash = self.mediaHashs[recd.type] if (len(hash) > 0): - self.ca.ui.addThumb( hash[len(hash)-1] ) + self.ca.ui.addThumb(recd) if (forceUpdating): self.setUpdating( False ) @@ -199,7 +198,7 @@ class Model: audioHash = self.mediaHashs[Constants.TYPE_AUDIO] audioHash.append( recd ) - gobject.idle_add(self.displayThumb, Constants.TYPE_AUDIO, True) + gobject.idle_add(self.displayThumb, recd, True) self.doPostSaveVideo() self.meshShareRecd( recd ) @@ -256,9 +255,8 @@ class Model: videoHash = self.mediaHashs[Constants.TYPE_VIDEO] videoHash.append( recd ) - gobject.idle_add(self.displayThumb, Constants.TYPE_VIDEO, True) - self.doPostSaveVideo() + gobject.idle_add(self.displayThumb, recd, True) self.meshShareRecd( recd ) @@ -320,7 +318,7 @@ class Model: photoHash = self.mediaHashs[Constants.TYPE_PHOTO] photoHash.append( recd ) - gobject.idle_add(self.displayThumb, Constants.TYPE_PHOTO, True) + gobject.idle_add(self.displayThumb, recd, True) self.meshShareRecd( recd ) @@ -330,7 +328,7 @@ class Model: self.mediaHashs[recd.type].append( recd ) #updateUi, but don't lock up the buttons if they're recording or whatever - gobject.idle_add(self.displayThumb, recd.type, False) + gobject.idle_add(self.displayThumb, recd, False) def createNewRecorded( self, type ): |