diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2020-07-11 16:47:00 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2020-07-11 16:47:00 -0700 |
commit | 3625160acc1715fc380f58ec3c4248485bed2370 (patch) | |
tree | dc95a32d81daac298cef69879a639029797fb762 /qt-recordmydesktop/src/rmdMonitor.py | |
parent | cfcca8681b88a171fb2cdbb83daa5f22bbedb6b8 (diff) |
*: 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.
Diffstat (limited to 'qt-recordmydesktop/src/rmdMonitor.py')
-rw-r--r-- | qt-recordmydesktop/src/rmdMonitor.py | 120 |
1 files changed, 0 insertions, 120 deletions
diff --git a/qt-recordmydesktop/src/rmdMonitor.py b/qt-recordmydesktop/src/rmdMonitor.py deleted file mode 100644 index a647e9c..0000000 --- a/qt-recordmydesktop/src/rmdMonitor.py +++ /dev/null @@ -1,120 +0,0 @@ -#/****************************************************************************** -#* qt-recordMyDesktop * -#******************************************************************************* -#* * -#* Copyright (C) 2007, 2008 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 3 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, see <http://www.gnu.org/licenses/>. * -#* * -#* * -#* For further information contact me at johnvarouhakis@gmail.com * -#******************************************************************************/ - - -from PyQt4 import QtGui,QtCore -import locale, gettext -import rmdConfig -def _(s): - return QtCore.QString.fromUtf8(gettext.gettext(s)) - -gettext.textdomain('qt-recordMyDesktop') -gettext.bindtextdomain('qt-recordMyDesktop',rmdConfig.locale_install_dir) -import popen2 -import os,fcntl,signal -from rmdStrings import * - -class rmdMonitor(QtGui.QDialog): - labeString=monStrings['PleaseWait'] - - counter_fraction=0.0 - - def closeEvent(self,Event=None): - self.timed_id.stop() - self.stop_encoding() - def destroy(self,Event=None): - self.close() - exit_ret=os.waitpid(self.rmdPid,0) - self.parent.show() - def update_counter(self): - strstdout="" - try: - strstdout=self.stdout.read() - if strstdout =='': - self.destroy() - except: - return True - try: - string=strstdout.replace("[","").replace("%] ","").replace("\n","").split("\r") - self.counter_fraction=max(self.counter_fraction,int(string.pop())) - if self.counter_fraction>100: - self.counter_fraction=100 - self.progressbar.setValue(self.counter_fraction) - self.progressbar.update() - except: - pass - - return True - def stop_encoding(self,Event=None): - try: - os.kill(self.rmdPid,signal.SIGINT) - except: - pass - def __init__(self,out_stream,childPid,parent): - self.parent=parent - flags = fcntl.fcntl(out_stream, fcntl.F_GETFL) - fcntl.fcntl(out_stream, fcntl.F_SETFL, flags | os.O_NONBLOCK) - self.rmdPid=childPid - self.stdout=out_stream - - #self.window = QtGui.QDialog() - QtGui.QDialog.__init__(self) - #self.closeEvent=self.destroy_and_kill - - self.setWindowTitle("recordMyDesktop-encoder") - - #self.frame=QtGui.QFrame() - self.label=QtGui.QLabel(self.labeString) - - self.label.setAlignment(QtCore.Qt.AlignHCenter) - - self.progressbar=QtGui.QProgressBar() - self.counter_fraction=0 - self.progressbar.setValue(self.counter_fraction) - self.stopbutton=QtGui.QPushButton(monStrings['Cancel'],self) - self.stopbutton.connect(self.stopbutton,QtCore.SIGNAL("clicked()"), - self.stop_encoding) - self.box=QtGui.QVBoxLayout() - self.box.addWidget(self.label,0) - self.box.addWidget(self.progressbar,0) - self.box.addWidget(self.stopbutton,0) - - - #self.stopbutton.show() - self.setLayout(self.box) - #self.window.setCentralWidget(self.frame) - #self.label.show() - #self.progressbar.show() - #self.window.show() - - self.timed_id=QtCore.QTimer(None) - self.timed_id.connect(self.timed_id,QtCore.SIGNAL("timeout()"), - self.update_counter) - self.timed_id.start(100) - - - - - - |