When I restarted work on Calendar this cycle it had been almost a year since my last commit. I got help this time. I have to thank every one involved in Calendar development, starting with Bastien Nocera, and Lapo Calamandrei whose design work has been amazing and last, but in anyway least, Georges Basile Stavracas Neto, who has offer us his coding skills and is the responsible for a bunch of new features in Calendar.
I would put here some mock-ups, and I know a more longer post is needed in order to let you know of some the stuff I’ve learned while developing the new features, but this going to be short one.
I’m about to make a 3.15.3 release of Calendar, even when I know is late, the release was last week. But I think is better to get it rolling, also there’s bunch of new features and I want people to be able to test it and comment on it.
Calendar new features:
GtkBuilder
UI filesGtkHeaderBar
As you can see, Calendar has moved a lot forward. Hope you enjoy it.
To get you moving I posted these screenshots and little video
]]>As you can see in the release notes this version includes improvements around the whole stack: the network and sharing settings; the input system, with support for gestures and improved touchscreen support; the shell and a bunch of updated applications.
I’m most happy with the updates on GNOME Shell, this time the developers bring some pretty nifty animations to the Activities overview and windows. There’s also a whole set of changes for the developers using and targeting GNOME as platform. I’ll be talking a bit more on this latter.
I thought at first on describing you the animations added to latest iteration of the shell, but since an image is worth a thousands words. I guess a video will be worth 30 times per second the same, so here it is this video showing you exactly that (Note: this is screencast was not made by me).
At first I thought I will be rapidly tired of those animations, usually, animations on the user interface looks good initially but over time just gets in the way of user daily activities. In this case it’s different, as in the case of those well thought features, I’ve been using the new shell for a over week a now, and I’m great surprised of how the animations don’t get in my way. Without being a magical thing, sometimes I realize of it when closing a window, or when opening one, but most of time I don’t even think of it. This speaks very highly on the craft of those designers and developers who accomplish so subtle change. Thanks.
Now, this is the main reason of the post, even when I have left it to the end.
Life for the developers in GNOME has been improving steady over the last few cycles. GNOME hackers has come up with a DX hackfest, the interest in having a SDK for developing GNOME software has risen in the community, and projects like Christian’s gnome-builder are actively working towards this.
With GNOME 3.14, the awesome design team has come up with an updated version of GNOME Human Interface Guidelines. I can’t stress enough the importance of this. Having a published and updated HIG provides uniformity and organization through the whole set of GNOME applications. I have it for around 4 days, and I have found myself going over to review a pattern, recheck a convention, etc. From simple things like margin, alignment and visual layout to others more detailed like how best use specific widgets available in Gtk+ and the contents of menus are explained there. The work done in getting those HIG ready is really impressive and we should be grateful as a platform of having this guidance for developers, either old ones and newcomers. I think is in order to thank great Allan Day and all the others for their work on this.
Finally, I want to mention Gtk+ improvements as a toolkit. First, the rewrite of Adwaita theme and its inclusion in Gtk+ will provide better experience for the user across different platforms and better looking in general. Second, and most important, the inclusion in Gtk+ of a new Gtk+ Inspector thanks to the work of Matthias Clasen. I won’t be talking much about Gtk+ Inspector since there have been already some post on it. I just wanted to mention it here because with the release of stable versions of Gtk+ and GNOME this is accessible to much more people than the selected team working on GNOME.
As before, I hope you enjoy GNOME 3.14 and its perks. See you around.
]]>The biggest greatest work on these past months was implementing inline contact creation. For a long time I had Allan’s mockups lying around, there were, also, some bugs concerning the “new contact dialog” and its behavior. So we set the goal to fix those and implement the feature this cycle. Doing this I realize the some internals cleaning in Contacts is in order, but, since feeling it is a big task I decided to delay it and hack our current ContactEditor widget to make it able to work on the new flow.
Down, at the end, are some screenshots.
We also worked a bit on others details. There’s a list here:
I hope you can enjoy latest version on Contacts when it’s released. Go, find and bugs and improvements and let us know
I’ve been trying to maintain Contacts’ bug list properly tagged and organized. In accomplishing that I’ve marked some as NEEDINFO, now, it’s been a while of this. I just wanted to let you know, I’ll be closing those bugs if they don’t get any updates before 3.14.1 is out on October 15.
]]>The thing about this, it’s that a network profile as defined in System Settings does not keep your proxy configuration for that profile. So I took the task to wrote a small tool for keeping different proxy configurations and allowing easy switching between them.
The tool is called GProxies. It’s built using latest Gtk+, GLib and Vala. I tried to use the minimal amount of dependencies so it won’t have that much noise.
GProxies is designed with a very simple plugins system. Plugins are meant for
updating other applications’ configuration whenever you select a different proxy setting
from the interface. For instance: I made a plugin for updating my git’s http.proxy
config automatically when selecting a different a proxy settings. There are two types
of plugins: one main default plugin, for setting GNOME system settings’ proxy and
the others living inside ${XDG_DATA_DIR}/gproxies
designed to update other applications
configuration.
A plugin is defined by a folder named after the plugin in ${XDG_DATA_DIR}/gproxies
with two or more files in it:
plugin.ini
key-file. More details are explained here.This way you can make plugins for changing the proxy in any applications you want. I’ve made another repository with the plugins I’ve write for myself.
Right now the tool is in a working state. I have some other improvements in mind, such as:
Finally, I’d like to say how much I enjoyed coding a small application for the GNOME desktop. Gtk+ toolkit is perfect for this kind of task, with widgets which helps enforcing GNOME HIG making an application fits properly in the desktop environment. Also, Vala as a language it’s really powerful and composite widget templates from Gtk+ really speed up the development process. The code of GProxies is pretty simple, and I guess it would make a nice reading for GNOME developer beginners.
Below, I present some screenshots. I hope someone will find this useful.
]]>GNOME 3.10 was released almost three weeks ago. A huge number changes and improvements were made as you can see in the release notes. Those changes affected Contacts as well.
This cycle the platform gained client-side decoration support from Gtk+ toolkit. We, in Contacts, also incorporated a cool header bar, which in our case has the perk of being splitted between the contacts list and the main contact pane.
The change in Contacts I’m most proud of is the new Change AddressBook dialog. It’s an UI change that improved the experience a lot and clarified which is the active addressbook
Finally, under the hood, Contacts is starting to use most of the new widgets recently migrated into Gtk+ and the template support landed this cycle.
Edit: I owe you screenshots.
]]>On the other side my Gnome duties caught up with me. I’ve been acting as Contacts maintainer with Alex for a while now. But so far, he was doing the releasing part. I, usually, implemented new stuff, reviewed patches, fixed bugs, but no more. This past week since Alex is on vacation I had to fill in doing the release.
I was prompted by Matthias Clasen for doing a release of gnome-contacts for the 3.9.4 development release of Gnome. In the process, I realized I can’t log into master.gnome.org for the purposes of uploading the packages. So, Mathias kindly offered himself to upload the package. Later I got my account authorized, and I was able to release gnome-contacts-3.8.3. This latter one, I was surprised to see it packaged this morning into Archlinux.
These two releases are only bug fixes, yet there nasty bugs fixed there. You can read the NEWS file, or the commit log to find about.
What’s next on Contacts ? I want to implement New Contact flow inline and get rid of dialog, and close a bunch of bugs around it. Also, yesterday I got a bug from Allan about updating a bit the selection pattern, and I would like to work on it.
Update: I have to thanks Jonh Wendell for his fix of the webcam bug.
]]>By now, I’m a little tired of writing, therefore I’ll be quick about it.
A few weeks ago I restarted the work on Calendar with the hope of adding a bunch of new features in Gtk+ to the project. I started by creating a new branch, since I was sure the build would break a lot times in between, and didn’t want to spoil master
I’d set for myself a bunch of points I want to accomplish by rewriting the UI and some of them has been done, some others, not yet. That’s the main reason why I keep the branch still around. As soon as I feel the work is done, I’ll come back to work on master
I wanted to:
So far 1, 2 and 3 has been accomplished. Point number 4 is going well since I manage to craft a day-view with the same requirements of week-view that does not need to use GtkOverlay.
Some of the work done is showcased below
]]>I’ve been working on Calendar, trying to get some minimal functioning application, to get something out for you to use, and then I can continue improving the rest. For now, I’ve focused on enable a fully working the “Event Details” dialog. The thing is kinda clunky yet, but it works. It needs more polish and heavy testing, though.
I also went and made a year-view implementation, which is almost fully functional. This one was easy, was almost copy/paste from the old month-view implementation. The month-view also received a full face-lift. The previous version had some super-rough edges when months didn’t fit in a 35 cells grid. That has been fixed, our designers pulled some rabbits out of their hats. The new design, which is already implemented suggest a scrolling animation, but I want to be sure it works before going into it.
I’m trying to get Calendar in beta shape for 3.8 release. I’m still need to implement three views: list-view, day-view and week-view, and the search mechanism, with the results showing. For the week-view I have an implementation which have scrolling issues, I have to take care of.
Some minor mojo I don’t want to pass unnoticed:
g_clear_object
Now some screenshots
]]>I’m developing some widget for specifying a date and I’ve been struggling with date formats across locales So, after reading a huge number of manpages, source-code, and so on I stumble on this code.
#include <langinfo.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
int
main(int argc, char *argv[])
{
setlocale(LC_ALL,"");
printf("%s\n",nl_langinfo(D_FMT));
exit(EXIT_SUCCESS);
}
This will show me your date format according to your locale. What I will ask, compile and run this code in your pc, and post the answer here along with your locales.
See you around.
Update: Thxs for the comments. Two things: I’ve just updated the code, thxs to Tom, adding setlocale line made the code works. Second: Thxs to Tommi (first comment). That was the info I was looking for.
]]>Once you start hacking around with Gtk+, the next thing you’ll want to do is to make your own widgets. And for that there’s little to none documentation, guides or tutorial. There’s a huge amount of knowledge in Gtk+ source itself, but most people doesn’t like to read code, or doesn’t know how to. They should, though
Here I’ll try to show, from the newbie point, how Gtk+ draw things, and what’s the guidelines to accomplish certain tasks when making widgets for Gtk+. This is, as well, a reminder for myself, since most times I need to go into IRC to ask the same things all over again.
I will split the post in three main sections which corresponds to the important parts in a widget lifetime.
One of the thing you need when you’re making widgets is knowing the dimensions everything will have inside. Size requisition and allocation is the step where this happens.
Explanations of this process appears here in GtkWidget’s documentation. It includes most of the size requisition process and geometry management.
Gtk+ widgets are arranged in a hierarchy where container widgets pack others and handle its size and allocation. The widget containing yours will ask the natural and minimal size you want to have, and after making some internal calculations will assign your widget a size and allocation. The first part is called size requisition and the second size allocation. The virtual methods you need to implement here are:
For size requisition
For size allocation:
Now, what to do on each one of these methods ?, Calculate what size you want for the widget, and return it. Let’s say you have a widget which have a text saying “Hello” inside, then, you need to ask Pango to calculate the width and height for you, add the margins and padding (if you want to take those into account) and return the size accordingly.
What’s width-for-height and height-for-width methods for ?, Widget have by definition one request-mode, its width depends on its height or the other way around. This is totally decided by you, accordingly to the type of widget you’re creating. The purpose of these methods is to retrieve these measures, the width of a widget given a specified height, and viceversa. About this part, read carefully the docs above and go asking in the IRC for more help if stuck.
One thing to keep in mind is that the allocated size to your widget, could be
not the same you requested in the get_preferred
methods, so the widget should
work with the given allocation instead of any other measure.
Rule of thumb: Implement the four methods of size requisition almost always, and the size-allocate one if needed.
This is the core of the matter, but there’s no much to tell in here. Use
cairo to draw, the API is pretty simple. Use cairo primitives to draw
inside the implementation of draw
virtual method. There, is given a context
which is clipped from one of the GdkWindow
of the widget, you should draw
in that context. Other than this, here are some remarks:
How to draw an icon from the theme into the cairo_context_t
?. Obtain a
GdkPixbuf
from the icon with gtk_icon_theme_load_icon
or
gtk_icon_info_load_symbolic
depending on the icon, and draw it to the
context with gdk_cairo_set_source_pixbuf
How do I get my lines subpixel thin ?. Turns out that cairo can draw lines thinner than one pixel, but for that to happen you need to place the cairo starting point in the middle of the pixel, so the drawing can be made, and look just like you want.
/* a vertical 0.3 pixel line */
cairo_set_line_width (cr, 0.3);
cairo_move_to (cr, 10, 10.4);
cairo_rel_line_to (cr, 0, 10);
cairo_stroke (cr);
Finally, use whenever you need gtk_render_background
,
gtk_render_frame
family and friends over any alternative drawing you
could think of doing. These functions will get colors and border size
and radius from the CSS theming engine, therefore you’re spared a bunch of work.
How to receive and handle mouse, touch and button events. My first attempt
to catching and handling event was to implement virtual method button_press
and button_release
, that didn’t worked. Not that easily.
For catching input events in your custom widget, you will need a GdkWindow
suited for those purposes. The preferred idiom here is:
realize
method, create a GdkWindow
with gdk_window_new
and
set its type to GDK_WINDOW_CHILD
, this would assure to catch the input events if
they occur inside you window. After created the window, call
gdk_window_show
to show it. You will use
gdk_window_set_user_data
to relate the window with your widget.size_allocate
method, you need to place the window where it should,
by using gdk_window_move_resize
.button_press
and the likes of them to handle your
events.There are virtual methods for handling mouse button presses, and a releases,
but no for high-level actions as click and double-click, you need to detect those
by detecting sequences of presses and releases. Nonetheless, for double-click the
GdkEventButton
will have the type field set to GDK_2BUTTON_PRESS
which will
certainly help. For key-press/release events, I have to say, I haven’t
had nothing to do with those yet. So, that will be left to the next time.
I won’t paste the code entirely, I’ll just describe the order in which the above mentioned steps will most likely occur.
Usually, as you must have guessed by now, the first thing your widget will
receive is a request for its preferred size using
gtk_widget_get_preferred_width
and friends. After that, the
parent will follow to allocate the size, there your implementation of
size_allocate
will run, and then, the painting will happen.
About the realize
part, it will happens almost anytime,
the only thing you can be sure of is: it will happens before your widget had to
paint itself. One thing worth mentioning is that a widget could be allocated a
bunch of times before it ever gets to the painting part.
About a full example of code, one the simplest widgets for showing all
of this is GtkButton
. You can read the source of in the Gtk+ tree. Here’s
the header: gtkbutton.h
and the source gtkbutton.c
. As I said
above, reaching into Gtk+ internals is the best way to learn to use the toolkit
and the framework.
Obviously this a pretty simple post about some of the more common tasks you’ll meet with when making a custom widget. There are several more complex widgets which are far from this, but those are left for later.
Hope it helps, and if you find any mistake, please contact me immediately so I can fix it.
]]>Now, you can argue a bunch of powerful reasons, but the people who package Gnome in Fedora knows Gnome internals, so the chance you’ll end up getting a better experience is higher. I should tell Gnome packagers in Archlinux to stay a little bit closer to upstream Gnome developers. Another reason for staying with Arch would have been to test Gnome across different distros, and I know that would help, but I felt I needed a change.
There’s another point, since I’m dedicating more time now to develop stuff, I spent less time configuring stuff and tweaking my system, I’m starting to see my laptop as a tool for development, not the toy it used to be. The only thing I require of a distro right now is:
So, by now, I’ve been on Fedora for almost a month according to last, and I’m pretty happy with it.
See you soon, to let u know some Calendar advances.
]]>Calendar is moving forward, slower than I would like, but is moving. From the last time, I’ve started the implementation of the event-view, and I say started cause there’s missing functionality yet, but the widgets part is almost done. For now, it deletes your events, so be careful, that’s the only button that really works. I’ve set in-place some code to enable notifications, but that will have to wait a little yet. The toolbar has got some changes, mostly added behavior to the change between views, and some internal refactoring.
The most important stuff is: the screenshots you’ll see below will
show you one thing, the event-view need some redesign to occupy all that empty
space. There’s host/guest part still missing implementation, but I know it won’t
fill all the space. On the other hand, I’ll need some symbolic icon for the
reminders, to show in the views (monthly, daily, etc.). There’s still the issue
of the navigation controls presentation, which I don’t like been shown by
pressing
This work is pretty skeleton-like, there’s a bunch of stuff that needs to be retouched, so, any thing you find, feel free to reach me.
Now the shots: The first one is the month-view, the only one working right now, and the others are of the event-view.
]]>The code was uploaded to github at first, but after talking with gnome’s servers sysadmins we agree the code could be hosted in git.gnome.org.
I’m very happy of getting the project live, I know there’s a lot of work ahead, and I’ll be on it alternating with Gnome Contacts’ work, which is mostly done by Alex.
I have to thanks all the gnome hackers for its great response.
Keep in touch.
]]>Anyway, and introduction is mandatory. My name is: Erick Pérez Castellanos, and I’m a software developer from Cuba. I studied Computer Science like 4 years ago or so, and I’ve been using Linux since for ever it seems. I became involved with Gnome last year, after wanting to for a very long time. I’ve been contributing to Contacts, as you can see here in the archive of the blog, and I’m planning to keep on. So, till next time, I’ll see you around.
]]>The thing is that octopress is a pretty comfortable scheme. It allows me to write and sanitize my blog at home, or wherever I have my laptop, no matter if I’m online or not. The point is I can do a bunch of stuff in my pc without internet connection, which is a very rare affair in under-developed countries.
There’s still stuff missing, and I’ll try to add it on the way. I would like update my twitter stream with my posts automatically from rake deploy task, but since Twitter now uses OAuth, that became a mess, and I don’t understand OAuth scheme yet, so I’ll have to let it be for a while. I was concern at first for my spelling, but now anymore, my vim has spell checking, and after change rake new_post task to launch vim with spell checking set on, it’s way better than Wordpress correction system.
So, as you can see, so far so good, I like this pretty much, and think is easier and better than Wordpress. I encourage you people to join.
]]>I had some help, some guy named zanshin in #octopress at freenode, and the docs at Octopress.org. Now I’ve installed a new theme, added my tweets stream, and I’m on the way to migrate my content from the previous wordpress blog. I have found a tool named exitwp in some post of another guy in the same situation, and will test it soon.
You know what’s missing ? You probably have see all those sites where you make an account for yourself, and they ask you for an URL, like your site. Well, I’ve been putting the wordpress site there. My bad, that should be set on a central place, now I have to go changing that address everywhere. Maybe I should make a redirect page in the wordpress blog, although I have to say, I’ve never had too many readers.
Ohh, there’s other stuff missing, one that I probably miss a lot. wordpress.com have a spell checking utility, well, octopress hasn’t one. It’s up to my vim, and I’m pretty lazy. Since english isn’t my mother tongue. I’ll have to look out for error and typos.
]]>While I was trying to pull some code using Clutter and Gtk+, before you ask, I was trying to put GtkWidget inside Clutter Actors to get some fancy animation, I got into some minor troubles, which I think those newbies like me out there should know.
First, if you read the blog of the might Emmanuele Bassi (Clutter’s author and main developer) you then came across this post Had a dream. I did, and I wanted to get those warning they talk about so my code would need to be modified pretty much anything when those API get deprecated. Well, I didn’t, I mean I used deprecated API and my compiler wasn’t throwing me warnings. Someone told me that I needed to use a decent set of compilers flags, and I tried, nah, still nothing. I went into IRC, I found help there and after a while, I was told to add this to my compiler options
1
|
|
This finally solved the issue and I’m having pretty warnings every time I use an old method which should be destroyed in a couple of months.
]]>Anyway, after a big while, and my request of my wordpress blog inclusion in Planet Gnome went stalled. I decided to go using Octopress, first I emailed the guys in Github since I have my doubts about using their system for ranting about stuff not related with ruby/rails and stuff. But they said they’re fine with that. I do have to say I’ve been learning some ruby these past days, there’s this RubyMonk site which is pretty cool, and I found out RubyKoans too which are pretty impressive too, although my lack of some supercharged environment is killing my advance there. Well after all that I think is pretty logic to try this move.
This is a great news to me, and I think it would be to anyone. There’s point you can’t miss though, this means more responsibilty doing a good job to make Gnome Project great.
]]>Now I’m still waiting for the Gnome Foundation decision on my application to be a member yet, this is huge joy. I’m looking forward to contribue more to Gnome, it’s an amazing world with amazing people and great programmers, and I’m pretty happy to be prt of it.
]]>