GNOME Bugzilla – Bug 673767
app-usage: Turn into a real API
Last modified: 2018-07-13 19:12:24 UTC
Extensions may want to use the app-usage data to do interesting things, without having to parse the XML file themselves.
Created attachment 211613 [details] [review] app-usage: Remove crufty old "context"s idea Back in the day, there was a proposed system of tracking apps in a specific context. The inspiration was that you may have used apps in multiple modes: Firefox may have been used in both "Programmer Reference" and "Kitten Videos" contexts. Early user response to the feedback wasn't too positive -- context switching is something that humans have trouble doing implicitly, let alone explicitly. The old codebase still has a few remnants of this around; let's finally put them to rest. Note that we still write out a dummy context tag to the XML file -- old versions of the shell will flat out crash if you don't have one of those in there, so just leave it in for compatibility sake.
Created attachment 211614 [details] [review] app-usage: Make ShellAppUsageData into a public boxed type Add a public accessor to get the raw usage data, as well.
Created attachment 211615 [details] [review] app-usage: Remove unused open-window-count attribute Since this has already been unused and was inaccessible, this shouldn't matter too much.
Created attachment 211616 [details] [review] app-usage: Remove more unused things
I put the cleanup patches into https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/146, as they still make sense. However I haven't seen any extension developers asking for access to the data, so I've left that bit out.