The "apply at next startup" box did not have a localization at all.
The tab views localication was not applied correctly to due to the
panels redesign.
The default entry cannot be deleted anymore, so lets not show it
in the deletion dialog at all.
Also remove usage of self inside the block to avoid strong
reference cycles.
refs #19260
This implements the following migration behaviour with older
VLC version:
- Index 0 in settings used to be the Default profile, and is now
ignored (not read from and not written to anymore)
- The default settings still include the default profile in index
0, to maintain backwards compatibility if older VLC are started.
- In profile selector, index 0 is still the Default profile,
if the "apply at next startup" is selected, a new Custom profile
is created at exit.
- By default after updating, no profile will be deployed at launch,
so the "Default profile is selected.
refs #19260
In init, the window is not loaded yet, so changing UI elements
does not work yet (pointers are null). It does not harm either, due to
objc behaviour on null object. But it also initializes the needed playlist
variables.
In the longer term, this should probably be splitted, as touching
lots of non-existing UI elements in init is not ideal.
* Fix bug where default video profile was at an older version, resulting
in a new profile always created after opening the vout effects
* On termination, only create a new profile if the apply button is
on, the user is at default profile and actually changed something.
This profile will be also marked as to be selected at next startup
(which is the meaning of that check box)
refs #19260
It is annoying to load the last selected video profile when the video effects
window opens if the apply last profile checkbox was not checked.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Use __unsafe_unretained instead of __weak, as we need to support 10.7
and it is not supported to form a weak reference to some types,
including NSWindowController, resulting in a runtime crash.
The former delegate approach had some drawbacks as one class could
be only delegate for one panel. This commit replaces it with a
completion handler block which moves the result handling code
closer to the actual creation of the dialog.
Also fixes crash for eq panels.
Splits PopupPanel and TextfieldPanel into two xib files and
creates NSWindowController subclasses for each panel.
Each user of the panel gets its own window controller instance.
This is needed as the same kind of window can be shown multiple
times simultaneously (e.g. both in video and audio effects).
This also did not work with the previous implementation of the
2.2 branch and fixes broken behaviour.