Ejemplo n.º 1
0
    def init_menu(self):
        # add actions
        self.toggle_action_group = ActionGroup(self.shell,
                                               "lLyricsPluginToggleActions")
        self.toggle_action_group.add_action(
            func=self.toggle_visibility,
            action_name="ToggleLyricSideBar",
            label=_("Lyrics"),
            action_state=ActionGroup.TOGGLE,
            action_type="app",
            accel="<Ctrl>l",
            tooltip=_("Display lyrics for the current playing song"),
        )
        self.appshell.insert_action_group(self.toggle_action_group)

        self.context_action_group = ActionGroup(self.shell,
                                                "lLyricsPluginPopupActions")
        self.context_action_group.add_action(
            action_name="lLyricsPopupAction",
            label=_("Show lyrics"),
            tooltip=_("Search and display lyrics for this song"),
            func=self.context_action_callback,
        )
        self.appshell.insert_action_group(self.context_action_group)

        self.insert_ui()