Ignore:
Timestamp:
03/31/13 09:33:45 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Implemented the GUI logic of the bug report sending (re #190)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/web.py

    r443 r484  
    794794#------------------------------------------------------------------------------
    795795
     796class SendBugReport(Request):
     797    """A request to send a bug report to the project homepage."""
     798    _latin2Encoder = codecs.getencoder("iso-8859-2")
     799
     800    def __init__(self, callback, summary, description, email):
     801        """Construct the request for the given bug report."""
     802        super(SendBugReport, self).__init__(callback)
     803        self._summary = summary
     804        self._description = description
     805        self._email = email
     806
     807    def run(self):
     808        """Perform the sending of the bug report."""
     809        time.sleep(3)
     810
     811        result = Result()
     812        result.success = True
     813
     814        return result
     815
     816#------------------------------------------------------------------------------
     817
    796818class Handler(threading.Thread):
    797819    """The handler for the web services.
     
    835857        """Send the given ACARS"""
    836858        self._addRequest(SendACARS(callback, acars))
     859
     860    def sendBugReport(self, callback, summary, description, email):
     861        """Send a bug report with the given data."""
     862        self._addRequest(SendBugReport(callback, summary, description, email))
    837863
    838864    def run(self):
Note: See TracChangeset for help on using the changeset viewer.