}
else
{
- menu->addAction( text, THEMIM, member );
+ action = menu->addAction( text, THEMIM, member );
}
action->setData( "ignore" );
}
"Ctrl+C" );
menu->addSeparator();
- addDPStaticEntry( menu, qtr( "Paste &Location" ),
+ addDPStaticEntry( menu, qtr( "Open &Location from clipboard" ),
NULL, SLOT( openUrlDialog() ), "Ctrl+V" );
- recentsMenu = new QMenu( qtr( "&Recent Media" ), menu );
- updateRecents( p_intf );
- menu->addMenu( recentsMenu );
+ if( config_GetInt( p_intf, "qt-recentplay" ) )
+ {
+ recentsMenu = new QMenu( qtr( "&Recent Media" ), menu );
+ updateRecents( p_intf );
+ menu->addMenu( recentsMenu );
+ }
menu->addMenu( SDMenu( p_intf, menu ) );
menu->addSeparator();
}
p_input = THEMIM->getInput();
- if( p_input )
- vlc_object_hold( p_input );
p_aout = THEMIM->getAout();
EnableStaticEntries( current, ( p_aout != NULL ) );
AudioAutoMenuBuilder( p_aout, p_input, objects, varnames );
{
vlc_object_release( p_aout );
}
- if( p_input )
- vlc_object_release( p_input );
return Populate( p_intf, current, varnames, objects );
}
}
p_input = THEMIM->getInput();
- if( p_input )
- vlc_object_hold( p_input );
p_vout = THEMIM->getVout();
VideoAutoMenuBuilder( p_vout, p_input, objects, varnames );
if( p_vout )
vlc_object_release( p_vout );
- if( p_input )
- vlc_object_release( p_input );
-
return Populate( p_intf, current, varnames, objects );
}
/* Get the input and hold it */
p_object = THEMIM->getInput();
- if( p_object )
- vlc_object_hold( p_object );
InputAutoMenuBuilder( p_object, objects, varnames );
PUSH_VAR( "prev-chapter" );
PUSH_VAR( "next-chapter" );
- if( p_object )
- vlc_object_release( p_object );
-
EnableStaticEntries( menu, (p_object != NULL ) );
return Populate( p_intf, menu, varnames, objects );
}
POPUP_BOILERPLATE;
if( p_input )
{
- vlc_object_hold( p_input );
vout_thread_t *p_vout = THEMIM->getVout();
if( p_vout )
{
VideoAutoMenuBuilder( p_vout, p_input, objects, varnames );
vlc_object_release( p_vout );
}
- vlc_object_release( p_input );
}
QMenu *menu = new QMenu();
CREATE_POPUP;
POPUP_BOILERPLATE;
if( p_input )
{
- vlc_object_hold( p_input );
aout_instance_t *p_aout = THEMIM->getAout();
AudioAutoMenuBuilder( p_aout, p_input, objects, varnames );
if( p_aout )
vlc_object_release( p_aout );
- vlc_object_release( p_input );
}
QMenu *menu = new QMenu();
CREATE_POPUP;
if( p_input )
{
- vlc_object_hold( p_input );
varnames.push_back( "audio-es" );
InputAutoMenuBuilder( p_input, objects, varnames );
PUSH_SEPARATOR;
/* Main Menu that sticks everything together */
void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
{
- /* Destroy popup menu if there is one */
+ /* Delete old popup if there is one */
+ if( p_intf->p_sys->p_popup_menu )
+ delete p_intf->p_sys->p_popup_menu;
+
if( !show )
{
- delete p_intf->p_sys->p_popup_menu;
p_intf->p_sys->p_popup_menu = NULL;
return;
}
- /* Delete and recreate a popup if there is one */
- if( p_intf->p_sys->p_popup_menu )
- delete p_intf->p_sys->p_popup_menu;
-
/* */
QMenu *menu = new QMenu();
- QMenu *submenu;
QAction *action;
bool b_isFullscreen = false;
MainInterface *mi = p_intf->p_sys->p_mi;
if( p_input )
{
+ QMenu *submenu;
vout_thread_t *p_vout = THEMIM->getVout();
/* Add a fullscreen switch button, since it is the most used function */
}
/* Input menu */
- vlc_object_hold( p_input );
InputAutoMenuBuilder( p_input, objects, varnames );
- vlc_object_release( p_input );
/* Audio menu */
submenu = new QMenu( menu );
/* Add some special entries for windowed mode: Interface Menu */
if( !b_isFullscreen )
{
- submenu = new QMenu( qtr( "Interface" ), menu );
+ QMenu *submenu = new QMenu( qtr( "Interface" ), menu );
QMenu *tools = ToolsMenu( submenu );
submenu->addSeparator();
/* In skins interface, append some items */
if( !mi )
{
- objects.clear(); varnames.clear();
vlc_object_t *p_object = ( vlc_object_t* )
vlc_object_find_name( p_intf, "skins2", FIND_PARENT );
if( p_object )
{
+ objects.clear(); varnames.clear();
objects.push_back( p_object );
varnames.push_back( "intf-skins" );
Populate( p_intf, submenu, varnames, objects );
+
+ objects.clear(); varnames.clear();
+ objects.push_back( p_object );
+ varnames.push_back( "intf-skins-interactive" );
+ Populate( p_intf, submenu, varnames, objects );
+
vlc_object_release( p_object );
}
else
mi->getSysTray()->setContextMenu( sysMenu );
}
+#undef CREATE_POPUP
+#undef POPUP_BOILERPLATE
+
#undef PUSH_VAR
#undef PUSH_SEPARATOR
RecentsMRL* rmrl = RecentsMRL::getInstance( p_intf );
QList<QString> l = rmrl->recents();
+#if QT_VERSION == 0x040500
+ //Workaround for Qt bug #176201
+ QList<QAction*> actions = recentsMenu->actions();
+ for(int i = 0; i < actions.size(); ++i)
+ actions.at(i)->deleteLater();
+#else
recentsMenu->clear();
+#endif
+
if( !l.size() )
{
action = recentsMenu->addAction( qtr(" - Empty - ") );