@ -36,10 +36,6 @@ PlasmaExtras.ExpandableListItem {
readonly property int state: sdSource . data [ udi ] ? sdSource . data [ udi ] . State : 0
readonly property int operationResult: ( model [ "Operation result" ] )
/ / d o n ' t s h o w u n m o u n t a c t i o n s f o r r o o t a n d m e d i a p l a y e r s ; i n s t e a d , s h o w a n
/ / " O p e n i n f i l e m a n a g e r " b u t t o n i n s t e a d , s o t h e u s e r c a n d o s o m e t h i n g u s e f u l
readonly property bool unmountable: sdSource . data [ udi ] [ "File Path" ] !== "/"
&& model [ "Device Types" ] . indexOf ( "Portable Media Player" ) == - 1
readonly property bool isMounted: devicenotifier . isMounted ( udi )
readonly property bool hasMessage: statusSource . lastUdi == udi && statusSource . data [ statusSource . last ] ? true : false
readonly property var message: hasMessage ? statusSource . data [ statusSource . last ] || ( { } ) : ( { } )
@ -124,7 +120,7 @@ PlasmaExtras.ExpandableListItem {
var service
var operationName
var operation
if ( ! deviceItem . unmount able) {
if ( ! sdSource . data [ udi ] . Remov able) {
service = hpSource . serviceForSource ( udi ) ;
operation = service . operationDescription ( 'invokeAction' ) ;
operation . predicate = "test-predicate-openinwindow.desktop" ;
@ -196,14 +192,14 @@ PlasmaExtras.ExpandableListItem {
defaultActionButtonAction: QQC2 . Action {
icon.name: {
if ( ! deviceItem . unmount able) {
if ( ! sdSource . data [ udi ] . Remov able) {
return "document-open-folder"
} else {
return isMounted ? "media-eject" : "media-mount"
}
}
text: {
if ( ! deviceItem . unmount able) {
if ( ! sdSource . data [ udi ] . Remov able) {
return i18n ( "Open in File Manager" )
} else {
var types = model [ "Device Types" ] ;