virt-manager/virtManager/about.py
Cole Robinson f107e39989 Switch to more traditional logging structure
Init a shared log instance in virtinst/logger.py, and use that
throughout the code base, so we aren't calling directly into
'logging'. This helps protect our logging output from being
cluttered with other library output, as happens with some
'requests' usage
2019-06-17 00:12:31 -04:00

45 lines
1.3 KiB
Python

# Copyright (C) 2006, 2013 Red Hat, Inc.
# Copyright (C) 2006 Daniel P. Berrange <berrange@redhat.com>
#
# This work is licensed under the GNU GPLv2 or later.
# See the COPYING file in the top-level directory.
from virtinst import log
from .baseclass import vmmGObjectUI
class vmmAbout(vmmGObjectUI):
@classmethod
def show_instance(cls, parentobj):
try:
if not cls._instance:
cls._instance = vmmAbout()
cls._instance.show(parentobj.topwin)
except Exception as e:
parentobj.err.show_err(
_("Error launching 'About' dialog: %s") % str(e))
def __init__(self):
vmmGObjectUI.__init__(self, "about.ui", "vmm-about")
self._cleanup_on_app_close()
self.builder.connect_signals({
"on_vmm_about_delete_event": self.close,
"on_vmm_about_response": self.close,
})
def show(self, parent):
log.debug("Showing about")
self.topwin.set_version(self.config.get_appversion())
self.topwin.set_transient_for(parent)
self.topwin.present()
def close(self, ignore1=None, ignore2=None):
log.debug("Closing about")
self.topwin.hide()
return 1
def _cleanup(self):
pass