Summer of Code with gnome-clocks

It has been a while since my last post about my ongoing contribution in GNOME. I mainly work on the gnome-clocks app. Therefore, in this post I try to summarize many of new upcoming features which gnome-clocks hopefully soon bring with a new stable release.

New selection mode design pattern

Gnome-clocks belongs to a few apps (among others like baobab, gnome-weather, and gitg) which has started to experiment with the new borderless window design. Moreover the new selection mode design was additionally implemented. Feel free to try it out, and let us know about your usability opinion. Otherwise enjoy the screenshots and the attached video.Screenshot from 2013-06-11 10:00:17Screenshot from 2013-06-11 10:00:31 From the developer point of view there are several new changes as well: Gnome-clocks does not anymore depend on the libgd submodule library as the revealer, headerbar and stack widgets have been added to gtk+. So, we were able to switch to them almost straightforward. Additionally some of the classes, which were building on the GtkBuilder functionality were ported to composite templates. This is a new feature recently introduced in gtk+ and successfully integrated into the Vala language. This feature tends to make your code cleaner and in the same time increases its readability.

Automatic geolocation discovery

One of the greatest new features I currently work on is the geolocation support in clocks. The first working implementation was used as starting point for a future design development. After a fruitful discussion with Paolo Borelli and Allan Day a new mockup for geoloction support in clocks was created. So, let’s see how it will progress. You can track the status of the geocode implementation here. Any positive suggestions are welcomed. Remember, only positive:)

City images

Another eye candy for the clocks app users is the city image support. I already have started playing with its implementation. Here in the video, which is not up to date any more the small image city is shown in the standalone mode. This has been already changed, so the image is now drawn in the background, similar way like it is done in gnome-weather. For getting in we have decided first to create a basic local image provider.Screenshot from 2013-07-01 16:14:26The main goal here, we are stiving for, is to provide support for the online image stoarage. One of the candidates in mind is the flicr group.

Some nasty bugs

Headerbar: The libgd port which is mentioned earlier in this post has sadly brought a user visible regression. Have you spotted it already? If not, it’s also fine. Maybe it’s only my eyes, which are time to time very picky. The issue is a headerbar height fluctuation. This becomes visible by switching back and forth between normal and selection mode. First, I thought, that I must be the person to blame, because this issue in my belief has landed due to one of many oversights I introduce and often find myself during writing. However, I have occasionally discovered that the weather app has exactly the same issue. So the reason for this should lie somewhere else. If you have an Idea, do not hesitate and please let me know.

The price developers pay for a good look: One of the new and tiny design improvements in GNOME was the replacement of the colon in the time string by a better looking centralized character. This new character widely used in the time strings is the ratio character “\u2236”. Screenshot from 2013-07-22 13:34:31Here, in the first screenshot the new centralized character is used in the date and time string once for the LTR and RTL language, respectively. I must admit, that it indeed appears much, much better than with the normal colon for comparison shown in the strings below. The source code of this simple test case app can be found here.Screenshot from 2013-07-22 14:18:45However nobody could never even assume that this little change would be an origin of so many issues. One of them is the funny appearance of the time in clocks. I have hidden from you this image not to burn it into your head, so look at it at your own risk. Just joking. Luckily this bug is already fixed and the time string from now on looks beautiful even in the RTL languages:)Yeaaah!Screenshot from 2013-07-22 16:06:36Another issue is when the non UTF-8 locale is in use the time string is not even displayed at all, as illustrated here. This bug will be already fixed by me tomorrow:-)Similar issues do appear in gnome-desktop and in other libraries like libgweather, in which ratio character was used.

Good news: Vala support for the \uXXXX escape sequence

The Vala compiler in git master from now on supports a unicode escape character \uXXXX, which can be used in strings and regular expression patterns, where X represents a hex digit. It could be used in strings by typing an escaped ‘u’ followed by exactly four hex digits. For example:

string s = "Copyright \u00a9"; // Copyright ©

In this particular example, there seems to be no point in using the escape sequence, because the ©-character can be used directly in the string. However for the next example it comes very handy.

string time1 = "12∶56 AM";
string time2 = "12\xE2\x88\xB656\xE2\x80\x89AM";
string time3 = "12\u223656\u2009AM";

A normal human eye, at least mine, cannot spot that in time1 the ratio character and moreover the thin space were used instead of commonly applied characters. And they are sometimes not easy to enter. The escaped x sequence can be used in this case, as illustrated in time2 string. The only downside is that \x uses a variable length for the following hex digits. This way \x9 represent probably a tab, and from the time2 string the part \xB656 will be treated by a compiler as a single escape sequence. So the use of \u would be handy here or correct me if I am wrong:) There are probably better examples, but whatever!


If there will be no short-term changes I am heavily planning and going to join the GUADEC conference for the first time and I hope to see you all there. I am looking forward to it and it will be for sure a good time. And here is a GUDEC logo I have snapped from the latex-beamer template.guadec-logo


Hello Planet GNOME

It’s a pleasure for me to announce to you, that from now on some of my blog entries will be published on PGO.

This summer I work on improving the gnome-clocks app accomplished by a strong support of my mentor Paolo Borelli and a close collaboration with the GNOME design team, especially with Allan Day.

For those, who still does not know how it looks like, here is a screenshot of its current stable 3.8.x release in Russian locale, using a dark theme.
Screenshot from 2013-05-10 00:28:54

Therefore, I will try to keep you informed periodically about ongoing work and achievements concerning this project.

So, Hello. 🙂