Skip to content

Commit

Permalink
Add a MEDIA menu item type to the main menus.
Browse files Browse the repository at this point in the history
This type allows you to add menu items that can call one of the media handlers.
For example you could add a menu item to show a particular web page or to play
a video using the internal player.

An example item to run MythBrowser

    <button>
        <type>WEBPAGE</type>
        <text>WebMail</text>
        <description>Show email</description>
        <action>MEDIA WebBrowser https://example.domain.com/signin/webmail/</action>
        <depends>mythbrowser</depends>
    </button>

An example to play a video file

    <button>
        <type>VIDEO</type>
        <text>Show Example Video</text>
        <description>Show an example video</description>
        <action>MEDIA Internal /media/videos/example.mpg/</action>
    </button>
  • Loading branch information
Paul Harrison committed May 1, 2011
1 parent e73e476 commit d4a4aa3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions mythtv/libs/libmythui/myththemedmenu.cpp
Expand Up @@ -849,6 +849,14 @@ bool MythThemedMenu::handleAction(const QString &action, const QString &password
QString rest = action.right(action.length() - 5);
GetMythMainWindow()->JumpTo(rest, false);
}
else if (action.left(6) == "MEDIA ")
{
// the format is MEDIA HANDLER URL
// TODO: allow spaces in the url
QStringList list = action.simplified().split(' ');
if (list.size() >= 3)
GetMythMainWindow()->HandleMedia(list[1], list[2]);
}
else
{
m_selection = action;
Expand Down

0 comments on commit d4a4aa3

Please sign in to comment.