diff options
author | Cole Robinson <crobinso@redhat.com> | 2013-06-14 14:11:55 -0400 |
---|---|---|
committer | Cole Robinson <crobinso@redhat.com> | 2013-06-14 14:28:04 -0400 |
commit | 3889bc480be87f0352c1fdecdf2758fc50e02045 (patch) | |
tree | 987ee224c3974f37027feb2add91fe460e55727a | |
parent | 8914a61689b386451e86220a43e4de5b3776f942 (diff) | |
download | virt-manager-3889bc480be87f0352c1fdecdf2758fc50e02045.tar.gz |
asyncjob: Fix dialog closing and progress bar pulsing
After the recent cleanups
-rw-r--r-- | virtManager/asyncjob.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/virtManager/asyncjob.py b/virtManager/asyncjob.py index e3104ce9..1e6f6d40 100644 --- a/virtManager/asyncjob.py +++ b/virtManager/asyncjob.py @@ -316,15 +316,21 @@ class vmmAsyncJob(vmmGObjectUI): def _exit_if_necessary(self): if not self._is_thread_active(): + if self.async: + Gtk.main_quit() return False if not self._is_pulsing or not self.show_progress: return True - self._pbar_pulse() + self._pbar_do_pulse() return True @idle_wrapper + def _pbar_do_pulse(self): + self.widget("pbar").pulse() + + @idle_wrapper def _pbar_pulse(self, progress="", stage=None): self._is_pulsing = True self.widget("pbar").set_text(progress) |