Ignore:
Timestamp:
04/22/12 14:21:23 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The dialogs now have a proper parent window and title

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/flight.py

    r102 r105  
    289289                self._wizard.nextPage()
    290290            else:
    291                 dialog = gtk.MessageDialog(type = MESSAGETYPE_ERROR,
     291                dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
     292                                           type = MESSAGETYPE_ERROR,
    292293                                           buttons = BUTTONSTYPE_OK,
    293294                                           message_format =
    294295                                           "Invalid pilot's ID or password.")
     296                dialog.set_title(WINDOW_TITLE_BASE)
    295297                dialog.format_secondary_markup("Check the ID and try to reenter"
    296298                                               " the password.")
     
    298300                dialog.hide()
    299301        else:
    300             dialog = gtk.MessageDialog(type = MESSAGETYPE_ERROR,
     302            dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
     303                                       type = MESSAGETYPE_ERROR,
    301304                                       buttons = BUTTONSTYPE_OK,
    302305                                       message_format =
    303306                                       "Failed to connect to the MAVA website.")
     307            dialog.set_title(WINDOW_TITLE_BASE)
    304308            dialog.format_secondary_markup("Try again in a few minutes.")
    305309            dialog.run()
     
    516520            self._wizard.nextPage()
    517521        else:
    518             dialog = gtk.MessageDialog(type = MESSAGETYPE_ERROR,
     522            dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
     523                                       type = MESSAGETYPE_ERROR,
    519524                                       buttons = BUTTONSTYPE_OK,
    520525                                       message_format = "Gate conflict detected again")
     526            dialog.set_title(WINDOW_TITLE_BASE)
    521527            dialog.format_secondary_markup("Try to select a different gate.")
    522528            dialog.run()
     
    18921898                type = MESSAGETYPE_INFO
    18931899                messageFormat = "The PIREP was sent successfully."
    1894                 secondaryMarkup = "Await the thorough scrutiny from our PIREP correctors! :)"
     1900                secondaryMarkup = "Await the thorough scrutiny by our fearless PIREP correctors! :)"
    18951901            elif result.alreadyFlown:
    18961902                messageFormat = "The PIREP for this flight has already been sent!"
     
    19081914                              "see the debug log for more information."
    19091915       
    1910         dialog = gtk.MessageDialog(type = type, buttons = BUTTONSTYPE_OK,
     1916        dialog = gtk.MessageDialog(parent = self._wizard.gui.mainWindow,
     1917                                   type = type, buttons = BUTTONSTYPE_OK,
    19111918                                   message_format = messageFormat)
     1919        dialog.set_title(WINDOW_TITLE_BASE)
    19121920        if secondaryMarkup is not None:
    19131921            dialog.format_secondary_markup(secondaryMarkup)
     
    21632171            self._fleet = None
    21642172
    2165             dialog = gtk.MessageDialog(type = MESSAGETYPE_ERROR,
     2173            dialog = gtk.MessageDialog(parent = self.gui.mainWindow,
     2174                                       type = MESSAGETYPE_ERROR,
    21662175                                       buttons = BUTTONSTYPE_OK,
    21672176                                       message_format =
    21682177                                       "Failed to retrieve the information on "
    21692178                                       "the fleet.")
     2179            dialog.set_title(WINDOW_TITLE_BASE)
    21702180            dialog.run()
    21712181            dialog.hide()
     
    21922202            success = None
    21932203
    2194             dialog = gtk.MessageDialog(type = MESSAGETYPE_ERROR,
     2204            dialog = gtk.MessageDialog(parent = self.gui.mainWindow,
     2205                                       type = MESSAGETYPE_ERROR,
    21952206                                       buttons = BUTTONSTYPE_OK,
    21962207                                       message_format =
    21972208                                       "Failed to update the statuis of "
    21982209                                       "the airplane.")
     2210            dialog.set_title(WINDOW_TITLE_BASE)
    21992211            dialog.run()
    22002212            dialog.hide()
Note: See TracChangeset for help on using the changeset viewer.