From 3203bfe1a626388b725fb68a274e92f78891d82c Mon Sep 17 00:00:00 2001
From: Benjamin Arnaud <benjamin.arnaud@videolabs.io>
Date: Wed, 4 May 2022 12:18:21 +0200
Subject: [PATCH] qml: Rename LanguageMenu to TracksMenu

---
 modules/gui/qt/Makefile.am                           |  2 +-
 .../player/qml/{LanguageMenu.qml => TracksMenu.qml}  |  0
 .../qt/player/qml/controlbarcontrols/LangButton.qml  | 12 ++++++------
 modules/gui/qt/vlc.qrc                               |  2 +-
 po/POTFILES.in                                       |  2 +-
 5 files changed, 9 insertions(+), 9 deletions(-)
 rename modules/gui/qt/player/qml/{LanguageMenu.qml => TracksMenu.qml} (100%)

diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am
index c27dbcfbe2cb..8a461b9307bb 100644
--- a/modules/gui/qt/Makefile.am
+++ b/modules/gui/qt/Makefile.am
@@ -806,7 +806,6 @@ libqt_plugin_la_QML = \
 	gui/qt/player/qml/qmldir \
 	gui/qt/player/qml/ControlBar.qml \
 	gui/qt/player/qml/ControlbarControls.qml \
-	gui/qt/player/qml/LanguageMenu.qml \
 	gui/qt/player/qml/PlaybackSpeed.qml \
 	gui/qt/player/qml/MiniPlayer.qml \
 	gui/qt/player/qml/PIPPlayer.qml \
@@ -819,6 +818,7 @@ libqt_plugin_la_QML = \
 	gui/qt/player/qml/SliderBar.qml \
 	gui/qt/player/qml/TopBar.qml \
 	gui/qt/player/qml/TrackInfo.qml \
+	gui/qt/player/qml/TracksMenu.qml \
 	gui/qt/player/qml/TracksPage.qml \
 	gui/qt/player/qml/TracksPageAudio.qml \
 	gui/qt/player/qml/TracksPageSpeed.qml \
diff --git a/modules/gui/qt/player/qml/LanguageMenu.qml b/modules/gui/qt/player/qml/TracksMenu.qml
similarity index 100%
rename from modules/gui/qt/player/qml/LanguageMenu.qml
rename to modules/gui/qt/player/qml/TracksMenu.qml
diff --git a/modules/gui/qt/player/qml/controlbarcontrols/LangButton.qml b/modules/gui/qt/player/qml/controlbarcontrols/LangButton.qml
index 2394b98194fb..61bd0030f8dc 100644
--- a/modules/gui/qt/player/qml/controlbarcontrols/LangButton.qml
+++ b/modules/gui/qt/player/qml/controlbarcontrols/LangButton.qml
@@ -29,18 +29,18 @@ Widgets.IconControlButton {
     size: VLCStyle.icon_medium
     iconText: VLCIcons.audiosub
 
-    enabled: langMenuLoader.status === Loader.Ready
-    onClicked: langMenuLoader.item.open()
+    enabled: menuLoader.status === Loader.Ready
+    onClicked: menuLoader.item.open()
 
     text: I18n.qtr("Languages and tracks")
 
     Loader {
-        id: langMenuLoader
+        id: menuLoader
 
         active: (typeof rootPlayer !== 'undefined') && (rootPlayer !== null)
 
-        sourceComponent: Player.LanguageMenu {
-            id: langMenu
+        sourceComponent: Player.TracksMenu {
+            id: menu
 
             parent: rootPlayer
             focus: true
@@ -51,7 +51,7 @@ Widgets.IconControlButton {
             onOpened: {
                 playerControlLayout.requestLockUnlockAutoHide(true, playerControlLayout)
                 if (!!rootPlayer)
-                    rootPlayer.menu = langMenu
+                    rootPlayer.menu = menu
             }
 
             onClosed: {
diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc
index 654833fca338..e85f8b563c0f 100644
--- a/modules/gui/qt/vlc.qrc
+++ b/modules/gui/qt/vlc.qrc
@@ -345,6 +345,7 @@
         <file alias="ControlBar.qml">player/qml/ControlBar.qml</file>
         <file alias="ResumeDialog.qml">player/qml/ResumeDialog.qml</file>
         <file alias="SliderBar.qml">player/qml/SliderBar.qml</file>
+        <file alias="TracksMenu.qml">player/qml/TracksMenu.qml</file>
         <file alias="TrackInfo.qml">player/qml/TrackInfo.qml</file>
         <file alias="TracksPage.qml">player/qml/TracksPage.qml</file>
         <file alias="TracksPageSpeed.qml">player/qml/TracksPageSpeed.qml</file>
@@ -357,7 +358,6 @@
         <file alias="PlayerControlLayout.qml">player/qml/PlayerControlLayout.qml</file>
         <file alias="PlayerMenu.qml">player/qml/PlayerMenu.qml</file>
         <file alias="PlayerMenuItem.qml">player/qml/PlayerMenuItem.qml</file>
-        <file alias="LanguageMenu.qml">player/qml/LanguageMenu.qml</file>
         <file alias="ControlLayout.qml">player/qml/ControlLayout.qml</file>
         <file alias="PlaybackSpeed.qml">player/qml/PlaybackSpeed.qml</file>
         <file alias="PlayerPlaylistVisibilityFSM.qml">player/qml/PlayerPlaylistVisibilityFSM.qml</file>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9dc15c38b8c4..973c4e4341d5 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -869,10 +869,10 @@ modules/gui/qt/network/qml/NetworkHomeDisplay.qml
 modules/gui/qt/network/qml/NetworkListItem.qml
 modules/gui/qt/network/qml/ServicesHomeDisplay.qml
 modules/gui/qt/player/qml/ControlbarControls.qml
-modules/gui/qt/player/qml/LanguageMenu.qml
 modules/gui/qt/player/qml/Player.qml
 modules/gui/qt/player/qml/ResumeDialog.qml
 modules/gui/qt/player/qml/TopBar.qml
+modules/gui/qt/player/qml/TracksMenu.qml
 modules/gui/qt/player/qml/TracksPageAudio.qml
 modules/gui/qt/player/qml/TracksPageSubtitle.qml
 modules/gui/qt/player/qml/controlbarcontrols/TeletextWidget.qml
-- 
GitLab