vlc | branch: master | Pierre Lamot <[email protected]> | Fri Oct 9 11:25:19 2020 +0200| [52d8195f0d53d28cbb0c494385aa141ed4de8712] | committer: Pierre Lamot
qml: remove obsolete menus widgets > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=52d8195f0d53d28cbb0c494385aa141ed4de8712 --- modules/gui/qt/Makefile.am | 12 --- modules/gui/qt/menus/qml/AudioMenu.qml | 54 ----------- modules/gui/qt/menus/qml/CheckableModelSubMenu.qml | 34 ------- modules/gui/qt/menus/qml/HelpMenu.qml | 28 ------ modules/gui/qt/menus/qml/MainDropdownMenu.qml | 51 ----------- modules/gui/qt/menus/qml/MainMenubar.qml | 33 ------- modules/gui/qt/menus/qml/MediaMenu.qml | 102 --------------------- modules/gui/qt/menus/qml/PlaybackMenu.qml | 86 ----------------- modules/gui/qt/menus/qml/PopupMenu.qml | 64 ------------- modules/gui/qt/menus/qml/SubtitleMenu.qml | 35 ------- modules/gui/qt/menus/qml/ToolsMenu.qml | 34 ------- modules/gui/qt/menus/qml/VideoMenu.qml | 97 -------------------- modules/gui/qt/menus/qml/ViewMenu.qml | 81 ---------------- modules/gui/qt/player/qml/ControlBar.qml | 1 - modules/gui/qt/player/qml/ControlButtons.qml | 1 - modules/gui/qt/player/qml/Player.qml | 1 - modules/gui/qt/vlc.qrc | 12 --- 17 files changed, 726 deletions(-) diff --git a/modules/gui/qt/Makefile.am b/modules/gui/qt/Makefile.am index 1cf5da7f59..eae0de1cc7 100644 --- a/modules/gui/qt/Makefile.am +++ b/modules/gui/qt/Makefile.am @@ -635,20 +635,8 @@ libqt_plugin_la_QML = \ gui/qt/medialibrary/qml/VideoGridItem.qml \ gui/qt/medialibrary/qml/VideoInfoExpandPanel.qml \ gui/qt/medialibrary/qml/VideoListDisplay.qml \ - gui/qt/menus/qml/AudioMenu.qml \ - gui/qt/menus/qml/CheckableModelSubMenu.qml \ gui/qt/menus/qml/GlobalShortcuts.qml \ - gui/qt/menus/qml/HelpMenu.qml \ - gui/qt/menus/qml/MainDropdownMenu.qml \ - gui/qt/menus/qml/MainMenubar.qml \ gui/qt/menus/qml/Menubar.qml \ - gui/qt/menus/qml/MediaMenu.qml \ - gui/qt/menus/qml/PlaybackMenu.qml \ - gui/qt/menus/qml/PopupMenu.qml \ - gui/qt/menus/qml/SubtitleMenu.qml \ - gui/qt/menus/qml/ToolsMenu.qml \ - gui/qt/menus/qml/VideoMenu.qml \ - gui/qt/menus/qml/ViewMenu.qml \ gui/qt/network/qml/DiscoverDisplay.qml \ gui/qt/network/qml/NetworkBrowseDisplay.qml \ gui/qt/network/qml/NetworkDisplay.qml \ diff --git a/modules/gui/qt/menus/qml/AudioMenu.qml b/modules/gui/qt/menus/qml/AudioMenu.qml deleted file mode 100644 index 6b8f7ffca8..0000000000 --- a/modules/gui/qt/menus/qml/AudioMenu.qml +++ /dev/null @@ -1,54 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import "qrc:///widgets/" as Widgets - -Widgets.MenuExt { - CheckableModelSubMenu { - title: i18n.qtr("Audio &Track"); - enabled: player.isPlaying - model: player.audioTracks - } - - CheckableModelSubMenu { - title: i18n.qtr("Audio &Device") - model: player.audioDevices - } - - CheckableModelSubMenu { - title: i18n.qtr("&Stereo Mode"); - enabled: player.isPlaying - model: player.audioStereoMode - } - - MenuSeparator { } - - CheckableModelSubMenu { - title: i18n.qtr("&Visualizations"); - enabled: player.isPlaying - model: player.audioVisualization - } - - MenuSeparator { } - - Action { text: i18n.qtr("Increase Volume"); enabled: player.isPlaying; onTriggered: player.setVolumeUp(); icon.source: "qrc:/toolbar/volume-high.svg"; } - Action { text: i18n.qtr("Decrease Volume"); enabled: player.isPlaying; onTriggered: player.setVolumeDown(); icon.source: "qrc:/toolbar/volume-low.svg"; } - Action { text: i18n.qtr("Mute"); enabled: player.isPlaying; onTriggered: player.toggleMuted(); icon.source: "qrc:/toolbar/volume-muted.svg"; } -} diff --git a/modules/gui/qt/menus/qml/CheckableModelSubMenu.qml b/modules/gui/qt/menus/qml/CheckableModelSubMenu.qml deleted file mode 100644 index 16dd92f6f0..0000000000 --- a/modules/gui/qt/menus/qml/CheckableModelSubMenu.qml +++ /dev/null @@ -1,34 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import "qrc:///widgets/" as Widgets - -Widgets.MenuExt { - property alias model: values.model - Repeater { - id: values - Widgets.MenuItemExt { - text: model.display - checkable: true - checked: model.checked - onTriggered: model.checked = !model.checked - } - } -} diff --git a/modules/gui/qt/menus/qml/HelpMenu.qml b/modules/gui/qt/menus/qml/HelpMenu.qml deleted file mode 100644 index d51b13305b..0000000000 --- a/modules/gui/qt/menus/qml/HelpMenu.qml +++ /dev/null @@ -1,28 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 -import org.videolan.vlc 0.1 - -import "qrc:///widgets/" as Widgets - -Widgets.MenuExt { - Action { text: i18n.qtr("&Help"); onTriggered: dialogProvider.helpDialog(); icon.source: "qrc:/menu/help.svg"; shortcut: "F1" } - Action { text: i18n.qtr("Check for &Updates..."); onTriggered: dialogProvider.updateDialog(); } - Action { text: i18n.qtr("&About"); onTriggered: history.push(["about"]); icon.source: "qrc:/menu/info.svg"; shortcut: "Shift+F1" } -} diff --git a/modules/gui/qt/menus/qml/MainDropdownMenu.qml b/modules/gui/qt/menus/qml/MainDropdownMenu.qml deleted file mode 100644 index 5f7df078c1..0000000000 --- a/modules/gui/qt/menus/qml/MainDropdownMenu.qml +++ /dev/null @@ -1,51 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import "qrc:///widgets/" as Widgets - -//main menus, to be used as a dropdown menu -Widgets.MenuExt { - id: mainDropdownMenu - //make the menu modal, as we are not attached to a QQuickWindow - modal: true - closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnEscape - - - MediaMenu { title: i18n.qtr("&Media") } - PlaybackMenu { title: i18n.qtr("&Playback") } - AudioMenu { title: i18n.qtr("&Audio") } - VideoMenu { title: i18n.qtr("&Video") } - SubtitleMenu { title: i18n.qtr("&Subtitle") } - ToolsMenu { title: i18n.qtr("&Tools") } - ViewMenu { title: i18n.qtr("V&iew") } - HelpMenu { title: i18n.qtr("&Help") } - - function openBelow(obj) { - this.x = (obj.x + obj.width / 2) - this.width / 2 - this.y = obj.y + obj.height - this.open() - } - - function openAbove(obj) { - this.x = (obj.x + obj.width / 2) - this.width / 2 - this.y = obj.y - this.height - this.open() - } -} diff --git a/modules/gui/qt/menus/qml/MainMenubar.qml b/modules/gui/qt/menus/qml/MainMenubar.qml deleted file mode 100644 index 25c426c55a..0000000000 --- a/modules/gui/qt/menus/qml/MainMenubar.qml +++ /dev/null @@ -1,33 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import "qrc:///widgets/" as Widgets - -//main menus as a MenuBar -MenuBar { - MediaMenu { title: i18n.qtr("&Media") } - PlaybackMenu { title: i18n.qtr("&Playback") } - AudioMenu { title: i18n.qtr("&Audio") } - VideoMenu { title: i18n.qtr("&Video") } - SubtitleMenu { title: i18n.qtr("&Subtitle") } - ToolsMenu { title: i18n.qtr("&Tools") } - ViewMenu { title: i18n.qtr("V&iew") } - HelpMenu { title: i18n.qtr("&Help") } -} diff --git a/modules/gui/qt/menus/qml/MediaMenu.qml b/modules/gui/qt/menus/qml/MediaMenu.qml deleted file mode 100644 index fe0432cbfc..0000000000 --- a/modules/gui/qt/menus/qml/MediaMenu.qml +++ /dev/null @@ -1,102 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import "qrc:///widgets/" as Widgets - -Widgets.MenuExt { - id: mediaMenu - - Action { text: i18n.qtr("Open &File..." ) ; onTriggered: dialogProvider.simpleOpenDialog(); icon.source:"qrc:/type/file-asym.svg" } - Action { text: i18n.qtr( "&Open Multiple Files..." ); onTriggered: dialogProvider.openFileDialog(); icon.source:"qrc:/type/file-asym.svg"; } - Action { text: i18n.qtr( "Open D&irectory" ); onTriggered: dialogProvider.PLOpenDir(); icon.source:"qrc:/type/folder-grey.svg"; shortcut: "Ctrl+F" } - - Action { text: i18n.qtr("Open &Disc..."); onTriggered: dialogProvider.openDiscDialog(); icon.source:"qrc:/type/disc.svg"; shortcut: "Ctrl+D" } - Action { text: i18n.qtr("Open &Network Stream..."); onTriggered: dialogProvider.openNetDialog(); icon.source:"qrc:/type/network.svg"; shortcut: "Ctrl+N" } - Action { text: i18n.qtr("Open &Capture Device..."); onTriggered: dialogProvider.openCaptureDialog(); icon.source:"qrc:/type/capture-card.svg"; shortcut: "Ctrl+C" } - Action { text: i18n.qtr("Open &Location from clipboard"); onTriggered: dialogProvider.openUrlDialog(); shortcut: "Ctrl+V" } - - - Widgets.MenuExt { - id: recentsMenu - title: i18n.qtr("Open &Recent Media") - property bool hasData: true - onAboutToShow:{ - recentsMenu.hasData = Boolean(recentsMedias.rowCount()) - } - - function moveItemToPos(item, pos) { - for ( var i = 0; i < recentsMenu.count; i++ ) { - if (recentsMenu.itemAt(i) == item) { - recentsMenu.moveItem(i, pos) - return; - } - } - } - - Repeater { - model: recentsMedias - - Widgets.MenuItemExt { - text: mrl - onTriggered:{ - mediaMenu.close() //needed since menuItem isn't a direct child of a menu - mainPlaylistController.append([mrl], true) - } - - Shortcut { - sequence: "Ctrl+" + (index + 1) - onActivated: mainPlaylistController.append([mrl], true) - context: Qt.ApplicationShortcut - } - } - - //replace last elements as the repeater won't keep the original - //order of the menu when updated - onItemAdded: { - recentsMenu.moveItemToPos(clearAction, recentsMenu.count - 1) - recentsMenu.moveItemToPos(clearSepId, recentsMenu.count - 2) - } - - onItemRemoved: { - recentsMenu.moveItemToPos(clearAction, recentsMenu.count - 1) - recentsMenu.moveItemToPos(clearSepId, recentsMenu.count - 2) - } - } - - MenuSeparator { - id: clearSepId - } - - Widgets.MenuItemExt { - id: clearAction - text: i18n.qtr("Clear") - enabled: recentsMenu.hasData - onTriggered:recentsMedias.clear() - } - } - - Action { text: i18n.qtr("Save Playlist to &File..."); onTriggered: dialogProvider.savePlayingToPlaylist(); icon.source: ""; shortcut: "Ctrl+Y" } - Action { text: i18n.qtr("Conve&rt / Save..." ); onTriggered: dialogProvider.openAndTranscodingDialogs(); icon.source: ""; shortcut: "Ctrl+R" } - Action { text: i18n.qtr("&Stream..." ); onTriggered: dialogProvider.openAndStreamingDialogs(); icon.source: "qrc:/menu/stream.svg"; shortcut: "Ctrl+S" } - - //Action { text: i18n.qtr( "&close to systray" ); onTriggered: dialogprovider.closeToSystray(); } - Action { text: i18n.qtr( "Quit at the end of playlist" ); onTriggered: console.warn("FIXME"); shortcut: "Ctrl+Q"; checkable: true; checked: true; } - Action { text: i18n.qtr( "&Quit" ); onTriggered: dialogProvider.quit(); icon.source:"qrc:/menu/exit.svg"; shortcut: "Ctrl+Q" } -} diff --git a/modules/gui/qt/menus/qml/PlaybackMenu.qml b/modules/gui/qt/menus/qml/PlaybackMenu.qml deleted file mode 100644 index 33e2bea28e..0000000000 --- a/modules/gui/qt/menus/qml/PlaybackMenu.qml +++ /dev/null @@ -1,86 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import org.videolan.vlc 0.1 - -import "qrc:///widgets/" as Widgets - -Widgets.MenuExt { - property bool isPlaying: player.playingState != PlayerController.PLAYING_STATE_STOPPED - - - CheckableModelSubMenu { - title: i18n.qtr("Title") - enabled: player.isPlaying - model: player.titles - } - - - CheckableModelSubMenu { - title: i18n.qtr("Chapters"); - enabled: player.isPlaying - model: player.chapters - } - - CheckableModelSubMenu { - title: i18n.qtr("Program"); - enabled: player.isPlaying - model: player.programs - } - - Action { - text: i18n.qtr("Custom Bookmarks") - onTriggered: dialogProvider.bookmarksDialog() - enabled: player.isPlaying - } - - MenuSeparator { } - - Widgets.MenuExt { - title: i18n.qtr("Renderer"); - } - - MenuSeparator { } - - Widgets.MenuExt { - title: i18n.qtr("Speed"); - enabled: isPlaying - Action { text: i18n.qtr("&Faster"); onTriggered: player.faster(); icon.source: "qrc:/toolbar/faster2.svg"; } - Action { text: i18n.qtr("&Faster (fine)"); onTriggered: player.littlefaster(); icon.source: "qrc:/toolbar/faster2.svg"; } - Action { text: i18n.qtr("N&ormal Speed"); onTriggered: player.normalRate(); } - Action { text: i18n.qtr("Slo&wer"); onTriggered: player.slower(); icon.source: "qrc:/toolbar/slower2.svg"; } - Action { text: i18n.qtr("Slo&wer (fine)"); onTriggered: player.littleslower(); icon.source: "qrc:/toolbar/slower2.svg"; } - } - - MenuSeparator { } - - Action { text: i18n.qtr("&Jump Forward"); enabled: player.isPlaying; onTriggered: player.jumpFwd(); icon.source: "qrc:/toolbar/skip_fw.svg"; } - Action { text: i18n.qtr("Jump Bac&kward"); enabled: player.isPlaying; onTriggered: player.jumpBwd(); icon.source: "qrc:/toolbar/skip_back.svg"; } - Action { text: i18n.qtr("Jump to Specific &Time"); enabled: player.isPlaying; onTriggered: dialogProvider.gotoTimeDialog(); } - - MenuSeparator { } - - Action { text: i18n.qtr("Play"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.play(); icon.source: "qrc:/toolbar/play_b.svg"; } - Action { text: i18n.qtr("Pause"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.pause(); icon.source: "qrc:/toolbar/pause_b.svg"; } - Action { text: i18n.qtr("Stop"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.stop(); icon.source: "qrc:/toolbar/stop_b.svg"; } - Action { text: i18n.qtr("Previous"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.previous(); icon.source: "qrc:/toolbar/previous_b.svg"; } - Action { text: i18n.qtr("Next"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.next(); icon.source: "qrc:/toolbar/next_b.svg"; } - Action { text: i18n.qtr("Record"); enabled: player.isPlaying ; onTriggered: player.toggleRecord(); icon.source: "qrc:/toolbar/record.svg"; } -} diff --git a/modules/gui/qt/menus/qml/PopupMenu.qml b/modules/gui/qt/menus/qml/PopupMenu.qml deleted file mode 100644 index 636b1212cf..0000000000 --- a/modules/gui/qt/menus/qml/PopupMenu.qml +++ /dev/null @@ -1,64 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import org.videolan.vlc 0.1 - -import "qrc:///widgets/" as Widgets - -//main menus, to be used as a dropdown menu -Widgets.MenuExt { - //make the menu modal, as we are not attached to a QQuickWindow - modal: true - closePolicy: Popup.CloseOnPressOutside | Popup.CloseOnEscape - - Action { text: i18n.qtr("Play"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.play(); icon.source: "qrc:/toolbar/play_b.svg"; } - Action { text: i18n.qtr("Pause"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.pause(); icon.source: "qrc:/toolbar/pause_b.svg"; } - Action { text: i18n.qtr("Stop"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.stop(); icon.source: "qrc:/toolbar/stop_b.svg"; } - Action { text: i18n.qtr("Previous"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.previous(); icon.source: "qrc:/toolbar/previous_b.svg"; } - Action { text: i18n.qtr("Next"); enabled: player.isPlaying ; onTriggered: mainPlaylistController.next(); icon.source: "qrc:/toolbar/next_b.svg"; } - Action { text: i18n.qtr("Record"); enabled: player.isPlaying ; onTriggered: player.toggleRecord(); icon.source: "qrc:/toolbar/record.svg"; } - - MenuSeparator {} - Action { text: i18n.qtr("&Fullscreen Interface"); checkable: true; checked: mainInterface.interfaceFullScreen; onTriggered: mainInterface.interfaceFullScreen = !mainInterface.interfaceFullScreen } - - MenuSeparator {} - AudioMenu { title: i18n.qtr("&Audio") } - VideoMenu { title: i18n.qtr("&Video") } - SubtitleMenu { title: i18n.qtr("&Subtitle") } - PlaybackMenu { title: i18n.qtr("&Playback") } - - MenuSeparator {} - - ViewMenu { title: i18n.qtr("V&iew") } - ToolsMenu { title: i18n.qtr("&Tools") } - MediaMenu { title: i18n.qtr("&Media") } - - function openBelow(obj) { - this.x = (obj.x + obj.width / 2) - this.width / 2 - this.y = obj.y + obj.height - this.open() - } - - function openAbove(obj) { - this.x = (obj.x + obj.width / 2) - this.width / 2 - this.y = obj.y - this.height - this.open() - } -} diff --git a/modules/gui/qt/menus/qml/SubtitleMenu.qml b/modules/gui/qt/menus/qml/SubtitleMenu.qml deleted file mode 100644 index e2d96856b5..0000000000 --- a/modules/gui/qt/menus/qml/SubtitleMenu.qml +++ /dev/null @@ -1,35 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import "qrc:///widgets/" as Widgets - -Widgets.MenuExt { - Action { - text: i18n.qtr("Add Subtitle File...") - enabled: player.isPlaying - onTriggered: dialogProvider.loadSubtitlesFile(); - } - - CheckableModelSubMenu { - title: i18n.qtr("Sub Track"); - enabled: player.isPlaying - model: player.subtitleTracks - } -} diff --git a/modules/gui/qt/menus/qml/ToolsMenu.qml b/modules/gui/qt/menus/qml/ToolsMenu.qml deleted file mode 100644 index 4e5f4f51ec..0000000000 --- a/modules/gui/qt/menus/qml/ToolsMenu.qml +++ /dev/null @@ -1,34 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import "qrc:///widgets/" as Widgets - -Widgets.MenuExt { - Action { text: i18n.qtr("&Effects and Filters"); onTriggered: dialogProvider.extendedDialog(); icon.source: "qrc:/menu/settings.svg"; shortcut: "Ctrl+E" } - Action { text: i18n.qtr("&Track Synchronization"); onTriggered: dialogProvider.synchroDialog(); icon.source: "qrc:/menu/settings.svg"; } - Action { text: i18n.qtr("Media &Information") ; onTriggered: dialogProvider.mediaInfoDialog(); icon.source: "qrc:/menu/info.svg"; shortcut: "Ctrl+I" } - Action { text: i18n.qtr("&Codec Information") ; onTriggered: dialogProvider.mediaCodecDialog(); icon.source: "qrc:/menu/info.svg"; shortcut: "Ctrl+J" } - Action { text: i18n.qtr("Program Guide"); onTriggered: dialogProvider.epgDialog(); } - Action { text: i18n.qtr("&Messages"); onTriggered: dialogProvider.messagesDialog(); icon.source: "qrc:/menu/messages.svg"; shortcut: "Ctrl+M" } - Action { text: i18n.qtr("Plu&gins and extensions"); onTriggered: dialogProvider.pluginDialog(); } - MenuSeparator {} - Action { text: i18n.qtr("Customise Interface"); onTriggered: dialogProvider.toolbarDialog(); icon.source: "qrc:/menu/preferences.svg";} - Action { text: i18n.qtr("&Preferences"); onTriggered: dialogProvider.prefsDialog(); icon.source: "qrc:/menu/preferences.svg"; shortcut: "Ctrl+P" } -} diff --git a/modules/gui/qt/menus/qml/VideoMenu.qml b/modules/gui/qt/menus/qml/VideoMenu.qml deleted file mode 100644 index 1a01824cda..0000000000 --- a/modules/gui/qt/menus/qml/VideoMenu.qml +++ /dev/null @@ -1,97 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import "qrc:///widgets/" as Widgets - -Widgets.MenuExt { - CheckableModelSubMenu { - title: i18n.qtr("Video Track"); - enabled: player.isPlaying - model: player.videoTracks - } - - MenuSeparator { } - - Action { - text: i18n.qtr("Fullscreen") - enabled: player.isPlaying - checkable: true - checked: player.fullscreen - onTriggered: player.fullscreen = !player.fullscreen - } - - Action { - text: i18n.qtr("Always Fit Window") - enabled: player.isPlaying - checkable: true - checked: player.autoscale - onTriggered: player.autoscale = !player.autoscale - } - - Action { - text: i18n.qtr("Set as Wallpaper") - enabled: player.isPlaying - checkable: true - checked: player.wallpaperMode - onTriggered: player.wallpaperMode = !player.wallpaperMode; - } - - MenuSeparator { } - - CheckableModelSubMenu { - title: i18n.qtr("Zoom") - enabled: player.isPlaying - model: player.zoom - } - - CheckableModelSubMenu { - title: i18n.qtr("Aspect Ratio") - enabled: player.isPlaying - model: player.aspectRatio - } - - CheckableModelSubMenu { - title: i18n.qtr("Crop") - enabled: player.isPlaying - model: player.crop - } - - MenuSeparator { } - - CheckableModelSubMenu { - title: i18n.qtr("Deinterlace") - enabled: player.isPlaying - model: player.deinterlace - } - - CheckableModelSubMenu { - title: i18n.qtr("Deinterlace Mode"); - enabled: player.isPlaying - model: player.deinterlaceMode - } - - MenuSeparator { } - - Action { - text: i18n.qtr("Take snapshot"); - enabled: player.isPlaying - onTriggered: player.snapshot(); - } -} diff --git a/modules/gui/qt/menus/qml/ViewMenu.qml b/modules/gui/qt/menus/qml/ViewMenu.qml deleted file mode 100644 index 44d92e5b1a..0000000000 --- a/modules/gui/qt/menus/qml/ViewMenu.qml +++ /dev/null @@ -1,81 +0,0 @@ -/***************************************************************************** - * Copyright (C) 2019 VLC authors and VideoLAN - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * ( at your option ) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. - *****************************************************************************/ -import QtQuick 2.11 -import QtQuick.Controls 2.4 - -import "qrc:///style/" -import "qrc:///widgets/" as Widgets - -Widgets.MenuExt { - id: viewMenu - Action { - text: i18n.qtr("Play&list") - onTriggered: mainInterface.playlistVisible = !mainInterface.playlistVisible - } - Action { - text: i18n.qtr("Docked Playlist") - checkable: true - checked: mainInterface.playlistDocked - onTriggered: mainInterface.playlistDocked = !mainInterface.playlistDocked - } - Action { - text: i18n.qtr("&Always on Top") - checkable: true - checked: mainInterface.interfaceAlwaysOnTop - onTriggered: mainInterface.interfaceAlwaysOnTop = !mainInterface.interfaceAlwaysOnTop - } - - Action { - text: i18n.qtr("&Fullscreen Interface") - checkable: true - checked: mainInterface.interfaceFullScreen - onTriggered: mainInterface.interfaceFullScreen = !mainInterface.interfaceFullScreen - } - - - Widgets.MenuItemExt { - text: i18n.qtr("&View Items as Grid") - checkable: true - checked: mainInterface.gridView - onTriggered: mainInterface.gridView = !mainInterface.gridView - } - - Widgets.MenuExt { - title: i18n.qtr("Color Scheme") - Repeater { - model: VLCStyle.colors.colorSchemes - Widgets.MenuItemExt { - text: modelData - checkable: true - checked: modelData === VLCStyle.colors.state - onTriggered: mainInterface.colorScheme = modelData - } - } - } - - MenuSeparator {} - - CheckableModelSubMenu{ - title: i18n.qtr("Add Interface") - model: mainInterface.extraInterfaces - } - - /* FIXME unimplemented - extensions - */ -} diff --git a/modules/gui/qt/player/qml/ControlBar.qml b/modules/gui/qt/player/qml/ControlBar.qml index 2646204154..f085b7075d 100644 --- a/modules/gui/qt/player/qml/ControlBar.qml +++ b/modules/gui/qt/player/qml/ControlBar.qml @@ -25,7 +25,6 @@ import org.videolan.vlc 0.1 import "qrc:///style/" import "qrc:///widgets/" as Widgets -import "qrc:///menus/" as Menus import "qrc:///playlist/" as PL diff --git a/modules/gui/qt/player/qml/ControlButtons.qml b/modules/gui/qt/player/qml/ControlButtons.qml index e7c9f370f7..7182e73822 100644 --- a/modules/gui/qt/player/qml/ControlButtons.qml +++ b/modules/gui/qt/player/qml/ControlButtons.qml @@ -24,7 +24,6 @@ import QtGraphicalEffects 1.0 import org.videolan.vlc 0.1 import "qrc:///widgets/" as Widgets -import "qrc:///menus/" as Menus import "qrc:///style/" Item{ diff --git a/modules/gui/qt/player/qml/Player.qml b/modules/gui/qt/player/qml/Player.qml index 48972e2735..33d50616d4 100644 --- a/modules/gui/qt/player/qml/Player.qml +++ b/modules/gui/qt/player/qml/Player.qml @@ -26,7 +26,6 @@ import "qrc:///style/" import "qrc:///widgets/" as Widgets import "qrc:///util/KeyHelper.js" as KeyHelper import "qrc:///playlist/" as PL -import "qrc:///menus/" as Menus Widgets.NavigableFocusScope { id: rootPlayer diff --git a/modules/gui/qt/vlc.qrc b/modules/gui/qt/vlc.qrc index 1fc54805fe..31fc199ebb 100644 --- a/modules/gui/qt/vlc.qrc +++ b/modules/gui/qt/vlc.qrc @@ -282,19 +282,7 @@ <file alias="PlaylistDetachedWindow.qml">playlist/qml/PlaylistDetachedWindow.qml</file> </qresource> <qresource prefix="/menus"> - <file alias="AudioMenu.qml">menus/qml/AudioMenu.qml</file> - <file alias="HelpMenu.qml">menus/qml/HelpMenu.qml</file> - <file alias="MainDropdownMenu.qml">menus/qml/MainDropdownMenu.qml</file> - <file alias="MainMenubar.qml">menus/qml/MainMenubar.qml</file> - <file alias="MediaMenu.qml">menus/qml/MediaMenu.qml</file> <file alias="Menubar.qml">menus/qml/Menubar.qml</file> - <file alias="PlaybackMenu.qml">menus/qml/PlaybackMenu.qml</file> - <file alias="SubtitleMenu.qml">menus/qml/SubtitleMenu.qml</file> - <file alias="ToolsMenu.qml">menus/qml/ToolsMenu.qml</file> - <file alias="VideoMenu.qml">menus/qml/VideoMenu.qml</file> - <file alias="CheckableModelSubMenu.qml">menus/qml/CheckableModelSubMenu.qml</file> - <file alias="ViewMenu.qml">menus/qml/ViewMenu.qml</file> - <file alias="PopupMenu.qml">menus/qml/PopupMenu.qml</file> <file alias="GlobalShortcuts.qml">menus/qml/GlobalShortcuts.qml</file> </qresource> <qresource prefix="/player"> _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
