Changeset 2e50966347e519ed46e448ffb66afe10d3a01cb0
- Timestamp:
- 07/04/06 23:52:33
(3 years ago)
- Author:
- Antoine Cellerier <dionoea@videolan.org>
- git-committer:
- Antoine Cellerier <dionoea@videolan.org> 1144446753 +0000
- git-parent:
[35e982dd4bbae7e3b882e87ee0c61188eb7c5f04]
- git-author:
- Antoine Cellerier <dionoea@videolan.org> 1144446753 +0000
- Message:
Win32 specific changes: Add --started-from-file option to tell VLC that it was started by clicking on a file (or disc). Add --one-instance-when-started-from-file option to tell VLC to use one instance mode when --started-from-file is used. See replies to r15125 for an explanation.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rfb0afd8 |
r2e50966 |
|
| 831 | 831 | "double-click on a file in the explorer. This option will allow you " \ |
|---|
| 832 | 832 | "to play the file with the already running instance or enqueue it.") |
|---|
| | 833 | |
|---|
| | 834 | #define STARTEDFROMFILE_TEXT N_("VLC is started from file association") |
|---|
| | 835 | #define STARTEDFROMFILE_LONGTEXT N_( \ |
|---|
| | 836 | "Tell VLC that it is being launched due to a file association in the OS" ) |
|---|
| | 837 | |
|---|
| | 838 | #define ONEINSTANCEWHENSTARTEDFROMFILE_TEXT N_( \ |
|---|
| | 839 | "Allow only on running instance when started from file") |
|---|
| | 840 | #define ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT N_( \ |
|---|
| | 841 | "Allow only on running instance when started from file") |
|---|
| 833 | 842 | |
|---|
| 834 | 843 | #define HPRIORITY_TEXT N_("Increase the priority of the process") |
|---|
| … | … | |
| 1465 | 1474 | add_bool( "one-instance", 0, NULL, ONEINSTANCE_TEXT, |
|---|
| 1466 | 1475 | ONEINSTANCE_LONGTEXT, VLC_TRUE ); |
|---|
| | 1476 | add_bool( "started-from-file", 0, NULL, STARTEDFROMFILE_TEXT, |
|---|
| | 1477 | STARTEDFROMFILE_LONGTEXT, VLC_TRUE ); |
|---|
| | 1478 | add_bool( "one-instance-when-started-from-file", 1, NULL, |
|---|
| | 1479 | ONEINSTANCEWHENSTARTEDFROMFILE_TEXT, |
|---|
| | 1480 | ONEINSTANCEWHENSTARTEDFROMFILE_LONGTEXT, VLC_TRUE ); |
|---|
| 1467 | 1481 | add_bool( "playlist-enqueue", 0, NULL, PLAYLISTENQUEUE_TEXT, |
|---|
| 1468 | 1482 | PLAYLISTENQUEUE_LONGTEXT, VLC_TRUE ); |
|---|
| r75729ee |
r2e50966 |
|
| 150 | 150 | } |
|---|
| 151 | 151 | |
|---|
| 152 | | if( config_GetInt( p_this, "one-instance" ) ) |
|---|
| | 152 | if( config_GetInt( p_this, "one-instance" ) |
|---|
| | 153 | || ( config_GetInt( p_this, "one-instance-when-started-from-file" ) |
|---|
| | 154 | && config_GetInt( p_this, "started-from-file" ) ) ) |
|---|
| 153 | 155 | { |
|---|
| 154 | 156 | HANDLE hmutex; |
|---|
| r540ddda |
r2e50966 |
|
| 174 | 174 | WriteRegStr HKCR "VLC$R0" "" "VLC media file" |
|---|
| 175 | 175 | WriteRegStr HKCR "VLC$R0\shell" "" "Play" |
|---|
| 176 | | WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" "%1"' |
|---|
| | 176 | WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --one-instance-when-started-from-file "%1"' |
|---|
| 177 | 177 | WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' |
|---|
| 178 | 178 | FunctionEnd |
|---|
| … | … | |
| 220 | 220 | !macro AddContextMenu EXT |
|---|
| 221 | 221 | WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" "Play with VLC media player" |
|---|
| 222 | | WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --no-playlist-enqueue "%1"' |
|---|
| | 222 | WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --one-instance-when-started-from-file --no-playlist-enqueue "%1"' |
|---|
| 223 | 223 | |
|---|
| 224 | 224 | WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" "Add to VLC media player's Playlist" |
|---|
| 225 | | WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --one-instance --playlist-enqueue "%1"' |
|---|
| | 225 | WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --one-instance-when-started-from-file --playlist-enqueue "%1"' |
|---|
| 226 | 226 | !macroend |
|---|
| 227 | 227 | |
|---|
| … | … | |
| 279 | 279 | WriteRegStr HKCR Applications\vlc.exe\shell\Play "" "Play with VLC" |
|---|
| 280 | 280 | WriteRegStr HKCR Applications\vlc.exe\shell\Play\command "" \ |
|---|
| 281 | | '$INSTDIR\vlc.exe "%1"' |
|---|
| | 281 | '$INSTDIR\vlc.exe --one-instance-when-started-from-file "%1"' |
|---|
| 282 | 282 | !insertmacro MacroAllExtensions WriteRegStrSupportedTypes |
|---|
| 283 | 283 | |
|---|
| 284 | 284 | WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player" |
|---|
| 285 | 285 | WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \ |
|---|
| 286 | | "$INSTDIR\vlc.exe cdda:%1" |
|---|
| | 286 | "$INSTDIR\vlc.exe --one-instance-when-started-from-file cdda:%1" |
|---|
| 287 | 287 | WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player" |
|---|
| 288 | 288 | WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \ |
|---|
| 289 | | "$INSTDIR\vlc.exe dvd:%1" |
|---|
| | 289 | "$INSTDIR\vlc.exe --one-instance-when-started-from-file dvd:%1" |
|---|
| 290 | 290 | |
|---|
| 291 | 291 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" "" |
|---|
| … | … | |
| 298 | 298 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" "" |
|---|
| 299 | 299 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "Play CD audio" |
|---|
| 300 | | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0' |
|---|
| | 300 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe --one-instance-when-started-from-file",0' |
|---|
| 301 | 301 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio" |
|---|
| 302 | 302 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play" |
|---|
| … | … | |
| 305 | 305 | WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Play" |
|---|
| 306 | 306 | WriteRegStr HKCR "VLC.DVDMovie\shell\Play\command" "" \ |
|---|
| 307 | | '$INSTDIR\vlc.exe dvd:%1' |
|---|
| | 307 | '$INSTDIR\vlc.exe --one-instance-when-started-from-file dvd:%1' |
|---|
| 308 | 308 | WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' |
|---|
| 309 | 309 | WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio" |
|---|
| 310 | 310 | WriteRegStr HKCR "VLC.CDAudio\shell" "" "Play" |
|---|
| 311 | 311 | WriteRegStr HKCR "VLC.CDAudio\shell\Play\command" "" \ |
|---|
| 312 | | '$INSTDIR\vlc.exe cdda:%1' |
|---|
| | 312 | '$INSTDIR\vlc.exe --one-instance-when-started-from-file cdda:%1' |
|---|
| 313 | 313 | WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' |
|---|
| 314 | 314 | |
|---|