[vlc-devel] [PATCH] Qt4: add play/pause options under Playback menu (#5522)

Jean-Baptiste Kempf jb at videolan.org
Sat Dec 3 16:13:34 CET 2011


On Sat, Dec 03, 2011 at 09:38:21AM -0500, Edward Wang wrote :
> This patch will add the new feature in bug #5522 (
> http://trac.videolan.org/vlc/ticket/5522) and the GCI task. Attached is the
> patch file.


> diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
> index f85e515..440f76c 100644
> --- a/modules/gui/qt4/menus.cpp
> +++ b/modules/gui/qt4/menus.cpp
> @@ -39,8 +39,6 @@
>  #include <vlc_vout.h>                             /* vout_thread_t */
>  #include <vlc_aout.h>                             /* audio_output_t */
>  
> -#include "menus.hpp"
> -
>  #include "main_interface.hpp"                     /* View modifications */
>  #include "dialogs_provider.hpp"                   /* Dialogs display */
>  #include "input_manager.hpp"                      /* Input Management */
> @@ -59,6 +57,8 @@
>  #include <QStatusBar>
>  #include <QFontMetrics>
>  
> +#include "menus.hpp"
> +

Unneeded change.

>  /*
>    This file defines the main menus and the pop-up menu (right-click menu)
>    and the systray menu (in that order in the file)
> @@ -688,6 +688,7 @@ QMenu *QVLCMenu::NavigMenu( intf_thread_t *p_intf, QMenu *menu )
>  {
>      QAction *action;
>      QMenu *submenu;
> +	input_thread_t* p_input = THEMIM->getInput();

No tabs in sourcecode, please.

> -            case 3: QVLCMenu::RebuildNavigMenu( p_intf, menu ); break;
> +            case 3:
> +                menu->clear();
> +                QVLCMenu::NavigMenu( p_intf, menu );
> +                break;

This is probably wrong and leaking, to do it everytime.

Best regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list