Logo Search packages:      
Sourcecode: viridian version File versions  Download package

def AmpacheTools::AmpacheGUI::AmpacheGUI::create_dialog_alert (   self,
  dialog_type,
  message,
  ok = False 
)

Dialogs.

Creates a generic dialog of the type specified with close.

Definition at line 2655 of file AmpacheGUI.py.

                                                                   :
            """Creates a generic dialog of the type specified with close."""
            if dialog_type == "warn": 
                  dialog_type = gtk.MESSAGE_WARNING
            elif dialog_type == "error":
                  dialog_type = gtk.MESSAGE_ERROR
            elif dialog_type == "info":
                  dialog_type = gtk.MESSAGE_INFO
            elif dialog_type == "question":
                  dialog_type = gtk.MESSAGE_QUESTION
            else:
                  return False
            if ok == True: # display OK button
                  md = gtk.MessageDialog(self.window, gtk.DIALOG_DESTROY_WITH_PARENT, dialog_type, gtk.BUTTONS_OK, message)
            else: # display Close button
                  md = gtk.MessageDialog(self.window, gtk.DIALOG_DESTROY_WITH_PARENT, dialog_type, gtk.BUTTONS_CLOSE, message)
            md.set_title('Viridian')
            md.set_icon(self.images_pixbuf_viridian_simple)
            md.run()
            md.destroy()
      

Generated by  Doxygen 1.6.0   Back to index