summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-07-08 15:49:23 +0000
committeriovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a>2007-07-08 15:49:23 +0000
commit7f399d7c3c68c67e34241f91a1c9776049ae3ca7 (patch)
tree0b9f20800a5f7b9345c18383dfd612ec2fb2f564
parent16586bbc661ab6edafd819cb4cda0fda87d8be52 (diff)
rmdConfig.py.in, rmdPrefsWidget.py, rmdSimple.py,
rmdStrings.py, rmdTrayIcon.py: made area resting after every capture optional. The area is also saved in the options file, if reseting is disabled. git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@376 f606c939-3180-4ac9-a4b8-4b8779d57d0a
-rw-r--r--gtk-recordmydesktop/src/rmdConfig.py.in2
-rw-r--r--gtk-recordmydesktop/src/rmdPrefsWidget.py16
-rw-r--r--gtk-recordmydesktop/src/rmdSimple.py28
-rw-r--r--gtk-recordmydesktop/src/rmdStrings.py2
-rw-r--r--gtk-recordmydesktop/src/rmdTrayIcon.py5
-rw-r--r--qt-recordmydesktop/src/rmdConfig.py.in2
-rw-r--r--qt-recordmydesktop/src/rmdPrefsWidget.py13
-rw-r--r--qt-recordmydesktop/src/rmdSimple.py28
-rw-r--r--qt-recordmydesktop/src/rmdStrings.py2
-rw-r--r--qt-recordmydesktop/src/rmdTrayIcon.py5
10 files changed, 78 insertions, 25 deletions
diff --git a/gtk-recordmydesktop/src/rmdConfig.py.in b/gtk-recordmydesktop/src/rmdConfig.py.in
index d0ac1ee..ff17ebc 100644
--- a/gtk-recordmydesktop/src/rmdConfig.py.in
+++ b/gtk-recordmydesktop/src/rmdConfig.py.in
@@ -21,7 +21,7 @@ default_values=[15, #framerate
"$DISPLAY", #display, this is not interpreted as an env variable
#but when the value is set to this the argument is omitted
0, #shared memory,0 on 1 off
- 1, #drop frames,unused in 0.3,0, removed at 0.3.4, preserved for compatibility of prefs file.
+ 0, #reset recording area ,0 on 1 off
75, #shared threshold.Removed at 0.3.4, preserved for compatibility of prefs file.
1, #quick subsampling,0 on 1 off
"/tmp", #working directory
diff --git a/gtk-recordmydesktop/src/rmdPrefsWidget.py b/gtk-recordmydesktop/src/rmdPrefsWidget.py
index 1a587ae..050be4f 100644
--- a/gtk-recordmydesktop/src/rmdPrefsWidget.py
+++ b/gtk-recordmydesktop/src/rmdPrefsWidget.py
@@ -42,7 +42,7 @@ from rmdStrings import *
class prefsWidget(object):
def __tooltips__(self):
self.tooltips=gtk.Tooltips()
- for i in range(17):
+ for i in range(18):
self.tooltips.set_tip(self.eboxes[i],prefTooltipLabels[i])
self.tooltips.set_tip(self.jack_ebox,prefJacktip)
@@ -55,6 +55,7 @@ class prefsWidget(object):
self.values[9]=self.deviceEntry.get_text().replace(' ','')
self.values[12]=self.displayEntry.get_text().replace(' ','')
self.values[13]=self.sharedComboBox.get_active()
+ self.values[14]=self.areaResetComboBox.get_active()
# self.values[15]=self.thresSpinButton.get_value_as_int()
self.values[16]=self.quickComboBox.get_active()
self.values[17]=self.workdirEntry.get_text()
@@ -235,7 +236,7 @@ class prefsWidget(object):
self.boxes[9].pack_end(self.deviceEntry,expand=False,fill=False)
#misc page
- for i in xrange(10,17):
+ for i in xrange(10,18):
self.labels[i]=gtk.Label(prefLabelStrings[i])
self.labels[i].set_justify(gtk.JUSTIFY_LEFT)
self.boxes[i]=gtk.HBox(homogeneous=False, spacing=0)
@@ -288,12 +289,19 @@ class prefsWidget(object):
self.rFrameComboBox.show()
self.boxes[15].pack_end(self.rFrameComboBox,expand=False,fill=False)
+ self.areaResetComboBox = gtk.combo_box_new_text()
+ for i in range(2):
+ self.areaResetComboBox.append_text(prefStateStrings[i])
+ self.areaResetComboBox.set_active(self.values[14])
+ self.areaResetComboBox.show()
+ self.boxes[16].pack_end(self.areaResetComboBox,expand=False,fill=False)
+
self.extraOptsEntry= gtk.Entry(max=0)
self.extraOptsEntry.set_text(self.values[26])
self.extraOptsEntry.show()
- self.boxes[16].pack_end(self.extraOptsEntry,expand=False,fill=False)
+ self.boxes[17].pack_end(self.extraOptsEntry,expand=False,fill=False)
- for i in range(17):
+ for i in range(18):
self.boxes[i].show()
self.eboxes[i].show()
diff --git a/gtk-recordmydesktop/src/rmdSimple.py b/gtk-recordmydesktop/src/rmdSimple.py
index 381dc8b..671d619 100644
--- a/gtk-recordmydesktop/src/rmdSimple.py
+++ b/gtk-recordmydesktop/src/rmdSimple.py
@@ -279,7 +279,7 @@ class simpleWidget(object):
savefile.readline()
self.values.append(savefile.readline().replace("\n",""))
#recording area is not saved
- self.values.append(rmdConfig.default_values[5])
+ self.values.append([])
for i in range(3):
savefile.readline()
self.values.append(int(savefile.readline()))
@@ -290,10 +290,24 @@ class simpleWidget(object):
self.values.append(int(savefile.readline()))
savefile.readline()
self.values.append(savefile.readline().replace("\n",""))
- for i in range(4):
+ for i in range(2):
savefile.readline()
self.values.append(int(savefile.readline()))
savefile.readline()
+ areastring=savefile.readline()
+ try:
+ as1=areastring.replace('\n','').split(',')
+ for i in range(4):
+ self.values[5].append(int(as1[i]))
+ except:
+ self.values[5]=[]
+ for i in rmdConfig.default_values[5]:
+ self.values[5].append(i)
+ #open for some future option
+ self.values.append(0)
+ savefile.readline()
+ self.values.append(int(savefile.readline()))
+ savefile.readline()
self.values.append(savefile.readline().replace("\n",""))
for i in range(2):
savefile.readline()
@@ -370,11 +384,13 @@ class simpleWidget(object):
savefile.write("%s\n"%self.values[12])
savefile.write("#Shared memory,1 disabled 0 enabled\n")
savefile.write("%d\n"%self.values[13])
- savefile.write("#Drop frames(encoder option),1 disabled 0 enabled.Unused at 0.3.0, removed at 0.3.4, preserved for compatibility of prefs file.\n")
+ savefile.write("#Reset capture area,1 disabled 0 enabled\n")
savefile.write("%d\n"%self.values[14])
- savefile.write("#Shared memory threshold,0-100. Removed at 0.3.4,"
- " preserved for compatibility of prefs file\n")
- savefile.write("%d\n"%self.values[15])
+ savefile.write("#Recording area\n")
+ if(self.values[14]):
+ savefile.write("%d,%d,%d,%d\n"%(self.values[5][0],self.values[5][1],self.values[5][2],self.values[5][3]))
+ else:
+ savefile.write("%d,%d,%d,%d\n"%(rmdConfig.default_values[5][0],rmdConfig.default_values[5][1],rmdConfig.default_values[5][2],rmdConfig.default_values[5][3]))
savefile.write("#Quick subsampling,1 disabled 0 enabled\n")
savefile.write("%d\n"%self.values[16])
savefile.write("#Working directory(temporary files)\n")
diff --git a/gtk-recordmydesktop/src/rmdStrings.py b/gtk-recordmydesktop/src/rmdStrings.py
index dcd2fa4..b0d82d0 100644
--- a/gtk-recordmydesktop/src/rmdStrings.py
+++ b/gtk-recordmydesktop/src/rmdStrings.py
@@ -71,6 +71,7 @@ prefLabelStrings=[_('Overwite Existing Files'),_('Working Directory'),
_('Channels'),_('Frequency'),_('Device'),_('Display'),_('Mouse Cursor'),
_('MIT-Shm extension'),_('Include Window Decorations'),_('Tooltips'),
_('Outline Capture Area On Screen'),
+ _('Reset Capture Area'),
_('Extra Options'),
_('Video Quality'),_('Sound Quality'),
_('Drop Frames(encoder)'),_('Startup Delay(secs)'),]
@@ -93,6 +94,7 @@ prefTooltipLabels=[_('By default, if you try to save under a filename that alrea
_('When selecting a window via the "Select Window" button,\ninclude that window\'s decorations in the recording area.'),
_('Enable or disable tooltips, like this one.\n(Requires restart)'),
_('Draw a frame on the screen, around the area\nthat will get captured.\n(This frame will remain throughout the recording.)'),
+ _('Reset capture area after every recording\nand at program shutdown.'),
_('Extra commandline options that will get\npassed to recordMyDesktop during initialization.\nThese options must be entered the same way\nthey would in the commandline (i.e. separated with spaces).\nConsult the manpage for more information on using them.')]
prefJacktip=_("Enable this option to record audio through\nJACK. The Jack server must be running in order to\nobtain the ports that will be recorded.\nThe audio recorded from each one\nwill be written on a channel of its own.\nrecordMyDesktop must be compiled with JACK\nsupport for this option to work.")
diff --git a/gtk-recordmydesktop/src/rmdTrayIcon.py b/gtk-recordmydesktop/src/rmdTrayIcon.py
index bbb88d5..560d2bf 100644
--- a/gtk-recordmydesktop/src/rmdTrayIcon.py
+++ b/gtk-recordmydesktop/src/rmdTrayIcon.py
@@ -161,8 +161,9 @@ class trayIcon(object):
self.execargs.append('%d'%(self.parent.values[5][2]-self.parent.values[5][0]))
self.execargs.append('-height')
self.execargs.append('%d'%(self.parent.values[5][3]-self.parent.values[5][1]))
- for i in range(4):
- self.parent.values[5][i]=-1
+ if(not self.parent.values[14]):
+ for i in range(4):
+ self.parent.values[5][i]=-1
if self.parent.values[6]>0:
self.execargs.append('-delay')
self.execargs.append('%d'%self.parent.values[6])
diff --git a/qt-recordmydesktop/src/rmdConfig.py.in b/qt-recordmydesktop/src/rmdConfig.py.in
index 7085433..5d4184f 100644
--- a/qt-recordmydesktop/src/rmdConfig.py.in
+++ b/qt-recordmydesktop/src/rmdConfig.py.in
@@ -22,7 +22,7 @@ default_values=[15, #framerate
"$DISPLAY", #display, this is not interpreted as an env variable
#but when the value is set to this the argument is omitted
0, #shared memory,0 on 1 off
- 1, #drop frames,unused in 0.3,0, removed at 0.3.4, preserved for compatibility of prefs file.
+ 0, #reset recording area ,0 on 1 off
75, #shared threshold.Removed at 0.3.4, preserved for compatibility of prefs file.
1, #quick subsampling,0 on 1 off
"/tmp", #working directory
diff --git a/qt-recordmydesktop/src/rmdPrefsWidget.py b/qt-recordmydesktop/src/rmdPrefsWidget.py
index 09db5b5..407a9f4 100644
--- a/qt-recordmydesktop/src/rmdPrefsWidget.py
+++ b/qt-recordmydesktop/src/rmdPrefsWidget.py
@@ -42,7 +42,7 @@ from rmdStrings import *
class prefsWidget(object):
def __tooltips__(self):
- for i in range(17):
+ for i in range(18):
self.labels[i].setToolTip(htmlize(prefTooltipLabels[i]))
self.jack_button.setToolTip(htmlize(prefJacktip))
self.jack_lsp_label.setToolTip(htmlize(prefJacktip))
@@ -59,6 +59,7 @@ class prefsWidget(object):
self.values[9]=self.deviceEntry.text().replace(' ','')
self.values[12]=self.displayEntry.text().replace(' ','')
self.values[13]=self.sharedComboBox.currentIndex()
+ self.values[14]=self.areaResetComboBox.currentIndex()
self.values[16]=self.quickComboBox.currentIndex()
self.values[17]=self.workdirEntry.text()
self.values[18]=self.onTheFlyComboBox.currentIndex()
@@ -210,7 +211,7 @@ class prefsWidget(object):
self.boxes[9].insertWidget(-1,self.deviceEntry)
#misc page
- for i in xrange(10,17):
+ for i in xrange(10,18):
self.labels[i]=QtGui.QLabel(prefLabelStrings[i],self.tabWidgets[3])
self.labels[i].setAlignment(QtCore.Qt.AlignLeft)
self.boxes[i]=QtGui.QHBoxLayout()
@@ -255,8 +256,14 @@ class prefsWidget(object):
self.rFrameComboBox.setCurrentIndex(self.values[25])
self.boxes[15].insertWidget(-1,self.rFrameComboBox)
+ self.areaResetComboBox = QtGui.QComboBox(self.tabWidgets[3])
+ for i in range(2):
+ self.areaResetComboBox.addItem(prefStateStrings[i])
+ self.areaResetComboBox.setCurrentIndex(self.values[14])
+ self.boxes[16].insertWidget(-1,self.areaResetComboBox)
+
self.extraOptsEntry= QtGui.QLineEdit(self.values[26])
- self.boxes[16].insertWidget(-1,self.extraOptsEntry)
+ self.boxes[17].insertWidget(-1,self.extraOptsEntry)
for i in range(4):
self.tabWidgets[i].setLayout(self.labelbox[i])
diff --git a/qt-recordmydesktop/src/rmdSimple.py b/qt-recordmydesktop/src/rmdSimple.py
index 62e597b..5c2be25 100644
--- a/qt-recordmydesktop/src/rmdSimple.py
+++ b/qt-recordmydesktop/src/rmdSimple.py
@@ -268,7 +268,7 @@ class simpleWidget(object):
savefile.readline()
self.values.append(savefile.readline().replace("\n",""))
#recording area is not saved
- self.values.append(rmdConfig.default_values[5])
+ self.values.append([])
for i in range(3):
savefile.readline()
self.values.append(int(savefile.readline()))
@@ -279,10 +279,24 @@ class simpleWidget(object):
self.values.append(int(savefile.readline()))
savefile.readline()
self.values.append(savefile.readline().replace("\n",""))
- for i in range(4):
+ for i in range(2):
savefile.readline()
self.values.append(int(savefile.readline()))
savefile.readline()
+ areastring=savefile.readline()
+ try:
+ as1=areastring.replace('\n','').split(',')
+ for i in range(4):
+ self.values[5].append(int(as1[i]))
+ except:
+ self.values[5]=[]
+ for i in rmdConfig.default_values[5]:
+ self.values[5].append(i)
+ #open for some future option
+ self.values.append(0)
+ savefile.readline()
+ self.values.append(int(savefile.readline()))
+ savefile.readline()
self.values.append(savefile.readline().replace("\n",""))
for i in range(2):
savefile.readline()
@@ -359,11 +373,13 @@ class simpleWidget(object):
savefile.write("%s\n"%self.values[12])
savefile.write("#Shared memory,1 disabled 0 enabled\n")
savefile.write("%d\n"%self.values[13])
- savefile.write("#Drop frames(encoder option),1 disabled 0 enabled.Unused at 0.3.0, removed at 0.3.4, preserved for compatibility of prefs file.\n")
+ savefile.write("#Reset capture area,1 disabled 0 enabled\n")
savefile.write("%d\n"%self.values[14])
- savefile.write("#Shared memory threshold,0-100. Removed at 0.3.4,"
- " preserved for compatibility of prefs file\n")
- savefile.write("%d\n"%self.values[15])
+ savefile.write("#Recording area\n")
+ if(self.values[14]):
+ savefile.write("%d,%d,%d,%d\n"%(self.values[5][0],self.values[5][1],self.values[5][2],self.values[5][3]))
+ else:
+ savefile.write("%d,%d,%d,%d\n"%(rmdConfig.default_values[5][0],rmdConfig.default_values[5][1],rmdConfig.default_values[5][2],rmdConfig.default_values[5][3]))
savefile.write("#Quick subsampling,1 disabled 0 enabled\n")
savefile.write("%d\n"%self.values[16])
savefile.write("#Working directory(temporary files)\n")
diff --git a/qt-recordmydesktop/src/rmdStrings.py b/qt-recordmydesktop/src/rmdStrings.py
index 6c1d726..b588d2c 100644
--- a/qt-recordmydesktop/src/rmdStrings.py
+++ b/qt-recordmydesktop/src/rmdStrings.py
@@ -71,6 +71,7 @@ prefLabelStrings=[_('Overwite Existing Files'),_('Working Directory'),
_('Channels'),_('Frequency'),_('Device'),_('Display'),_('Mouse Cursor'),
_('MIT-Shm extension'),_('Include Window Decorations'),_('Tooltips'),
_('Outline Capture Area On Screen'),
+ _('Reset Capture Area'),
_('Extra Options'),
_('Video Quality'),_('Sound Quality'),
_('Drop Frames(encoder)'),_('Startup Delay(secs)'),]
@@ -93,6 +94,7 @@ prefTooltipLabels=[_('By default, if you try to save under a filename that alrea
_('When selecting a window via the "Select Window" button,\ninclude that window\'s decorations in the recording area.'),
_('Enable or disable tooltips, like this one.\n(Requires restart)'),
_('Draw a frame on the screen, around the area\nthat will get captured.\n(This frame will remain throughout the recording.)'),
+ _('Reset capture area after every recording\nand at program shutdown.'),
_('Extra commandline options that will get\npassed to recordMyDesktop during initialization.\nThese options must be entered the same way\nthey would in the commandline (i.e. separated with spaces).\nConsult the manpage for more information on using them.')]
prefJacktip=_("Enable this option to record audio through\nJACK. The Jack server must be running in order to\nobtain the ports that will be recorded.\nThe audio recorded from each one\nwill be written on a channel of its own.\nrecordMyDesktop must be compiled with JACK\nsupport for this option to work.")
diff --git a/qt-recordmydesktop/src/rmdTrayIcon.py b/qt-recordmydesktop/src/rmdTrayIcon.py
index 57a7ca7..bd70af4 100644
--- a/qt-recordmydesktop/src/rmdTrayIcon.py
+++ b/qt-recordmydesktop/src/rmdTrayIcon.py
@@ -151,8 +151,9 @@ class trayIcon(object):
self.execargs.append('%d'%(self.parent.values[5][2]-self.parent.values[5][0]))
self.execargs.append('-height')
self.execargs.append('%d'%(self.parent.values[5][3]-self.parent.values[5][1]))
- for i in range(4):
- self.parent.values[5][i]=-1
+ if(not self.parent.values[14]):
+ for i in range(4):
+ self.parent.values[5][i]=-1
if self.parent.values[6]>0:
self.execargs.append('-delay')
self.execargs.append('%d'%self.parent.values[6])
© All Rights Reserved