Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-12-14 04:07:13 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-12-14 04:07:13 (GMT)
commitf33d8a5e79653d802e369f83bf7482b253d01e0d (patch)
tree822f3a8f4d1ee94a5a377c17f5b5674439895175
parentf706c43145128d40f8c639059800fe7282abe063 (diff)
more 46
git-svn-id: http://mediamods.com/public-svn/camera-activity/tags/46@974 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
-rwxr-xr-xactivity/activity.info2
-rw-r--r--constants.py21
-rw-r--r--ui.py20
3 files changed, 27 insertions, 16 deletions
diff --git a/activity/activity.info b/activity/activity.info
index 2a04dae..70ae34c 100755
--- a/activity/activity.info
+++ b/activity/activity.info
@@ -3,5 +3,5 @@ name = Record
service_name = org.laptop.RecordActivity
class = record.Record
icon = activity-record
-activity_version = 45
+activity_version = 46
show_launcher = yes \ No newline at end of file
diff --git a/constants.py b/constants.py
index d7645e4..aa73598 100644
--- a/constants.py
+++ b/constants.py
@@ -16,7 +16,7 @@ import pangocairo
class Constants:
- VERSION = 45
+ VERSION = 46
SERVICE = "org.laptop.Record"
IFACE = SERVICE
@@ -63,13 +63,13 @@ class Constants:
TIMERS.append(TIMER_5)
TIMERS.append(TIMER_10)
- DURATION_15 = 15
- DURATION_30 = 30
- DURATION_45 = 45
+ DURATION_1 = 1
+ DURATION_3 = 3
+ DURATION_5 = 5
DURATIONS = []
- DURATIONS.append(DURATION_15)
- DURATIONS.append(DURATION_30)
- DURATIONS.append(DURATION_45)
+ DURATIONS.append(DURATION_1)
+ DURATIONS.append(DURATION_3)
+ DURATIONS.append(DURATION_5)
colorBlack = Color()
colorBlack.init_rgba( 0, 0, 0, 255 )
@@ -280,6 +280,11 @@ class Constants:
def createCountdownPng( self, num ):
todisk = True
+ if (todisk):
+ path = os.path.join(Instance.dataPath, str(num)+".png")
+ if (os.path.exists(path)):
+ return
+
w = self.__class__.dim_CONTROLBAR_HT
h = w
if (todisk):
@@ -314,7 +319,7 @@ class Constants:
img = gtk.Image()
if (todisk):
- path = os.path.join(Instance.tmpPath, str(num)+".png")
+ path = os.path.join(Instance.dataPath, str(num)+".png")
path = utils.getUniqueFilepath(path, 0)
cimg.write_to_png(path)
numPixbuf = gtk.gdk.pixbuf_new_from_file(path)
diff --git a/ui.py b/ui.py
index 2aac2a7..4100061 100644
--- a/ui.py
+++ b/ui.py
@@ -647,8 +647,8 @@ class UI:
record.Record.log.error("doClipboardCopyStart: imgPath_s==None")
return None
- tmpImgPath = recd.getMediaFilepath() #os.path.join( Instance.instancePath, recd.mediaFilename)
- tmpImgPath = utils.getUniqueFilepath(tmpImgPath,0)
+ tmpImgPath = recd.getMediaFilepath()
+ tmpImgPath = utils.getUniqueFilepath(tmpImgPath, 0)
shutil.copyfile( imgPath_s, tmpImgPath )
return tmpImgPath
@@ -841,7 +841,13 @@ class UI:
return False
else:
secsRemaining = duration - passedTime
- self.progressWindow.updateProgress( passedTime/duration, Constants.istrDuration + " " + Constants.istrSecondsRemaining % {"1":str(int(secsRemaining))} )
+ timeRemainStr = Constants.istrSecondsRemaining % {"1":str(int(secsRemaining))}
+ if (secsRemaining >= 60):
+ mins = int( secsRemaining/60 )
+ secs = int( secsRemaining%60 )
+ timeRemainStr = Constants.istrMinutesSecondsRemaining % {"1":str(int(mins)), "2":str(int(secs))}
+
+ self.progressWindow.updateProgress( passedTime/duration, Constants.istrDuration + " " + timeRemainStr )
return True
@@ -2222,7 +2228,7 @@ class VideoToolbar(gtk.Toolbar):
durCbb = gtk.combo_box_new_text()
self.durCb = ToolComboBox(combo=durCbb, label_text=Constants.istrDuration)
for i in range (0, len(Constants.DURATIONS)):
- self.durCb.combo.append_text( Constants.istrSeconds % {"1":(str(Constants.DURATIONS[i]))} )
+ self.durCb.combo.append_text( Constants.istrMinutes % {"1":(str(Constants.DURATIONS[i]))} )
self.durCb.combo.set_active(0)
self.insert(self.durCb, -1 )
@@ -2237,7 +2243,7 @@ class VideoToolbar(gtk.Toolbar):
def getDuration(self):
- return Constants.DURATIONS[self.durCb.combo.get_active()]
+ return 60 * Constants.DURATIONS[self.durCb.combo.get_active()]
class AudioToolbar(gtk.Toolbar):
@@ -2277,7 +2283,7 @@ class AudioToolbar(gtk.Toolbar):
durCbb = gtk.combo_box_new_text()
self.durCb = ToolComboBox(combo=durCbb, label_text=Constants.istrDuration)
for i in range (0, len(Constants.DURATIONS)):
- self.durCb.combo.append_text( Constants.istrSeconds % {"1":(str(Constants.DURATIONS[i]))} )
+ self.durCb.combo.append_text( Constants.istrMinutes % {"1":(str(Constants.DURATIONS[i]))} )
self.durCb.combo.set_active(0)
self.insert(self.durCb, -1 )
@@ -2292,4 +2298,4 @@ class AudioToolbar(gtk.Toolbar):
def getDuration(self):
- return Constants.DURATIONS[self.durCb.combo.get_active()] \ No newline at end of file
+ return 60 * Constants.DURATIONS[self.durCb.combo.get_active()] \ No newline at end of file