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

def AmpacheTools::AmpacheGUI::AmpacheGUI::button_xml_server_clicked (   self,
  widget,
  action,
  label,
  image,
  port 
)

XML Server Buttons.

Start, stop or restart the xml server.

Definition at line 2626 of file AmpacheGUI.py.

                                                                             :
            """Start, stop or restart the xml server."""
            if self.xml_server.is_running: # xml server is running
                  if action == "start":
                        return False
            else:
                  if action == "stop":
                        return False
            if port.get_text().isdigit():
                  self.db_session.variable_set('xmlrpc_port', int(port.get_text()))
            if action == "start":
                  self.start_xml_server()
            elif action == "stop":
                  self.stop_xml_server()
            elif action == "restart":
                  self.restart_xml_server()
                  
            # update the gui
            if self.xml_server.is_running:
                  image.set_from_stock(gtk.STOCK_YES,gtk.ICON_SIZE_SMALL_TOOLBAR)
                  label.set_text(_("Running. (port %d)" % self.xml_server.port))
            else:
                  image.set_from_stock(gtk.STOCK_NO,gtk.ICON_SIZE_SMALL_TOOLBAR)
                  label.set_text(_("Not Running."))
            
      

Generated by  Doxygen 1.6.0   Back to index