mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-04 19:26:19 +00:00
ActiveWindow + MediaMini: proper cleanup of strings to avoid line breaks.
This commit is contained in:
@@ -162,7 +162,11 @@ Singleton {
|
||||
// Get focused window title
|
||||
function getFocusedWindowTitle() {
|
||||
if (focusedWindowIndex >= 0 && focusedWindowIndex < windows.count) {
|
||||
return windows.get(focusedWindowIndex).title || ""
|
||||
var title = windows.get(focusedWindowIndex).title
|
||||
if (title !== undefined) {
|
||||
title = title.replace(/(\r\n|\n|\r)/g, "")
|
||||
}
|
||||
return title || ""
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ Singleton {
|
||||
property bool isSeeking: false
|
||||
property int selectedPlayerIndex: 0
|
||||
property bool isPlaying: currentPlayer ? (currentPlayer.playbackState === MprisPlaybackState.Playing || currentPlayer.isPlaying) : false
|
||||
property string trackTitle: currentPlayer ? (currentPlayer.trackTitle || "") : ""
|
||||
property string trackTitle: currentPlayer ? (currentPlayer.trackTitle !== undefined ? currentPlayer.trackTitle.replace(/(\r\n|\n|\r)/g, "") : "") : ""
|
||||
property string trackArtist: currentPlayer ? (currentPlayer.trackArtist || "") : ""
|
||||
property string trackAlbum: currentPlayer ? (currentPlayer.trackAlbum || "") : ""
|
||||
property string trackArtUrl: currentPlayer ? (currentPlayer.trackArtUrl || "") : ""
|
||||
|
||||
Reference in New Issue
Block a user