> On Сен. 16, 2015, 10:11 д.п., Kai Uwe Broulik wrote: > > I really like that! > > > > The device notifier UI itself is questionable with the popup telling us > > "the device xyz failed to unmount" rather than just highlighting the device > > and showing the message in the list directly but this is of course outside > > the scope of this patch. > > > > +1 for adding this into Solid > > Kai Uwe Broulik wrote: > Bonus points for querying KService for the pretty application name :) > > See > https://quickgit.kde.org/?p=plasma-workspace.git&a=blob&f=dataengines%2Fpowermanagement%2Fpowermanagementengine.cpp > starting on lines 648 > > Igor Poboiko wrote: > I was thinking about it, but it turns out it isn't that easy. > Simply looking for name.desktop won't work, since e.g gwenviews desktop > name is org.kde.gwenview.desktop. > Another way is using KServiceTypeTrader and looking for applications with > Exec match (e.g "exists Exec and ('gwenview' =~ Exec)"), but it didn't work > as well, since exec line for gwenview (and a lot of other guys aswell) is > "gwenview %U" (no match :( ). Another possible thing is just to check if it > contains (i.e "~~" instead of "=~") executable name, but it might get > unwanted results, e.g I wanted to look for "ls" and it got me "kmailservice". > But then we can filter it by hands. > > What do you think?
I think this actually belongs to KService framework. A method like KService::serviceByExecutable(QString) can be implemented there and used in solid (the link you provided); here; and also in plasma-workspace/libtaskmanager (it has also its own routine, which is broken due to reasons I stated above). Maybe somewhere else, I think it might be useful. - Igor ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/125248/#review85488 ----------------------------------------------------------- On Сен. 16, 2015, 9:49 п.п., Igor Poboiko wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/125248/ > ----------------------------------------------------------- > > (Updated Сен. 16, 2015, 9:49 п.п.) > > > Review request for Plasma and Solid. > > > Repository: plasma-workspace > > > Description > ------- > > An attempt to implement feature from [bug > 96107](https://bugs.kde.org/show_bug.cgi?id=96107) (see summary). > > On umount/eject error it runs "lsof" executable, gets PIDs of blocking > processes and obtains names of processes via KSysGuard::Process machinery. > Finally it appends obtained information to error message which is shown in > tooltip of Device Notifier applet. > > > Diffs > ----- > > dataengines/devicenotifications/CMakeLists.txt 3f7fd83 > dataengines/devicenotifications/ksolidnotify.h a471d50 > dataengines/devicenotifications/ksolidnotify.cpp 35d49d6 > > Diff: https://git.reviewboard.kde.org/r/125248/diff/ > > > Testing > ------- > > Tested unmount on busy device with several processes blocking it. Did not > test eject, since I have no optical disc drive :( > > > File Attachments > ---------------- > > Applet with error message > > https://git.reviewboard.kde.org/media/uploaded/files/2015/09/15/3b1b64fc-abff-4633-9dca-621388edf086__snapshot11.png > > > Thanks, > > Igor Poboiko > >
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel