[GSoC 2017] Calendar Application: Final Report

Blog post by AkshayAgarwal007 on Mon, 2017-08-28 11:55

Hello Everyone!

Google Summer of Code 2017 is off to an end and in this report I'll be summarizing the work done throughout the summer.

Introductory blog post

Source code: https://github.com/HaikuArchives/Calendar

List of all blog posts: https://www.haiku-os.org/blog/akshayagarwal007/

List of all Commits:
https://github.com/HaikuArchives/Calendar/commits/master
https://github.com/haiku/haiku/commits?author=AkshayAgarwal007

What has been completed

Calendar App

The Calendar app currently has the following features implemented:

  • Create, modify and delete events.
  • Generate notifications for events.
  • Display Day Calendar view.
  • Event categorization.
  • Set all day long events.
  • Fetching events from Google Calendar using Google Calendar API.
  • SQLite backend for storing events.
  • Setting preferences like 'First day of week', 'Display week number in Calendar'.
  • App localization: DateTime strings are localised and updates with locale preferences changes but GUI string still needs to be localised.

What's left to do (After GSoC)

  • Localizing the app's GUI strings
  • Implement month view
  • Fix adding/updating events to Google Calendar

There are many features that a Calendar app in the present world requires and all of it couldn't be completed in the summer. Apart from the 'future features' which I already mentioned in the proposal, throughout the course of the work I came across many features (based on discussions throughout the project and suggestions on my blog posts) which the app would require and I opened issues for the same in the repo so that they don't get lost.

[GSoC 2017] Calendar Application: Weekly Report 7

Blog post by AkshayAgarwal007 on Sun, 2017-08-27 03:45

Hello Everyone!

In this post I would be focusing on the work done in the past two weeks.

I worked on Google Calendar integration and general improvements and bug fixes in the Calendar App. I also worked on implementing a relative datetime formatter and general enhancements/bug fixes involving the Haiku locale kit.

Calendar App

Fetching events using Google Calendar API and syncing with the database works now. There are issues with sending JSON data in an http post request, which always results in a parse error in the API response, as a result of which adding/updating events to Google Calendar doesn't work currently. I would be working to fix the same over the next few days. Deleting events from Google Calendar works fine.

[GSoC 2017] Calendar Application: Weekly Report 6

Blog post by AkshayAgarwal007 on Fri, 2017-08-11 02:41

Hello Everyone!

In this post I would be focusing on the work done in the past two weeks.

I implemented a database backend and worked on generating notification for events. Currently, I am using SQLite3 for data storage, but I would be implementing a BFS backend for the same sooner. Google Calendar integration is currently in progress. Also there is an issue with date/time parsing and formatting in the app which I would be fixing.

[GSoC 2017] Calendar Application: Weekly Report 5

Blog post by AkshayAgarwal007 on Tue, 2017-07-25 10:47

Hello Everyone!

It's been more than a week since I wrote my last blog post. In this post I would brief you on the work done during this time.

I spent a little more time digging into the Haiku source (mostly the locale kit) to work on bugs and possible improvements as I came across quite a few places that would require it, while working on the Calendar app.

The current date is now highlighted in BCalendarView. This can be seen in the deskbar calendar. I fixed a few bugs with my first commit regarding the same.

[GSoC 2017] Calendar Application: Weekly Report 4

Blog post by AkshayAgarwal007 on Tue, 2017-07-11 08:51

Hello Everyone!

It has been three weeks since my last blog post. In this post I would update you with the current progress on the Calendar Application.

I have been working on the following since the past three weeks:

  • Writing the Event and Category class.
  • Working on UI of Event Manager.
  • Working on UI of Category Manager and Category Edit Window.
  • Working on a pop-up Calendar control to select event start and end date.
  • Working on the Calendar View class to highlight the current system date.
  • Fixing bugs in the existing code and improvements.
  • Working on Add/Modify/Delete events functionality.
  • Exploring existing Haiku applications to look for widgets, trying to implement new ones(For e.g DateTimeEdit - to select calendar start and end date)

Add/Modify/Delete events

Basic Add/Modify/Delete events functionality is complete now. There has been a little change from the initial mockups. Instead of switching views(I thought of using the BCardLayout initially to switch been Day View and Add Event section) and showing the Add Event section in the MainWindow, there will be a separate Event Manager window for it. Event details such as Event's name, place, description, start and end date/time can be filled. Also an event can be made an all day event which will make it appear on the top of the Day View. Event recurrence is not implemented currently and event category is not complete so it's disabled for now. Because of not having a DateTimeEdit currently there's just a text control that shows the date selected in Calendar View and a dummy time. Also the calendar pop-up control is under work which would be a part of DateTimeEdit. Currently, for storing purposes I am using BMessage and flat files.

[GSoC 2017] Calendar Application: Weekly Report 3

Blog post by AkshayAgarwal007 on Wed, 2017-06-21 04:41

Hello Everyone!

In this post I would be focusing on the work done in the past two weeks, issues faced and how I went about resolving them. Also, since the first evaluation is near, the post also contains a brief analysis of the current progress with respect to the deliverables mentioned in the proposal.

Issues faced and how I went about resolving them:

  1. I wasn't able to set the day names header in the calendar view based on the locale preferences, the day names always showed up in English no matter which language is selected in locale preferences. The Calendar view uses BDate::ShortDayName() which in turn uses strfime to get the day of week names, and it uses LC_TIME to decide which locale to use. By default it is set to use the "C" locale set which is a rather neutral locale with minimal locale information. In order to use the locale set selected in the environment, setlocale(LC_ALL,"") has to be called. But still work has to be done to update it with live changes in locale preferences.
  2. <li>This was not an issue but still I have to look into several
    implementations in order to find a proper way do this i.e updating the date
    headers with changes in system date. I'm making the MainView in the calendar
    app accept pulse messages(using B_PULSE_NEEDED) and every time the Pulse()
    method is called I'm checking the system date and sending the state change
    message using SendNotices() to all the other subscribers(currently there is
    only one- SidePanelView that contains the date header and calendar views)
    and calling the method to update the date header in the SidePanelView class
    on receiving the message. Instead of using pulse, BMessageRunner can also be
    used to send periodic messages.</li>
    
    <li>There was a bit difficulty in updating the date headers and calendar
    view day name headers with live changes in locale preferences as I was
    unsure about how the handle B_LOCALE_CHANGED message. When locale preference
    are changed BApplication gets the B_LOCALE_CHANGED message, I am forwarding
    the message to SidePanelView and updating the headers based on the new locale
    preferences. Work has to be done in updating the day name headers in the
    calendar view on locale preferences change.</li>
    
    <li>I explored the Haiku message-passing system in details and had a few
    doubts regarding how to post and forward messages as there are similar ways
    of doing itand used interchangeably in the existing applications. Stippi and
    PulkoMandy helped me in understanding it better.</li>
    
    <li>In the calendar view when I change the selected day, the current day 
    doesn't remain highlighted. Also if a day which is not in the current month
    is selected, then I cannot bring the focus back to the current day
    programmatically i.e the CalendarView::SetDate() doesn't work. I am working
    to fix this.</li>
    
    <p><img src="/files/blog/AkshayAgarwal007/calendar-focus.png" alt="Calendar" 
    class="img-responsive center-block"></p>
    
    <li> This is more of a learning than an issue. Haiku uses a 32-bit time_t 
    and therefore is vulnerable to the Y2038 problem</li> So if events are set 
    to happen after the date 19-January-2038 3:14:08 AM GMT, they would cause 
    problems. Moreover the system date cannot be set to a date after Y2038
    currently. Waddlesplash has recently worked to switch to a 64-bit time_t
    and that is applicable for x86_64 build and not for 32-bit x86 and the Y2038
    will remain the same for it. We will hopefully drop 32-bit support by 2038.
    So for 32-bit x86 the calendar would not support dates after Jaunary 19th
    2038.</li>
    

I also implemented preferences settings for the app. The user can enable/disable week number and set the first day of week(which can be set to locale based first day of week or any specific day.)

[GSoC 2017] Week 3-4 of Community Bonding

Blog post by AkshayAgarwal007 on Sun, 2017-06-04 08:41

Hello Everyone!

In this post I would be focusing on my last two weeks of community bonding. The coding period has officially began on 30th, although I had already started it in my second week itself.

I had one or two different things in mind for this week as I mentioned in my previous post. But I ended up working on implementing a locale aware date header, and the calendar widget, which is more important initially as to implement the basic functionalities of the calendar app, and is also the first goal. In the process, I also gained a better understanding of the locale kit and Haiku date/time classes.

[GSoC 2017] First two weeks of Community Bonding

Blog post by AkshayAgarwal007 on Thu, 2017-05-18 08:51

Hello Everyone!

In my previous post I introduced you all to the Calendar Application project that I would be working upon as a part of GSoC 2017. In this post I would be focusing on my first two weeks of the community bonding period.

Getting to know people

The first few days were spent in exploring more about the Haiku community, getting to know the mentors and fellow students, and learning in details about their project through their blog posts. All the projects are geared to take Haiku forward and it would indeed be an awesome summer for Haiku.

[GSoC 2017] Calendar Application

Blog post by AkshayAgarwal007 on Mon, 2017-05-08 06:51

Introduction

Hello I'm Akshay (IRC/Trac: akshay, GitHub: AkshayAgarwal007) from Kolkata, India. I would be working on developing a native Calendar Application for Haiku as a part of Google Summer of Code 2017. My mentors for the project are Scott McCreary and Kacper Kasper. I am very excited for this project.

Why a Calendar Application? Isn't there already one?

A Calendar application is a must have application for any operating system and would be beneficial for end users as well as developers. Haiku doesn't have a calendar application yet. There are a few existing 3rd party Calendar apps out there, but none are close to a simple and elegant Calendar app that an end user would like to use, with all the necessary features a modern Calendar app should have.