summaryrefslogtreecommitdiff
path: root/gtk-recordmydesktop/src
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-11-17 01:55:54 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2006-11-17 01:55:54 +0000
commitee9338612793568f0fe31383b1d4e88a7c5b82be (patch)
treee337a458601334dee99446fc99e10aaaf84bea03 /gtk-recordmydesktop/src
parent434869db48bebe78983568e4f04f2e6e29122cb1 (diff)
better rounding of video and audio quality
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@182 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'gtk-recordmydesktop/src')
-rw-r--r--gtk-recordmydesktop/src/rmdSimple.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/gtk-recordmydesktop/src/rmdSimple.py b/gtk-recordmydesktop/src/rmdSimple.py
index b5789a3..e885dea 100644
--- a/gtk-recordmydesktop/src/rmdSimple.py
+++ b/gtk-recordmydesktop/src/rmdSimple.py
@@ -99,12 +99,12 @@ class simpleWidget(object):
self.NWBox.pack_start(self.image,False,False)
#quality
- self.v_adj=gtk.Adjustment(value=(self.values[10]*100)/63, lower=0, upper=100, step_incr=1, page_incr=10, page_size=0)
+ self.v_adj=gtk.Adjustment(value=int(round((float(self.values[10])*100.0)/63.0)), lower=0, upper=100, step_incr=1, page_incr=10, page_size=0)
self.v_quality=gtk.HScale(self.v_adj)
self.v_quality.set_value_pos(gtk.POS_LEFT)
self.v_quality.set_digits(0)
self.s_button= gtk.CheckButton(label=None)
- self.s_adj=gtk.Adjustment(value=(self.values[11]*10), lower=0, upper=100, step_incr=1, page_incr=10, page_size=0)
+ self.s_adj=gtk.Adjustment(value=int(round(float(self.values[11])*10.0)), lower=0, upper=100, step_incr=1, page_incr=10, page_size=0)
#print (self.values[11]*10)
self.s_quality=gtk.HScale(self.s_adj)
self.s_quality.set_value_pos(gtk.POS_LEFT)
@@ -254,8 +254,12 @@ class simpleWidget(object):
self.values[2]=widget.get_active()
def update(self) :
- self.values[10]=int((self.v_quality.get_value()*63)/100)
- self.values[11]=int(self.s_quality.get_value()/10)
+ self.values[10]=int(round((float(self.v_quality.get_value())*63.0)/100.0))
+ self.values[11]=int(round(float(self.s_quality.get_value())/10.0))
+ if self.values[10]>63:
+ self.values[10]=63
+ if self.values[11]>10:
+ self.values[11]=10
def load_prefs(self):
path=os.path.join(os.getenv("HOME"),".gtk-recordmydesktop")
try:
© All Rights Reserved