The End is Only the Beginning

Somehow, some way, the summer has flown by and it is time for the Summer of Code to come to an end. As sad as that is to think about, I thought I would give an overview as to what has become of my project: the new task editor for Getting Things GNOME!

From the onset of the internship, the intent was to upgrade the task editor from pyGtk to Gtk3. For the first month or so of the project, this posed problems, mostly with having to deal with the fact that Gtk2 and Gtk3 cannot run in the same process. So, it came down to a decision of using dbus and running the editor as a separate program.

How does this all work? What happens is there is a new object that controls the task editors, and keeps a list of all opened editors. When a user wants to open a task, Getting Things GNOME contacts the controller with the id of the task. The controller then looks to see if that task is already open; if it is, it presents the already opened window, otherwise it opens a new editor. The editor then can contact the controller when it needs to save, and the controller sends a dictionary of all the task data over to Getting Things GNOME to save.

But what about rich text editing? Unfortunately the task of rewriting the entire editor from scratch proved to be a very big project and I didn’t get to spend a lot of time on rich text editing. However, there is partially working rich text editing, such as being able to bold/italicize/underline a selection of text. As I continue to work on the project, this should be up and running pretty soon.

So now that the internship is closed, I can say this has been an absolutely amazing experience and a big thanks to Getting Things GNOME for allowing me to work on a wonderful project, and a thank you to my mentor, Luca, for everything you helped me with as the summer rolled along. But, just because the internship is over doesn’t mean the work is over, and I can’t wait to continue to work on Getting Things GNOME and improving the new editor.

The Task Editor is Finally Implemented!

After many weeks of struggling to get the task editor for Getting Things GNOME to do everything its predecessor does, the final product of the internship is slowly starting to take shape. I’ve been spending the past couple months starting the new editor separately from Getting Things GNOME to test both the dbus methods and be able to load real task data into the editor, but I can now say that it is no longer necessary.

This is because the new task editor is now loading through the main Getting Things GNOME application and properly loading tasks! The struggle to get things working with dbus was much more difficult than I could have imagined, mostly due to the fact that there is not much documentation out there for dbus. This meant that instead of being able to find solutions from others who have had similar problems or being able to go into this part of the project understanding how everything works, there was much experimentation to be had within the Dbus API (which, once you have a handle on everything, can be quite robust). 

So what can be expected now that we are into the home stretch of Google’s Summer of Code? Much debugging is needed to be done now that the system is running in its intended environment. There are also a few features that I would like to have added and finished before the end of the internship, namely rich text editing and couple features on the wishlist at Launchpad. 

Halfway There!

 

That’s right folks, we are in the midterm period of Google’s Summer of Code! So what progress has been made on the new Task Editor for Getting Things GNOME? Well, a lot of progress has been made since my last blog post.

Image

As you can see in the picture, we DO have an editor that’s seemingly coming along! You’ll notice lots of buttons in the toolbar (especially ones that were never in the editor in the previous version. Those will be utilized later when rich text editing is added into the editor. Beyond that is the standard insert subtask, insert tag, and mark done buttons, all which work.

In the past two weeks, I’ve rewritten how we find tags and subtasks within our task in order to make it more efficient and I haven’t noticed any lag when testing out the editor. It had it’s ups and downs and certainly some bug hunting was to be had, but they seem to be up and running just great.

There are actually only a couple missing features left to get running before the editor is at the same level of features as the original, and that’s the ability to delete tasks (which is coming very soon) and the ability to set the start date and due date of the task. Once the deletion of a task is done, it will be time to actually add the editor into the program so that we don’t have to manually enter task ids to load a task, which will put us that much closer to having a new and (hopefully) improved task editor at Getting Things GNOME!

Updates on Summer of Code

Because PyGTK and GTK3 don’t work together very well, I have had to make a minor design change in the Task Editor for Getting Things GNOME. In order to get the Task Editor running with the rest of the program, it needs to run on it’s own process, and so, we now have the Editor running with a Dbus wrapper. For those who don’t know what Dbus does, it allows two programs running on different processes to communicate with each other through a connection.

The nice thing about making the switch over to Dbus was that Getting Things GNOME already has a well done Dbus wrapper for other programs to use, so all I had to do was create the wrapper for the Editor. This meant that I could finally load tasks and make sure that that aspect was working properly. The way that Getting Things GNOME handles Dbus is that to get a task it sends over a dictionary of key-values with items such as the task title, text, tags, subtasks, etc. Because of this, the workflow of the Editor has changed in how it gets things and affected the workflow as well.

With the workflow change came a major code change. But with that code change came a lot of good. We now have tasks loading properly within the editor. It properly applies all the necessary highlighting and rich text to subtasks, tags, and the title.

So now that tasks are loading where to next? Next things to take care of is to deal with working on text input and how to deal with it. We need to manually take care of links, such as changing the mouse cursor when we hover over them, and having clicking them open up a webpage or subtask, etc. By then I should have some pictures worth showing on the blog.

Summer of Code is Here!

Well, it has already been an entire month since Google’s Summer of Code program began! For those of you who don’t know what the Summer of Code is, it is a program in which Google pays students to work on open source projects, easing them into the world of open source programming. For more information, you can check out their website at http://code.google.com/soc/.

So for the past month, what have I been doing? Well my project is to rework Getting Things GNOME’s task editor and add some rich text editing features. This became the task of porting our task editor from PyGTK’s framework to the GTK3 python bindings, in order to upgrade us to the newest form of GTK. So, once the port is complete, I will also be adding features such as rich text editing (a.k.a. bold, italics, and underline text), search features, and more. When it came down to figuring out the best way to accomplish this, I decided to try and work in a Model-View-Controller architecture, which will not only bring us the new GTK frontend we need, but also sets up the project for possible future frontends as we need them, and making it easier to do such.

What exactly have I been up to these past four weeks, you might ask. I have been working on bringing the frontend, which is where I feel the bulk of the work will be since the controller will be just passing info between the frontend and the model, and the model is already done. So far, we have an editor that takes in the title of the task, formats it to how the previous editor does, and makes the title of the task the title of the window. It also is able to bold, italicize, and underline selected text. It also has the necessary seralizer and deserializer in the class for when it is ready to start loading and saving tasks.

However, along this path there have a been a few difficulties that have been run into. The major issue is that it seems that PyGTK and GTK3 (and, by larger picture, I think GTK2 and GTK3) do not get along very well together. This has led to the editor crashing when I import certain parts of Getting Things GNOME into the editor because they don’t agree with each other.

Follow

Get every new post delivered to your Inbox.