VLC adds wrong Contextmenus

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
p91
Blank Cone
Blank Cone
Posts: 28
Joined: 22 Jan 2006 11:52

VLC adds wrong Contextmenus

Postby p91 » 03 Nov 2008 22:44

Hi,
I have a little problem with VLC which should easy be fixed.
As I am using VLC only for video playback I only want it to be used for video files.
But it will also add Context menus for audio files which is quiet annoying as winamp, my standard music player immo, also adds menus which I want to us. Why does VLC add context menus to audio files even if it is told not to do so?

With best regards

p90

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Re: VLC adds wrong Contextmenus

Postby VLC_help » 04 Nov 2008 14:45

http://trac.videolan.org/vlc/browser/ex ... n32.nsi.in

Context menu entries use MacroAllExtensions (!insertmacro MacroAllExtensions AddContextMenu) but file associations use sub groups (!insertmacro MacroAudioExtensions RegisterExtensionSection, insertmacro MacroVideoExtensions RegisterExtensionSection and !insertmacro MacroOtherExtensions RegisterExtensionSection). I think they should do the same thing, but I might be wrong in here.

MacroAllExtensions is same as
!macro MacroAllExtensions _action
!insertmacro MacroAudioExtensions ${_action}
!insertmacro MacroVideoExtensions ${_action}
!insertmacro MacroOtherExtensions ${_action}
!macroend

p91
Blank Cone
Blank Cone
Posts: 28
Joined: 22 Jan 2006 11:52

Re: VLC adds wrong Contextmenus

Postby p91 » 04 Nov 2008 18:58

Hi,
I am not a pro, but I think you are right.

Code: Select all

272 ; Generic function for adding the context menu for one ext. 273 !macro AddContextMenuExt EXT 274 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $ContextMenuEntry_PlayWith 275 WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"' 276 277 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $ContextMenuEntry_AddToPlaylist 278 WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --started-from-file --playlist-enqueue "%1"' 279 !macroend 280 281 !macro AddContextMenu EXT 282 Push $R0 283 ReadRegStr $R0 HKCR ${EXT} "" 284 !insertmacro AddContextMenuExt $R0 285 Pop $R0 286 !macroend
seems to be the code to include contextmenus and is only used at this point:

Code: Select all

606 Section $Name_Section07 SEC07 607 SectionIn 1 3 608 !insertmacro MacroAllExtensions AddContextMenu 609 !insertmacro AddContextMenuExt "Directory" 610 SectionEnd
to add contextmenus to "Directory" that should be fine, as you cannot define it better for dirs.
As there aren't any other calls, why are there context menus in the first place?
So there do the context menus really come from?
Well at this point MacroAllExtension AddContextMenu is also called which is doing what?
It's calling AddContextmenus to add the menus to all types of file, like my audiofiles.
So something has to be changed.
My guess would be that

Code: Select all

606 Section $Name_Section07 SEC07 607 SectionIn 1 3 608 !insertmacro MacroAllExtensions AddContextMenu 609 !insertmacro AddContextMenuExt "Directory" 610 SectionEnd
must be look a little bit more like it Extension counterpart

Code: Select all

558 SectionGroup /e !$Name_Section06 SEC05 559 SectionGroup $Name_SectionGroupAudio 560 !insertmacro MacroAudioExtensions RegisterExtensionSection 561 SectionGroupEnd 562 SectionGroup $Name_SectionGroupVideo 563 !insertmacro MacroVideoExtensions RegisterExtensionSection 564 SectionGroupEnd 565 SectionGroup $Name_SectionGroupOther 566 !insertmacro MacroOtherExtensions RegisterExtensionSection 567 SectionGroupEnd 568 SectionGroupEnd
But as I said, I have nothing to do this these macros or this language, so I might be wrong.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 40 guests