[vlc-commits] [Git][videolan/vlc][master] 2 commits: qt: use enum in signal mapper for SimplePref page button
Jean-Baptiste Kempf (@jbk)
gitlab at videolan.org
Sat Jul 15 15:25:40 UTC 2023
Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
6197e1c0 by Pierre Lamot at 2023-07-15T15:05:07+00:00
qt: use enum in signal mapper for SimplePref page button
the value is matched against the enum afterwards
- - - - -
e4fef615 by Pierre Lamot at 2023-07-15T15:05:07+00:00
qt: don't show medialibrary panel when feature is disabled
- - - - -
1 changed file:
- modules/gui/qt/dialogs/preferences/simple_preferences.cpp
Changes:
=====================================
modules/gui/qt/dialogs/preferences/simple_preferences.cpp
=====================================
@@ -268,15 +268,16 @@ SPrefsCatList::SPrefsCatList( qt_intf_t *_p_intf, QWidget *_parent ) :
layout->addWidget( button );
};
- addCategory( qfut(INTF_TITLE), qfut(INTF_TOOLTIP), ":/prefsmenu/spref_interface.png" , 0 );
- addCategory( qfut(AUDIO_TITLE), qfut(AUDIO_TOOLTIP), ":/prefsmenu/spref_audio.png", 1 );
- addCategory( qfut(VIDEO_TITLE), qfut(VIDEO_TOOLTIP), ":/prefsmenu/spref_video.png", 2 );
- addCategory( qfut(SUBPIC_TITLE), qfut(SUBPIC_TOOLTIP), ":/prefsmenu/spref_subtitles.png", 3 );
- addCategory( qfut(INPUT_TITLE), qfut(INPUT_TOOLTIP), ":/prefsmenu/spref_input.png", 4 );
- addCategory( qfut(HOTKEYS_TITLE), qfut(HOTKEYS_TOOLTIP), ":/prefsmenu/spref_hotkeys.png", 5 );
- addCategory( qfut(ML_TITLE), qfut(ML_TOOLTIP), ":/prefsmenu/spref_medialibrary.png", 6 );
-
- qobject_cast<QToolButton*>(mapper->mapping(0))->setChecked(true);
+ addCategory( qfut(INTF_TITLE), qfut(INTF_TOOLTIP), ":/prefsmenu/spref_interface.png" , SPrefsInterface );
+ addCategory( qfut(AUDIO_TITLE), qfut(AUDIO_TOOLTIP), ":/prefsmenu/spref_audio.png", SPrefsAudio );
+ addCategory( qfut(VIDEO_TITLE), qfut(VIDEO_TOOLTIP), ":/prefsmenu/spref_video.png", SPrefsVideo );
+ addCategory( qfut(SUBPIC_TITLE), qfut(SUBPIC_TOOLTIP), ":/prefsmenu/spref_subtitles.png", SPrefsSubtitles );
+ addCategory( qfut(INPUT_TITLE), qfut(INPUT_TOOLTIP), ":/prefsmenu/spref_input.png", SPrefsInputAndCodecs );
+ addCategory( qfut(HOTKEYS_TITLE), qfut(HOTKEYS_TOOLTIP), ":/prefsmenu/spref_hotkeys.png", SPrefsHotkeys );
+ if ( vlc_ml_instance_get( p_intf ) != nullptr )
+ addCategory( qfut(ML_TITLE), qfut(ML_TOOLTIP), ":/prefsmenu/spref_medialibrary.png", SPrefsMediaLibrary );
+
+ qobject_cast<QToolButton*>(mapper->mapping(SPrefsInterface))->setChecked(true);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing( 1 );
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8bf85bbf79ec067843eab3154f74d349ee7ee2ac...e4fef615912ce8a7585e5387c9681ff1fef1b756
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8bf85bbf79ec067843eab3154f74d349ee7ee2ac...e4fef615912ce8a7585e5387c9681ff1fef1b756
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list