def __init__(self,parent, title, message, button1, button2):
        Toplevel.__init__(self,parent)
        self.transient(parent)
        self.parent = parent
        self.title(title)
        body = Frame(self)
        self.initial_focus = self.body(body, message)
        body.pack(padx=4, pady=4)
        self.buttonbox(button1, button2)
        self.grab_set()

        if not self.initial_focus:
            self.initial_focus = self
        
        self.protocol("WM_DELETE_WINDOW", self.button2)
        Utilities.center_window(self)
        self.initial_focus.focus_set()
        self.deiconify()
        self.wait_window(self)
 def __init__(self, parent, candidate_uuid='new'):
     Toplevel.__init__(self, parent)
     # create a transient window on top of parent window
     self.transient(parent) 
     self.parent = parent
     self.title(MultiLanguage.data_window_title)  #TODO find a better title for the thing
     body = Frame(self)
     self.initial_focus = self.body(body, candidate_uuid)
     body.pack(padx=5, pady=5)
     
     self.button_box()
     self.grab_set()
     if not self.initial_focus:
         self.initial_focus = self
     self.protocol("WM_DELETE_WINDOW", self.closedialog)
     Utilities.center_window(self)
     self.initial_focus.focus_set()
     # self.deiconify()
     self.wait_window(self)