mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
kdeplasma-addons: drop audioplayercontrol runner and nowplaying applet
if the interfaces are not even introspectable (e.g. chromium) and borked then the follwing happens - I will simply say no, show them the middle finger and move on Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
c22daafe11
commit
44a2ab9c9f
31 changed files with 7 additions and 2271 deletions
|
@ -16,7 +16,6 @@ add_subdirectory(life)
|
|||
add_subdirectory(luna)
|
||||
add_subdirectory(magnifique)
|
||||
add_subdirectory(notes)
|
||||
add_subdirectory(nowplaying)
|
||||
add_subdirectory(spellcheck)
|
||||
add_subdirectory(timer)
|
||||
add_subdirectory(eyes)
|
||||
|
@ -33,8 +32,8 @@ if(KDE4WORKSPACE_FOUND)
|
|||
add_subdirectory(fuzzy-clock)
|
||||
add_subdirectory(weather)
|
||||
add_subdirectory(icontasks)
|
||||
endif(KDE4WORKSPACE_FOUND)
|
||||
endif()
|
||||
|
||||
if ( QALCULATE_FOUND )
|
||||
if (QALCULATE_FOUND)
|
||||
add_subdirectory(qalculate)
|
||||
endif( QALCULATE_FOUND )
|
||||
endif()
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
project(nowplaying)
|
||||
|
||||
install(DIRECTORY package/
|
||||
DESTINATION ${KDE4_DATA_INSTALL_DIR}/plasma/plasmoids/nowplaying)
|
||||
|
||||
install(FILES package/metadata.desktop
|
||||
DESTINATION ${KDE4_SERVICES_INSTALL_DIR}
|
||||
RENAME plasma-applet-nowplaying.desktop)
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
#! /usr/bin/env bash
|
||||
$EXTRACTRC `find . -name \*.ui` >> rc.cpp || exit 11
|
||||
$XGETTEXT *.cpp -o `find . -name \*.qml` -o $podir/plasma_applet_nowplaying.pot
|
|
@ -1,23 +0,0 @@
|
|||
.pragma library
|
||||
|
||||
var control = service("mpris2", "@multiplex");
|
||||
|
||||
function associateItem(item, name)
|
||||
{
|
||||
control.associateItem(item, name);
|
||||
}
|
||||
|
||||
function callCommand(name)
|
||||
{
|
||||
control.startOperationCall(name, control.operationParameters(name));
|
||||
}
|
||||
|
||||
function seek(timeMs)
|
||||
{
|
||||
var desc = control.operationParameters('SetPosition');
|
||||
desc["microseconds"] = Math.floor(timeMs * 1000);
|
||||
print("Seeking to " + timeMs + "ms");
|
||||
control.startOperationCall('SetPosition', desc);
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,20 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
|
||||
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
|
||||
<kcfgfile name=""/>
|
||||
|
||||
<group name="General">
|
||||
<entry name="displayCover" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="displayArtist" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
<entry name="displayAlbum" type="Bool">
|
||||
<default>true</default>
|
||||
</entry>
|
||||
</group>
|
||||
|
||||
</kcfg>
|
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property Mpris2 source;
|
||||
|
||||
implicitWidth: {
|
||||
if (realArt.visible) {
|
||||
realArt.implicitWidth;
|
||||
} else if (logoArtItem.visible) {
|
||||
logoArtItem.implicitWidth
|
||||
} else {
|
||||
noArtItem.implicitWidth
|
||||
}
|
||||
}
|
||||
implicitHeight: {
|
||||
if (realArt.visible) {
|
||||
realArt.implicitHeight;
|
||||
} else if (logoArtItem.visible) {
|
||||
logoArtItem.implicitHeight
|
||||
} else {
|
||||
noArtItem.implicitHeight
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Image {
|
||||
id: noArtItem
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectFit
|
||||
visible: !realArt.visible && !logoArtItem.visible
|
||||
source: "images/nocover.png"
|
||||
}
|
||||
PlasmaCore.IconItem {
|
||||
id: logoArtItem
|
||||
anchors.fill: parent
|
||||
visible: !realArt.visible && root.source.logo != ''
|
||||
source: root.source.logo
|
||||
}
|
||||
Image {
|
||||
id: realArt
|
||||
anchors.fill: parent
|
||||
fillMode: Image.PreserveAspectFit
|
||||
visible: (status == Image.Ready)
|
||||
source: root.source.artUrl
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,100 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property int minimumWidth: minimumHeight + 120
|
||||
property int minimumHeight: metadataLine.implicitHeight + progressBar.height + metadataLine.anchors.bottomMargin
|
||||
|
||||
Component.onCompleted: {
|
||||
plasmoid.addEventListener('ConfigChanged', function(){
|
||||
albumArt.visible = plasmoid.readConfig("displayCover");
|
||||
});
|
||||
}
|
||||
|
||||
Mpris2 {
|
||||
id: source
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
|
||||
AlbumArt {
|
||||
id: albumArt
|
||||
source: source
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
width: (visible ? height : 0)
|
||||
}
|
||||
|
||||
MetadataLine {
|
||||
id: metadataLine
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: albumArt.right
|
||||
leftMargin: 2
|
||||
right: parent.right
|
||||
bottom: progressBar.top
|
||||
bottomMargin: 3
|
||||
}
|
||||
interval: 5000
|
||||
source: source
|
||||
}
|
||||
|
||||
PositionSlider {
|
||||
id: progressBar
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
left: albumArt.right
|
||||
leftMargin: 2
|
||||
right: parent.right
|
||||
}
|
||||
height: 5
|
||||
source: source
|
||||
}
|
||||
|
||||
PlayPauseButton {
|
||||
id: ppButton
|
||||
visible: albumArt.visible && source.canControl && mouseArea.containsMouse
|
||||
width: height
|
||||
anchors {
|
||||
// using anchors.fill causes spurious
|
||||
// "Possible anchor loop detected on fill"
|
||||
// warnings
|
||||
top: albumArt.top
|
||||
bottom: albumArt.bottom
|
||||
left: albumArt.left
|
||||
right: albumArt.right
|
||||
}
|
||||
source: source
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,89 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
import "../code/service.js" as Control
|
||||
|
||||
Row {
|
||||
id: root
|
||||
|
||||
property int controlSize: theme.largeIconSize;
|
||||
|
||||
property Mpris2 source;
|
||||
|
||||
PlasmaCore.Theme {
|
||||
id: theme
|
||||
}
|
||||
PlasmaComponents.ToolButton {
|
||||
width: controlSize
|
||||
height: controlSize
|
||||
id: prevButton
|
||||
iconSource: "media-skip-backward"
|
||||
onClicked: {
|
||||
Control.callCommand('Previous');
|
||||
}
|
||||
Component.onCompleted: {
|
||||
Control.associateItem(prevButton, 'Previous');
|
||||
}
|
||||
}
|
||||
PlasmaComponents.ToolButton {
|
||||
width: controlSize
|
||||
height: controlSize
|
||||
id: playPauseButton
|
||||
property string operation: (source.playbackStatus == 'Playing' ? 'Pause' : 'Play')
|
||||
iconSource: (source.playbackStatus == 'Playing' ? "media-playback-pause" : "media-playback-start")
|
||||
onClicked: {
|
||||
Control.callCommand(operation);
|
||||
}
|
||||
Component.onCompleted: {
|
||||
Control.associateItem(playPauseButton, operation);
|
||||
}
|
||||
onOperationChanged: {
|
||||
Control.associateItem(playPauseButton, operation);
|
||||
}
|
||||
}
|
||||
PlasmaComponents.ToolButton {
|
||||
width: controlSize
|
||||
height: controlSize
|
||||
id: stopButton
|
||||
iconSource: "media-playback-stop"
|
||||
onClicked: {
|
||||
Control.callCommand('Stop');
|
||||
}
|
||||
Component.onCompleted: {
|
||||
Control.associateItem(stopButton, 'Stop');
|
||||
}
|
||||
}
|
||||
PlasmaComponents.ToolButton {
|
||||
width: controlSize
|
||||
height: controlSize
|
||||
id: nextButton
|
||||
iconSource: "media-skip-forward"
|
||||
onClicked: {
|
||||
Control.callCommand('Next');
|
||||
}
|
||||
Component.onCompleted: {
|
||||
Control.associateItem(nextButton, 'Next');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,96 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property int minimumWidth: albumArt.width + controls.anchors.leftMargin + controls.implicitWidth + 25
|
||||
property int minimumHeight: metadataPane.implicitHeight + progressBar.height + metadataPane.anchors.bottomMargin + 75
|
||||
|
||||
Component.onCompleted: {
|
||||
plasmoid.addEventListener('ConfigChanged', function(){
|
||||
albumArt.visible = plasmoid.readConfig("displayCover");
|
||||
});
|
||||
}
|
||||
|
||||
Mpris2 {
|
||||
id: source
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
|
||||
AlbumArt {
|
||||
id: albumArt
|
||||
source: source
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
bottom: progressBar.top
|
||||
margins: 10
|
||||
}
|
||||
width: (visible ? height : 0)
|
||||
}
|
||||
|
||||
MetadataPanel {
|
||||
id: metadataPane
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: albumArt.right
|
||||
leftMargin: 10
|
||||
right: parent.right
|
||||
bottom: progressBar.top
|
||||
bottomMargin: 5
|
||||
}
|
||||
source: source
|
||||
}
|
||||
|
||||
PositionSlider {
|
||||
id: progressBar
|
||||
anchors {
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
margins: 10
|
||||
}
|
||||
height: 15
|
||||
source: source
|
||||
}
|
||||
|
||||
Controls {
|
||||
id: controls
|
||||
visible: source.canControl && mouseArea.containsMouse
|
||||
anchors {
|
||||
bottom: metadataPane.bottom
|
||||
left: metadataPane.left
|
||||
leftMargin: metadataPane.contentLeftOffset
|
||||
right: parent.right
|
||||
}
|
||||
source: source
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
|
||||
PlasmaComponents.Label {
|
||||
id: root
|
||||
|
||||
// TODO: make excess text scroll back and forth
|
||||
elide: Text.ElideMiddle
|
||||
}
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,114 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property alias interval: timer.interval
|
||||
property Mpris2 source
|
||||
property bool showArtist: true
|
||||
property bool showAlbum: true
|
||||
|
||||
implicitWidth: metadataLine.implicitWidth
|
||||
implicitHeight: metadataLine.implicitHeight
|
||||
|
||||
Component.onCompleted: {
|
||||
plasmoid.addEventListener('ConfigChanged', function(){
|
||||
showArtist = plasmoid.readConfig("displayArtist");
|
||||
showAlbum = plasmoid.readConfig("displayAlbum");
|
||||
});
|
||||
}
|
||||
|
||||
onSourceChanged: {
|
||||
if (source) {
|
||||
source.titleChanged.connect(function() {
|
||||
if (metadataLine.step == 0)
|
||||
metadataLine.updateText();
|
||||
});
|
||||
source.artistChanged.connect(function() {
|
||||
if (metadataLine.step == 1)
|
||||
metadataLine.updateText();
|
||||
});
|
||||
source.albumChanged.connect(function() {
|
||||
if (metadataLine.step == 2)
|
||||
metadataLine.updateText();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
id: metadataLine
|
||||
anchors {
|
||||
// using this instead of parent.fill prevents spurious
|
||||
// "possible anchor loop detected on fill" warnings
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
}
|
||||
property int step: 0;
|
||||
text: source.title
|
||||
//fade-out and -in on text change
|
||||
Behavior on text {
|
||||
SequentialAnimation {
|
||||
NumberAnimation { target: metadataLine; property: "opacity"; to: 0 }
|
||||
//needs to be here, otherwise the text changes first and fades to itself
|
||||
PropertyAction {}
|
||||
NumberAnimation { target: metadataLine; property: "opacity"; to: 1 }
|
||||
}
|
||||
}
|
||||
function updateText() {
|
||||
var newText = source.title;
|
||||
if (metadataLine.step == 1) {
|
||||
if (showArtist && source.artist != '') {
|
||||
newText = i18nc("What artist is this track by", "by %1", source.artist);
|
||||
} else {
|
||||
metadataLine.step = 2;
|
||||
}
|
||||
}
|
||||
if (metadataLine.step == 2) {
|
||||
if (showAlbum && source.album != '') {
|
||||
newText = i18nc("What album is this track on", "on %1", source.album);
|
||||
} else {
|
||||
metadataLine.step = 0;
|
||||
}
|
||||
}
|
||||
// prevent fading the text if it hasn't changed
|
||||
if (text != newText) {
|
||||
text = newText;
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: timer
|
||||
running: true
|
||||
interval: 5000
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
metadataLine.step = (metadataLine.step + 1) % 3;
|
||||
metadataLine.updateText();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,87 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property Mpris2 source
|
||||
property int contentLeftOffset: 3
|
||||
property bool showArtist: true
|
||||
property bool showAlbum: true
|
||||
|
||||
implicitHeight: childrenRect.height
|
||||
implicitWidth: contentLeftOffset + Math.max(Math.max(titleLabel.implicitWidth, artistLabel.implicitWidth), albumLabel.implicitWidth)
|
||||
height: childrenRect.height
|
||||
|
||||
Component.onCompleted: {
|
||||
plasmoid.addEventListener('ConfigChanged', function(){
|
||||
showArtist = plasmoid.readConfig("displayArtist");
|
||||
showAlbum = plasmoid.readConfig("displayAlbum");
|
||||
});
|
||||
}
|
||||
|
||||
function getLabelSize(weight)
|
||||
{
|
||||
return (parent.height + (parent.width /6)) / weight;
|
||||
}
|
||||
Label {
|
||||
id: titleLabel
|
||||
anchors {
|
||||
top: parent.top
|
||||
left: parent.left
|
||||
leftMargin: contentLeftOffset
|
||||
topMargin: 10
|
||||
right: parent.right
|
||||
}
|
||||
font.weight: Font.Bold
|
||||
font.pointSize: getLabelSize(16)
|
||||
text: source.title
|
||||
}
|
||||
Label {
|
||||
id: artistLabel
|
||||
font.pointSize: getLabelSize(18)
|
||||
anchors {
|
||||
top: titleLabel.bottom
|
||||
left: parent.left
|
||||
leftMargin: contentLeftOffset
|
||||
right: parent.right
|
||||
}
|
||||
visible: showArtist && text != ''
|
||||
text: source.artist
|
||||
}
|
||||
Label {
|
||||
id: albumLabel
|
||||
|
||||
font.pointSize: getLabelSize(18)
|
||||
anchors {
|
||||
top: artistLabel.visible ? artistLabel.bottom : titleLabel.bottom
|
||||
left: parent.left
|
||||
leftMargin: contentLeftOffset
|
||||
right: parent.right
|
||||
}
|
||||
visible: showAlbum && text != ''
|
||||
text: source.album
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
|
||||
PlasmaCore.DataSource {
|
||||
id: source
|
||||
engine: "mpris2"
|
||||
connectedSources: Array("@multiplex")
|
||||
interval: 0
|
||||
property bool hasMetadata: getHasMetadata()
|
||||
property string title: getMetadata("xesam:title", '')
|
||||
property string artist: getMetadata("xesam:artist", []).join(", ")
|
||||
property string album: getMetadata("xesam:album", '')
|
||||
property url artUrl: getMetadata("mpris:artUrl", '')
|
||||
property string playbackStatus: getHasData() ? data["@multiplex"]["PlaybackStatus"] : 'unknown'
|
||||
property bool canControl: getHasData() && data["@multiplex"]["CanControl"]
|
||||
property int trackLength: getMetadata("mpris:length", 0) / 1000
|
||||
property string logo: getHasIcon() ? data["@multiplex"]["Desktop Icon Name"] : ''
|
||||
|
||||
function getHasIcon() {
|
||||
return data["@multiplex"] != undefined
|
||||
&& data["@multiplex"]["Desktop Icon Name"] != undefined;
|
||||
}
|
||||
|
||||
function getHasData() {
|
||||
return data["@multiplex"] != undefined
|
||||
&& data["@multiplex"]["PlaybackStatus"] != undefined;
|
||||
}
|
||||
|
||||
function getHasMetadata() {
|
||||
return data["@multiplex"] != undefined
|
||||
&& data["@multiplex"]["Metadata"] != undefined
|
||||
&& data["@multiplex"]["Metadata"]["mpris:trackid"] != undefined;
|
||||
}
|
||||
|
||||
function getMetadata(entry, def) {
|
||||
if (hasMetadata && data["@multiplex"]["Metadata"][entry] != undefined)
|
||||
return data["@multiplex"]["Metadata"][entry];
|
||||
else
|
||||
return def;
|
||||
}
|
||||
|
||||
function currentPos() {
|
||||
if (!getHasData())
|
||||
return 0;
|
||||
var pos = data["@multiplex"]["Position"] / 1000;
|
||||
var pbStatus = data["@multiplex"]["PlaybackStatus"];
|
||||
if (pbStatus == "Playing") {
|
||||
var lastUpd = data["@multiplex"]["Position last updated (UTC)"];
|
||||
var diffMs = Date.now() - lastUpd.getTime();
|
||||
var rate = data["@multiplex"]["Rate"];
|
||||
return pos + (diffMs * rate);
|
||||
} else {
|
||||
return pos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,54 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
import "../code/service.js" as Control
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property Mpris2 source;
|
||||
implicitWidth: playPauseButton.implicitWidth;
|
||||
implicitHeight: playPauseButton.implicitHeight;
|
||||
|
||||
PlasmaComponents.ToolButton {
|
||||
id: playPauseButton
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
property string operation: (source.playbackStatus == 'Playing' ? 'Pause' : 'Play')
|
||||
iconSource: (source.playbackStatus == 'Playing' ? "media-playback-pause" : "media-playback-start")
|
||||
onClicked: {
|
||||
Control.callCommand(operation);
|
||||
}
|
||||
Component.onCompleted: {
|
||||
Control.associateItem(playPauseButton, operation);
|
||||
}
|
||||
onOperationChanged: {
|
||||
Control.associateItem(playPauseButton, operation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,112 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* Code taken from PlasmaComponents.ProgressBar:
|
||||
* Copyright 2011 Daker Fernandes Pinheiro <dakerfp@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
import org.kde.qtextracomponents 0.1
|
||||
import "../code/service.js" as Control
|
||||
|
||||
Item {
|
||||
id: root
|
||||
property Mpris2 source
|
||||
property int orientation: Qt.Horizontal
|
||||
|
||||
implicitHeight: 10
|
||||
implicitWidth: 100
|
||||
|
||||
onSourceChanged: {
|
||||
if (source) {
|
||||
source.dataChanged.connect(function() {
|
||||
range.update();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
PlasmaCore.Theme {
|
||||
id: theme
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: updateTimer
|
||||
|
||||
interval: 500
|
||||
running: source.playbackStatus == 'Playing'
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
range.update();
|
||||
}
|
||||
}
|
||||
PlasmaComponents.RangeModel {
|
||||
id: range
|
||||
|
||||
// default values
|
||||
minimumValue: 0.0
|
||||
maximumValue: source.trackLength
|
||||
value: 0
|
||||
function update() {
|
||||
value = source.currentPos();
|
||||
}
|
||||
|
||||
positionAtMinimum: 0
|
||||
positionAtMaximum: contents.width
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: contents
|
||||
|
||||
property bool _isVertical: orientation == Qt.Vertical
|
||||
|
||||
width: _isVertical ? root.height : root.width
|
||||
height: _isVertical ? root.width : root.height
|
||||
rotation: _isVertical ? 90 : 0
|
||||
anchors.centerIn: parent
|
||||
|
||||
Rectangle {
|
||||
id: barBg
|
||||
anchors.fill: parent
|
||||
color: theme.highlightColor
|
||||
opacity: 0.4
|
||||
}
|
||||
Rectangle {
|
||||
id: bar
|
||||
anchors {
|
||||
left: parent.left
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
}
|
||||
color: theme.highlightColor
|
||||
visible: range.position > 0
|
||||
width: range.position
|
||||
}
|
||||
MouseArea {
|
||||
id: seekArea
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
var x = mouse.x;
|
||||
Control.seek(range.valueForPosition(x));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,63 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property int minimumWidth: 16
|
||||
property int minimumHeight: 16
|
||||
|
||||
Mpris2 {
|
||||
id: source
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
plasmoid.addEventListener('ConfigChanged', function(){
|
||||
albumArt.visible = plasmoid.readConfig("displayCover");
|
||||
});
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouseArea
|
||||
hoverEnabled: true
|
||||
anchors.fill: parent
|
||||
|
||||
AlbumArt {
|
||||
id: albumArt
|
||||
source: source
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
PlayPauseButton {
|
||||
id: ppButton
|
||||
visible: (!albumArt.visible) || (source.canControl && mouseArea.containsMouse)
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
source: source
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,51 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>nowplayingConfig</class>
|
||||
<widget class="QWidget" name="nowplayingConfig">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>193</width>
|
||||
<height>86</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="kcfg_displayCover">
|
||||
<property name="text">
|
||||
<string>Display cover</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="kcfg_displayArtist">
|
||||
<property name="text">
|
||||
<string>Display artist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="kcfg_displayAlbum">
|
||||
<property name="text">
|
||||
<string>Display album</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>3</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<connections/>
|
||||
</ui>
|
Binary file not shown.
Before Width: | Height: | Size: 146 KiB |
|
@ -1,47 +0,0 @@
|
|||
/*
|
||||
* Copyright 2012 Alex Merry <alex.merry@kdemail.net>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License as
|
||||
* published by the Free Software Foundation; either version 2 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 Library 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 1.1
|
||||
import org.kde.plasma.core 0.1 as PlasmaCore
|
||||
import org.kde.plasma.components 0.1 as PlasmaComponents
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
property int minimumWidth: l.item.minimumWidth
|
||||
property int minimumHeight: l.item.minimumHeight
|
||||
|
||||
Loader {
|
||||
id: l
|
||||
source: {
|
||||
if (plasmoid.formFactor == Planar || plasmoid.formFactor == MediaCenter)
|
||||
"FullLayout.qml"
|
||||
else if (plasmoid.formFactor == Horizontal)
|
||||
"CompactLayout.qml"
|
||||
else
|
||||
"VLayout.qml"
|
||||
}
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
plasmoid.aspectRatioMode = plasmoid.IgnoreAspectRatio;
|
||||
}
|
||||
}
|
||||
// vi:sts=4:sw=4:et
|
|
@ -1,135 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Name=Now Playing
|
||||
Name[ar]=المشغل الآن
|
||||
Name[ast]=Sonando agora...
|
||||
Name[bs]=Trenutno izvođenje
|
||||
Name[ca]=Ara s'està escoltant
|
||||
Name[ca@valencia]=Ara s'està escoltant
|
||||
Name[cs]=Nyní se hraje
|
||||
Name[da]=Nu spilles
|
||||
Name[de]=Musiktitel-Anzeige
|
||||
Name[el]=Τρέχουσα αναπαραγωγή
|
||||
Name[en_GB]=Now Playing
|
||||
Name[eo]=Nun legas
|
||||
Name[es]=Ahora suena
|
||||
Name[et]=Praegu esitamisel
|
||||
Name[eu]=Orain jotzen
|
||||
Name[fi]=Nyt soi
|
||||
Name[fr]=En lecture
|
||||
Name[ga]=Á Sheinm Anois
|
||||
Name[gl]=Estase a reproducir
|
||||
Name[he]=מנגן עכשיו
|
||||
Name[hr]=Trenutno svira
|
||||
Name[hu]=Most játszott
|
||||
Name[is]=Nú í spilun
|
||||
Name[it]=In riproduzione
|
||||
Name[ja]=今聴いているもの
|
||||
Name[kk]=Ойнап жатқаны
|
||||
Name[km]=កំពុងចាក់
|
||||
Name[ko]=지금 재생 중
|
||||
Name[ku]=Niha Lêdide
|
||||
Name[lt]=Dabar grojama
|
||||
Name[lv]=Šobrīd atskaņo
|
||||
Name[mr]=आता प्ले करत आहे
|
||||
Name[nb]=Spiller nå
|
||||
Name[nds]=Lopen Stück
|
||||
Name[nl]=Speelt nu
|
||||
Name[nn]=Spelar no
|
||||
Name[oc]=Novèla tièra de lecturas
|
||||
Name[pa]=ਹੁਣ ਚੱਲ ਰਿਹਾ ਹੈ
|
||||
Name[pl]=Teraz odtwarzane
|
||||
Name[pt]=Agora a Tocar
|
||||
Name[pt_BR]=Reproduzindo agora
|
||||
Name[ro]=În redare
|
||||
Name[ru]=Сейчас играет
|
||||
Name[sk]=Teraz hrá
|
||||
Name[sl]=Trenutno se predvaja
|
||||
Name[sr]=тренутна свирка
|
||||
Name[sr@ijekavian]=тренутна свирка
|
||||
Name[sr@ijekavianlatin]=trenutna svirka
|
||||
Name[sr@latin]=trenutna svirka
|
||||
Name[sv]=Spelar nu
|
||||
Name[th]=สื่อที่กำลังเล่นอยู่
|
||||
Name[tr]=Şimdi Çalınıyor
|
||||
Name[ug]=قويۇۋاتىدۇ
|
||||
Name[uk]=Зараз відтворюється
|
||||
Name[wa]=Djouwé asteure
|
||||
Name[x-test]=xxNow Playingxx
|
||||
Name[zh_CN]=现在收听
|
||||
Name[zh_TW]=現正播放
|
||||
|
||||
Comment=Displays currently playing audio
|
||||
Comment[ar]=أظهر الملفات الصوتية التي تعمل حاليا
|
||||
Comment[ast]=Amuesa l'audio que se ta reproduciendo nesti intre
|
||||
Comment[bs]=Prikazuje trenutno emitovani zvuk.
|
||||
Comment[ca]=Mostra la reproducció d'àudio actual
|
||||
Comment[ca@valencia]=Mostra la reproducció d'àudio actual
|
||||
Comment[cs]=Zobrazení informací o právě přehrávaných skladbách
|
||||
Comment[da]=Viser musikken som aktuelt afspilles.
|
||||
Comment[de]=Den derzeit laufenden Musiktitel anzeigen
|
||||
Comment[el]=Εμφάνιση κομματιού που αναπαράγεται αυτή τη στιγμή
|
||||
Comment[en_GB]=Displays currently playing audio
|
||||
Comment[es]=Muestra el audio que se está reproduciendo actualmente
|
||||
Comment[et]=Näitab parajasti mängitavat muusikat
|
||||
Comment[eu]=Bistaratu unean jotzen ari den audioa
|
||||
Comment[fi]=Näyttää tällä hetkellä soivan kappaleen
|
||||
Comment[fr]=Montre les éléments en cours de lecture
|
||||
Comment[ga]=Taispeáin an ceol á sheinm anois
|
||||
Comment[gl]=Mostra o son que se está a reproducir
|
||||
Comment[he]=מציג את השיר המושמע עכשיו
|
||||
Comment[hr]=Prikazuje zvučni zapis koji trenutno traje
|
||||
Comment[hu]=A jelenleg hallgatott szám megjelenítése
|
||||
Comment[is]=Sýnir hljóð í spilun
|
||||
Comment[it]=Mostra l'audio in riproduzione
|
||||
Comment[ja]=今聴いている音楽を表示します
|
||||
Comment[kk]=Қазір орындалып жатқан аудио туралы мәлімет
|
||||
Comment[km]=បង្ហាញអូឌីយ៉ូដែលកំពុងចាក់បច្ចុប្បន្ន
|
||||
Comment[ko]=지금 재생 중인 곡 표시
|
||||
Comment[ku]=Strana lêdide nîşan bide
|
||||
Comment[lt]=Rodo šiuo metu grojamą garsą
|
||||
Comment[lv]=Parāda šobrīd atskaņoto skaņdarbu
|
||||
Comment[mr]=सध्या प्ले करत असलेला ऑडिओ दर्शवितो
|
||||
Comment[nb]=Vis lyd som spilles nå
|
||||
Comment[nds]=Wiest opstunns afspeelt Stücken
|
||||
Comment[nl]=Toont de momenteel spelende audio
|
||||
Comment[nn]=Vis musikken som vert spelt
|
||||
Comment[pa]=ਹੁਣ ਚੱਲ ਰਿਹਾ ਆਡੀਓ ਵੇਖੋ
|
||||
Comment[pl]=Wyświetla aktualnie odtwarzany utwór
|
||||
Comment[pt]=Mostra o áudio actualmente em reprodução
|
||||
Comment[pt_BR]=Mostra a música que está sendo reproduzida
|
||||
Comment[ro]=Afișează cîntecul redat la moment
|
||||
Comment[ru]=Показывает воспроизводимую в данный момент музыку
|
||||
Comment[sk]=Zobrazuje aktuálne prehrávanú skladbu
|
||||
Comment[sl]=Prikaz skladbe, ki se trenutno predvaja
|
||||
Comment[sr]=Која се то музика управо пушта?
|
||||
Comment[sr@ijekavian]=Која се то музика управо пушта?
|
||||
Comment[sr@ijekavianlatin]=Koja se to muzika upravo pušta?
|
||||
Comment[sr@latin]=Koja se to muzika upravo pušta?
|
||||
Comment[sv]=Visar musik som för närvarande spelas
|
||||
Comment[th]=แสดงสื่อเสียงที่กำลังเล่นอยู่ในปัจจุบัน
|
||||
Comment[tr]=O anda çalınan sesi gösterir
|
||||
Comment[uk]=Показує інформацію про аудіо, що відтворюється
|
||||
Comment[wa]=Håynêye l' odio djouwé pol moumint
|
||||
Comment[x-test]=xxDisplays currently playing audioxx
|
||||
Comment[zh_CN]=显示正在收听的音乐
|
||||
Comment[zh_TW]=顯示目前播放的音樂
|
||||
|
||||
Icon=applications-multimedia
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=Plasma/Applet
|
||||
|
||||
X-Plasma-API=declarativeappletscript
|
||||
X-Plasma-MainScript=ui/nowplaying.qml
|
||||
X-Plasma-DefaultSize=256,128
|
||||
|
||||
X-KDE-PluginInfo-Author=Alex Merry
|
||||
X-KDE-PluginInfo-Email=alex.merry@kdemail.net
|
||||
X-KDE-PluginInfo-Name=nowplaying
|
||||
X-KDE-PluginInfo-Version=2.0
|
||||
X-KDE-PluginInfo-Website=
|
||||
X-KDE-PluginInfo-Category=Multimedia
|
||||
X-KDE-PluginInfo-Depends=
|
||||
X-KDE-PluginInfo-License=GPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
||||
X-Plasma-Requires-FileDialog=Unused
|
||||
X-Plasma-Requires-LaunchApp=Unused
|
|
@ -1,4 +1,3 @@
|
|||
add_subdirectory(audioplayercontrol)
|
||||
add_subdirectory(converter)
|
||||
add_subdirectory(datetime)
|
||||
add_subdirectory(katesessions)
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
set(krunner_audioplayercontrol_SRCS
|
||||
audioplayercontrolrunner.cpp
|
||||
)
|
||||
|
||||
set(kcm_krunner_audioplayercontrol_SRCS
|
||||
audioplayercontrolrunner_config.cpp
|
||||
audioplayercontrolrunner_config.ui
|
||||
)
|
||||
|
||||
kde4_add_plugin(kcm_krunner_audioplayercontrol ${kcm_krunner_audioplayercontrol_SRCS})
|
||||
target_link_libraries(kcm_krunner_audioplayercontrol
|
||||
KDE4::kdecore
|
||||
KDE4::kdeui
|
||||
KDE4::kcmutils
|
||||
${QT_QTCORE_LIBRARY}
|
||||
${QT_QTGUI_LIBRARY}
|
||||
)
|
||||
|
||||
kde4_add_plugin(krunner_audioplayercontrol ${krunner_audioplayercontrol_SRCS})
|
||||
target_link_libraries(krunner_audioplayercontrol KDE4::kio KDE4::kdeui KDE4::plasma)
|
||||
|
||||
|
||||
install(TARGETS krunner_audioplayercontrol kcm_krunner_audioplayercontrol DESTINATION ${KDE4_PLUGIN_INSTALL_DIR})
|
||||
install(FILES plasma-runner-audioplayercontrol.desktop plasma-runner-audioplayercontrol_config.desktop DESTINATION ${KDE4_SERVICES_INSTALL_DIR})
|
|
@ -1,3 +0,0 @@
|
|||
#! /usr/bin/env bash
|
||||
$EXTRACTRC *.ui >> rc.cpp
|
||||
$XGETTEXT *.cpp -o $podir/plasma_runner_audioplayercontrol.pot
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2009 Jan G. Marker <jangerrit@weiler-marker.com>
|
||||
* Copyright (C) 2021 Ivailo Monev <xakepa10@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License version 2 as
|
||||
* published by the Free Software Foundation
|
||||
*
|
||||
* 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 Library 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.
|
||||
*/
|
||||
|
||||
#ifndef AUDIOPLAYERCONTROLRUNNERCONFIGKEYS_H
|
||||
#define AUDIOPLAYERCONTROLRUNNERCONFIGKEYS_H
|
||||
|
||||
static const char * CONFIG_PLAY = "com_play";
|
||||
static const char * CONFIG_PAUSE = "com_pause";
|
||||
static const char * CONFIG_NEXT = "com_next";
|
||||
static const char * CONFIG_PREV = "com_prev";
|
||||
static const char * CONFIG_STOP = "com_stop";
|
||||
static const char * CONFIG_VOLUME = "com_volume";
|
||||
static const char * CONFIG_QUIT = "com_quit";
|
||||
static const char * CONFIG_PLAYER = "player";
|
||||
|
||||
#endif
|
|
@ -1,277 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2008 Bruno Virlet <bvirlet@kdemail.net>
|
||||
* Copyright (C) 2009 Ryan P. Bitanga <ryan.bitanga@gmail.com>
|
||||
* Copyright (C) 2009 Jan G. Marker <jangerrit@weiler-marker.com>
|
||||
* Copyright (C) 2021 Ivailo Monev <xakepa10@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License version 2 as
|
||||
* published by the Free Software Foundation
|
||||
*
|
||||
* 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 Library 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.
|
||||
*/
|
||||
|
||||
#include "audioplayercontrolrunner.h"
|
||||
#include "audioplayercontrolconfigkeys.h"
|
||||
|
||||
#include <QtCore/QElapsedTimer>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtDBus/QDBusInterface>
|
||||
#include <QtDBus/QDBusMetaType>
|
||||
#include <QtDBus/QDBusPendingReply>
|
||||
#include <QtDBus/qdbuspendingcall.h>
|
||||
#include <QtDBus/QDBusMessage>
|
||||
|
||||
#include <KDebug>
|
||||
#include <KIcon>
|
||||
#include <KRun>
|
||||
#include <KUrl>
|
||||
|
||||
// for reference:
|
||||
// https://specifications.freedesktop.org/mpris-spec/latest/
|
||||
|
||||
AudioPlayerControlRunner::AudioPlayerControlRunner(QObject *parent, const QVariantList& args)
|
||||
: Plasma::AbstractRunner(parent, args)
|
||||
{
|
||||
Q_UNUSED(args);
|
||||
|
||||
setObjectName(QLatin1String("Audio Player Control Runner"));
|
||||
setSpeed(AbstractRunner::SlowSpeed);
|
||||
|
||||
connect(this, SIGNAL(prepare()), this, SLOT(prep()));
|
||||
|
||||
reloadConfiguration();
|
||||
}
|
||||
|
||||
AudioPlayerControlRunner::~AudioPlayerControlRunner()
|
||||
{
|
||||
}
|
||||
|
||||
void AudioPlayerControlRunner::prep()
|
||||
{
|
||||
m_running = false;
|
||||
m_canPlay = false;
|
||||
m_canGoNext = false;
|
||||
m_canGoPrevious = false;
|
||||
m_playbackStatus = QString();
|
||||
m_identity = m_player;
|
||||
|
||||
QDBusInterface player(QString::fromLatin1("org.mpris.MediaPlayer2.%1").arg(m_player),
|
||||
QLatin1String("/org/mpris/MediaPlayer2"), QLatin1String("org.mpris.MediaPlayer2.Player"));
|
||||
m_running = player.isValid();
|
||||
|
||||
if (m_running) {
|
||||
QDBusInterface mediaplayer2(QString::fromLatin1("org.mpris.MediaPlayer2.%1").arg(m_player),
|
||||
QLatin1String("/org/mpris/MediaPlayer2"), QLatin1String("org.mpris.MediaPlayer2"));
|
||||
m_identity = mediaplayer2.property("Identity").toString();
|
||||
m_playbackStatus = player.property("PlaybackStatus").toString();
|
||||
// NOTE: Bogus values set by Audacious for the properties bellow
|
||||
m_canPlay = player.property("CanPlay").toBool();
|
||||
m_canGoNext = player.property("CanGoNext").toBool();
|
||||
m_canGoPrevious = player.property("CanGoPrevious").toBool();
|
||||
}
|
||||
|
||||
// qDebug() << Q_FUNC_INFO << m_running << m_canPlay << m_canGoNext << m_canGoPrevious << m_playbackStatus << m_identity;
|
||||
}
|
||||
|
||||
void AudioPlayerControlRunner::match(Plasma::RunnerContext &context)
|
||||
{
|
||||
if (context.query().length() < 3) {
|
||||
return;
|
||||
}
|
||||
|
||||
const QString term = context.query();
|
||||
|
||||
QList<Plasma::QueryMatch> matches;
|
||||
|
||||
if (context.isValid() ) {
|
||||
QVariantList playcontrol;
|
||||
playcontrol << QLatin1String("/org/mpris/MediaPlayer2") << QLatin1String("org.mpris.MediaPlayer2.Player");
|
||||
|
||||
// Play
|
||||
if (m_comPlay.startsWith(term, Qt::CaseInsensitive) &&
|
||||
(!m_running || (m_canPlay && m_playbackStatus != QLatin1String("Playing")))) {
|
||||
QVariantList data = playcontrol;
|
||||
data << QLatin1String("Play") << QLatin1String("start");
|
||||
matches << createMatch(this, i18n("Start playing"), i18n("Audio player control"),
|
||||
QLatin1String("play"), KIcon(QLatin1String("media-playback-start")), data, 1.0);
|
||||
}
|
||||
|
||||
if (!m_running) {
|
||||
// The interface of the player is not availalbe, so the rest of the commands are not needed
|
||||
context.addMatches(term, matches);
|
||||
return;
|
||||
}
|
||||
|
||||
// Next song
|
||||
if (m_comNext.startsWith(term, Qt::CaseInsensitive) && m_canGoNext) {
|
||||
QVariantList data = playcontrol;
|
||||
data << QLatin1String("Next") << QLatin1String("nostart");
|
||||
matches << createMatch(this, i18n("Play next song"), i18n("Audio player control"),
|
||||
QLatin1String("next"), KIcon(QLatin1String("media-skip-forward")), data, 1.0);
|
||||
}
|
||||
|
||||
// Previous song
|
||||
if (m_comPrev.startsWith(term, Qt::CaseInsensitive) && m_canGoPrevious) {
|
||||
QVariantList data = playcontrol;
|
||||
data << QLatin1String("Previous") << QLatin1String("nostart");
|
||||
matches << createMatch(this, i18n("Play previous song"), i18n("Audio player control") ,
|
||||
QLatin1String("previous"), KIcon(QLatin1String("media-skip-backward")), data, 1.0);
|
||||
}
|
||||
|
||||
// Pause
|
||||
if (m_comPause.startsWith(term, Qt::CaseInsensitive) && m_playbackStatus == QLatin1String("Playing")) {
|
||||
QVariantList data = playcontrol;
|
||||
data << QLatin1String("Pause") << QLatin1String("nostart");
|
||||
matches << createMatch(this, i18n("Pause playing"), i18n("Audio player control"),
|
||||
QLatin1String("pause"), KIcon(QLatin1String("media-playback-pause")), data, 1.0);
|
||||
}
|
||||
|
||||
// Stop
|
||||
if (m_comStop.startsWith(term, Qt::CaseInsensitive) && m_playbackStatus == QLatin1String("Playing")) {
|
||||
QVariantList data = playcontrol;
|
||||
data << QLatin1String("Stop") << QLatin1String("nostart");
|
||||
matches << createMatch(this, i18n("Stop playing"), i18n("Audio player control"),
|
||||
QLatin1String("stop"), KIcon(QLatin1String("media-playback-stop")), data, 1.0);
|
||||
}
|
||||
|
||||
// Set volume to
|
||||
QRegExp volumeRegxp(m_comVolume + QLatin1String(" \\d{1,2}0{0,1}"));
|
||||
volumeRegxp.setCaseSensitivity(Qt::CaseInsensitive);
|
||||
if (volumeRegxp.exactMatch(term)) {
|
||||
QVariantList data = playcontrol;
|
||||
int newVolume = getNumber(term , ' ');
|
||||
data << QLatin1String("Volume") << QLatin1String("nostart") << (newVolume / 100.0);
|
||||
matches << createMatch(this, i18n("Set volume to %1%" , newVolume),
|
||||
QLatin1String("volume"), i18n("Audio player control"), KIcon(QLatin1String("audio-volume-medium")), data, 1.0);
|
||||
}
|
||||
|
||||
// Quit player
|
||||
if (m_comQuit.startsWith(term, Qt::CaseInsensitive)) {
|
||||
QVariantList data;
|
||||
data << QLatin1String("/org/mpris/MediaPlayer2") << QLatin1String("org.mpris.MediaPlayer2")
|
||||
<< QLatin1String("Quit") << QLatin1String("nostart");
|
||||
matches << createMatch(this, i18n("Quit %1", m_identity), QLatin1String(""),
|
||||
QLatin1String("quit"), KIcon(QLatin1String("application-exit")), data, 1.0);
|
||||
}
|
||||
}
|
||||
|
||||
context.addMatches(term, matches);
|
||||
}
|
||||
|
||||
void AudioPlayerControlRunner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match)
|
||||
{
|
||||
Q_UNUSED(context)
|
||||
|
||||
QVariantList data = match.data().value<QVariantList>();
|
||||
|
||||
if (data[3].toString().compare(QLatin1String("start")) == 0) {
|
||||
// The players's interface isn't available but it should be started
|
||||
if (!startPlayer()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Special case for properties
|
||||
if (data[2].toString().compare(QLatin1String("Volume")) == 0) {
|
||||
QDBusInterface player(QString::fromLatin1("org.mpris.MediaPlayer2.%1").arg(m_player),
|
||||
data[0].toString(), data[1].toString());
|
||||
player.setProperty(data[2].toByteArray(), data[4]);
|
||||
return;
|
||||
}
|
||||
|
||||
QDBusMessage msg = QDBusMessage::createMethodCall(QString::fromLatin1("org.mpris.MediaPlayer2.%1").arg(m_player),
|
||||
data[0].toString(), data[1].toString(), data[2].toString());
|
||||
kDebug() << msg;
|
||||
QVariantList args;
|
||||
for (int i = 4; data.length() > i;++i) {
|
||||
args << data[i];
|
||||
}
|
||||
msg.setArguments(args);
|
||||
QDBusConnection::sessionBus().call(msg, QDBus::NoBlock);
|
||||
}
|
||||
|
||||
void AudioPlayerControlRunner::reloadConfiguration()
|
||||
{
|
||||
#warning TODO: untranslated keywords match
|
||||
KConfigGroup grp = config();
|
||||
m_player = grp.readEntry(CONFIG_PLAYER, "vlc");
|
||||
m_comPlay = grp.readEntry(CONFIG_PLAY, i18n("play"));
|
||||
m_comPause = grp.readEntry(CONFIG_PAUSE, i18n("pause"));
|
||||
m_comNext = grp.readEntry(CONFIG_NEXT, i18n("next"));
|
||||
m_comPrev = grp.readEntry(CONFIG_PREV, i18n("prev"));
|
||||
m_comStop = grp.readEntry(CONFIG_STOP, i18n("stop"));
|
||||
m_comVolume = grp.readEntry(CONFIG_VOLUME, i18n("volume"));
|
||||
m_comQuit = grp.readEntry(CONFIG_QUIT, i18n("quit"));
|
||||
|
||||
// Adding the syntaxes for helping the user
|
||||
QList<Plasma::RunnerSyntax> syntaxes;
|
||||
|
||||
syntaxes << Plasma::RunnerSyntax(m_comPlay, i18n("Plays a song from playlist"));
|
||||
syntaxes << Plasma::RunnerSyntax(m_comPause,i18n("Pauses the playing"));
|
||||
syntaxes << Plasma::RunnerSyntax(m_comNext, i18n("Plays the next song in the playlist if one is available"));
|
||||
syntaxes << Plasma::RunnerSyntax(m_comPrev, i18n("Plays the previous song if one is available"));
|
||||
syntaxes << Plasma::RunnerSyntax(m_comStop, i18n("Stops the playing"));
|
||||
syntaxes << Plasma::RunnerSyntax(m_comVolume + QLatin1String(" :q:"), i18n("Sets the volume to :q:"));
|
||||
syntaxes << Plasma::RunnerSyntax(m_comQuit, i18n("Quits the player"));
|
||||
|
||||
setSyntaxes(syntaxes);
|
||||
}
|
||||
|
||||
Plasma::QueryMatch AudioPlayerControlRunner::createMatch(Plasma::AbstractRunner* runner,
|
||||
const QString &title, const QString &subtext, const QString &id,
|
||||
const KIcon &icon, const QVariantList &data, const float &relevance)
|
||||
{
|
||||
Plasma::QueryMatch match(runner);
|
||||
match.setText(title);
|
||||
match.setSubtext(subtext);
|
||||
match.setId(id);
|
||||
match.setIcon(icon);
|
||||
match.setData(data);
|
||||
match.setRelevance(relevance);
|
||||
return match;
|
||||
}
|
||||
|
||||
bool AudioPlayerControlRunner::startPlayer()
|
||||
{
|
||||
if (m_running) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!KRun::run(m_player, KUrl::List(), nullptr)) {
|
||||
// NOTE: KRun::run() shows message box in case of error
|
||||
return false;
|
||||
}
|
||||
|
||||
QElapsedTimer waitTimeout;
|
||||
waitTimeout.start();
|
||||
while (!m_running && waitTimeout.elapsed() < 30000) {
|
||||
// Waiting for the player's interface to appear
|
||||
QDBusInterface player(QString::fromLatin1("org.mpris.MediaPlayer2.%1").arg(m_player),
|
||||
QLatin1String("/org/mpris/MediaPlayer2"), QLatin1String("org.mpris.MediaPlayer2.Player"));
|
||||
m_running = player.isValid();
|
||||
QCoreApplication::processEvents();
|
||||
}
|
||||
|
||||
if (m_running) {
|
||||
prep();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
int AudioPlayerControlRunner::getNumber(const QString& term, const char character)
|
||||
{
|
||||
return term.section(QLatin1Char(character), 1, 1).toInt();
|
||||
}
|
||||
|
||||
#include "moc_audioplayercontrolrunner.cpp"
|
|
@ -1,114 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2008 Bruno Virlet <bvirlet@kdemail.net>
|
||||
* Copyright (C) 2009 Jan G. Marker <jangerrit@weiler-marker.com>
|
||||
* Copyright (C) 2021 Ivailo Monev <xakepa10@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License version 2 as
|
||||
* published by the Free Software Foundation
|
||||
*
|
||||
* 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 Library 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.
|
||||
*/
|
||||
|
||||
#ifndef AUDIOPLAYERCONTROLRUNNER_H
|
||||
#define AUDIOPLAYERCONTROLRUNNER_H
|
||||
|
||||
#include <plasma/abstractrunner.h>
|
||||
|
||||
#include <KIcon>
|
||||
#include <KUrl>
|
||||
|
||||
class AudioPlayerControlRunner : public Plasma::AbstractRunner
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AudioPlayerControlRunner(QObject *parent, const QVariantList& args);
|
||||
~AudioPlayerControlRunner();
|
||||
|
||||
void match(Plasma::RunnerContext &context);
|
||||
void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match);
|
||||
|
||||
void reloadConfiguration();
|
||||
|
||||
private:
|
||||
/** A own method to create a match easily
|
||||
* @param context the terms context
|
||||
* @param runner the instance of AudioPlayerControlRunner
|
||||
* @param term the search term
|
||||
* @param term the main text of the match
|
||||
* @param subtext the subtext of the match
|
||||
* @param icon the icon of the match
|
||||
* @param data the data of the match
|
||||
* @param relevance the relevance of the match
|
||||
* @return the created match
|
||||
*/
|
||||
Plasma::QueryMatch createMatch(Plasma::AbstractRunner* runner,
|
||||
const QString &title, const QString &subtext,
|
||||
const QString &id, const KIcon &icon,
|
||||
const QVariantList &data, const float &relevance);
|
||||
|
||||
/** Starts the player detached from the current progress if it isn't started already.
|
||||
* @return @c true if it was successful, @c false in any other case
|
||||
*/
|
||||
bool startPlayer();
|
||||
|
||||
/** Looks for the number in the command term (it isn't case sensitive)
|
||||
* @param text the term
|
||||
* @param character the separator
|
||||
* @return the number as int
|
||||
*/
|
||||
static int getNumber(const QString& term, const char character);
|
||||
|
||||
private slots:
|
||||
void prep();
|
||||
|
||||
private:
|
||||
/** The player this runner controls */
|
||||
QString m_player;
|
||||
|
||||
/** Command for play a song */
|
||||
QString m_comPlay;
|
||||
/** Command for pause playing */
|
||||
QString m_comPause;
|
||||
/** Command for stop playing */
|
||||
QString m_comStop;
|
||||
/** Command for playing the next song */
|
||||
QString m_comNext;
|
||||
/** Command for playing the previous song */
|
||||
QString m_comPrev;
|
||||
/** Command for changing the volume */
|
||||
QString m_comVolume;
|
||||
/** Command for quit the player */
|
||||
QString m_comQuit;
|
||||
|
||||
/** The running state of the player */
|
||||
bool m_running;
|
||||
|
||||
/** @c true if player can play song */
|
||||
bool m_canPlay;
|
||||
|
||||
/** @c true if a next song is available */
|
||||
bool m_canGoNext;
|
||||
|
||||
/** @c true if a previous song is available */
|
||||
bool m_canGoPrevious;
|
||||
|
||||
/** The playback state of the player */
|
||||
QString m_playbackStatus;
|
||||
|
||||
/** The player identity */
|
||||
QString m_identity;
|
||||
};
|
||||
|
||||
K_EXPORT_PLASMA_RUNNER(audioplayercontrol, AudioPlayerControlRunner)
|
||||
|
||||
#endif
|
|
@ -1,133 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2009 Jan G. Marker <jangerrit@weiler-marker.com>
|
||||
* Copyright (C) 2021 Ivailo Monev <xakepa10@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License version 2 as
|
||||
* published by the Free Software Foundation
|
||||
*
|
||||
* 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 Library 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.
|
||||
*/
|
||||
|
||||
//Project-Includes
|
||||
#include "audioplayercontrolrunner_config.h"
|
||||
|
||||
//KDE-Includes
|
||||
#include <Plasma/AbstractRunner>
|
||||
#include <KDebug>
|
||||
|
||||
#include "audioplayercontrolconfigkeys.h"
|
||||
|
||||
K_EXPORT_RUNNER_CONFIG(audioplayercontrol, AudioPlayerControlRunnerConfig)
|
||||
|
||||
AudioPlayerControlRunnerConfigForm::AudioPlayerControlRunnerConfigForm(QWidget* parent) : QWidget(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
}
|
||||
|
||||
AudioPlayerControlRunnerConfig::AudioPlayerControlRunnerConfig(QWidget* parent, const QVariantList& args) :
|
||||
KCModule(AudioPlayerControlRunnerConfigFactory::componentData(), parent, args)
|
||||
{
|
||||
m_ui = new AudioPlayerControlRunnerConfigForm(this);
|
||||
|
||||
QGridLayout* layout = new QGridLayout(this);
|
||||
layout->addWidget(m_ui, 0, 0);
|
||||
|
||||
connect(m_ui->player_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
|
||||
connect(m_ui->player_combo, SIGNAL(editTextChanged(QString)), this, SLOT(changed()));
|
||||
connect(m_ui->play_edit, SIGNAL(textChanged(QString)), this, SLOT(changed()));
|
||||
connect(m_ui->pause_edit, SIGNAL(textChanged(QString)), this, SLOT(changed()));
|
||||
connect(m_ui->next_edit, SIGNAL(textChanged(QString)), this, SLOT(changed()));
|
||||
connect(m_ui->prev_edit, SIGNAL(textChanged(QString)), this, SLOT(changed()));
|
||||
connect(m_ui->stop_edit, SIGNAL(textChanged(QString)), this, SLOT(changed()));
|
||||
connect(m_ui->volume_edit, SIGNAL(textChanged(QString)), this, SLOT(changed()));
|
||||
connect(m_ui->quit_edit, SIGNAL(textChanged(QString)), this, SLOT(changed()));
|
||||
|
||||
|
||||
/* Setup the combobox to select the player */
|
||||
m_ui->player_combo->setDuplicatesEnabled(false);
|
||||
m_ui->player_combo->addItem(i18n("VLC"), QLatin1String("vlc"));
|
||||
m_ui->player_combo->addItem(i18n("Audacious"), QLatin1String("audacious"));
|
||||
/* template for adding other players:
|
||||
* m_ui->player_combo->addItem(i18n("player's name"), "the end of it's MPRIS interface");
|
||||
*/
|
||||
m_ui->player_combo->setEditable(true); //Let's add our own players
|
||||
|
||||
load();
|
||||
}
|
||||
|
||||
void AudioPlayerControlRunnerConfig::load()
|
||||
{
|
||||
KCModule::load();
|
||||
|
||||
KSharedConfig::Ptr cfg = KSharedConfig::openConfig(QLatin1String("krunnerrc"));
|
||||
KConfigGroup grp = cfg->group("Runners");
|
||||
grp = KConfigGroup(&grp, "Audio Player Control Runner");
|
||||
QString player = grp.readEntry(CONFIG_PLAYER, "vlc");
|
||||
int index = m_ui->player_combo->findData(player);
|
||||
if (index == -1) {
|
||||
m_ui->player_combo->addItem(player, player);
|
||||
m_ui->player_combo->setCurrentItem(player);
|
||||
} else {
|
||||
m_ui->player_combo->setCurrentIndex(index);
|
||||
}
|
||||
m_ui->play_edit->setText(grp.readEntry(CONFIG_PLAY , i18n("play")));
|
||||
m_ui->pause_edit->setText(grp.readEntry(CONFIG_PAUSE, i18n("pause")));
|
||||
m_ui->next_edit->setText(grp.readEntry(CONFIG_NEXT, i18nc("next song", "next")));
|
||||
m_ui->prev_edit->setText(grp.readEntry(CONFIG_PREV , i18nc("previous song", "prev")));
|
||||
m_ui->stop_edit->setText(grp.readEntry(CONFIG_STOP , i18n("stop")));
|
||||
m_ui->volume_edit->setText(grp.readEntry(CONFIG_VOLUME , i18nc("set the sound volume", "volume")));
|
||||
m_ui->quit_edit->setText(grp.readEntry(CONFIG_QUIT, i18nc("quit media player", "quit")));
|
||||
|
||||
emit changed(false);
|
||||
}
|
||||
|
||||
void AudioPlayerControlRunnerConfig::save()
|
||||
{
|
||||
KCModule::save();
|
||||
|
||||
KSharedConfig::Ptr cfg = KSharedConfig::openConfig(QLatin1String("krunnerrc"));
|
||||
KConfigGroup grp = cfg->group("Runners");
|
||||
grp = KConfigGroup(&grp, "Audio Player Control Runner");
|
||||
grp.writeEntry(CONFIG_PLAY, m_ui->play_edit->text());
|
||||
grp.writeEntry(CONFIG_PAUSE, m_ui->pause_edit->text());
|
||||
grp.writeEntry(CONFIG_STOP, m_ui->stop_edit->text());
|
||||
grp.writeEntry(CONFIG_PREV, m_ui->prev_edit->text());
|
||||
grp.writeEntry(CONFIG_NEXT, m_ui->next_edit->text());
|
||||
grp.writeEntry(CONFIG_VOLUME, m_ui->volume_edit->text());
|
||||
grp.writeEntry(CONFIG_QUIT, m_ui->quit_edit->text());
|
||||
QString data = m_ui->player_combo->itemData(m_ui->player_combo->findText(
|
||||
m_ui->player_combo->currentText())).toString();
|
||||
if (data.isEmpty()) {
|
||||
grp.writeEntry(CONFIG_PLAYER, m_ui->player_combo->currentText());
|
||||
} else {
|
||||
grp.writeEntry(CONFIG_PLAYER, data);
|
||||
}
|
||||
grp.sync();
|
||||
|
||||
emit changed(false);
|
||||
}
|
||||
|
||||
void AudioPlayerControlRunnerConfig::defaults()
|
||||
{
|
||||
KCModule::defaults();
|
||||
|
||||
m_ui->player_combo->setCurrentIndex(m_ui->player_combo->findData(QLatin1String("vlc")));
|
||||
m_ui->play_edit->setText(i18n("Play"));
|
||||
m_ui->pause_edit->setText(i18n("Pause")) ;
|
||||
m_ui->next_edit->setText(i18n("Next"));
|
||||
m_ui->prev_edit->setText(i18n("Prev"));
|
||||
m_ui->stop_edit->setText(i18n("Stop"));
|
||||
m_ui->volume_edit->setText(i18n("Volume"));
|
||||
m_ui->quit_edit->setText(i18n("Quit"));
|
||||
|
||||
emit changed(true);
|
||||
}
|
|
@ -1,52 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2009 Jan G. Marker <jangerrit@weiler-marker.com>
|
||||
* Copyright (C) 2021 Ivailo Monev <xakepa10@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Library General Public License version 2 as
|
||||
* published by the Free Software Foundation
|
||||
*
|
||||
* 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 Library 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.
|
||||
*/
|
||||
|
||||
#ifndef AUDIOPLAYERCONTROLRUNNERCONFIG_H
|
||||
#define AUDIOPLAYERCONTROLRUNNERCONFIG_H
|
||||
|
||||
//Project-Includes
|
||||
#include "ui_audioplayercontrolrunner_config.h"
|
||||
//Qt-Includes
|
||||
//KDE-Includes
|
||||
#include <KCModule>
|
||||
|
||||
class AudioPlayerControlRunnerConfigForm : public QWidget, public Ui::AudioPlayerControlRunnerUI
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AudioPlayerControlRunnerConfigForm(QWidget* parent);
|
||||
};
|
||||
|
||||
class AudioPlayerControlRunnerConfig : public KCModule
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AudioPlayerControlRunnerConfig(QWidget* parent = 0, const QVariantList& args = QVariantList());
|
||||
|
||||
public slots:
|
||||
void save();
|
||||
void load();
|
||||
void defaults();
|
||||
|
||||
private:
|
||||
AudioPlayerControlRunnerConfigForm* m_ui;
|
||||
};
|
||||
#endif // AUDIOPLAYERCONTROLRUNNERCONFIG_H
|
|
@ -1,289 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AudioPlayerControlRunnerUI</class>
|
||||
<widget class="QWidget" name="AudioPlayerControlRunnerUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>421</width>
|
||||
<height>292</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Audio Player Control Runner Settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="player_layout">
|
||||
<item>
|
||||
<widget class="QLabel" name="player_label">
|
||||
<property name="text">
|
||||
<string>The player the runner controls:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="KComboBox" name="player_combo">
|
||||
<property name="toolTip">
|
||||
<string>You may add another player. That player has to support the MPRISv2 specification.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="frame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="next_label">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Next song:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>next_edit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="prev_label">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Previ&ous song:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>prev_edit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="stop_label">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>S&top:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>stop_edit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="quit_label">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Quit player:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>quit_edit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="play_label">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pla&y:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>play_edit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="KLineEdit" name="stop_edit">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="urlDropsEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="volume_label">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Set &volume:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>volume_edit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="pause_label">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>P&ause:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>pause_edit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KLineEdit" name="play_edit">
|
||||
<property name="toolTip">
|
||||
<string>Can be used as "Play" for playing and "Play <song>" for playing a song that matches to <song> (in title, artist and album)</string>
|
||||
</property>
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="urlDropsEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<widget class="KLineEdit" name="volume_edit">
|
||||
<property name="toolTip">
|
||||
<string>The numbers are automatically added at the end:
|
||||
Player:Volume=10</string>
|
||||
</property>
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="urlDropsEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="clickMessage">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<widget class="KLineEdit" name="quit_edit">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="urlDropsEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<widget class="KLineEdit" name="prev_edit">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="urlDropsEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="KLineEdit" name="pause_edit">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="urlDropsEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="KLineEdit" name="next_edit">
|
||||
<property name="locale">
|
||||
<locale language="English" country="UnitedStates"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="urlDropsEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="showClearButton" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KIntSpinBox</class>
|
||||
<extends>QSpinBox</extends>
|
||||
<header>knuminput.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>KLineEdit</class>
|
||||
<extends>QLineEdit</extends>
|
||||
<header>klineedit.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>KComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>kcombobox.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -1,103 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Name=Control Audio Player
|
||||
Name[ar]=التحكم بمشغل الصوتيات
|
||||
Name[bs]=Upravljanje audio plejerom
|
||||
Name[ca]=Control del reproductor d'àudio
|
||||
Name[ca@valencia]=Control del reproductor d'àudio
|
||||
Name[cs]=Ovládat zvukový přehrávač
|
||||
Name[da]=Betjening af lydafspiller
|
||||
Name[de]=Medienwiedergabe steuern
|
||||
Name[el]=Έλεγχος του αναπαραγωγέα ήχου
|
||||
Name[en_GB]=Control Audio Player
|
||||
Name[es]=Controlar el reproductor de audio
|
||||
Name[et]=Helifailide mängija juhtimine
|
||||
Name[fi]=Hallitse äänisoitinta
|
||||
Name[fr]=Contrôle du lecteur audio
|
||||
Name[ga]=Rialaigh Seinnteoir Fuaime
|
||||
Name[gl]=Control para reprodutores de son
|
||||
Name[hr]=Kontroliraj svirač zvuka
|
||||
Name[hu]=Zenelejátszó-vezérlő
|
||||
Name[it]=Controllo lettore audio
|
||||
Name[ja]=オーディオプレーヤーを制御
|
||||
Name[kk]=Аудоплейерді басқару
|
||||
Name[km]=ត្រួតពិនិត្យកម្មវិធីចាក់អូឌីយ៉ូ
|
||||
Name[ko]=오디오 재생기 제어
|
||||
Name[lt]=Valdyti audio grotuvą
|
||||
Name[lv]=Kontrolēt audio atskaņotāju
|
||||
Name[mr]=ऑडिओ प्लेयर नियंत्रण
|
||||
Name[nb]=Styr mediaspiller
|
||||
Name[nds]=Klangafspelerkuntrull
|
||||
Name[nl]=Audiospeler besturen
|
||||
Name[nn]=Kontroller lydspelar
|
||||
Name[pa]=ਆਡੀਓ ਪਲੇਅਰ ਕੰਟਰੋਲ ਕਰੋ
|
||||
Name[pl]=Sterowanie odtwarzaczem muzyki
|
||||
Name[pt]=Controlar o Leitor de Áudio
|
||||
Name[pt_BR]=Controlar o reprodutor de áudio
|
||||
Name[ro]=Controlează lector audio
|
||||
Name[ru]=Пульт аудиопроигрывателя
|
||||
Name[sk]=Ovládanie audio prehrávača
|
||||
Name[sl]=Nadzorovanje predvajalnika zvoka
|
||||
Name[sr]=управљање аудио плејером
|
||||
Name[sr@ijekavian]=управљање аудио плејером
|
||||
Name[sr@ijekavianlatin]=upravljanje audio plejerom
|
||||
Name[sr@latin]=upravljanje audio plejerom
|
||||
Name[sv]=Styr ljudspelare
|
||||
Name[th]=ควบคุมเครื่องเล่นเสียง
|
||||
Name[tr]=Müzik Çaları Yönet
|
||||
Name[uk]=Керування аудіопрогравачем
|
||||
Name[x-test]=xxControl Audio Playerxx
|
||||
Name[zh_CN]=控制音乐播放器
|
||||
Name[zh_TW]=控制音效播放器
|
||||
Comment=Allows to control MPRIS audio player
|
||||
Comment[ar]=يسمح بالتحكم بمشغل الصوتيات MPRIS
|
||||
Comment[bs]=Dopušta kontroliranje MPRIS audio plejera
|
||||
Comment[ca]=Permet controlar reproductors d'àudio MPRIS
|
||||
Comment[ca@valencia]=Permet controlar reproductors d'àudio MPRIS
|
||||
Comment[cs]=Dovoluje ovládání audio přehrávačů MPRIS
|
||||
Comment[da]=Lader dig betjene MPRIS-lydafspillere
|
||||
Comment[de]=Ermöglicht die Steuerung von MPRIS-Medienspielern
|
||||
Comment[el]=Επιτρέπει τον έλεγχο αναπαραγωγέων ήχου MPRIS
|
||||
Comment[en_GB]=Allows to control MPRIS audio players
|
||||
Comment[es]=Permite controlar reproductores de audio MPRIS
|
||||
Comment[et]=Võimaldab juhtida MPRIS helifailide mängijaid
|
||||
Comment[fi]=Mahdollistaa MPRIS-äänisoitinten hallinnan
|
||||
Comment[fr]=Permet de contrôler les lecteurs audio « MPRIS »
|
||||
Comment[gl]=Permite controlar reprodutores de son de tipo MPRIS
|
||||
Comment[hr]=Omogućuje kontrolu MPRIS-svirača zvuka
|
||||
Comment[hu]=Lehetővé teszi az MPRIS zenelejátszók vezérlését
|
||||
Comment[it]=Consente di controllare i lettori audio MPRIS
|
||||
Comment[kk]=MPRIS аудиоплейерлерді басқаруға мүмкіндік береді
|
||||
Comment[km]=អនុញ្ញាតឲ្យត្រួតពិនិត្យកម្មវិធីចាក់អូឌីយ៉ូ MPRIS
|
||||
Comment[ko]=MPRIS 오디오 재생기 제어
|
||||
Comment[lt]=Leidžia valdyti MPRIS audio grotuvus
|
||||
Comment[lv]=Ļauj kontrolēt MPRIS audio atskaņotājus
|
||||
Comment[mr]=MPRIS ऑडिओ प्लेयर्स वर नियंत्रण ठेवतो
|
||||
Comment[nb]=Kan styre MPRIS-lydspillere
|
||||
Comment[nds]=Stüern för MPRIS-Klangafspelers
|
||||
Comment[nl]=Staat toe om MPRIS audiospelers te besturen
|
||||
Comment[nn]=Kontroller MPRIS-baserte lydspelarar
|
||||
Comment[pl]=Pozwala sterować odtwarzaczami muzyki MPRIS
|
||||
Comment[pt]=Permite controlar os leitores de áudio MPRIS
|
||||
Comment[pt_BR]=Permite controlar os reprodutores de áudio MPRIS
|
||||
Comment[ru]=Позволяет управлять аудиопроигрывателями, совместимыми с MPRIS
|
||||
Comment[sk]=Ovládanie MPRIS audio prehrávačov
|
||||
Comment[sl]=Omogoča nadzor predvajalnikov zvoka MPRIS
|
||||
Comment[sr]=Управљајте МПРИС аудио плејерима
|
||||
Comment[sr@ijekavian]=Управљајте МПРИС аудио плејерима
|
||||
Comment[sr@ijekavianlatin]=Upravljajte MPRIS audio plejerima
|
||||
Comment[sr@latin]=Upravljajte MPRIS audio plejerima
|
||||
Comment[sv]=Gör det möjligt att styra MPRIS-ljudspelare
|
||||
Comment[th]=ช่วยควบคุมโปรแกรมเล่นเสียง MPRIS
|
||||
Comment[tr]=MPRIS müzik çalarları kontrol etmeyi sağlar
|
||||
Comment[uk]=Надає змогу керувати аудіопрогравачами стандарту MPRIS
|
||||
Comment[x-test]=xxAllows to control MPRIS audio playersxx
|
||||
Comment[zh_CN]=让您控制 MPRIS 音乐播放器
|
||||
Comment[zh_TW]=允許控制 MPRIS 音效播放器
|
||||
X-KDE-ServiceTypes=Plasma/Runner
|
||||
Type=Service
|
||||
Icon=applications-multimedia
|
||||
X-KDE-Library=krunner_audioplayercontrol
|
||||
X-KDE-PluginInfo-Name=Audio Player Control Runner
|
||||
X-KDE-PluginInfo-Version=0.1
|
||||
X-KDE-PluginInfo-License=LGPL
|
||||
X-KDE-PluginInfo-EnabledByDefault=true
|
|
@ -1,56 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Type=Service
|
||||
X-KDE-ServiceTypes=KCModule
|
||||
|
||||
X-KDE-Library=kcm_krunner_audioplayercontrol
|
||||
X-KDE-ParentComponents=Audio Player Control Runner
|
||||
X-KDE-PluginKeyword=kcm_krunner_audioplayercontrol
|
||||
|
||||
Name=Control audio player
|
||||
Name[ar]=التحكم بمشغل الصوتيات
|
||||
Name[bs]=Kontroliranje audio plejera
|
||||
Name[ca]=Controlador del reproductor d'àudio
|
||||
Name[ca@valencia]=Controlador del reproductor d'àudio
|
||||
Name[cs]=Ovládat zvukový přehrávač
|
||||
Name[da]=Betjening af lydafspiller
|
||||
Name[de]=Medienwiedergabe steuern
|
||||
Name[el]=Έλεγχος του αναπαραγωγέα ήχου
|
||||
Name[en_GB]=Control audio player
|
||||
Name[es]=Controlar el reproductor de audio
|
||||
Name[et]=Helifailide mängija juhtimine
|
||||
Name[fi]=Hallitse äänisoitinta
|
||||
Name[fr]=Contrôle du lecteur audio
|
||||
Name[gl]=Control para reprodutores de son
|
||||
Name[hr]=Kontroliraj svirač zvuka
|
||||
Name[hu]=Zenelejátszó-vezérlő
|
||||
Name[it]=Controllo lettore audio
|
||||
Name[ja]=オーディオプレーヤーを制御
|
||||
Name[kk]=Аудоплейерді басқару
|
||||
Name[km]=ត្រួតពិនិត្យកម្មវិធីចាក់អូឌីយ៉ូ
|
||||
Name[ko]=오디오 재생기 제어
|
||||
Name[lt]=Valdyti audio grotuvą
|
||||
Name[lv]=Kontrolēt audio atskaņotāju
|
||||
Name[mr]=ऑडिओ प्लेयर नियंत्रण
|
||||
Name[nb]=Styr mediaspiller
|
||||
Name[nds]=Klangafspelerkuntrull
|
||||
Name[nl]=Audiospeler besturen
|
||||
Name[nn]=Kontroller lydspelar
|
||||
Name[pa]=ਆਡੀਓ ਪਲੇਅਰ ਕੰਟਰੋਲ ਕਰੋ
|
||||
Name[pl]=Sterowanie odtwarzaczem muzyki
|
||||
Name[pt]=Controlar o leitor de áudio
|
||||
Name[pt_BR]=Controlar o reprodutor de áudio
|
||||
Name[ro]=Controlează lector audio
|
||||
Name[ru]=Пульт аудиопроигрывателя
|
||||
Name[sk]=Ovládanie audio prehrávača
|
||||
Name[sl]=Nadzorovanje predvajalnika zvoka
|
||||
Name[sr]=управљање аудио плејером
|
||||
Name[sr@ijekavian]=управљање аудио плејером
|
||||
Name[sr@ijekavianlatin]=upravljanje audio plejerom
|
||||
Name[sr@latin]=upravljanje audio plejerom
|
||||
Name[sv]=Styr ljudspelare
|
||||
Name[th]=ควบคุมเครื่องเล่นเสียง
|
||||
Name[tr]=Müzik çaları yönet
|
||||
Name[uk]=Керування аудіопрогравачем
|
||||
Name[x-test]=xxControl audio playerxx
|
||||
Name[zh_CN]=控制音乐播放器
|
||||
Name[zh_TW]=控制音效播放器
|
Loading…
Add table
Reference in a new issue