~heckyel/librevideoconverter

83abaf1743702d7b27b58ede50c6ff435678496b — Jesús 1 year, 4 months ago 8f61ee8
pep8
2 files changed, 20 insertions(+), 11 deletions(-)

M lvc/widgets/gtk/gtkmenus.py
M lvc/widgets/menus.py
M lvc/widgets/gtk/gtkmenus.py => lvc/widgets/gtk/gtkmenus.py +1 -0
@@ 59,6 59,7 @@ def _setup_accel(widget, name, shortcut=None):
        else:
            gtk.accel_map_change_entry(path, key, mods, True)


# map menu names to GTK stock ids.
_STOCK_IDS = {
    "SaveItem": gtk.STOCK_SAVE,

M lvc/widgets/menus.py => lvc/widgets/menus.py +19 -11
@@ 18,9 18,8 @@ from lvc.widgets.keyboard import (Shortcut, CTRL, ALT, SHIFT, CMD,
                                  ESCAPE, F1, F2, F3, F4, F5, F6, F7, F8, F9,
                                  F10, F11, F12)

# XXX hack:


# XXX hack:
def _(text, *params):
    if params:
        return text % params[0]


@@ 64,22 63,31 @@ class MenuItemFetcher(object):
def get_app_menu():
    """Returns the default menu structure."""

    app_name = "Libre Video Converter"    # XXX HACK
    # XXX HACK
    app_name = "Libre Video Converter"

    file_menu = widgetset.Menu(_("_File"), "FileMenu",
                               [MenuItem(_("_Open"), "Open",
                                         Shortcut("o", MOD),
                                         groups=["NonPlaying"]),
                                MenuItem(_("_Quit"), "Quit",
                                         Shortcut("q", MOD)), ])
                               [
                                   MenuItem(
                                       _("_Open"), "Open",
                                       Shortcut("o", MOD),
                                       groups=["NonPlaying"]),
                                   MenuItem(
                                       _("_Quit"), "Quit",
                                       Shortcut("q", MOD)),
                               ])
    help_menu = widgetset.Menu(_("_Help"), "HelpMenu",
                               [MenuItem(_("About %(name)s",
                                           {'name': app_name}),
                                         "About")])
                               [
                                   MenuItem(
                                       _("About %(name)s",
                                         {'name': app_name}),
                                       "About")
                               ])

    all_menus = [file_menu, help_menu]
    return all_menus


action_handlers = {}
group_action_handlers = {}