diff options
author | Jesús Eduardo <heckyel@hyperbola.info> | 2018-01-13 16:13:16 -0500 |
---|---|---|
committer | Jesús Eduardo <heckyel@hyperbola.info> | 2018-01-13 16:13:16 -0500 |
commit | 33ff5018dae3e4342c34a5038522cdaf6076951d (patch) | |
tree | 131d203c885cee20b0729f1f8d0d1cc0d19b5456 /lvc | |
parent | 89dc227325303ddae0e96191a7aa11293b63bebf (diff) | |
download | librevideoconverter-33ff5018dae3e4342c34a5038522cdaf6076951d.tar.lz librevideoconverter-33ff5018dae3e4342c34a5038522cdaf6076951d.tar.xz librevideoconverter-33ff5018dae3e4342c34a5038522cdaf6076951d.zip |
pep8 en lvc/widgets/osx/contextmenu.py
Diffstat (limited to 'lvc')
-rw-r--r-- | lvc/widgets/osx/contextmenu.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lvc/widgets/osx/contextmenu.py b/lvc/widgets/osx/contextmenu.py index 7a8fa55..6fd932c 100644 --- a/lvc/widgets/osx/contextmenu.py +++ b/lvc/widgets/osx/contextmenu.py @@ -3,6 +3,7 @@ from objc import nil from .base import Widget + class ContextMenuHandler(NSObject): def initWithCallback_widget_i_(self, callback, widget, i): self = super(ContextMenuHandler, self).init() @@ -41,11 +42,14 @@ class ContextMenu(object): label, callback = item_info nsitem = NSMenuItem.alloc().init() font_size = NSFont.systemFontSize() - font = NSFont.fontWithName_size_("Lucida Sans Italic", font_size) + font = NSFont.fontWithName_size_("Lucida Sans Italic", + font_size) if font is None: font = NSFont.systemFontOfSize_(font_size) attributes = {NSFontAttributeName: font} - attributed_label = NSAttributedString.alloc().initWithString_attributes_(label, attributes) + attributed_label = \ + NSAttributedString.alloc().initWithString_attributes_( + label, attributes) nsitem.setAttributedTitle_(attributed_label) else: nsitem.setTitle_(label) @@ -53,7 +57,9 @@ class ContextMenu(object): submenu = ContextMenu(callback) self.menu.setSubmenu_forItem_(submenu.menu, nsitem) else: - handler = ContextMenuHandler.alloc().initWithCallback_widget_i_(callback, self, i) + handler = \ + ContextMenuHandler.alloc().initWithCallback_widget_i_( + callback, self, i) nsitem.setTarget_(handler) nsitem.setAction_('handleMenuItem:') self.menu.addItem_(nsitem) @@ -81,4 +87,6 @@ class ContextMenu(object): 0, 0, 0) - NSMenu.popUpContextMenu_withEvent_forView_(self.menu, event, window.contentView()) + NSMenu.popUpContextMenu_withEvent_forView_(self.menu, + event, + window.contentView()) |