Commit 22a10cf3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: cleanup

parent 3c99a3b2
...@@ -877,21 +877,18 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf ) ...@@ -877,21 +877,18 @@ void QVLCMenu::MiscPopupMenu( intf_thread_t *p_intf )
/* Main Menu that sticks everything together */ /* Main Menu that sticks everything together */
void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) 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 ) if( !show )
{ {
delete p_intf->p_sys->p_popup_menu;
p_intf->p_sys->p_popup_menu = NULL; p_intf->p_sys->p_popup_menu = NULL;
return; 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 *menu = new QMenu();
QMenu *submenu;
QAction *action; QAction *action;
bool b_isFullscreen = false; bool b_isFullscreen = false;
MainInterface *mi = p_intf->p_sys->p_mi; MainInterface *mi = p_intf->p_sys->p_mi;
...@@ -904,6 +901,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -904,6 +901,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
if( p_input ) if( p_input )
{ {
QMenu *submenu;
vout_thread_t *p_vout = THEMIM->getVout(); vout_thread_t *p_vout = THEMIM->getVout();
/* Add a fullscreen switch button, since it is the most used function */ /* Add a fullscreen switch button, since it is the most used function */
...@@ -951,7 +949,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show ) ...@@ -951,7 +949,7 @@ void QVLCMenu::PopupMenu( intf_thread_t *p_intf, bool show )
/* Add some special entries for windowed mode: Interface Menu */ /* Add some special entries for windowed mode: Interface Menu */
if( !b_isFullscreen ) if( !b_isFullscreen )
{ {
submenu = new QMenu( qtr( "Interface" ), menu ); QMenu *submenu = new QMenu( qtr( "Interface" ), menu );
QMenu *tools = ToolsMenu( submenu ); QMenu *tools = ToolsMenu( submenu );
submenu->addSeparator(); submenu->addSeparator();
......
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