Xfce 4.6 is on the way!
Stephan Arts, our beloved release manager, started to prepare the tarballs for Xfce 4.6! There are still some things to do before the release like testing the tarballs and getting the mirrors ready, but it should be out soon!
Update: most tarballs are ready now, the release should be for Thursday or Friday.
Thoughts on libxfce4menu for Xfce 4.8
I've been hacking on libxfce4menu in a local branch for the last couple of days and I think I'm finally happy with the API changes I have done. The version that will be shipped with Xfce 4.6 has a clean API for reading from menus but unfortunately it lacks support for menu merging and is not really usable for writing a menu editor.
So there is a lot to improve for Xfce 4.8.
libxfce4menu uses a GObject class called XfceMenu as a representation of the entire menu tree. The downside of this approach is that some tree operations are hard to implement if possible at all. In a DOM structure child elements are ordered. In XfceMenu, they are not. In fact, the concept of a child element in XfceMenu is problematic. In a DOM all child elements are treated equal. XfceMenu on the opposite treats Menu elements different than e.g. AppDir elements. It throws them into different lists. And that's why merging is hard to implement with the current API. There is no DOM representation of the tree and thus, XfceMenu does not know whether an AppDir element came before a certain DirectoryDir element for instance. But when doing merges this matters. Actually, in most cases this won't be a problem, but theoretically it is. If you don't care about the order, you break the specification.
So, libxfce4menu in Xfce 4.8 is going to build a DOM representation for the menu tree to make merging and other things easier to implement.
But there still is the goal to improve the API with regards to menu editing support. To work properly, menu editors need to know information about the menu tree after parsing the root .menu file - before any modifications. This is something the current implementation of libxfce4menu hides completely.
So, here is what I came up with for 4.8. First of all, you have several classes:
GNode
is used for the DOM representation.- Every node has a data object which is an instance of
XfceMenuNode
, except for<Menu>
nodes. - To parse a menu there is
XfceMenuParser
which creates aGNode
DOM representation for a .menu file. It doesn't do merging, so you'll only get the DOM for the XML of the .menu file itself, not of other .menu files specified using<MergeFile>
elements. - To load and merge the rest, there is
XfceMenuMerger
. It takes the DOM representation generated by the parser and basically does everything that explained in this part of the specification. XfceMenu
,XfceMenuLayout
andXfceMenuItem
will still be around. They take the merged DOM representation fromXfceMenuMerger
, load all the desktop entries and wrap the entire information about the resulting menu tree with a nice and easy-to-use API. There will also still be a class for monitoring and stuff like that.- And then there is a nother class:
XfceMenuEditor
which takes the DOM representation fromXfceMenuParser
and provides functions for operations required by graphical menu editors. It will be able to add<Move>
elements if the user moves menus around, it can add<Deleted
> elements if the user decides to hide a menu and so forth. It will also support writing the tree to a .menu file, maybe using another class calledXfceMenuWriter
. - There will be an interface called
XfceMenuTreeProvider
which is implemented byXfceMenuParser
,XfceMenuMerger
andXfceMenuEditor
.
The only thing that is not covered is how desktop entries are edited. But they are not really part of the menu tree anyway. Here are two uses cases for the usage of the API presented above.
Reading Menus (For Hardliners)
Someone wants to read and build the menu from a file calledapplications.menu
.
XfceMenuParser *parser;
XfceMenuMerger *merger;
XfceMenu *menu;
GError *error = NULL;
GFile *file;
file = g_file_new_for_path ("applications.menu");
parser = xfce_menu_parser_new (file, &error);
g_object_unref (file);
/* The optional second argument is a GCancellable */
if (!xfce_menu_parser_run (parser, NULL, &error))
{
g_error (error->message);
g_error_free (error);
g_object_unref (parser);
return;
}
merger = xfce_menu_merger_new (XFCE_MENU_TREE_PROVIDER (parser));
g_object_unref (parser);
if (!xfce_menu_merger_run (merger, NULL, &error))
{
g_error (error->message);
g_error_free (error);
g_object_unref (merger);
return;
}
menu = xfce_menu_new_from_tree_provider (XFCE_MENU_TREE_PROVIDER (merger));
g_object_unref (merger);
/* Now do something with the menu */
g_object_unref (menu);
Reading Menus (The Easy Way)
Of course there will be a much easier-to-use function for creating an XfceMenu, like this one:
XfceMenu *xfce_menu_create_for_file (GFile *file,
GError **error);
Writing a Menu Editor
XfceMenuParser *parser;
XfceMenuEditor *editor;
XfceMenuWriter *writer;
/* I'll leave out the error handling this time */
parser = xfce_menu_parser_new (file);
xfce_menu_parser_run (parser, NULL, &error);
editor = xfce_menu_editor_new (XFCE_MENU_TREE_PROVIDER (parser));
g_object_unref (parser);
/* Use XfceMenuMerger and XfceMenu here to get an XfceMenu object for use in the GUI */
/* Assuming that the user moves the menu "A/B" to "C/D" using the GUI */
xfce_menu_editor_move (editor, "A/B", "C/D");
/* Assuming that the user decided to hide the menu "Accessories" */
xfce_menu_editor_set_deleted (editor, "Accessories", TRUE);
/* Save the menu to a file, assuming we have a GFile object to write to */
writer = xfce_menu_writer_new (XFCE_MENU_TREE_PROVIDER (editor));
xfce_menu_writer_write (writer, file, NULL, &error);
g_object_unref (writer);
Of course nothing of this is final. This is just what I came up with today. But I can imagine that this would work quit well.
So, what do you think?
Colored Notes
I passed the last night to hack on a gtkrc snippet for the Notes plugin, because I couldn't find my sleep well. So being borred I killed a little bit the time to have a colored notes window :-) I know it was possible since always, I just never carred to do it. Using colors showed one annoying problem which are the icons. They don't fit always once you go away from the default gtk theme colors. In consequence I switched them to bold text labels with minus, plus and times. One other thing I didn't succeed with was to theme the menu that is available on the top right corner or Ctrl+M.Finally the result is nice.
The snippet is the following:
gtk_color_scheme = "notes_fg_color:#E8E58C\nnotes_bg_color:#77741D\nnotes_base_color:#EBE88C\nnotes_text_color:#6B6A4A\nnotes_selected_bg_color:#ACA94E\nnotes_selected_fg_color:#E8E58C"The shade() and mix() functions are specific to either Clearlooks or Aurora. But this can be fixed. Actually I didn't include a default rc style inside the notes plugin, in fact this snippet can be saved for instance as notesrc inside your current theme and you add include "notesrc" in the gtkrc file.
style "notes-default"
{
xthickness = 2
ythickness = 2
fg[NORMAL] = @notes_fg_color
fg[ACTIVE] = @notes_fg_color
fg[PRELIGHT] = @notes_fg_color
fg[SELECTED] = @notes_selected_fg_color
fg[INSENSITIVE] = shade (3.0,@notes_fg_color)
bg[NORMAL] = @notes_bg_color
bg[ACTIVE] = shade (1.0233,@notes_bg_color)
bg[PRELIGHT] = mix(0.90, shade (1.1,@notes_bg_color), @notes_selected_bg_color)
bg[SELECTED] = @notes_selected_bg_color
bg[INSENSITIVE] = shade (1.03,@notes_bg_color)
base[NORMAL] = @notes_base_color
base[ACTIVE] = shade (0.65,@notes_base_color)
base[PRELIGHT] = @notes_base_color
base[SELECTED] = @notes_selected_bg_color
base[INSENSITIVE] = shade (1.025,@notes_bg_color)
text[NORMAL] = @notes_text_color
text[ACTIVE] = shade (0.95,@notes_base_color)
text[PRELIGHT] = @notes_text_color
text[SELECTED] = @notes_selected_fg_color
text[INSENSITIVE] = mix (0.675,shade (0.95,@notes_bg_color),@notes_fg_color)
}
widget "xfce4-notes-plugin*" style:highest "notes-default"
widget "xfce4-notes-plugin*.*GtkMenu*" style:highest "notes-default"
widget "xfce4-notes-plugin*.*GtkMenuItem*" style:highest "notes-default"
# TODO Set the colors for the menu
All for the sharing, please enjoy.
Update: The shade() and mix() functions are a feature from GTK+ 2.10 just like gtk_color_scheme.
Update: I released a new version 1.6.4 that has a configurable background color setting.
What can we expect in Xfce 4.8 ? For the menu…
I'll start to write some posts in English, in case some English speakers are interested by Xfce news, I made a category for each language, so that people can read the posts of their preferred language easily. Xfce 4.6 is not out yet, but some developers have already started to implement nice things for the future versions, particularly Xfce 4.8.
Libxfce4menu : easily editable menus ?
People have been complaining for a long time that menu editing is a pain in Xfce : Xfce 4.4 menu editor was quite limited. 4.6 is a bit better as you can put Desktop files in ~/.local/share/applications/ to modify the menu, but it lacks a GUI to do those actions quickly and easily.
Jannis Pohlmann, the developer of libxfce4menu, has recently announced that he has started to improve libxfce4menu so that it implements the whole Freedesktop menu specification. This work is only at its early stages, but it seems to be quite promising : he published a video where one can see him editing the Xfce menu using Alacarte, the Gnome menu editor.
His code is available on git.xfce.org and works pretty well. After installing this new version, you just need to restart xfdesktop and xfce4-panel, to edit the menu using Alacarte and to configure the menu panel plugin to use the ~/.config/menus/applications.menu menu file.
Unfortunately, it is not yet possible to set a custom menu file for the right click menu of the desktop, so no right click custom menu for now... This new version will also allow some neat things, which might interest sysadmins, such as having a menu file on a network and use it on the local machine.
Ruby for Web Development
I recently started a new web dev project, and decided to use it to better learn Ruby. However, I don’t want to use Rails. I’d like to keep it simple. I also prefer to know a lot about the inner workings of a particular technology before I go and use a large framework that hides [...]Xfce at FOSDEM 2009
FOSDEM is over and it was a blast! Finally, after about four years, the team met again. It was the first time for me and it was great to meet them all in person. Olivier, Yves-Alexis, Nick and I stayed at the same hotel. Stephan stayed in Gent and the others spread over several other hotels in Brussels.
I arrived early on Friday and relaxed in the hotel room for a while, going through my slides and listening to a couple having sex next door for hours. If you’re able to count the orgasms then it’s definitely too loud. So I left the hotel and walked around in the inner city of Brussels for a while until Yves-Alexis, and shortly after that, Nick and Stephan arrived. We had a few beers at a bar around the corner and later went to for Pasta and Pizza in an Italian restaurant close to the hotel where Jens joined us. After that we went to the FOSDEM beer event and stayed there until half past midnight, only interrupted by the arrival of Olivier whom we had to take to the hotel. The beer was nice and since the place was so crowded we had a hard time understanding each other … but we somehow managed it.
We got up at around 7am the next morning and of course the beer from the evening before didn’t really make things better. The nice thing about the hotel (Hotel Du Congres by the way) was that there was free breakfast included though. It was rather basic but it did it’s job. Shortly after that we left for FOSDEM. We arrived in time for the keynotes and met Jean-François and Maximilian on our way to Janson (the large auditorium). Later we went for some french fries and mainly spent our time in the X.org devroom. Some of us went to the LXDE lightning talk and were quite amused by their claim that LXDE is better than Xfce (what does better mean anyway?) and the huge number of slides showing photos of their team at different conferences. Later that day we went to a restaurant called Big Mama in the very heart of Brussels were we had a beer and nice food. Everyone went to bed afterwards, except Nick, who kept hacking on the panel.
Sunday was a big day for me – I had a talk about Xfce 4.6 and the future of Xfce scheduled at 11am. I didn’t really sleep well and was nervous the entire morning. It didn’t get any better when I had finally booted up my laptop and the microphone was turned on. I don’t know how long I talked but I have the feeling that I literally speed-talked through the slides. I forgot a few things I would’ve loved to mention but all in all I think it was ok. There were quite a few sceptical faces in the audience but also a few who looked very pleased by the features and plans I presented them. I definitely think it was ok for my first talk in English at a big conference but I know I can do better. So I’d be absolutely happy to do that again next year!
I felt very relieved afterwards. We then went out to take a few group pictures (the following one was shot by Jens). In the meantime, Samuel and Jelle de Jong had joined us (I have no idea where Jelle went afterwards, but Samuel stayed with us for the rest of the day).
After that we want back to one of the devrooms until Maximilian came back from his car with a number of sandwiches he had bought on the way. We had a beer at the FOSDEM bar, ate our sandwiches and then went back to the cross desktop room for Stephan’s talk about Xfce as a platform. I think he did a good job overall, especially considering that he had just finished his slides the night before. I would’ve loved to see more about how to use the different libraries and maybe more details about our plugin APIs but he covered a few very important things about Xfconf.
After that we had another beer at the bar and went to the last talks in Janson. Samuel dropped his full beer, I accidently kicked my empty one and Olivier and I left early for the FOSDEM bus back to Brussels-South. I managed to catch an earlier train to the airport, had a short flight, then had to wait for the bus from Hamburg to Lübeck for 90 minutes and finally arrived at around half past midnight.
I think it was a lot of fun and I’ll definitely go to FOSDEM again. It was nice to put a face to all the names of people I’ve been working with over the last few years. Thanks to everyone I met there, it was a real pleasure! Hope to see you all again! Thanks to all the people who went to our talks (oh, and to that guy who wanted that picture of him and me – could you send it to me please?) and asked questions (“Has the Xfce team ever thought about participating in Google SoC?”, “How good is the relationship of Xfce with Xubuntu?”, “Are you still aiming to be lightweight?” amongst others). It was also great to see several packagers, like Mark from Foresight, Landry from OpenBSD and Christoph from Fedora.
As I’ve mentioned before, I would really like to talk at conferences again. It’s a challenge but definitely a nice one. If you know any that could be interesting for Xfce, please let me know!
Oh, and by the way, if you’ve taken any pictures of us at FOSDEM, please let us know!
Xfce at FOSDEM 2009
FOSDEM is over and it was a blast! Finally, after about four years, the team met again. It was the first time for me and it was great to meet them all in person. Olivier, Yves-Alexis, Nick and I stayed at the same hotel. Stephan stayed in Gent and the others spread over several other hotels in Brussels.
Friday
I arrived early on Friday and relaxed in the hotel room for a while, going through my slides and listening to a couple having sex next door for hours. If you're able to count the orgasms then it's definitely too loud. So I left the hotel and walked around in the inner city of Brussels for a while until Yves-Alexis, and shortly after that, Nick and Stephan arrived. We had a few beers at a bar around the corner and later went to for Pasta and Pizza in an Italian restaurant close to the hotel where Jens joined us. After that we went to the FOSDEM beer event and stayed there until half past midnight, only interrupted by the arrival of Olivier whom we had to take to the hotel. The beer was nice and since the place was so crowded we had a hard time understanding each other ... but we somehow managed it.
Saturday
We got up at around 7am the next morning and of course the beer from the evening before didn't really make things better. The nice thing about the hotel (Hotel Du Congres by the way) was that there was free breakfast included though. It was rather basic but it did it's job. Shortly after that we left for FOSDEM. We arrived in time for the keynotes and met Jean-François and Maximilian on our way to Janson (the large auditorium). Later we went for some french fries and mainly spent our time in the X.org devroom. Some of us went to the LXDE lightning talk and were quite amused by their claim that LXDE is better than Xfce (which is denied by the guys at LXDE, so they might not actually have said that ... what does better mean anyway?) and the huge number of slides showing photos of their team at different conferences. Later that day we went to a restaurant called Big Mama in the very heart of Brussels were we had a beer and nice food. Everyone went to bed afterwards, except Nick, who kept hacking on the panel.
Sunday
Sunday was a big day for me - I had a talk about Xfce 4.6 and the future of Xfce scheduled at 11am. I didn't really sleep well and was nervous the entire morning. It didn't get any better when I had finally booted up my laptop and the microphone was turned on. I don't know how long I talked but I have the feeling that I literally speed-talked through the slides. I forgot a few things I would've loved to mention but all in all I think it was ok. There were quite a few sceptical faces in the audience but also a few who looked very pleased by the features and plans I presented them. I definitely think it was ok for my first talk in English at a big conference but I know I can do better. So I'd be absolutely happy to do that again next year!
I felt very relieved afterwards. We then went out to take a few group pictures (the following one was shot by Jens). In the meantime, Samuel and Jelle de Jong had joined us (I have no idea where Jelle went afterwards, but Samuel stayed with us for the rest of the day).
After that we want back to one of the devrooms until Maximilian came back from his car with a number of sandwiches he had bought on the way. We had a beer at the FOSDEM bar, ate our sandwiches and then went back to the cross desktop room for Stephan's talk about Xfce as a platform. I think he did a good job overall, especially considering that he had just finished his slides the night before. I would've loved to see more about how to use the different libraries and maybe more details about our plugin APIs but he covered a few very important things about Xfconf.
After that we had another beer at the bar and went to the last talks in Janson. Samuel dropped his full beer, I accidently kicked my empty one and Olivier and I left early for the FOSDEM bus back to Brussels-South. I managed to catch an earlier train to the airport, had a short flight, then had to wait for the bus from Hamburg to Lübeck for 90 minutes and finally arrived at around half past midnight.
I think it was a lot of fun and I'll definitely go to FOSDEM again. It was nice to put a face to all the names of people I've been working with over the last few years. Thanks to everyone I met there, it was a real pleasure! Hope to see you all again! Thanks to all the people who went to our talks (oh, and to that guy who wanted that picture of him and me - could you send it to me please?) and asked questions ("Has the Xfce team ever thought about participating in Google SoC?", "How good is the relationship of Xfce with Xubuntu?", "Are you still aiming to be lightweight?" amongst others). It was also great to see several packagers, like Mark from Foresight, Landry from OpenBSD and Christoph from Fedora.
As I've mentioned before, I would really like to talk at conferences again. It's a challenge but definitely a nice one. If you know any that could be interesting for Xfce, please let me know!
Oh, and by the way, if you've taken any pictures of us at FOSDEM, please let us know!
Minimal word processors
I've just discovered two very interesting minimal word processors. They're designed by writers, for writers. They aim to get out of the way and let you just write, with no distractions.
PyRoom
First is PyRoom, which relies only on pygtk. It's really quite minimal and not distracting in the slightest, and easily themeable. I like it a lot. I created an ebuild, available here. Thank goodness for distutils!
WordGrinder
Second is WordGrinder, an even more minimal application that's entirely console-based. Unfortunately, it uses some weird freaky build system called PrimeMover, and it's scary. I asked one of my fellow developers who maintains the Lua package about it, but he's never heard of it. There aren't any eclasses for dealing with any Lua build system.
According to WordGrinder's Readme, the PrimeMover setup should be pretty simple. However, take a look at the pmfile itself. Man, that's ugly. It looks like three hours of judicious sed usage within the ebuild. I can't see any other way to alter it to something sanely installable to /usr
.
If anyone has any tips, I'm all ears. I've got a skeleton ebuild for WordGrinder available in my repository, but it really needs fleshing out. So, who's willing to help?
Hardware: graphics shuffle redux
In other news, I had a really fun time getting my ATI X1950 Pro to work (again) with a silent aftermarket cooler (AC Accelero v1 rev2) and the latest bleeding-edge radeon, mesa, and libdrm packages. The hardware mods were fun, but the software . . . well, that's a long story for next time.
Desktop
Oh yes, and this month's Xfce desktop. Token uncluttered version here. All those artists in that Thunar window are amazing. You should be listening to them right now.
icons: Meliae-dust (needed something reddish)
gtk+: Rezlooks L & D
xfwm4: Rezlooks-gtk (yes, it is confusingly named)
background: The Empire (from pixelgirlpresents)
Fix bitmap^Whorrible fonts
You have horrible fonts in Firefox and don't know how to fix it? It is fairy simple:cd /etc/fonts/conf.dAnd this is it. Restart X.
cp ../conf.avail/70-no-bitmaps.conf .
FOSDEM schedule and graphical 4.6 installers
The FOSDEM schedule has been published. You can find the Cross Desktop room schedule here. There will be two talks about Xfce. Short descriptions are linked from the schedule. We’re also mentioned in the press release.
We will be a fairly large group of people (around at dozen at least, with most of the core developers being present) so it’ll definitely rock!
On the Xfce mailing list people have been asking about graphical installers for 4.6. I’m currently preparing them and there should be installers for Xfce 4.6 RC1, RC2 and the final release. The main installer is already working except for one thing that’s bugging me. Should be able to fix it though.