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

Added a Quit option to the status icon's menu and a confirmation dialog.

File:
1 edited

Legend:

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

    r71 r76  
    843843    def _quit(self, what = None):
    844844        """Quit from the application."""
    845         self._statusIcon.destroy()
    846         return gtk.main_quit()
     845        dialog = gtk.MessageDialog(type = MESSAGETYPE_QUESTION,
     846                                   buttons = BUTTONSTYPE_YES_NO,
     847                                   message_format =
     848                                   "Are you sure to quit the logger?")
     849        result = dialog.run()
     850        dialog.hide()
     851       
     852        if result==RESPONSETYPE_YES:
     853            self._statusIcon.destroy()
     854            return gtk.main_quit()
    847855
    848856    def _notebookPageSwitch(self, notebook, page, page_num):
Note: See TracChangeset for help on using the changeset viewer.