diff options
author | Jesús Eduardo <heckyel@hyperbola.info> | 2018-01-14 19:50:57 -0500 |
---|---|---|
committer | Jesús Eduardo <heckyel@hyperbola.info> | 2018-01-14 19:50:57 -0500 |
commit | 52cfef3142af6d272af4e4722524f2a7e347f675 (patch) | |
tree | 046e5304598868516c962a04b57ffef6446cb3c4 /lvc | |
parent | 37cdd71d55d39722298982cc0c065a4b29832688 (diff) | |
download | librevideoconverter-52cfef3142af6d272af4e4722524f2a7e347f675.tar.lz librevideoconverter-52cfef3142af6d272af4e4722524f2a7e347f675.tar.xz librevideoconverter-52cfef3142af6d272af4e4722524f2a7e347f675.zip |
pep8 en lvc/widgets/gtk/gtkmenus.py
Diffstat (limited to 'lvc')
-rw-r--r-- | lvc/widgets/gtk/gtkmenus.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lvc/widgets/gtk/gtkmenus.py b/lvc/widgets/gtk/gtkmenus.py index 0e89fa8..f529919 100644 --- a/lvc/widgets/gtk/gtkmenus.py +++ b/lvc/widgets/gtk/gtkmenus.py @@ -37,6 +37,7 @@ import base import keymap import wrappermap + def _setup_accel(widget, name, shortcut=None): """Setup accelerators for a menu item. @@ -80,6 +81,7 @@ except AttributeError: # fullscreen not available on all GTK versions pass + class MenuItemBase(base.Widget): """Base class for MenuItem and Separator.""" @@ -106,6 +108,7 @@ class MenuItemBase(base.Widget): # handles it for them pass + class MenuItem(MenuItemBase): """Single item in the menu that can be clicked @@ -179,6 +182,7 @@ class MenuItem(MenuItemBase): def get_label(self): self._widget.get_label() + class CheckMenuItem(MenuItem): """MenuItem that toggles on/off""" @@ -200,6 +204,7 @@ class CheckMenuItem(MenuItem): def get_state(self): return self._widget.get_active() + class RadioMenuItem(CheckMenuItem): """MenuItem that toggles on/off and is grouped with other RadioMenuItems. """ @@ -223,6 +228,7 @@ class RadioMenuItem(CheckMenuItem): if self.get_state(): MenuItem._on_activate(self, menu_item) + class Separator(MenuItemBase): """Separator item for menus""" @@ -234,6 +240,7 @@ class Separator(MenuItemBase): # items. self.name = None + class MenuShell(base.Widget): """Common code shared between Menu and MenuBar. @@ -309,6 +316,7 @@ class MenuShell(base.Widget): return submenu_find return None + class Menu(MenuShell): """A Menu holds a list of MenuItems and Menus. @@ -356,6 +364,7 @@ class Menu(MenuShell): for child in self.children: child._set_accel_group(accel_group) + class MenuBar(MenuShell): """Displays a list of Menu items. @@ -380,6 +389,7 @@ class MenuBar(MenuShell): def get_accel_group(self): return self._accel_group + class MainWindowMenuBar(MenuBar): """MenuBar for the main window. @@ -398,7 +408,7 @@ class MainWindowMenuBar(MenuBar): """Update the portable root menu with GTK-specific stuff.""" # on linux, we don't have a CheckVersion option because # we update with the package system. - #this_platform = app.config.get(prefs.APP_PLATFORM) - #if this_platform == 'linux': - # self.find("CheckVersion").remove_from_parent() - #app.video_renderer.setup_subtitle_encoding_menu() + # this_platform = app.config.get(prefs.APP_PLATFORM) + # if this_platform == 'linux': + # self.find("CheckVersion").remove_from_parent() + # app.video_renderer.setup_subtitle_encoding_menu() |