GNOME Calendar: The much awaited recurrence-dialog is finally here!

Hey folks!

It’s been quite a while since I last posted here and there’s a reason behind it. Lesson learnt: implementing ‘Evolution Data Server’ API correctly requires lot of effort and also some amount of experimentation. So finally, after a lot of hard work, ‘Editing recurrent events’ is now possible in GNOME Calendar.

The idea behind the recurrence-dialog (screenshot below) is simple. Whenever you edit a recurrent event, the recurrence-dialog pops up asking you about the set of events you want to modify.

Screenshot from 2017-06-15 23-51-16

Then you choose the appropriate option.

Here is a short demo where I changed the name of a recurrent event named ‘Guitar Lessons’ to ‘CHANGED’ and chose the ‘Subsequent Events’ option.

guitar-subseq.webm

Notice that only those instances which occur on and after 18th June were modified. That’s desired behavior.

And that’s not it. We have also integrated the ‘drag-and-drop’ functionality with recurrent events. Whenever you drag and drop a recurrent event the same recurrence-dialog pops up.

Here is a demo showing just that.

football-dnd.webm

I simply dragged and dropped the ‘Football practice’ event to the next date. Then the recurrence dialog popped up and I chose ‘All events’ option. The effect of this was that all the instances of this event were shifted forward by 1 day. The events earlier used to occur on dates – 1,4,7…. but after modification occur on 2,5,8….. dates.

If you want to check out the related patches, you can find them here.

You can check out the official project page here.

Feel free to comment/say hi to me regarding my ongoing project.

Until next time.

We can now detect recurrent events in GNOME Calendar

Yes! We cleared the first hurdle in adding recurrence support to GNOME Calendar.

Now GNOME Calendar is smart enough to detect if an event has recurrences or not.

We added a new property – ‘has-recurrence‘ – to GcalEvent. Evolution API took most of the load off our shoulders as it already had a function ‘e_cal_component_has_recurrences()‘ which served our purpose.

The property ‘has-recurrence is a gboolean (or boolean, in general) and is assigned TRUE when an event has recurrence property, otherwise FALSE. This is the simplest of properties with more complex ones yet to come.

To test out this newly added patch, I decided to import a recurrent event from Google Calendar to GNOME Calendar. To my benefit, our weekly GSoC meeting was already a recurrent event and therefore served as a perfect test case. So after successfully importing that event in GNOME Calendar, I used GtkInspector to enlist the properties of the event.

And Voilà! As you can see below, the has-recurrence property was automatically set to TRUE.

aaNQTnM

You can find more about GtkInspector here.

For those of you who are new to GObject. Here are the relevant links.

You can check out my patch here.

Feel free to say hi or drop suggestions.

GSoC ’17 project on GNOME Calendar

I am extremely happy to announce that I have been selected as a student in Google Summer of Code ’17 in GNOME. This would not have been possible without the constant guidance and support of my mentor Georges Stavracas and also the immensely helpful GNOME community. I would also like to thank my mate Rohit Kaushik who kept me motivated all the time and himself got selected for GSoC in GNOME To Do. You can find Rohit’s work here.

Now let’s dive right into what my project is about.

The goal of the project is to add support to recurrent events in GNOME Calendar.

Support for recurrent events already exists in Evolution calendar but it is lacking in GNOME Calendar. For example, right now, for a weekly repeating event, users have to manually add that event every week which is very inconvenient and time consuming.

  • Recurrence property will be added to GcalEvent in Calendar. A new GcalRecurrence structure will be introduced which will handle the recurrence part in GcalEvent using Evolution’s API.
  • The first major task would be to ‘detect recurrent events’.
  • Then, the Edit-dialog will be modified accordingly. Here’s a design sample of what the Edit-dialog would look like-

0bt7of8 - Imgur

You can check out the full mockup here.

  • The next major part of the project is to handle the editing/deletion of recurrent events. The options available to the user regarding that are given in the mockup below.

dfKCgvs - Imgur

I will regularly update this blog and provide a step-by-step documentation so that it may help fellow developers and also some enthusiastic users who want to dive into the world of GNOME development (or Open-source development in general).

You can find the official project page here with a detailed list of deliverables.

Evolution is a calendar and a mailing client. Learn more about Evolution here.

Feel free to say hi or drop suggestions.

Stay tuned, there is plenty more to come!

Blog at WordPress.com.

Up ↑