Index: src/mlx/gui/common.py
===================================================================
--- src/mlx/gui/common.py	(revision 837)
+++ src/mlx/gui/common.py	(revision 846)
@@ -326,4 +326,9 @@
         else:
             return 0
+
+    @property
+    def minutes(self):
+        """Get the time in minutes, i.e. hour*60+minute."""
+        return self.hour * 60 + self.minute
 
     def setTimestamp(self, timestamp):
Index: src/mlx/gui/info.py
===================================================================
--- src/mlx/gui/info.py	(revision 844)
+++ src/mlx/gui/info.py	(revision 846)
@@ -54,9 +54,9 @@
         return (frame, comments)
 
-    def __init__(self, gui, mainInstance = True):
+    def __init__(self, gui, callbackObject = None):
         """Construct the flight info tab."""
         super(FlightInfo, self).__init__()
         self._gui = gui
-        self._mainInstance = mainInstance
+        self._callbackObject = callbackObject
 
         self._commentsAlignment = gtk.Alignment(xalign = 0.5, yalign = 0.5,
@@ -184,14 +184,20 @@
     def delayCodesChanged(self):
         """Callewd when the delay codes have changed."""
-        if self._mainInstance:
+        if self._callbackObject is None:
             self._gui.delayCodesChanged()
+        else:
+            self._callbackObject.delayCodesChanged()
 
     def _commentsChanged(self, textbuffer):
         """Called when the comments have changed."""
-        if self._mainInstance:
+        if self._callbackObject is None:
             self._gui.commentsChanged()
+        else:
+            self._callbackObject.commentsChanged()
 
     def _faultExplanationsChanged(self, faultExplainWidget, fullyExplained):
         """Called when the status of the fault explanations has changed."""
-        if self._mainInstance:
+        if self._callbackObject is None:
             self._gui.faultExplanationsChanged()
+        else:
+            self._callbackObject.faultExplanationsChanged()
Index: src/mlx/gui/pirep.py
===================================================================
--- src/mlx/gui/pirep.py	(revision 845)
+++ src/mlx/gui/pirep.py	(revision 846)
@@ -6,4 +6,5 @@
 
 from mlx.pirep import PIREP
+from mlx.flight import Flight
 from mlx.const import *
 
@@ -692,4 +693,6 @@
         self._gui = gui
 
+        self._pirep = None
+
         contentArea = self.get_content_area()
 
@@ -715,4 +718,6 @@
         self._notebook.append_page(logTab, label)
 
+        self.add_button(xstr("button_cancel"), RESPONSETYPE_CANCEL)
+
         self._okButton = self.add_button(xstr("button_ok"), RESPONSETYPE_OK)
         self._okButton.set_can_default(True)
@@ -720,4 +725,6 @@
     def setPIREP(self, pirep):
         """Setup the data in the dialog from the given PIREP."""
+        self._pirep = pirep
+
         bookedFlight = pirep.bookedFlight
 
@@ -835,4 +842,18 @@
         self._okButton.grab_default()
 
+        self._updateButtons()
+
+    def delayCodesChanged(self):
+        """Called when the delay codes have changed."""
+        self._updateButtons()
+
+    def commentsChanged(self):
+        """Called when the comments have changed."""
+        self._updateButtons()
+
+    def faultExplanationsChanged(self):
+        """Called when the fault explanations have changed."""
+        self._updateButtons()
+
     def _buildDataTab(self):
         """Build the data tab of the viewer."""
@@ -932,5 +953,4 @@
                                     xstr("pirepView_numPassengers"),
                                     width = 4)
-
         self._numCrew = \
             PIREPViewer.tableAttach(table, 1, 0,
@@ -981,4 +1001,5 @@
         #self._filedCruiseLevel.set_tooltip_text(xstr("route_level_tooltip"))
         self._filedCruiseLevel.set_numeric(True)
+        self._filedCruiseLevel.connect("value-changed", self._updateButtons)
 
         levelBox.pack_start(self._filedCruiseLevel, False, False, 0)
@@ -995,4 +1016,5 @@
         #self._modifiedCruiseLevel.set_tooltip_text(xstr("route_level_tooltip"))
         self._modifiedCruiseLevel.set_numeric(True)
+        self._modifiedCruiseLevel.connect("value-changed", self._updateButtons)
 
         levelBox.pack_start(self._modifiedCruiseLevel, False, False, 0)
@@ -1003,4 +1025,5 @@
           PIREPViewer.getTextWindow(editable = True)
         mainBox.pack_start(routeWindow, False, False, 0)
+        self._userRoute.get_buffer().connect("changed", self._updateButtons)
 
         return frame
@@ -1015,4 +1038,5 @@
             PIREPViewer.getTextWindow(heightRequest = -1,
                                       editable = True)
+        self._departureMETAR.get_buffer().connect("changed", self._updateButtons)
         mainBox.pack_start(metarWindow, True, True, 0)
 
@@ -1062,4 +1086,5 @@
             PIREPViewer.getTextWindow(heightRequest = -1,
                                       editable = True)
+        self._arrivalMETAR.get_buffer().connect("changed", self._updateButtons)
         mainBox.pack_start(metarWindow, True, True, 0)
 
@@ -1137,16 +1162,20 @@
             PIREPEditor.tableAttachTimeEntry(table, 0, 0,
                                              xstr("pirepView_blockTimeStart"))
+        self._blockTimeStart.connect("changed", self._updateButtons)
 
         self._blockTimeEnd = \
             PIREPEditor.tableAttachTimeEntry(table, 2, 0,
                                              xstr("pirepView_blockTimeEnd"))
+        self._blockTimeEnd.connect("changed", self._updateButtons)
 
         self._flightTimeStart = \
             PIREPEditor.tableAttachTimeEntry(table, 0, 1,
                                              xstr("pirepView_flightTimeStart"))
+        self._flightTimeStart.connect("changed", self._updateButtons)
 
         self._flightTimeEnd = \
             PIREPEditor.tableAttachTimeEntry(table, 2, 1,
                                              xstr("pirepView_flightTimeEnd"))
+        self._flightTimeEnd.connect("changed", self._updateButtons)
 
         self._flownDistance = PIREPViewer.getDataLabel(width = 3)
@@ -1159,5 +1188,5 @@
                                               xstr("pirepView_fuelUsed"),
                                               1000000)
-
+        self._fuelUsed.connect("value-changed", self._updateButtons)
 
         self._rating = PIREPViewer.getDataLabel(width = 3)
@@ -1181,4 +1210,5 @@
                                               xstr("pirepView_numPassengers"),
                                               300)
+        self._flownNumPassengers.connect("value-changed", self._updateButtons)
 
         self._flownNumCrew = \
@@ -1186,4 +1216,5 @@
                                               xstr("pirepView_numCrew"),
                                               10)
+        self._flownNumCrew.connect("value-changed", self._updateButtons)
 
         self._flownBagWeight = \
@@ -1222,5 +1253,5 @@
     def _buildCommentsTab(self):
         """Build the tab with the comments and flight defects."""
-        return FlightInfo(self._gui, mainInstance = False)
+        return FlightInfo(self._gui, callbackObject = self)
 
     def _buildLogTab(self):
@@ -1238,4 +1269,5 @@
         should be converted to uppercase."""
         entry.set_text(entry.get_text().upper())
+        self._updateButtons()
         #self._valueChanged(entry, arg)
 
@@ -1245,5 +1277,65 @@
         if comboBox.get_active()==-1:
             entry.set_text(entry.get_text().upper())
+        self._updateButtons()
         #self._valueChanged(entry)
 
+    def _updateButtons(self, *kwargs):
+        """Update the activity state of the buttons."""
+        pirep = self._pirep
+        bookedFlight = pirep.bookedFlight
+
+        departureMinutes = \
+            bookedFlight.departureTime.hour*60 + bookedFlight.departureTime.minute
+        departureDifference = abs(Flight.getMinutesDifference(self._blockTimeStart.minutes,
+                                                              departureMinutes))
+        flightStartDifference = \
+            Flight.getMinutesDifference(self._flightTimeStart.minutes,
+                                        self._blockTimeStart.minutes)
+        arrivalMinutes = \
+            bookedFlight.arrivalTime.hour*60 + bookedFlight.arrivalTime.minute
+        arrivalDifference = abs(Flight.getMinutesDifference(self._blockTimeEnd.minutes,
+                                                            arrivalMinutes))
+        flightEndDifference = \
+            Flight.getMinutesDifference(self._blockTimeEnd.minutes,
+                                        self._flightTimeEnd.minutes)
+
+        timesOK = self._flightInfo.hasComments or \
+                  self._flightInfo.hasDelayCode or \
+                  (departureDifference<=Flight.TIME_ERROR_DIFFERENCE and
+                   arrivalDifference<=Flight.TIME_ERROR_DIFFERENCE and
+                   flightStartDifference>=0 and flightStartDifference<30 and
+                   flightEndDifference>=0 and flightEndDifference<30)
+
+        text = self._sid.get_child().get_text()
+        sid = text if self._sid.get_active()!=0 and text and text!="N/A" \
+               else None
+
+        text = self._star.get_child().get_text()
+        star = text if self._star.get_active()!=0 and text and text!="N/A" \
+               else None
+
+        text = self._transition.get_child().get_text()
+        transition = text if self._transition.get_active()!=0 \
+                     and text and text!="N/A" else None
+
+
+        buffer = self._userRoute.get_buffer()
+        route =  buffer.get_text(buffer.get_start_iter(),
+                                 buffer.get_end_iter(), True)
+
+        self._okButton.set_sensitive(timesOK and
+                                     self._flightInfo.faultsFullyExplained and
+                                     self._flownNumPassengers.get_value_as_int()>0 and
+                                     self._flownNumCrew.get_value_as_int()>2 and
+                                     self._fuelUsed.get_value_as_int()>0 and
+                                     self._departureRunway.get_text_length()>0 and
+                                     self._arrivalRunway.get_text_length()>0 and
+                                     self._departureMETAR.get_buffer().get_char_count()>0 and
+                                     self._arrivalMETAR.get_buffer().get_char_count()>0 and
+                                     self._filedCruiseLevel.get_value_as_int()>=50 and
+                                     self._modifiedCruiseLevel.get_value_as_int()>=50 and
+                                     sid is not None and (star is not None or
+                                     transition is not None) and route!="" and
+                                     self._approachType.get_text()!="")
+
 #------------------------------------------------------------------------------
