text: Q:
  
  Python GTK. How to continiously show dialog?
  
  I want to display Dialog over custom Dialog with Listbox. If selected choice in ListBox is wrong, show message and allow to choose the right answer again. I have written this demo code to demonstrate the problem:
  import gi
  gi.require_version('Gtk', '3.0')
  from gi.repository import Gtk
  from ListBoxRowWithData import ListBoxRowWithData
  import shutil
  from InterfaceChooserDialog import InterfaceChooserDialog
  import netifaces as ni
  
  class InterfaceChooserDialog(Gtk.Dialog):
      def __init__(self, parent):
          Gtk.Dialog.__init__(self, "Choose interface", parent, 0,
              (Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,
                  Gtk.STOCK_OK, Gtk.ResponseType.OK))
          self.connect("response", self.on_response)
  
          wrapper_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
          description_label = Gtk.Label("Select one")
          wrapper_box.pack_start(description_label, False, False, 0)
          self.listbox = Gtk.ListBox()
          strings = ["12", "22", "32"]
  
          for single_string in strings:
              row = Gtk.ListBoxRow()
              row.string = single_string
              hbox = Gtk.Box(orientation=Gtk.Orientation.HORIZONTAL, spacing=50)
              row.add(hbox)
              label = Gtk.Label(single_string, xalign=0)
              hbox.pack_start(label, True, True, 0)
              self.listbox.add(row)
  
          self.selected_interface = self.listbox.get_row_at_index(0)
          self.listbox.select_row(self.selected_interface)
          wrapper_box.pack_start(self.listbox, False, False, 0)
          box = self.get_content_area()
          box.add(wrapper_box)
          self.show_all()
  
      def on_response(self, widget, response_id):
          self.selected_one = self.listbox.get_selected_row()
  
      def get_selected_string(self):
          return self.selected_one.string
  
  class MyWindow(Gtk.Window):
      def __init__(self):
          Gtk.Window.__init__(self, title="Example")
          self.set_default_size(600, 480)
          dialog = InterfaceChooserDialog(self)
          response = dialog.run()
          if response == Gtk.ResponseType.OK: 
              selected_string = dialog.get_selected_string() 
              print("Selected string", selected_string)
              if selected_string == 12: 
                  print("selected")
                  dialog.destroy()
              else:
                  dialog_wrong = Gtk.MessageDialog(self, 0, Gtk.MessageType.INFO,
                          Gtk.ButtonsType.OK, "This is wrong. Select 12")
                  dialog_wrong.run()
                  dialog_wrong.destroy()
  
          elif response == Gtk.ResponseType.CANCEL:
              dialog.destroy()
  
  win = MyWindow()
  win.connect("destroy", Gtk.main_quit)
  win.show_all()
  
  But it doesn't allow to show the custom Dialog to show multiple times. How can I solve this issue?
  
  A:
  
  You need to run Gtk.main() at the end so the main loop starts to run and the program doesn't quit after the dialog is shown.
  If you do that, you probably also want to run win.show() in the constructor so the window does not appear after the dialog.
  
  