[vlc-devel] [vlc-commits] Qt4: remove isFirstRun parameter

Rémi Denis-Courmont remi at remlab.net
Sun Mar 24 22:24:24 CET 2013


Le dimanche 24 mars 2013 23:13:55, Jean-Baptiste Kempf a écrit :
> On 24 Mar, Rémi Denis-Courmont wrote :
> > Le dimanche 24 mars 2013 23:03:04, Jean-Baptiste Kempf a écrit :
> > > On 24 Mar, Rémi Denis-Courmont wrote :
> > > > Le dimanche 24 mars 2013 22:56:20, Jean-Baptiste Kempf a écrit :
> > > > > On 24 Mar, Rémi Denis-Courmont wrote :
> > > > > > > Now you need to pass it every single time.
> > > > > > 
> > > > > > Worksforme.
> > > > > 
> > > > > No. If you do not pass it after the first run, it shows the dialog.
> > > > 
> > > > As a matter of fact, it does not - unless your vlcrc is read-only.
> > > 
> > > git head
> > > rm -rf ~/.config/vlc
> > > ./vlc --no-qt-privacy-ask Close
> > > ./vlc --no-qt-privacy-ask Close
> > > ./vlc  => dialog is present
> > 
> > Answer and save.
> 
> No. This is not what it was.

Then it was wrong and I fixed it.

> > Now, I can even bring the dialog back by toggling the preferences and
> > restarting. That looks correct, *unlike* the old semantics. There are
> > reasons why we do not save the command line (been there done that); it
> > looks like you are arguing for saving the command line.
> 
> No. The old behaviour allowed to never have the dialog displayed, but
> just passing it once at the beginning. The new behavious does not.

The old behaviour was WRONG. --qt-privacy-ask is no different from any other 
command line parameter: it shall be idempotent and if you specified it once, it 
shall have NO CONSEQUENCES to further instances. Again, we used to save the 
command line in the past and we got badly burnt.

Otherwise you get idiotic behaviour:
- Say VLC is installed but was never run (maybe it comes with the OS, or it is 
on the custom OS image used to generate the partition.)
- Now say that some script/batch starts VLC automatically. Obviously the 
script will want to avoid the PNAP dialog, so for instance:
C:\> vlc.exe --no-qt-privacy-ask --fullscreen FirstTime.avi

In the old times, fullscreen would then be enabled on all further run of VLC 
by default. And the PNAP dialog did not get activated ever. That is wrong and 
defeats the principle of least surprise w.r.t. the command line.

If you don't want the dialog ever ever, preset vlcrc adequately or compile 
your own variant. There are no exceptions.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list