Make InfoDialog non modal
svn: r17680
This commit is contained in:
parent
516b184925
commit
5acfb94f9d
@ -240,7 +240,7 @@ class OkDialog(gtk.MessageDialog):
|
|||||||
|
|
||||||
class InfoDialog(object):
|
class InfoDialog(object):
|
||||||
"""
|
"""
|
||||||
Dialog to show selectable info in a scrolled window
|
Non modal dialog to show selectable info in a scrolled window
|
||||||
"""
|
"""
|
||||||
def __init__(self, msg1, infotext, parent=None):
|
def __init__(self, msg1, infotext, parent=None):
|
||||||
self.xml = Glade(toplevel='infodialog')
|
self.xml = Glade(toplevel='infodialog')
|
||||||
@ -260,13 +260,12 @@ class InfoDialog(object):
|
|||||||
|
|
||||||
if parent:
|
if parent:
|
||||||
self.top.set_transient_for(parent)
|
self.top.set_transient_for(parent)
|
||||||
|
self.top.connect('response', self.destroy)
|
||||||
self.top.show()
|
self.top.show()
|
||||||
self.response = self.top.run()
|
|
||||||
#no matter how it finishes, destroy dialog
|
|
||||||
self.top.destroy()
|
|
||||||
|
|
||||||
def get_response(self):
|
def destroy(self, dialog, response_id):
|
||||||
return self.response
|
#no matter how it finishes, destroy dialog
|
||||||
|
dialog.destroy()
|
||||||
|
|
||||||
class MissingMediaDialog(object):
|
class MissingMediaDialog(object):
|
||||||
def __init__(self, msg1, msg2, task1, task2, task3, parent=None):
|
def __init__(self, msg1, msg2, task1, task2, task3, parent=None):
|
||||||
|
@ -470,7 +470,7 @@
|
|||||||
<property name="layout_style">end</property>
|
<property name="layout_style">end</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="button182">
|
<object class="GtkButton" id="button182">
|
||||||
<property name="label">gtk-ok</property>
|
<property name="label">gtk-close</property>
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">True</property>
|
||||||
<property name="can_default">True</property>
|
<property name="can_default">True</property>
|
||||||
@ -494,7 +494,7 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<action-widgets>
|
<action-widgets>
|
||||||
<action-widget response="-5">button182</action-widget>
|
<action-widget response="-7">button182</action-widget>
|
||||||
</action-widgets>
|
</action-widgets>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkDialog" id="missmediadialog">
|
<object class="GtkDialog" id="missmediadialog">
|
||||||
|
Loading…
Reference in New Issue
Block a user