From 3625160acc1715fc380f58ec3c4248485bed2370 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Sat, 11 Jul 2020 16:47:00 -0700 Subject: *: drop {gtk,qt}-recordmydesktop subdirs This restores the recordmydesktop/ subdir as root from the mirror I cloned by fork from. I have no particular interest in the gtk/qt frontends and it doesn't appear they were part of a single tree in the past. But I will probably preserve backwards compatibility of the cli so they can continue to work with this fork installed. --- gtk-recordmydesktop/src/Makefile.am | 28 -- gtk-recordmydesktop/src/__init__.py | 4 - gtk-recordmydesktop/src/gtk-recordMyDesktop.in | 50 -- .../src/gtk-recordmydesktop.desktop | 12 - gtk-recordmydesktop/src/gtk-recordmydesktop.png | Bin 3651 -> 0 bytes gtk-recordmydesktop/src/gtk-recordmydesktop.svg | 99 ---- gtk-recordmydesktop/src/rmdConfig.py.in | 37 -- gtk-recordmydesktop/src/rmdFrame.py | 124 ----- gtk-recordmydesktop/src/rmdMonitor.py | 74 --- gtk-recordmydesktop/src/rmdPrefsWidget.py | 425 ---------------- gtk-recordmydesktop/src/rmdSelect.py | 139 ------ gtk-recordmydesktop/src/rmdSelectThumb.py | 250 ---------- gtk-recordmydesktop/src/rmdSimple.py | 535 --------------------- gtk-recordmydesktop/src/rmdStrings.py | 112 ----- gtk-recordmydesktop/src/rmdTrayIcon.py | 358 -------------- gtk-recordmydesktop/src/rmdTrayPopup.py | 108 ----- 16 files changed, 2355 deletions(-) delete mode 100644 gtk-recordmydesktop/src/Makefile.am delete mode 100644 gtk-recordmydesktop/src/__init__.py delete mode 100644 gtk-recordmydesktop/src/gtk-recordMyDesktop.in delete mode 100644 gtk-recordmydesktop/src/gtk-recordmydesktop.desktop delete mode 100644 gtk-recordmydesktop/src/gtk-recordmydesktop.png delete mode 100644 gtk-recordmydesktop/src/gtk-recordmydesktop.svg delete mode 100644 gtk-recordmydesktop/src/rmdConfig.py.in delete mode 100644 gtk-recordmydesktop/src/rmdFrame.py delete mode 100644 gtk-recordmydesktop/src/rmdMonitor.py delete mode 100644 gtk-recordmydesktop/src/rmdPrefsWidget.py delete mode 100644 gtk-recordmydesktop/src/rmdSelect.py delete mode 100755 gtk-recordmydesktop/src/rmdSelectThumb.py delete mode 100644 gtk-recordmydesktop/src/rmdSimple.py delete mode 100644 gtk-recordmydesktop/src/rmdStrings.py delete mode 100644 gtk-recordmydesktop/src/rmdTrayIcon.py delete mode 100644 gtk-recordmydesktop/src/rmdTrayPopup.py (limited to 'gtk-recordmydesktop/src') diff --git a/gtk-recordmydesktop/src/Makefile.am b/gtk-recordmydesktop/src/Makefile.am deleted file mode 100644 index 1527d23..0000000 --- a/gtk-recordmydesktop/src/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -bin_SCRIPTS=gtk-recordMyDesktop - -gtk_recordMyDesktopdir=$(pythondir)/recordMyDesktop - -gtk_recordMyDesktop_PYTHON = \ - rmdSelect.py\ - rmdTrayIcon.py\ - rmdSelectThumb.py\ - rmdTrayPopup.py\ - rmdPrefsWidget.py\ - rmdSimple.py\ - rmdConfig.py\ - rmdMonitor.py\ - rmdFrame.py\ - rmdStrings.py\ - __init__.py - -desktopdir = $(datadir)/applications - -desktop_DATA =gtk-recordmydesktop.desktop - -pixmapdir = $(datadir)/pixmaps -pixmap_DATA = gtk-recordmydesktop.png - -EXTRA_DIST=gtk-recordMyDesktop.in gtk-recordmydesktop.desktop gtk-recordmydesktop.png gtk-recordmydesktop.svg - -clean-local: - rm -rf *.pyc *.pyo diff --git a/gtk-recordmydesktop/src/__init__.py b/gtk-recordmydesktop/src/__init__.py deleted file mode 100644 index 7262f15..0000000 --- a/gtk-recordmydesktop/src/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -# -# - diff --git a/gtk-recordmydesktop/src/gtk-recordMyDesktop.in b/gtk-recordmydesktop/src/gtk-recordMyDesktop.in deleted file mode 100644 index 6d5b6ab..0000000 --- a/gtk-recordmydesktop/src/gtk-recordMyDesktop.in +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/python - - -#/********************************************************************************* -#* gtk-recordMyDesktop * -#********************************************************************************** -#* * -#* Copyright (C) 2006 John Varouhakis * -#* * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU General Public License as published by * -#* the Free Software Foundation; either version 2 of the License, or * -#* (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License * -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * -#* * -#* * -#* * -#* For further information contact me at johnvarouhakis@gmail.com * -#**********************************************************************************/ - -import sys - -#this is the installation direcotry, -#which is determined during configuration -#default /usr/local/lib/python/site-packages -PYTHONDIR='@PYTHONDIR@' -sys.path.append(PYTHONDIR) -from recordMyDesktop import rmdSimple - -def main(): - tr=rmdSimple.simpleWidget() - - -main() - - - - - - - diff --git a/gtk-recordmydesktop/src/gtk-recordmydesktop.desktop b/gtk-recordmydesktop/src/gtk-recordmydesktop.desktop deleted file mode 100644 index 5c79b89..0000000 --- a/gtk-recordmydesktop/src/gtk-recordmydesktop.desktop +++ /dev/null @@ -1,12 +0,0 @@ -[Desktop Entry] -Version=1.0 -Encoding=UTF-8 -Name=gtk-recordMyDesktop -Comment=Frontend for recordMyDesktop -Comment[fr]=Interface pour recordmydesktop -Exec=gtk-recordMyDesktop -Terminal=false -Type=Application -Icon=gtk-recordmydesktop.png -Categories=AudioVideo;Recorder; -StartupNotify=false diff --git a/gtk-recordmydesktop/src/gtk-recordmydesktop.png b/gtk-recordmydesktop/src/gtk-recordmydesktop.png deleted file mode 100644 index 8ac6b3e..0000000 Binary files a/gtk-recordmydesktop/src/gtk-recordmydesktop.png and /dev/null differ diff --git a/gtk-recordmydesktop/src/gtk-recordmydesktop.svg b/gtk-recordmydesktop/src/gtk-recordmydesktop.svg deleted file mode 100644 index 2d76d5b..0000000 --- a/gtk-recordmydesktop/src/gtk-recordmydesktop.svg +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - -Created by potrace 1.7, written by Peter Selinger 2001-2005 - - - image/svg+xml - - - - - - - diff --git a/gtk-recordmydesktop/src/rmdConfig.py.in b/gtk-recordmydesktop/src/rmdConfig.py.in deleted file mode 100644 index 8f875d1..0000000 --- a/gtk-recordmydesktop/src/rmdConfig.py.in +++ /dev/null @@ -1,37 +0,0 @@ -import os -VERSION='@VERSION@' -PREFIX='@PREFIX@' -locale_install_dir=os.path.join('@DATADIR@'.replace("${prefix}",PREFIX), 'locale') - -#binary values expressed with 1 and zero instead of True and False -#are upside down. That means 0 is enabled and 1 disabled - -default_values=[15, #framerate - 0, #cursor - True, #sound - 1, #full shots,0 on 1 off - os.path.join(os.getenv('HOME'),'out.ogv'), #filename - [-1,-1,-1,-1], #recording area(<0 means auto) - 0, #delay ,unused on 0.3 - 1, #no of channels - 22050, #frequency - 'DEFAULT', #device - 63, #video quality - 10, #audio quality - "$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 - 0, #reset recording area ,0 on 1 off - 1, #follow mouse,0 on 1 off - 1, #quick subsampling,0 on 1 off - "/tmp", #working directory - 1, #on the fly encoding,0 on 1 off - 0, #zero compression,0 on 1 off - False, #overwrite existing files - 0, #include window decorations, 0 on 1 off - False, #Use jack - [], #jack ports - 0, #tooltips,0 on 1 off - 0, #draw an on-screen frame, surrounding the capture area,0 on 1 off - "", #extra options - ] diff --git a/gtk-recordmydesktop/src/rmdFrame.py b/gtk-recordmydesktop/src/rmdFrame.py deleted file mode 100644 index 4441afb..0000000 --- a/gtk-recordmydesktop/src/rmdFrame.py +++ /dev/null @@ -1,124 +0,0 @@ -#/********************************************************************************* -#* gtk-recordMyDesktop * -#********************************************************************************** -#* * -#* Copyright (C) 2006 John Varouhakis * -#* * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU General Public License as published by * -#* the Free Software Foundation; either version 2 of the License, or * -#* (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License * -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * -#* * -#* * -#* * -#* For further information contact me at johnvarouhakis@gmail.com * -#**********************************************************************************/ -import pygtk -pygtk.require('2.0') -import gtk -import gobject - -class rmdFrame: - borderwidth=6 - outlinewidth=1 - - def __init__(self,x,y,w,h,parent): - self.window=gtk.Window(gtk.WINDOW_TOPLEVEL) - self.area=gtk.DrawingArea() - self.x=x - self.y=y - self.w=w - self.h=h - self.parent=parent - mask = gtk.gdk.Pixmap(None, - self.w+self.borderwidth*2, - self.h+self.borderwidth*2, - 1) - gc = mask.new_gc() - gc.foreground = gtk.gdk.Color(0,0,0,1) - mask.draw_rectangle(gc,True,0,0, - self.w+self.borderwidth*2, - self.h+self.borderwidth*2) - gc.foreground = gtk.gdk.Color(0, 0, 0, 0) - mask.draw_rectangle(gc,True, - self.borderwidth, - self.borderwidth, - self.w,self.h) - - self.area.show() - self.window.stick() - self.window.set_keep_above(True) - self.area.connect("expose-event", self.__expose_cb) - self.window.shape_combine_mask(mask,0,0) - self.window.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DOCK) - self.window.set_title("gtk-recordMyDesktop frame") - self.window.stick() - self.window.set_keep_above(True) - self.window.add(self.area) - self.window.show() - - self.window.set_size_request(self.w+self.borderwidth*2, - self.h+self.borderwidth*2) - self.window.move(self.x-self.borderwidth, - self.y-self.borderwidth) - self.window.set_resizable(False) - self.disp=gtk.gdk.display_get_default() - self.wroot = gtk.gdk.get_default_root_window() - (self.wwidth, self.wheight) = self.wroot.get_size() - self.timed_id=gobject.timeout_add(100,self.moveFrame) - - def moveFrame(self): - if self.parent.values[15]==0 and self.parent.hidden[0]==0: - npos=gtk.gdk.Display.get_pointer(self.disp) - x=npos[1]-self.w/2 - y=npos[2]-self.h/2 - x=(x>>1)<<1 - y=(y>>1)<<1 - if x<0:x=0 - if y<0:y=0 - if x+self.w>self.wwidth:x=self.wwidth-self.w - if y+self.h>self.wheight:y=self.wheight-self.h - if(x!=self.x or y!= self.y): - self.x=x - self.y=y - self.window.move(self.x-(self.borderwidth),self.y-(self.borderwidth)) - return True - - - def __expose_cb(self, widget, event): - if widget==self.area: - self.area.window.draw_rectangle(self.window.style.white_gc, - True,0,0,self.w+self.borderwidth*2, - self.h+self.borderwidth*2) - self.area.window.draw_rectangle(self.window.style.black_gc, - True,self.outlinewidth, - self.outlinewidth, - self.w+(self.borderwidth- - self.outlinewidth)*2, - self.h+(self.borderwidth- - self.outlinewidth)*2) - self.area.window.draw_rectangle(self.window.style.white_gc, - True, - self.borderwidth-self.outlinewidth, - self.borderwidth-self.outlinewidth, - self.w+self.outlinewidth*2, - self.h+self.outlinewidth*2) - else: - pass - - def destroy(self): - self.area.destroy() - try: - self.window.destroy() - except: - pass diff --git a/gtk-recordmydesktop/src/rmdMonitor.py b/gtk-recordmydesktop/src/rmdMonitor.py deleted file mode 100644 index f6c20dd..0000000 --- a/gtk-recordmydesktop/src/rmdMonitor.py +++ /dev/null @@ -1,74 +0,0 @@ -import pygtk -pygtk.require('2.0') -import gtk -import gobject -import locale, gettext -import rmdConfig -_ = gettext.gettext -gettext.textdomain('gtk-recordMyDesktop') -gettext.bindtextdomain('gtk-recordMyDesktop',rmdConfig.locale_install_dir) -import popen2 -import os,fcntl,signal -from rmdStrings import * - -class rmdMonitor(object): - labeString=monStrings['PleaseWait'] - counter_fraction=0.0 - - def destroy_and_kill(self,Event=None): - self.destroy() - self.stop_encoding() - def destroy(self,Event=None): - gobject.source_remove(self.timed_id) - self.window.destroy() - gtk.main_quit() - def update_counter(self): - strstdout="" - try: - strstdout=self.stdout.read() - if strstdout =='': - self.destroy() - except: - return True - try: - self.counter_fraction=float(strstdout.replace("[","").replace("%] ","")) - percentage=self.counter_fraction/100.0 - if percentage>1.0: - percentage=1.0 - self.progressbar.set_fraction(percentage) - self.progressbar.set_text("%.2f%% "%(self.counter_fraction)+monStrings['complete']) - except: - self.counter_fraction=0.0 - - return True - def stop_encoding(self,Event=None): - os.kill(self.rmdPid,signal.SIGINT) - - def __init__(self,out_stream,childPid): - flags = fcntl.fcntl(out_stream, fcntl.F_GETFL) - fcntl.fcntl(out_stream, fcntl.F_SETFL, flags | os.O_NONBLOCK) - self.rmdPid=childPid - self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) - self.window.connect("destroy", self.destroy_and_kill) - self.window.set_border_width(10) - self.window.set_title("recordMyDesktop-encoder") - self.label=gtk.Label(self.labeString) - self.label.set_justify(gtk.JUSTIFY_CENTER) - self.label.show() - self.progressbar=gtk.ProgressBar(adjustment=None) - self.progressbar.set_fraction(self.counter_fraction) - self.progressbar.set_text("0% "+monStrings['complete']) - self.progressbar.show() - self.stopbutton=gtk.Button(None,gtk.STOCK_CANCEL) - self.stopbutton.connect("clicked",self.stop_encoding) - self.box=gtk.VBox(homogeneous=False, spacing=20) - self.box.pack_start(self.label,True,True) - self.box.pack_start(self.progressbar,True,True) - self.box.pack_start(self.stopbutton,expand=False,fill=False) - self.box.show() - self.stopbutton.show() - self.window.add(self.box) - self.window.show() - self.stdout=out_stream - self.timed_id=gobject.timeout_add(100,self.update_counter) - gtk.main() diff --git a/gtk-recordmydesktop/src/rmdPrefsWidget.py b/gtk-recordmydesktop/src/rmdPrefsWidget.py deleted file mode 100644 index 0257ba9..0000000 --- a/gtk-recordmydesktop/src/rmdPrefsWidget.py +++ /dev/null @@ -1,425 +0,0 @@ -#/********************************************************************************* -#* gtk-recordMyDesktop * -#********************************************************************************** -#* * -#* Copyright (C) 2006 John Varouhakis * -#* * -#* * -#* This program is free software; you can redistribute it and/or modify * -#* it under the terms of the GNU General Public License as published by * -#* the Free Software Foundation; either version 2 of the License, or * -#* (at your option) any later version. * -#* * -#* This program is distributed in the hope that it will be useful, * -#* but WITHOUT ANY WARRANTY; without even the implied warranty of * -#* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -#* GNU General Public License for more details. * -#* * -#* You should have received a copy of the GNU General Public License * -#* along with this program; if not, write to the Free Software * -#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * -#* * -#* * -#* * -#* For further information contact me at johnvarouhakis@gmail.com * -#**********************************************************************************/ - - -import pygtk -pygtk.require('2.0') -import gtk -import locale, gettext -import rmdConfig -_ = gettext.gettext -gettext.textdomain('gtk-recordMyDesktop') -gettext.bindtextdomain('gtk-recordMyDesktop',rmdConfig.locale_install_dir) -import os -from rmdStrings import * - - - - -class prefsWidget(object): - def __tooltips__(self): - self.tooltips=gtk.Tooltips() - for i in range(19): - self.tooltips.set_tip(self.eboxes[i],prefTooltipLabels[i]) - self.tooltips.set_tip(self.jack_ebox,prefJacktip) - - - def destroy(self,Event=None): - self.values[0]=self.fpsSpinButton.get_value_as_int() - self.values[1]=self.mouseComboBox.get_active() - self.values[3]=int(not self.fullComboBox.get_active()) - 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[12]=self.displayEntry.get_text().replace(' ','') - self.values[13]=int(not self.sharedComboBox.get_active()) - self.values[14]=int(not self.areaResetComboBox.get_active()) - self.values[15]=int(not self.followMouseComboBox.get_active()) - self.values[16]=int(not self.quickComboBox.get_active()) - self.values[17]=self.workdirEntry.get_text() - self.values[18]=int(not self.onTheFlyComboBox.get_active()) - self.values[19]=int(not self.zeroCmpComboBox.get_active()) - self.values[20]=self.overwriteFilesButton.get_active() - self.values[21]=int(not self.winDecoComboBox.get_active()) - self.values[22]=self.jack_button.get_active() - self.__getSelectedPorts__() - self.values[24]=int(not self.tooltipsComboBox.get_active()) - self.values[25]=int(not self.rFrameComboBox.get_active()) - self.values[26]=self.extraOptsEntry.get_text().strip() - self.window.destroy() - self.optionsOpen[0]=0 - - def __exit__(self,Event=None): - gtk.main_quit() - self.values[0]=-1 - self.optionsOpen[0]=0 - self.window.destroy() - - def __getSelectedPorts__(self): - iters_t=[] - self.values[23]=[] - sel_rows=self.jack_lsp_listview.get_selection().get_selected_rows() - for i in sel_rows[1]: - iters_t.append(self.jack_lsp_listview.get_model().get_iter(i)) - for i in iters_t: - self.values[23].append(self.jack_lsp_listview.get_model().get_value(i,0)) - - def __fileSelQuit__(self,Event=None): - self.fileSel.destroy() - - def __fileSelOk__(self,Event=None): - new_val=self.fileSel.get_filename() - self.workdirEntry.set_text(new_val) - self.fileSel.destroy() - - - def __subWidgets__(self): - self.labels={} - self.boxes={} - self.labelbox={} - self.eboxes={} - for i in range(4): - self.labelbox[i]=gtk.VBox(homogeneous=False, spacing=20) - self.notebook = gtk.Notebook() - -#Files page - for i in range(2): - self.labels[i]=gtk.Label(prefLabelStrings[i]) - self.labels[i].set_justify(gtk.JUSTIFY_LEFT) - self.boxes[i]=gtk.HBox(homogeneous=False, spacing=40) - self.boxes[i].pack_start(self.labels[i],expand=False,fill=False) - self.labels[i].show() - self.eboxes[i]=gtk.EventBox() - self.eboxes[i].add(self.boxes[i]) - self.labelbox[0].pack_start(self.eboxes[i],expand=False,fill=False) - - self.workdir_layout=gtk.HBox(homogeneous=False, spacing=0) - - - self.overwriteFilesButton=gtk.CheckButton(label=None) - self.overwriteFilesButton.set_active(self.values[20]) - self.overwriteFilesButton.show() - self.boxes[0].pack_end(self.overwriteFilesButton,expand=False,fill=False) - - self.workdirEntry= gtk.Entry(max=0) - self.workdirEntry.set_text(self.values[17]) - self.workdirEntry.show() - #self.boxes[1].pack_end(self.workdirEntry,expand=False,fill=False) - #self.file_button=gtk.Button(None,gtk.STOCK_SAVE_AS) - #self.file_button.show() - self.workdir_button=gtk.Button(None,gtk.STOCK_SAVE_AS) - self.workdir_button.show() - - - self.workdir_layout.pack_start(self.workdirEntry,expand=True,fill=True) - self.workdir_layout.pack_start(self.workdir_button,expand=False,fill=False) - self.workdir_layout.show() - - self.labelbox[0].pack_start(self.workdir_layout,expand=False,fill=False) - - -#Performance page - for i in xrange(2,7): - self.labels[i]=gtk.Label(prefLabelStrings[i]) - self.labels[i].set_justify(gtk.JUSTIFY_LEFT) - self.boxes[i]=gtk.HBox(homogeneous=False, spacing=40) - self.boxes[i].pack_start(self.labels[i],expand=False,fill=False) - self.labels[i].show() - self.eboxes[i]=gtk.EventBox() - self.eboxes[i].add(self.boxes[i]) - self.labelbox[1].pack_start(self.eboxes[i],expand=False,fill=False) - - self.fpsAdjustment=gtk.Adjustment(value=self.values[0], lower=1, upper=50, step_incr=1, page_incr=5, page_size=0) - self.fpsSpinButton= gtk.SpinButton(self.fpsAdjustment, climb_rate=0.5, digits=0) - self.fpsSpinButton.show() - self.boxes[2].pack_end(self.fpsSpinButton,expand=False,fill=False) - - self.onTheFlyComboBox = gtk.CheckButton(" ") - self.onTheFlyComboBox.set_active(int(not self.values[18])) - self.onTheFlyComboBox.show() - self.boxes[3].pack_end(self.onTheFlyComboBox,expand=False,fill=False) - - self.zeroCmpComboBox = gtk.CheckButton(" ") - self.zeroCmpComboBox.set_active(int(not self.values[19])) - self.zeroCmpComboBox.show() - self.boxes[4].pack_end(self.zeroCmpComboBox,expand=False,fill=False) - - self.quickComboBox = gtk.CheckButton(" ") - self.quickComboBox.set_active(int(not self.values[16])) - self.quickComboBox.show() - self.boxes[5].pack_end(self.quickComboBox,expand=False,fill=False) - - self.fullComboBox = gtk.CheckButton(" ") - self.fullComboBox.set_active(int(not self.values[3])) - self.fullComboBox.show() - self.boxes[6].pack_end(self.fullComboBox,expand=False,fill=False) - - -#sound page - for i in xrange(7,10): - self.labels[i]=gtk.Label(prefLabelStrings[i]) - self.labels[i].set_justify(gtk.JUSTIFY_LEFT) - self.boxes[i]=gtk.HBox(homogeneous=False, spacing=0) - self.boxes[i].pack_start(self.labels[i],expand=False,fill=False) - self.labels[i].show() - self.eboxes[i]=gtk.EventBox() - self.eboxes[i].add(self.boxes[i]) - self.labelbox[2].pack_start(self.eboxes[i],expand=False,fill=False) - - self.jack_button= gtk.CheckButton(prefStrings['UseJack']) - self.jack_lsp_label=gtk.Label(prefStrings['SelectPorts']) - - self.jack_lsp_liststore=gtk.ListStore(str) - - self.jack_lsp_listview=gtk.TreeView(self.jack_lsp_liststore) - self.jack_lsp_tvc = gtk.TreeViewColumn(prefStrings['AvailablePorts']) - self.jack_lsp_listview.append_column(self.jack_lsp_tvc) - self.cell = gtk.CellRendererText() - self.jack_lsp_tvc.pack_start(self.cell, True) - self.jack_lsp_tvc.add_attribute(self.cell, 'text', 0) - self.jack_lsp_listview.set_search_column(0) - self.jack_lsp_listview.set_reorderable(True) - self.jack_lsp_listview.get_selection().set_mode(gtk.SELECTION_MULTIPLE) - self.jack_scroll=gtk.ScrolledWindow(hadjustment=None, vadjustment=None) - self.jack_scroll.add_with_viewport(self.jack_lsp_listview) - - self.jack_lsp_refresh=gtk.Button(None,gtk.STOCK_REFRESH) - self.jack_box=gtk.VBox(homogeneous=False, spacing=10) - self.jack_box.pack_start(self.jack_button,expand=False,fill=False) - self.jack_box.pack_start(self.jack_lsp_label,expand=False,fill=False) - self.jack_box.pack_start(self.jack_scroll,expand=True,fill=True) - self.jack_box.pack_start(self.jack_lsp_refresh,expand=False,fill=False) - - - - self.jack_button.set_active(self.values[22]) - self.jack_button.show() - self.jack_lsp_label.show() - self.jack_lsp_listview.show() - self.jack_scroll.set_size_request(-1,200) - self.jack_scroll.show() - self.jack_lsp_refresh.show() - - self.jack_ebox=gtk.EventBox() - self.jack_ebox.add(self.jack_box) - self.jack_box.show() - - sep1=gtk.HSeparator() - - self.labelbox[2].pack_start(sep1,expand=False,fill=False) - self.labelbox[2].pack_start(self.jack_ebox,expand=True,fill=True) - sep1.show() - self.jack_ebox.show() - - - self.channelsAdjustment=gtk.Adjustment(value=self.values[7], lower=1,upper=2, step_incr=1, page_incr=1, page_size=1) - self.channelsSpinButton= gtk.SpinButton(self.channelsAdjustment, climb_rate=0.5, digits=0) - self.channelsSpinButton.show() - self.boxes[7].pack_end(self.channelsSpinButton,expand=False,fill=False) - - - self.freqAdjustment=gtk.Adjustment(value=self.values[8], lower=0,upper=48000, step_incr=1, page_incr=100, page_size=0) - self.freqSpinButton= gtk.SpinButton(self.freqAdjustment, climb_rate=0.5, digits=0) - self.freqSpinButton.show() - self.boxes[8].pack_end(self.freqSpinButton,expand=False,fill=False) - - - self.deviceEntry= gtk.Entry(max=0) - self.deviceEntry.set_text(self.values[9]) - self.deviceEntry.show() - self.boxes[9].pack_end(self.deviceEntry,expand=False,fill=False) - -#misc page - for i in xrange(10,19): - self.labels[i]=gtk.Label(prefLabelStrings[i]) - self.labels[i].set_justify(gtk.JUSTIFY_LEFT) - self.boxes[i]=gtk.HBox(homogeneous=False, spacing=0) - self.boxes[i].pack_start(self.labels[i],expand=False,fill=False) - self.labels[i].show() - self.eboxes[i]=gtk.EventBox() - self.eboxes[i].add(self.boxes[i]) - self.labelbox[3].pack_start(self.eboxes[i],expand=False,fill=False) - - self.displayEntry= gtk.Entry(max=0) - self.displayEntry.set_text(self.values[12]) - self.displayEntry.show() - self.boxes[10].pack_end(self.displayEntry,expand=False,fill=False) - - - self.mouseComboBox = gtk.combo_box_new_text() - for i in range(4): - self.mouseComboBox.append_text(prefMouseStrings[i]) - self.mouseComboBox.set_active(self.values[1]) - self.mouseComboBox.show() - self.boxes[11].pack_end(self.mouseComboBox,expand=False,fill=False) - - self.followMouseComboBox = gtk.CheckButton(" ") - self.followMouseComboBox.set_active(int(not self.values[15])) - self.followMouseComboBox.show() - self.boxes[12].pack_end(self.followMouseComboBox,expand=False,fill=False) - - self.sharedComboBox = gtk.CheckButton(" ") - self.sharedComboBox.set_active(int(not self.values[13])) - self.sharedComboBox.show() - self.boxes[13].pack_end(self.sharedComboBox,expand=False,fill=False) - - self.winDecoComboBox = gtk.CheckButton(" ") - self.winDecoComboBox.set_active(int(not self.values[21])) - self.winDecoComboBox.show() - self.boxes[14].pack_end(self.winDecoComboBox,expand=False,fill=False) - - self.tooltipsComboBox = gtk.CheckButton(" ") - self.tooltipsComboBox.set_active(int(not self.values[24])) - self.tooltipsComboBox.show() - self.boxes[15].pack_end(self.tooltipsComboBox,expand=False,fill=False) - - - self.rFrameComboBox = gtk.CheckButton(" ") - self.rFrameComboBox.set_active(int(not self.values[25])) - self.rFrameComboBox.show() - self.boxes[16].pack_end(self.rFrameComboBox,expand=False,fill=False) - - self.areaResetComboBox = gtk.CheckButton(" ") - self.areaResetComboBox.set_active(int(not self.values[14])) - self.areaResetComboBox.show() - self.boxes[17].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[18].pack_end(self.extraOptsEntry,expand=False,fill=False) - - for i in range(19): - self.boxes[i].show() - self.eboxes[i].show() - -#append and show - for i in range(4): - self.notebook.append_page(self.labelbox[i],gtk.Label(prefTabStrings[i])) - self.window.add(self.notebook) - for i in range(4): - self.labelbox[i].show() - self.notebook.show() - def __runJackLSP__(self,button=None): - if button!=None: - self.__getSelectedPorts__() - self.ports=[] - failed=0 - (stdin,stdout,stderr)=os.popen3(['jack_lsp'],'t') - ports=stdout.readlines() - stdin.close() - stdout.close() - stderr.close() - self.jack_lsp_liststore.clear() - self.jack_lsp_listview.get_selection().unselect_all() - if ports!=[]: - for i in ports: - self.ports.append(i.replace('\n',"")) - self.jack_lsp_listview.get_selection().set_mode(gtk.SELECTION_MULTIPLE) - else: - failed=1 - self.ports.append(prefStrings['JackLspS1']) - self.ports.append(prefStrings['JackLspS2']) - self.jack_lsp_listview.get_selection().set_mode(gtk.SELECTION_NONE) - self.values[23]=[] - k=0 - for i in self.values[23]: - self.jack_lsp_liststore.append([i]) - self.jack_lsp_listview.get_selection().select_path((k,)) - k+=1 - for i in self.ports: - if i not in self.values[23]: - self.jack_lsp_liststore.append([i]) - #we are selecting the first one to prevent messing the args - if (not failed) and self.values[23]==[]: - self.jack_lsp_listview.get_selection().select_path((0,)) - #print self.jack_lsp_listview.get_selection().get_selected_rows() - - def __workdirSelect__(self,Event=None): - p=gtk.FileChooserDialog(title=None, - action=gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, - buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN,gtk.RESPONSE_OK) - ) - p.set_filename(self.workdirEntry.get_text()) - if p.run()==gtk.RESPONSE_OK: - tpath=p.get_filename() - if tpath!= '': - self.workdirEntry.set_text(tpath) - p.hide() - p.destroy() - - def __makeCons__(self): - self.jack_button.connect("clicked",self.__jack_enabled_check__) - self.jack_lsp_refresh.connect("clicked",self.__runJackLSP__) - self.workdir_button.connect("clicked",self.__workdirSelect__) - - def __register_shortcuts__(self): - self.parent.advanced_button.add_accelerator("clicked",self.accel_group, - ord('P'), gtk.gdk.CONTROL_MASK, - gtk.ACCEL_VISIBLE) - self.parent.advanced_button.add_accelerator("clicked",self.accel_group, - gtk.gdk.keyval_from_name("Escape"),0, - gtk.ACCEL_VISIBLE) - - def __jack_enabled_check__(self,widget): - self.channelsSpinButton.set_sensitive(not widget.get_active()) - self.freqSpinButton.set_sensitive(not widget.get_active()) - self.deviceEntry.set_sensitive(not widget.get_active()) - self.jack_lsp_listview.set_sensitive(widget.get_active()) - self.jack_lsp_refresh.set_sensitive(widget.get_active()) - - def __init__(self,parent,values,optionsOpen): - self.values=values - self.ports=[] - self.parent=parent - self.optionsOpen=optionsOpen - self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) - self.window.connect("destroy", self.destroy) - self.window.set_border_width(10) - self.window.set_title("recordMyDesktop: "+smplButtonStrings[0]) - self.accel_group = gtk.AccelGroup() - self.window.add_accel_group(self.accel_group) - - self.__subWidgets__() - self.__makeCons__() - self.__register_shortcuts__() - self.__runJackLSP__() - self.__jack_enabled_check__(self.jack_button) - if self.values[24]==0: - self.__tooltips__() - self.window.show() - - def main(self): - gtk.main() - - - - - - - - diff --git a/gtk-recordmydesktop/src/rmdSelect.py b/gtk-recordmydesktop/src/rmdSelect.py deleted file mode 100644 index cf03403..0000000 --- a/gtk-recordmydesktop/src/rmdSelect.py +++ /dev/null @@ -1,139 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Istanbul - a desktop session recorder -# Copyright (C) 2005 Zaheer Abbas Merali (zaheerabbas at merali dot org) -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Headers in this file shall remain intact. - -#This file has been modified to be used in gtk-recordMyDesktop -#by John Varouhakis -#area_return list has been added to retrieve the values -#original file name is select.py in Istanbul-0.2.1 -import gtk -import gtk.gdk - -class GtkAreaSelector(gtk.Window): - def __init__(self,area_return): - self.area_return=area_return - gtk.Window.__init__(self) - self.set_app_paintable(True) - self.fullscreen() - self.connect("expose-event", self.expose_cb) - self.connect("button-press-event", self.button_press_cb) - self.connect("button-release-event", self.button_release_cb) - self.connect("motion-notify-event", self.motion_notify_cb) - self.connect("delete-event", self.delete_cb) - self.connect("realize", self.realize_cb) - root = gtk.gdk.get_default_root_window() - (width, height) = root.get_size() - self.root = root.get_image(0, 0, width, height) - self.x1 = self.y1 = -1 - self.x2 = self.y2 = 0 - self.show_all() - - def realize_cb(self, widget): - gdkwindow = self.window - gdkwindow.set_events(gdkwindow.get_events() | - gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.BUTTON_RELEASE_MASK | - gtk.gdk.POINTER_MOTION_MASK); - cursor = gtk.gdk.Cursor(gtk.gdk.CROSSHAIR) - gdkwindow.set_cursor(cursor) - gdkwindow.set_back_pixmap(None, False) - - def expose_cb(self, widget, event): - dashes = [ 1.0, 2.0 ] - cr = self.window.cairo_create() - cr.rectangle(event.area.x, event.area.y, event.area.width, - event.area.height) - cr.clip() - self.window.draw_image(self.style.black_gc, self.root, event.area.x, - event.area.y, event.area.x, event.area.y, event.area.width, - event.area.height) - cr.set_line_width(1.0) - cr.set_source_rgba (1.0, 0.0, 0.0, 1.0) - cr.set_dash (dashes, 0.0) - cr.move_to (self.x1 - 0.5, 0.0) - cr.line_to (self.x1 - 0.5, event.area.y + event.area.height) - cr.move_to (0.0, self.y1 - 0.5) - cr.line_to (event.area.x + event.area.width, self.y1 - 0.5) - cr.stroke () - - if self.x1 >= 0: - x = min(self.x1, self.x2) - y = min(self.y1, self.y2) - w = max(self.x1, self.x2) - x - h = max(self.y1, self.y2) - y - cr.set_dash ([], 0.0) - cr.rectangle ( x, y, w, h) - cr.fill() - cr.set_source_rgba (0.0, 0.0, 0.5, 0.5) - cr.rectangle (x + 0.5, y + 0.5, w - 1, h - 1) - cr.stroke() - - return False - - def motion_notify_cb(self, widget, event): - self.queue_draw() - - if self.x1 >= 0: - rect = gtk.gdk.Rectangle() - rect.x = min(self.x1, min(self.x2, event.x + 1)) - rect.width = max(self.x1, max(self.x2, event.x + 1)) - rect.x - rect.y = min(self.y1, min(self.y2, event.y + 1)) - rect.height = max(self.y1, max(self.y2, event.y + 1)) - rect.y - self.queue_draw_area(rect.x, rect.y, rect.width, rect.height) - - self.x2 = event.x + 1 - self.y2 = event.y + 1 - - return True - - def button_release_cb(self, widget, event): - if event.button == 1 and self.x1 >= 0: - self.x2 = event.x + 1 - self.y2 = event.y + 1 - # stop - self.area_return[0]=min(int(self.x1),int(self.x2)) - self.area_return[1]=min(int(self.y1),int(self.y2)) - self.area_return[2]=max(int(self.x1),int(self.x2)) - self.area_return[3]=max(int(self.y1),int(self.y2)) - self.hide() - self.destroy() - - return True - - def button_press_cb(self, widget, event): - if event.button != 1: - self.x1 = self.y1 = -1 - # stop - #print "(%d, %d) - (%d, %d)" % (self.x1, self.y1, self.x2, self.y2) - #self.area_return[0]=self.x1 - #self.area_return[1]=self.y1 - #self.area_return[2]=self.x2 - #self.area_return[3]=self.y2 - #print self.area_return - self.destroy() - return True - self.x1 = event.x - self.y1 = event.y - self.queue_draw() - return True - - def delete_cb(self, widget,Event=None): - pass - -if __name__ == "__main__": - w = GtkAreaSelector() - w.show() - gtk.main() - - diff --git a/gtk-recordmydesktop/src/rmdSelectThumb.py b/gtk-recordmydesktop/src/rmdSelectThumb.py deleted file mode 100755 index b9533aa..0000000 --- a/gtk-recordmydesktop/src/rmdSelectThumb.py +++ /dev/null @@ -1,250 +0,0 @@ -# -*- Mode: Python -*- -# vi:si:et:sw=4:sts=4:ts=4 -# -# Istanbul - a desktop session recorder -# Copyright (C) 2005 Zaheer Abbas Merali (zaheerabbas at merali dot org) -# All rights reserved. - -# This file may be distributed and/or modified under the terms of -# the GNU General Public License version 2 as published by -# the Free Software Foundation. -# This file is distributed without any warranty; without even the implied -# warranty of merchantability or fitness for a particular purpose. -# See "LICENSE.GPL" in the source distribution for more information. - -# Headers in this file shall remain intact. - -#This file has been modified to be used in gtk-recordMyDesktop -#by John Varouhakis - -#Base class is DrawingArea instead of Window to allow insertion. -#new methods: -# update_image to keep the screenshot current. -# __subsample__ to scale the screenshot -# __draw_lines__ to highlight the selected area. -#Calls to destroy have been removed, since this widget is meant to -#live for an indefinite amount of time. -#Click behavior has been changed. Selection now happens by left-click and dragging, -#while right click resets the selection. - - -#original file name is select.py in Istanbul-0.2.1 - - -import gtk -import gtk.gdk -from rmdFrame import * -import gobject -import gc - -class GtkThumbSelector(gtk.DrawingArea): - def __init__(self,caller,area_return,hidden,update_interval=2000): - self.hidden=hidden - self.area_return=area_return - self.selecting=0 - self.realFrame=None - self.caller=caller - gtk.DrawingArea.__init__(self) - self.set_app_paintable(True) - #self.fullscreen() - self.connect("expose-event", self.expose_cb) - self.connect("button-press-event", self.button_press_cb) - self.connect("button-release-event", self.button_release_cb) - self.connect("motion-notify-event", self.motion_notify_cb) - #self.connect("delete-event", self.delete_cb) - self.connect("realize", self.realize_cb) - #root = gtk.gdk.get_default_root_window() - self.wroot = gtk.gdk.get_default_root_window() - (self.wwidth, self.wheight) = self.wroot.get_size() - ############################################################### - - self.factor=1; - twidth=self.wwidth - while twidth>320 or self.factor<4: - twidth/=2 - self.factor*=2 - self.root=gtk.gdk.Image(gtk.gdk.IMAGE_NORMAL,self.wroot.get_visual(),self.wwidth/self.factor,self.wheight/self.factor) - #(width, height) = root.get_size() - sroot = self.wroot.get_image(0, 0, self.wwidth, self.wheight) - self.__subsample__(sroot,self.wwidth,self.wheight,self.root,self.factor) - #self.root = root.get_image(0, 0, width, height) - self.x1 = self.y1 = -1 - self.x2 = self.y2 = -1 - self.set_size_request(self.wwidth/self.factor,self.wheight/self.factor) - self.timed_id=gobject.timeout_add(update_interval,self.update_image) - - def __subsample__(self,im1,w,h,im2,stride,x=0,y=0): - for i in xrange(y,h,stride): - for k in xrange(x,w,stride): - im2.put_pixel(k/stride,i/stride,im1.get_pixel(k,i)) - def button_release_cb(self, widget, event): - if event.button == 1 and self.x1 >= 0 and widget==self: - self.selecting=0 - self.x2 = event.x + 1 - self.y2 = event.y + 1 - # stop - if self.x1 <0: self.x1=0 - if self.x2 <0: self.x2=0 - if self.y1 <0: self.y1=0 - if self.y2 <0: self.y2=0 - if self.x1 >self.wwidth/self.factor: self.x1=self.wwidth/self.factor - if self.x2 >self.wwidth/self.factor: self.x2=self.wwidth/self.factor - if self.y1 >self.wheight/self.factor: self.y1=self.wheight/self.factor - if self.y2 >self.wheight/self.factor: self.y2=self.wheight/self.factor - - - self.area_return[0]=min(int(self.x1),int(self.x2))*self.factor - self.area_return[1]=min(int(self.y1),int(self.y2))*self.factor - self.area_return[2]=max(int(self.x1),int(self.x2))*self.factor - self.area_return[3]=max(int(self.y1),int(self.y2))*self.factor - self.x1=self.y1=self.x2=self.y2=-1 - #print self.area_return - self.update_image() - - def button_press_cb(self, widget, event): - if widget==self: - if event.button == 1: - self.selecting=1 - self.update_image() - self.x1 = event.x - self.y1 = event.y - else: - self.x1 = self.y1=self.x2=self.y2=-1 - self.area_return[0]=self.area_return[1]=0 - self.area_return[2]=self.wwidth - self.area_return[3]=self.wheight - self.update_image() - - def realize_cb(self, widget): - if widget == self: - gdkwindow = self.window - gdkwindow.set_events(gdkwindow.get_events() | - gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.BUTTON_RELEASE_MASK | - gtk.gdk.POINTER_MOTION_MASK); - cursor = gtk.gdk.Cursor(gtk.gdk.CROSSHAIR) - gdkwindow.set_cursor(cursor) - gdkwindow.set_back_pixmap(None, False) - - def expose_cb(self, widget, event): - if widget==self: - dashes = [ 1.0, 2.0 ] - cr = self.window.cairo_create() - cr.rectangle(event.area.x, event.area.y, event.area.width, - event.area.height) - cr.clip() - self.window.draw_image(self.style.black_gc, self.root, event.area.x, - event.area.y, event.area.x, event.area.y, event.area.width, - event.area.height) - cr.set_line_width(1.0) - cr.set_source_rgba (1.0, 0.0, 0.0, 1.0) - cr.set_dash (dashes, 0.0) - cr.move_to (self.x1 - 0.5, 0.0) - cr.line_to (self.x1 - 0.5, event.area.y + event.area.height) - cr.move_to (0.0, self.y1 - 0.5) - cr.line_to (event.area.x + event.area.width, self.y1 - 0.5) - cr.stroke () - - if self.x1 >= 0: - x = min(self.x1, self.x2) - y = min(self.y1, self.y2) - w = max(self.x1, self.x2) - x - h = max(self.y1, self.y2) - y - cr.set_dash ([], 0.0) - cr.rectangle ( x, y, w, h) - cr.fill() - cr.set_source_rgba (0.0, 0.0, 0.5, 0.5) - cr.rectangle (x + 0.5, y + 0.5, w - 1, h - 1) - cr.stroke() - - return False - - def motion_notify_cb(self, widget, event): - if widget ==self: - self.queue_draw() - - if self.x1 >= 0 : - rect = gtk.gdk.Rectangle() - rect.x = min(self.x1, min(self.x2, event.x + 1)) - rect.width = max(self.x1, max(self.x2, event.x + 1)) - rect.x - rect.y = min(self.y1, min(self.y2, event.y + 1)) - rect.height = max(self.y1, max(self.y2, event.y + 1)) - rect.y - self.queue_draw_area(rect.x, rect.y, rect.width, rect.height) - - self.x2 = event.x + 1 - self.y2 = event.y + 1 - - return True - - def update_image(self): - #self.root.destroy() - self.queue_draw() - if self.hidden[0]==0 : - gc.collect() - sroot = self.wroot.get_image(0,0,self.wwidth,self.wheight) - self.__subsample__(sroot,self.wwidth,self.wheight,self.root,self.factor) - vals=[0,0, self.wwidth, self.wheight] - if self.area_return[0]>=0: - vals[0]=self.area_return[0] - if self.area_return[1]>=0: - vals[1]=self.area_return[1] - if self.area_return[2]>=0: - vals[2]=self.area_return[2]-self.area_return[0] - if self.area_return[3]>=0: - vals[3]=self.area_return[3]-self.area_return[1] - if vals[0] >0 or vals[1] >0 or vals[2]