Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC
Commits: 48e6a427 by Hugo Beauzée-Luyssen at 2021-06-04T13:44:01+00:00 libvlc-module: Remove trailing whitespace - - - - - a170af4a by Hugo Beauzée-Luyssen at 2021-06-04T13:44:01+00:00 libvlc-module: Clarify restore-playback-pos option - - - - - 4df0bd1d by Hugo Beauzée-Luyssen at 2021-06-04T13:44:01+00:00 qt: prefs: Expose restore-playback-pos instead of qt-continue - - - - - 3b833f09 by Hugo Beauzée-Luyssen at 2021-06-04T13:44:01+00:00 qt: Deprecate qt-continue option - - - - - 3 changed files: - modules/gui/qt/dialogs/preferences/simple_preferences.cpp - modules/gui/qt/qt.cpp - src/libvlc-module.c Changes: ===================================== modules/gui/qt/dialogs/preferences/simple_preferences.cpp ===================================== @@ -928,7 +928,7 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ui.recentlyPlayedFilters, setEnabled( bool ) ); ui.recentlyPlayedFilters->setEnabled( false ); CONFIG_BOOL( "qt-recentplay", saveRecentlyPlayed ); - CONFIG_GENERIC( "qt-continue", IntegerList, ui.continuePlaybackLabel, continuePlaybackComboBox ); + CONFIG_GENERIC( "restore-playback-pos", IntegerList, ui.continuePlaybackLabel, continuePlaybackComboBox ); CONFIG_GENERIC( "qt-recentplay-filter", String, ui.filterLabel, recentlyPlayedFilters ); CONFIG_GENERIC( "qt-auto-raise", IntegerList, ui.autoRaiseLabel, autoRaiseComboBox ); ===================================== modules/gui/qt/qt.cpp ===================================== @@ -241,20 +241,12 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * ); #define FULLSCREEN_CONTROL_PIXELS N_( "Fullscreen controller mouse sensitivity" ) -#define CONTINUE_PLAYBACK_TEXT N_("Continue playback?") - static const int i_notification_list[] = { NOTIFICATION_NEVER, NOTIFICATION_MINIMIZED, NOTIFICATION_ALWAYS }; static const char *const psz_notification_list_text[] = { N_("Never"), N_("When minimized"), N_("Always") }; -static const int i_continue_list[] = - { 0, 1, 2 }; - -static const char *const psz_continue_list_text[] = - { N_("Never"), N_("Ask"), N_("Always") }; - static const int i_raise_list[] = { MainInterface::RAISE_NEVER, MainInterface::RAISE_VIDEO, \ MainInterface::RAISE_AUDIO, MainInterface::RAISE_AUDIOVIDEO, }; @@ -310,8 +302,7 @@ vlc_module_begin () nullptr, false ) add_string( "qt-recentplay-filter", "", RECENTPLAY_FILTER_TEXT, RECENTPLAY_FILTER_LONGTEXT, false ) - add_integer( "qt-continue", 1, CONTINUE_PLAYBACK_TEXT, nullptr, false ) - change_integer_list(i_continue_list, psz_continue_list_text ) + add_obsolete_integer( "qt-continue" ) #ifdef UPDATE_CHECK add_bool( "qt-updates-notif", true, UPDATER_TEXT, ===================================== src/libvlc-module.c ===================================== @@ -199,7 +199,7 @@ static const char *const ppsz_stereo_mode_texts[] = { N_("Unset"), }; #define MIX_MODE_TEXT N_("Audio mix mode") -static const int pi_mix_mode_values[] = { +static const int pi_mix_mode_values[] = { AOUT_MIX_MODE_UNSET, AOUT_MIX_MODE_STEREO, AOUT_MIX_MODE_BINAURAL, AOUT_MIX_MODE_4_0, AOUT_MIX_MODE_5_1, AOUT_MIX_MODE_7_1, }; @@ -706,7 +706,20 @@ static const char *const ppsz_prefres[] = { "the form \"{name=bookmark-name,time=optional-time-offset," \ "bytes=optional-byte-offset},{...}\"") -#define RESTORE_PLAYBACK_POS_TEXT N_("Continue playback?") +#define RESTORE_PLAYBACK_POS_TEXT N_("Continue playback") +#define RESTORE_PLAYBACK_POS_LONGTEXT N_("Should the playback resume where " \ + "it was left off?") + +static const int pi_restore_playback_values[] = { + VLC_PLAYER_RESTORE_PLAYBACK_POS_NEVER, + VLC_PLAYER_RESTORE_PLAYBACK_POS_ASK, + VLC_PLAYER_RESTORE_PLAYBACK_POS_ALWAYS +}; +static const char* const ppsz_restore_playback_desc[] = { + N_( "Never resume playback where it was left off" ), + N_( "Ask when the playback starts" ), + N_( "Always resume playback where it was left off" ), +}; #define RESTORE_PLAYBACK_STATE_TEXT N_("Resume last playback states") #define RESTORE_PLAYBACK_STATE_LONGTEXT N_("This will resume the last playback " \ @@ -1851,7 +1864,9 @@ vlc_module_begin () change_safe () add_integer( "restore-playback-pos", VLC_PLAYER_RESTORE_PLAYBACK_POS_ASK, - RESTORE_PLAYBACK_POS_TEXT, NULL, false ) + RESTORE_PLAYBACK_POS_TEXT, RESTORE_PLAYBACK_POS_LONGTEXT, false ) + change_integer_list( pi_restore_playback_values, ppsz_restore_playback_desc ); + add_bool( "restore-playback-states", false, RESTORE_PLAYBACK_STATE_TEXT, RESTORE_PLAYBACK_STATE_LONGTEXT, false ) View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/db6f8b7cb08e53f332dd3346e581ce9bb3b1e471...3b833f09b54d463335734e571ea95692914a7b8a -- View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/db6f8b7cb08e53f332dd3346e581ce9bb3b1e471...3b833f09b54d463335734e571ea95692914a7b8a You're receiving this email because of your account on code.videolan.org.
_______________________________________________ vlc-commits mailing list vlc-commits@videolan.org https://mailman.videolan.org/listinfo/vlc-commits