First release of the GTG extension for Gnome-Shell
by bapt
Today I push my first release of the gnome-shell extension of GTG : Github repo
- First implementation of the architecture :
I decided to rewrite the extension from the begining to provide a strong architecture.
For now the extension is composed by 3 files :
- extension.js this file will launch the “modules” of the extension.
- gtgsearchprovider.js represents the first module, it adds a search provider to gnome shell. This search provider will search in your gtg tasks and display results. In order to centralize features, this search is carried out by the overview.
- gtgdbus.js contains all the dbus-related things. Interfaces, proxy, usefull functions, etc…
For the future, I’ll add a file for each module and extension.js will just manage these modules (Launch, destruction, etc…)
- Search provider for Gnome-Shell
As I explained before, this first release comes with a search provider. Just open the overview, type keywords to search in your tasks, and the extension will displays all results.
Of course, gtg must be launched.
You can see an example in this video :
- How does it works ?
It’s quite simple. The extension contains the list of all the active tasks.
When a signal is emitted (TaskAdded, TaskModified, TaskDeleted) this list is updated :
function(sender, tid) { loadTasks(); });
this.modifiedSignal = GTGDBus.GTGProxy.connect(‘TaskModified’,
function(sender, tid) { loadTasks(); });
this.deletedTask = GTGDBus.GTGProxy.connect(‘TaskDeleted’,
function(sender, tid) { loadTasks(); });
Also, the extension watches the gtg state in DBus, if the interface vanishes, the list is emptied, if the interface appears, the list is updated :
function() { running=true; loadTasks(); },
function() { running=false; loadTasks(); });
Now, the user can search with differents terms. The extension searches these terms in the list and displays results.
- And after ?
After, I’ll begin the menu in the calendar widget and I’ll fix all bugs you found in the search provider
Cool stuff!
> “Of course, gtg must be launched.”
That’s kind of not as useful as it could…
I mean, I could see myself search for a task in the shell, and when selecting it GTG would start if needed then display the task.
That’s what happens with GNOME-Documents, GNOME-Contacts,…
Any plan to make it work the same way?
I’m sorry, but requiring an extension to integrate with GNOME Shell’s search is just wrong. Instead, GTG should implement a remote search provider like Documents[0], which makes search integration part of the default experience.
[0] http://git.gnome.org/browse/gnome-documents/tree/src/shellSearchProvider.js