@ -38,7 +38,7 @@ import org.kde.latte 0.1 as Latte
Column {
Column {
id: instance
id: instance
property var submodelIndex: tasksModel . makeModelIndex ( parentIndex , isGroup ? itemIndex : - 1 )
property var submodelIndex
property int flatIndex: isGroup && itemIndex >= 0 ? itemIndex : 0
property int flatIndex: isGroup && itemIndex >= 0 ? itemIndex : 0
property bool isActive: ( typeof model !== 'undefined' ) && ( typeof model . IsActive !== 'undefined' ) ? IsActive : false
property bool isActive: ( typeof model !== 'undefined' ) && ( typeof model . IsActive !== 'undefined' ) ? IsActive : false
@ -166,7 +166,7 @@ Column {
tasksModel . requestClose ( submodelIndex )
tasksModel . requestClose ( submodelIndex )
}
}
onContainsMouseChanged: contentItem. checkMouse Inside( ) ;
onContainsMouseChanged: mainToolTip. mouseIs Inside( ) ;
PlasmaCore . IconItem {
PlasmaCore . IconItem {
anchors.fill: parent
anchors.fill: parent
@ -196,7 +196,7 @@ Column {
readonly property bool isMinimized: isGroup ? instance.isMinimized : mainToolTip . isMinimizedParent
readonly property bool isMinimized: isGroup ? instance.isMinimized : mainToolTip . isMinimizedParent
/ / T O D O : t h i s c a u s e s X C B e r r o r m e s s a g e w h e n b e i n g v i s i b l e t h e f i r s t t i m e
/ / T O D O : t h i s c a u s e s X C B e r r o r m e s s a g e w h e n b e i n g v i s i b l e t h e f i r s t t i m e
property int winId: isWin && windows [ flatIndex ] != undefined ? windows [ flatIndex ] : 0
property int winId: isWin && windows [ flatIndex ] != = undefined ? windows [ flatIndex ] : 0
Loader {
Loader {
@ -356,7 +356,7 @@ Column {
acceptedButtons: Qt . LeftButton
acceptedButtons: Qt . LeftButton
hoverEnabled: true
hoverEnabled: true
onClicked: mpris2Source . goPrevious ( mprisSourceName )
onClicked: mpris2Source . goPrevious ( mprisSourceName )
onContainsMouseChanged: contentItem. checkMouse Inside( ) ;
onContainsMouseChanged: mainToolTip. mouseIs Inside( ) ;
PlasmaCore . IconItem {
PlasmaCore . IconItem {
anchors.fill: parent
anchors.fill: parent
@ -377,7 +377,7 @@ Column {
acceptedButtons: Qt . LeftButton
acceptedButtons: Qt . LeftButton
hoverEnabled: true
hoverEnabled: true
onClicked: mpris2Source . playPause ( mprisSourceName )
onClicked: mpris2Source . playPause ( mprisSourceName )
onContainsMouseChanged: contentItem. checkMouse Inside( ) ;
onContainsMouseChanged: mainToolTip. mouseIs Inside( ) ;
PlasmaCore . IconItem {
PlasmaCore . IconItem {
anchors.fill: parent
anchors.fill: parent
@ -398,7 +398,7 @@ Column {
acceptedButtons: Qt . LeftButton
acceptedButtons: Qt . LeftButton
hoverEnabled: true
hoverEnabled: true
onClicked: mpris2Source . goNext ( mprisSourceName )
onClicked: mpris2Source . goNext ( mprisSourceName )
onContainsMouseChanged: contentItem. checkMouse Inside( ) ;
onContainsMouseChanged: mainToolTip. mouseIs Inside( ) ;
PlasmaCore . IconItem {
PlasmaCore . IconItem {
anchors.fill: parent
anchors.fill: parent
@ -451,8 +451,8 @@ Column {
text = text . replace ( /\s*(?:-|—)*\s*$/ , "" ) ;
text = text . replace ( /\s*(?:-|—)*\s*$/ , "" ) ;
/ / A d d c o u n t e r b a c k a t t h e e n d .
/ / A d d c o u n t e r b a c k a t t h e e n d .
if ( counter != null ) {
if ( counter != = null ) {
if ( text == "" ) {
if ( text == = "" ) {
text = counter ;
text = counter ;
} else {
} else {
text = text + " " + counter ;
text = text + " " + counter ;
@ -461,14 +461,14 @@ Column {
/ / I n c a s e t h e w i n d o w t i t l e h a d o n l y r e d u n d a n t i n f o r m a t i o n s ( i . e . a p p N a m e ) , t e x t i s n o w e m p t y .
/ / I n c a s e t h e w i n d o w t i t l e h a d o n l y r e d u n d a n t i n f o r m a t i o n s ( i . e . a p p N a m e ) , t e x t i s n o w e m p t y .
/ / A d d a h y p h e n t o i n d i c a t e t h a t a n d a v o i d e m p t y s p a c e .
/ / A d d a h y p h e n t o i n d i c a t e t h a t a n d a v o i d e m p t y s p a c e .
if ( text == "" ) {
if ( text == = "" ) {
text = "—" ;
text = "—" ;
}
}
return text . toString ( ) ;
return text . toString ( ) ;
}
}
function generateSubText ( ) {
function generateSubText ( ) {
if ( activitiesParent == undefined ) {
if ( activitiesParent == = undefined ) {
return "" ;
return "" ;
}
}
@ -479,9 +479,9 @@ Column {
if ( ! plasmoid . configuration . showOnlyCurrentDesktop
if ( ! plasmoid . configuration . showOnlyCurrentDesktop
&& virtualDesktopInfo . numberOfDesktops > 1
&& virtualDesktopInfo . numberOfDesktops > 1
&& ( isGroup ? IsOnAllVirtualDesktops : isOnAllVirtualDesktopsParent ) !== true
&& ( isGroup ? IsOnAllVirtualDesktops : isOnAllVirtualDesktopsParent ) !== true
&& vd != - 1
&& vd != = - 1
&& vd != undefined
&& vd != = undefined
&& virtualDesktopInfo . desktopNames [ vd - 1 ] != undefined ) {
&& virtualDesktopInfo . desktopNames [ vd - 1 ] != = undefined ) {
subTextEntries . push ( i18n ( "On %1" , virtualDesktopInfo . desktopNames [ vd - 1 ] ) ) ;
subTextEntries . push ( i18n ( "On %1" , virtualDesktopInfo . desktopNames [ vd - 1 ] ) ) ;
}
}
@ -491,7 +491,7 @@ Column {
return subTextEntries . join ( "\n" ) ;
return subTextEntries . join ( "\n" ) ;
}
}
if ( act . length == 0 && activityInfo . numberOfRunningActivities > 1 ) {
if ( act . length == = 0 && activityInfo . numberOfRunningActivities > 1 ) {
subTextEntries . push ( i18nc ( "Which virtual desktop a window is currently on" ,
subTextEntries . push ( i18nc ( "Which virtual desktop a window is currently on" ,
"Available on all activities" ) ) ;
"Available on all activities" ) ) ;
} else if ( act . length > 0 ) {
} else if ( act . length > 0 ) {
@ -500,14 +500,14 @@ Column {
for ( var i = 0 ; i < act . length ; i ++ ) {
for ( var i = 0 ; i < act . length ; i ++ ) {
var activity = act [ i ] ;
var activity = act [ i ] ;
var activityName = activityInfo . activityName ( act [ i ] ) ;
var activityName = activityInfo . activityName ( act [ i ] ) ;
if ( activityName == "" ) {
if ( activityName == = "" ) {
continue ;
continue ;
}
}
if ( plasmoid . configuration . showOnlyCurrentActivity ) {
if ( plasmoid . configuration . showOnlyCurrentActivity ) {
if ( activity != activityInfo . currentActivity ) {
if ( activity != = activityInfo . currentActivity ) {
activityNames . push ( activityName ) ;
activityNames . push ( activityName ) ;
}
}
} else if ( activity != activityInfo . currentActivity ) {
} else if ( activity != = activityInfo . currentActivity ) {
activityNames . push ( activityName ) ;
activityNames . push ( activityName ) ;
}
}
}
}