I have been hacking away on the gnome-control-center’s Date & Time panel, moulding it into the new design created by Allan Day. The new design includes a listview based main view, similar to many other gnome-control-center panels. With the new list based design, some rows have on/off buttons for enabling stuff; other rows act as buttons, opening new dialogs with more detailed settings.
See the design page for the mockups.
I have also tried to fix up issues in other modules whenever I run into them:
Thanks to Alex Larsson’s work, GTK+ recently got a new GtkListBox widget. Alex (he did most of the work) and I converted gnome-control-center to the new widget and all the patches have now been merged to git master. Thanks to Thomas Wood for the patch review and merging!
I converted the network connection editor so please let me know if there are any regressions.
These are my patches from the porting series:
I also helped with some some GtkListBox cleanup in GTK+ itself and added a new gtk_list_box_row_get_index function:
Glade and new widgets
Glade is the visual editor the should work for GtkBuilder .ui file editing, but unfortunately it’s most of the time lagging behind when new widgets get added to GTK+. Most regular widgets are easy to add, but containers require custom code to make them properly work.
Since I needed GtkListBox for my control-center work, I went ahead and added the support to Glade. The result looks like this:
The patch can be found at bug 702296.
Compared to other GTK+ containers, the new GtkListBox is a bit special, because it can’t directly include child widgets. Instead, when inserting new children with gtk_container_add(), it inserts intermediate GtkListBoxRow widgets, which will in turn contain the real children.
This complicates the Glade integration a bit, making it harder to implement listbox resizing.
As seen on the screenshot, I have implemented ‘Insert Before’ and ‘Insert After’ to insert new rows in the listbox. However, there’s some further work needed to be able to add new rows to empty listboxes.
(If anyone who’s good with icons is reading this, could you please help with doing a new GtkListBox icon for Glade? See the screenshot above.)
The new panel
This is how the main view of the new Date & Time panel redesign currently looks:
Clicking on “Time Zone” and “Date & Time” opens up further dialogs for actually settings the time zone and the time.
One missing feature in the above implementation is the Automatic Time Zone. My current plan is to scrap the time zone row for now, and land the rest of the redesign. And once that is done, implement the geolocation based automatic time zone and land it with a separate patch. The geolocation support requires a bit more work, both on gnome-control-center and gnome-settings-daemon side, and the rest of the current redesign doesn’t really depend on it.
Time Zone dialog
This is a straightforward implementation based on the redesign page. In the mean time, Allan Day however has been experimenting with some more changes to how to the timezone selection should look. The experiments are available on the design whiteboard. The whiteboard experiments are also going to be something I want to work on a bit later, after having landed the initial redesign.
Separate timezonemap library
There’s work underway to merge together gnome-control-center’s timezonemap library and the fork used in the Ubiquity installer. There are some differences to be resolved, but I hope we can end up with a shared timezone widget that multiple modules can use. Right now we have gnome-control-center, gnome-initial-setup, gnome-weather, Ubiquity and Anaconda as possible clients. See bug 702194 for the current state of things.
Date & Time dialog
From the screenshot above, the question with “Update time to 7:45 PM?” is not implemented. I am currently not sure how to best do that: should we run a one-off NTP query (ntpdate?) behind the scenes when the dialog is launched, and show the question if the the time differs too much?
Next up I would like to get the current patches merged to gnome-control-center’s master and then move on to implementing the geolocation support.
- Merge current work
- Implement geolocation support
- Work on Allan’s time zone widget redesign
- See if it’s possible to merge together libtimezone map library forks
Offline and vacation
P.S. Sorry if I have missed any IRC messages, I have been travelling for most of the past week and am still catching up with email / IRC backlog.