Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/model.py
diff options
context:
space:
mode:
authorerikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-10-31 22:49:44 (GMT)
committer erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0>2007-10-31 22:49:44 (GMT)
commitb484ad8606ac962dfc7b6a0036d9d605e2794cb2 (patch)
tree8aa0ecb7998278e3edcef9cdc94de812a359f202 /model.py
parentb784a928f5f1ce70e4320d60a8f722e90ac7a1c4 (diff)
more refactor fixes
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@797 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'model.py')
-rw-r--r--model.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/model.py b/model.py
index 4f00f3d..53dc333 100644
--- a/model.py
+++ b/model.py
@@ -38,7 +38,6 @@ import gobject
from hashlib import md5
import operator
-from sugar import util
from sugar.datastore import datastore
import sugar.env
@@ -46,7 +45,8 @@ from constants import Constants
from instance import Instance
from recorded import Recorded
from color import Color
-import _camera
+from ui import UI
+import utils
class Model:
@@ -192,7 +192,7 @@ class Model:
thumbPath = os.path.join(Instance.tmpPath, recd.thumbFilename)
scale = float((UI.THUMBWIDTH+0.0)/(pixbuf.get_width()+0.0))
- thumbImg = self.generateThumbnail(pixbuf, scale, UI.THUMB_WIDTH, UI.THUMB_HEIGHT)
+ thumbImg = utils.generateThumbnail(pixbuf, scale, UI.THUMB_WIDTH, UI.THUMB_HEIGHT)
thumbImg.write_to_png(thumbPath)
imagePath = os.path.join(Instance.tmpPath, "audioPicture.png")
@@ -255,7 +255,7 @@ class Model:
thumbPath = os.path.join(Instance.tmpPath, recd.thumbFilename)
scale = float((UI.THUMB_WIDTH+0.0)/(wid+0.0))
- thumbImg = self.generateThumbnail(pixbuf, scale, UI.THUMB_WIDTH, ui.THUMB_HEIGHT)
+ thumbImg = utils.generateThumbnail(pixbuf, scale, UI.THUMB_WIDTH, ui.THUMB_HEIGHT)
thumbImg.write_to_png(thumbPath)
self.createNewRecordedMd5Sums( recd )
@@ -318,7 +318,7 @@ class Model:
thumbpath = os.path.join(Instance.tmpPath, recd.thumbFilename)
scale = float((UI.THUMB_WIDTH+0.0)/(pixbuf.get_width()+0.0))
- thumbImg = self.generateThumbnail(pixbuf, scale, UI.THUMB_WIDTH, UI.THUMB_HEIGHT)
+ thumbImg = utils.generateThumbnail(pixbuf, scale, UI.THUMB_WIDTH, UI.THUMB_HEIGHT)
thumbImg.write_to_png(thumbpath)
gc.collect()
#now that we've saved both the image and its pixbuf, we get their md5s