From e2b46f886b7ee4fe2ec9ed1ddb1ff33b6b43091d Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 16 Mar 2013 19:47:56 +0000 Subject: [PATCH] Add modal option to ProgressMeter svn: r21661 --- src/gui/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/utils.py b/src/gui/utils.py index 77b5af05a..56853a96a 100644 --- a/src/gui/utils.py +++ b/src/gui/utils.py @@ -128,7 +128,7 @@ class ProgressMeter(object): MODE_ACTIVITY = 1 def __init__(self, title, header='', can_cancel=False, - cancel_callback=None, message_area=False): + cancel_callback=None, message_area=False, parent=None): """ Specify the title and the current pass header. """ @@ -158,6 +158,9 @@ class ProgressMeter(object): self.__dialog.vbox.set_spacing(10) self.__dialog.vbox.set_border_width(24) self.__dialog.set_size_request(400, 125) + if parent: + self.__dialog.set_transient_for(parent) + self.__dialog.set_modal(True) tlbl = gtk.Label('%s' % title) tlbl.set_use_markup(True)