Commit d1ceadaf authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt menus: add faster/slower/normal rate

parent a8291189
......@@ -721,9 +721,12 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu,
intf_thread_t *p_intf,
input_thread_t *p_input )
{
QAction *action;
/* Play or Pause action and icon */
if( !p_input || var_GetInteger( p_input, "state" ) != PLAYING_S )
{
QAction *action = menu->addAction( qtr( "Play" ),
action = menu->addAction( qtr( "Play" ),
ActionsManager::getInstance( p_intf ), SLOT( play() ) );
action->setIcon( QIcon( ":/play" ) );
}
......@@ -733,8 +736,24 @@ void QVLCMenu::PopupMenuControlEntries( QMenu *menu,
":/pause", SLOT( togglePlayPause() ) );
}
/* Stop */
addMIMStaticEntry( p_intf, menu, qtr( "Stop" ),
":/stop", SLOT( stop() ) );
/* Faster/Slower */
action = menu->addAction( qtr( "Faster" ), THEMIM->getIM(), SLOT( faster() ) );
action->setIcon( QIcon( ":/faster") );
menu->addAction( qtr( "Normal Speed" ), THEMIM->getIM(), SLOT( normalRate() ) );
action = menu->addAction( qtr( "Slower" ), THEMIM->getIM(), SLOT( slower() ) );
action->setIcon( QIcon( ":/slower") );
}
void QVLCMenu::PopupMenuPlaylistControlEntries( QMenu *menu,
intf_thread_t *p_intf,
input_thread_t *p_input )
{
/* Next / Previous */
addMIMStaticEntry( p_intf, menu, qtr( "Previous" ),
":/previous", SLOT( prev() ) );
addMIMStaticEntry( p_intf, menu, qtr( "Next" ),
......@@ -822,6 +841,9 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
menu->addSeparator();
PopupMenuControlEntries( menu, p_intf, p_input );
menu->addSeparator();
PopupMenuPlaylistControlEntries( menu, p_intf, p_input );
menu->addSeparator();
PopupMenuStaticEntries( menu );
......@@ -850,6 +872,9 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
PopupMenuControlEntries( menu, p_intf, p_input );
menu->addSeparator();
PopupMenuPlaylistControlEntries( menu, p_intf, p_input );
menu->addSeparator();
if( p_input )
{
vout_thread_t *p_vout = THEMIM->getVout();
......@@ -989,6 +1014,7 @@ void QVLCMenu::updateSystrayMenu( MainInterface *mi,
sysMenu->addSeparator();
PopupMenuControlEntries( sysMenu, p_intf, p_input );
PopupMenuPlaylistControlEntries( sysMenu, p_intf, p_input );
sysMenu->addSeparator();
addDPStaticEntry( sysMenu, qtr( "&Open Media" ),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment