Log dialog viewer as a separate tool
Added entry point and main() to enable using log viewer as a separate tool.
This commit is contained in:
parent
8de26419c1
commit
6b206d2050
@ -19,7 +19,7 @@
|
|||||||
# with this program; if not, see <http://www.gnu.org/licenses/>.
|
# with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
import sys
|
||||||
from PyQt4 import QtCore # pylint: disable=import-error
|
from PyQt4 import QtCore # pylint: disable=import-error
|
||||||
from PyQt4 import QtGui # pylint: disable=import-error
|
from PyQt4 import QtGui # pylint: disable=import-error
|
||||||
|
|
||||||
@ -27,6 +27,8 @@ from . import ui_logdlg # pylint: disable=no-name-in-module
|
|||||||
from . import clipboard
|
from . import clipboard
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from qubesadmin import Qubes
|
||||||
|
|
||||||
# Display only this size of log
|
# Display only this size of log
|
||||||
LOG_DISPLAY_SIZE = 1024*1024
|
LOG_DISPLAY_SIZE = 1024*1024
|
||||||
|
|
||||||
@ -65,3 +67,18 @@ class LogDialog(ui_logdlg.Ui_LogDialog, QtGui.QDialog):
|
|||||||
|
|
||||||
def copy_to_clipboard_triggered(self):
|
def copy_to_clipboard_triggered(self):
|
||||||
clipboard.copy_text_to_qubes_clipboard(self.displayed_text)
|
clipboard.copy_text_to_qubes_clipboard(self.displayed_text)
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
qubes_app = Qubes()
|
||||||
|
qt_app = QtGui.QApplication(sys.argv)
|
||||||
|
|
||||||
|
log_window = LogDialog(qubes_app, sys.argv[1])
|
||||||
|
log_window.show()
|
||||||
|
|
||||||
|
qt_app.exec_()
|
||||||
|
qt_app.exit()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
@ -66,6 +66,7 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
/usr/bin/qubes-backup
|
/usr/bin/qubes-backup
|
||||||
/usr/bin/qubes-backup-restore
|
/usr/bin/qubes-backup-restore
|
||||||
/usr/bin/qubes-qube-manager
|
/usr/bin/qubes-qube-manager
|
||||||
|
/usr/bin/qubes-log-viewer
|
||||||
/usr/libexec/qubes-manager/mount_for_backup.sh
|
/usr/libexec/qubes-manager/mount_for_backup.sh
|
||||||
/usr/libexec/qubes-manager/qvm_about.sh
|
/usr/libexec/qubes-manager/qvm_about.sh
|
||||||
|
|
||||||
|
3
setup.py
3
setup.py
@ -24,6 +24,7 @@ if __name__ == '__main__':
|
|||||||
'qubes-vm-boot-from-device = qubesmanager.bootfromdevice:main',
|
'qubes-vm-boot-from-device = qubesmanager.bootfromdevice:main',
|
||||||
'qubes-backup = qubesmanager.backup:main',
|
'qubes-backup = qubesmanager.backup:main',
|
||||||
'qubes-backup-restore = qubesmanager.restore:main',
|
'qubes-backup-restore = qubesmanager.restore:main',
|
||||||
'qubes-qube-manager = qubesmanager.qube_manager:main'
|
'qubes-qube-manager = qubesmanager.qube_manager:main',
|
||||||
|
'qubes-log-viewer = qubesmanager.log_dialog:main'
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user