Building the Linux menu

Our GenericMenu class is pretty close to the Gnome HIG, but there is one change to be made:  our Options menu doesn't really belong; rather, we need to split its items into two categories.

The autofill options, since they change the way data is entered in the form, belong in an edit menu. The font and theme options, since they only change the appearance of the application and not the actual data, belong in a view menu.

Let's make the modifications necessary to create our Linux menu:

  1. Start the class by subclassing GenericMainMenu and overriding the _build_menu() method:
class LinuxMainMenu(GenericMainMenu):
    def _build_menu(self):
  1. Once again, copy in the code from the parent and edit what needs to be changed.
  2. First, ...

Get Python GUI Programming with Tkinter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.