diff options
Diffstat (limited to 'gtk-recordmydesktop/rmdPrefsWidget.py')
-rw-r--r-- | gtk-recordmydesktop/rmdPrefsWidget.py | 112 |
1 files changed, 51 insertions, 61 deletions
diff --git a/gtk-recordmydesktop/rmdPrefsWidget.py b/gtk-recordmydesktop/rmdPrefsWidget.py index 6ca4b3f..772d952 100644 --- a/gtk-recordmydesktop/rmdPrefsWidget.py +++ b/gtk-recordmydesktop/rmdPrefsWidget.py @@ -36,27 +36,27 @@ import os class prefsWidget(object): - labelStrings=[_('Frames Per Second'),_('Sound Recording'),_('Startup Delay(secs)'), + labelStrings=[_('Frames Per Second'),_(''),_('Startup Delay(secs)'), _('Channels'),_('Frequency'),_('Device'),_('Video Quality'),_('Sound Quality'), _('Display'),_('Mouse Cursor'),_('Full shots at every frame'),_('MIT-Shm extension'), _('Drop Frames(encoder)'),_('Shared Threshold'),_('Quick Subsampling')] mouseStrings=[_('Normal'),_('White'),_('Black'),_('None')] stateStrings=[_('Enabled'),_('Disabled')] - tabStrings=[_('Basic'),_('Sound'),_('Encoding'),_('Advanced')] + tabStrings=[_('Basic'),_('Sound'),_('Advanced')] def destroy(self,Event=None): self.values[0]=self.fpsSpinButton.get_value_as_int() self.values[1]=self.mouseComboBox.get_active() - self.values[2]=self.soundComboBox.get_active() + #self.values[2]=self.soundComboBox.get_active() self.values[3]=self.fullComboBox.get_active() - self.values[4]=self.pathEntry.get_text() + #self.values[4]=self.pathEntry.get_text() #self.values[5]=self.are self.values[6]=self.delaySpinButton.get_value_as_int() self.values[7]=self.channelsSpinButton.get_value_as_int() self.values[8]=self.freqSpinButton.get_value_as_int() self.values[9]=self.deviceEntry.get_text().replace(' ','') - self.values[10]=self.vidqSpinButton.get_value_as_int() - self.values[11]=self.soundqSpinButton.get_value_as_int() + #self.values[10]=self.vidqSpinButton.get_value_as_int() + #self.values[11]=self.soundqSpinButton.get_value_as_int() self.values[12]=self.displayEntry.get_text().replace(' ','') self.values[13]=self.sharedComboBox.get_active() self.values[14]=self.frdropComboBox.get_active() @@ -72,25 +72,14 @@ class prefsWidget(object): self.optionsOpen[0]=0 self.window.destroy() - def __fileSelQuit__(self,Event=None): - self.fileSel.destroy() - - def __fileSelOk__(self,Event=None): - self.pathEntry.set_text(self.fileSel.get_filename()) - self.fileSel.destroy() - def __fileSelect__(self,Event=None): - self.fileSel = gtk.FileSelection(title=None) - self.fileSel.ok_button.connect("clicked", self.__fileSelOk__) - self.fileSel.cancel_button.connect("clicked", self.__fileSelQuit__) - self.fileSel.set_filename(self.values[4]) - self.fileSel.show() def __subWidgets__(self): self.labels={} self.boxes={} self.labelbox={} - for i in range(4): + #self.labelbox[0]=gtk.VBox(homogeneous=False, spacing=20) + for i in range(3): self.labelbox[i]=gtk.VBox(homogeneous=False, spacing=20) self.notebook = gtk.Notebook() @@ -99,21 +88,21 @@ class prefsWidget(object): self.fpsSpinButton= gtk.SpinButton(self.fpsAdjustment, climb_rate=0.5, digits=0) - self.soundComboBox = gtk.combo_box_new_text() - for i in range(2): - self.soundComboBox.append_text(self.stateStrings[i]) - self.soundComboBox.set_active(self.values[2]) + #self.soundComboBox = gtk.combo_box_new_text() + #for i in range(2): + #self.soundComboBox.append_text(self.stateStrings[i]) + #self.soundComboBox.set_active(self.values[2]) self.delayAdjustment=gtk.Adjustment(value=self.values[6], lower=0,upper=10000, step_incr=1, page_incr=5, page_size=0) self.delaySpinButton= gtk.SpinButton(self.delayAdjustment, climb_rate=0.5, digits=0) - self.pathEntry= gtk.Entry(max=0) - self.pathEntry.set_text(self.values[4]) - self.pathButton = gtk.Button(None,gtk.STOCK_SAVE_AS) + #self.pathEntry= gtk.Entry(max=0) + #self.pathEntry.set_text(self.values[4]) + #self.pathButton = gtk.Button(None,gtk.STOCK_SAVE_AS) - self.okButton=gtk.Button(None,gtk.STOCK_OK) + self.okButton=gtk.Button(None,gtk.STOCK_CLOSE) - for i in range(3): + for i in xrange(0,3,2): self.labels[i]=gtk.Label(self.labelStrings[i]) self.labels[i].set_justify(gtk.JUSTIFY_LEFT) self.boxes[i]=gtk.HBox(homogeneous=False, spacing=0) @@ -123,26 +112,27 @@ class prefsWidget(object): self.boxes[3]=gtk.HBox(homogeneous=False, spacing=20) self.labelbox[0].pack_start(self.boxes[3],expand=False,fill=False) - placeholder2=gtk.Label("") + placeholder2=gtk.Label("\n\n\n\n\n\n") placeholder2.show() - self.labelbox[0].pack_start(placeholder2) + self.labelbox[0].pack_start(placeholder2,True,True) self.boxes[4]=gtk.HBox(homogeneous=False, spacing=0) self.labelbox[0].pack_end(self.boxes[4]) self.fpsSpinButton.show() self.boxes[0].pack_end(self.fpsSpinButton,expand=False,fill=False) - self.soundComboBox.show() - self.boxes[1].pack_end(self.soundComboBox,expand=False,fill=False) + #self.soundComboBox.show() + #self.boxes[1].pack_end(self.soundComboBox,expand=False,fill=False) self.delaySpinButton.show() self.boxes[2].pack_end(self.delaySpinButton,expand=False,fill=False) - self.pathEntry.show() - self.boxes[3].pack_start(self.pathEntry,expand=False,fill=False) - self.pathButton.show() - self.boxes[3].pack_end(self.pathButton,expand=False,fill=False) + #self.pathEntry.show() + #self.boxes[3].pack_start(self.pathEntry,expand=False,fill=False) + #self.pathButton.show() + #self.boxes[3].pack_end(self.pathButton,expand=False,fill=False) self.okButton.show() - self.boxes[4].pack_start(self.okButton,expand=True,fill=True) + self.boxes[4].pack_end(self.okButton,expand=False,fill=False) for i in range(5): - self.boxes[i].show() + if i!=1: + self.boxes[i].show() #sound page for i in xrange(3,6): self.labels[i]=gtk.Label(self.labelStrings[i]) @@ -172,24 +162,24 @@ class prefsWidget(object): #encoding page - for i in xrange(6,8): - self.labels[i]=gtk.Label(self.labelStrings[i]) - self.labels[i].set_justify(gtk.JUSTIFY_LEFT) - self.boxes[i+5]=gtk.HBox(homogeneous=False, spacing=0) - self.boxes[i+5].pack_start(self.labels[i],expand=False,fill=False) - self.labels[i].show() - #self.boxes[i+5].show() - self.labelbox[2].pack_start(self.boxes[i+5],expand=False,fill=False) - self.vidqAdjustment=gtk.Adjustment(value=self.values[10], lower=0,upper=63, step_incr=1, page_incr=1, page_size=1) - self.vidqSpinButton= gtk.SpinButton(self.vidqAdjustment, climb_rate=0.5, digits=0) - self.boxes[11].pack_end(self.vidqSpinButton,expand=False,fill=False) - self.vidqSpinButton.show() - self.boxes[11].show() - self.soundqAdjustment=gtk.Adjustment(value=self.values[11], lower=-1,upper=10, step_incr=1, page_incr=1, page_size=1) - self.soundqSpinButton= gtk.SpinButton(self.soundqAdjustment, climb_rate=0.5, digits=0) - self.boxes[12].pack_end(self.soundqSpinButton,expand=False,fill=False) - self.soundqSpinButton.show() - self.boxes[12].show() + #for i in xrange(6,8): + #self.labels[i]=gtk.Label(self.labelStrings[i]) + #self.labels[i].set_justify(gtk.JUSTIFY_LEFT) + #self.boxes[i+5]=gtk.HBox(homogeneous=False, spacing=0) + #self.boxes[i+5].pack_start(self.labels[i],expand=False,fill=False) + #self.labels[i].show() + ##self.boxes[i+5].show() + #self.labelbox[2].pack_start(self.boxes[i+5],expand=False,fill=False) + #self.vidqAdjustment=gtk.Adjustment(value=self.values[10], lower=0,upper=63, step_incr=1, page_incr=1, page_size=1) + #self.vidqSpinButton= gtk.SpinButton(self.vidqAdjustment, climb_rate=0.5, digits=0) + #self.boxes[11].pack_end(self.vidqSpinButton,expand=False,fill=False) + #self.vidqSpinButton.show() + #self.boxes[11].show() + #self.soundqAdjustment=gtk.Adjustment(value=self.values[11], lower=-1,upper=10, step_incr=1, page_incr=1, page_size=1) + #self.soundqSpinButton= gtk.SpinButton(self.soundqAdjustment, climb_rate=0.5, digits=0) + #self.boxes[12].pack_end(self.soundqSpinButton,expand=False,fill=False) + #self.soundqSpinButton.show() + #self.boxes[12].show() #misc page for i in xrange(8,15): @@ -199,7 +189,7 @@ class prefsWidget(object): self.boxes[i+5].pack_start(self.labels[i],expand=False,fill=False) self.labels[i].show() #self.boxes[i+5].show() - self.labelbox[3].pack_start(self.boxes[i+5],expand=False,fill=False) + self.labelbox[2].pack_start(self.boxes[i+5],expand=False,fill=False) self.displayEntry= gtk.Entry(max=0) self.displayEntry.set_text(self.values[12]) self.boxes[13].pack_end(self.displayEntry,expand=False,fill=False) @@ -254,15 +244,15 @@ class prefsWidget(object): self.boxes[19].show() #append and show - for i in range(4): + for i in range(3): self.notebook.append_page(self.labelbox[i],gtk.Label(self.tabStrings[i])) self.window.add(self.notebook) - for i in range(4): + for i in range(3): self.labelbox[i].show() self.notebook.show() def __makeCons__(self): - self.pathButton.connect("clicked",self.__fileSelect__) + #self.pathButton.connect("clicked",self.__fileSelect__) self.okButton.connect("clicked",self.destroy) def __init__(self,values,optionsOpen): @@ -276,7 +266,7 @@ class prefsWidget(object): self.__makeCons__() - self.window.set_size_request(288,384) + self.window.set_size_request(350,-1) self.window.show() def main(self): |