Commit 878f0458 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist

Remove unused Dialog

parent bf207395
Pipeline #3690 passed with stages
in 2 minutes and 37 seconds
......@@ -997,48 +997,6 @@ class TransformChatToMUC:
def on_cancel_button_clicked(self, widget):
self.window.destroy()
class Dialog(Gtk.Dialog):
def __init__(self, parent, title, buttons, default=None,
on_response_ok=None, on_response_cancel=None):
super().__init__(title=title,
transient_for=parent,
destroy_with_parent=True)
self.user_response_ok = on_response_ok
self.user_response_cancel = on_response_cancel
self.set_border_width(6)
self.get_content_area().set_spacing(12)
self.set_resizable(False)
for stock, response in buttons:
self.add_button(stock, response)
if default is not None:
self.set_default_response(default)
else:
self.set_default_response(buttons[-1][1])
self.connect('response', self.on_response)
def on_response(self, widget, response_id):
if response_id == Gtk.ResponseType.OK:
if self.user_response_ok:
if isinstance(self.user_response_ok, tuple):
self.user_response_ok[0](*self.user_response_ok[1:])
else:
self.user_response_ok()
self.destroy()
elif response_id == Gtk.ResponseType.CANCEL:
if self.user_response_cancel:
if isinstance(self.user_response_cancel, tuple):
self.user_response_cancel[0](*self.user_response_ok[1:])
else:
self.user_response_cancel()
self.destroy()
def just_destroy(self, widget):
self.destroy()
class ResourceConflictDialog(TimeoutDialog, InputDialog):
def __init__(self, title, text, resource, ok_handler):
......@@ -1052,7 +1010,6 @@ class ResourceConflictDialog(TimeoutDialog, InputDialog):
self.on_okbutton_clicked(None)
class VoIPCallReceivedDialog:
instances = {} # type: Dict[Tuple[str, str], VoIPCallReceivedDialog]
def __init__(self, account, contact_jid, sid, content_types):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment