But the control center still crashes..

In the last milestone, adding a TODOist provider to gnome-online-accounts looked like it had a bug which made the control-center crash. Here’s a brief description as to what happened :

  • Run the control center.
  • Add the TODOist account.
      • The dialog to enter the credentials opens.
      • If you cross the above step, it asks for permission to access resources from your account.
      • Granting the permissions, the accounts.conf file gets written and the account gets added.

    And BAM!! it crashes.

    Next time you run the control-center right away, the account would be there showing up all nice.

Hence we go to GDB to seek help about what’s the matter with gnome-online-accounts or control-center. Now GDB’s stack trace (which I’ve lost now and can’t reproduce due to some other graphics problems) pointed out some problem with the Intel graphics drivers which I obviously did not know as how to overcome.

Then in discussion with mclasen about this thing, he pointed out the workaround for the bug which was running control center with the prefix

GDK_BACKEND=x11 

and yay! it works now.  Now this had something to do with wayland backend creating some issues with Intel graphics drivers which I cannot really decode at the moment ¯\_(ツ)_/¯

And closing this one with a realization I had after this bug:

“All software has bugs, and a working system is just one where most bugs are not triggered too frequently” –mclasen

Adding TODOist Provider

The first milestone of the project – writing a TODOist Provider for gnome-online-accounts. This provider will be used for authentication of user and providing authorization to read/write todo-lists from Recipes to TODOist.

The API documentation for TODOist is available here.

    • The process started from registering Recipes and getting the client_id and client_secret from the TODOist.
    • Then comes coding the GoaTodoistProvider that implements GoaOAuth2Provider. Subclasses must implement these methods from GoaOAuth2ProviderClass:
      • GoaOAuth2ProviderClass.get_authorization_uri: getting the authorization url
      • GoaOAuth2ProviderClass.get_token_uri : getting the token url
      • GoaOAuth2ProviderClass.get_redirect_uri : getting the redirection url (which is https://localhost/ for Desktop Clients)
      • GoaOAuth2ProviderClass.get_scope : decides the level of access to ask from the user
      • GoaOAuth2ProviderClass.get_client_id : getting the client_id obtained from TODOist.
      • GoaOAuth2ProviderClass.get_client_secret : getting the client_secret obtained from TODOist
      • GoaOAuth2ProviderClass.get_identity_sync : to obtain the presentation_id (email id in this case) from the json object returned using REST API by reading user’s properties
    • Additionally, the GoaProviderClass methods (that should chain up to its parent class) must be implemented: GoaProviderClass.get_provider_type, GoaProviderClass.get_provider_name , GoaProviderClass.build_object

The final view of how the provider looks like this:

TODOIST LOGIN

 

TODOIST ACCOUNT

And the official coding period begins…

Hello there ! This is my first post about my GSoC project.

About Project

As the title says Sharing of shopping lists from Recipes to TODOist which is self explanatory.

Implementation

There would be addition of minute details as and when the steps gets implemented. The implementation is basically divided into two steps.

  1. Implement gnome-online-accounts Provider for TODOist. (Along with that taking care of the fact that Recipes being non-core app,if isn’t installed, this implementation doesn’t end up having TODOist account that serves no purpose)

  2.  Implement sending shopping list/s from Recipes to TODOist along with sync in the deletion of items

    Onto the implementation of step one. I am digging my way through gnome-online-accounts to write a TODOist provider. Stay tuned for more details! 😉

Hello world!

About Myself

I am Ekta Nandwani, an open-source enthusiast, a foodie and a music lover. I’ve done my major in Computer Science at L.D. College of Engineering. This summer I’ve been selected as a Google Summer of Code Intern under GNOME Foundation. I am quite excited about the opportunity to work in such a great community this summer.

 

I’ll be blogging about my GSoC project which is Sharing of Shopping lists from Recipes (Desktop App) to Todoist (Web + Mobile App). Here is the wiki page for the project