Tabs?

So, it seems like lots of people are enjoying adding tab support to GNOME applications.

While looking at the screenshots what came to my mind is that this seems just so wrong. I wonder if it is not better to improve task switching in the window manager, pager and window list, and have one window per document, as would be natural in a document-centric desktop.

Why are people trying to ressurrect the MDI model, which the GNOME HIG despises?

In other news, good to see planning on GNOME 3.0. And it does look like people are aware that repeating KDE 4/GNOME 2 is not a good idea, and planning the breakage/delay to be limited, and sane.

Update: a conversation at #webkit-gtk@Freenode just made me realize that the tabs for the calculator and totem were probably just jokes; I really hope so! =)

Another meme

Or is it a geek poll? =)

1 liferea window
1 devhelp window
2 emacs windows
3 emacs buffers
4 gnome-terminal windows
6 gnome-terminal tabs
5 epiphany windows
17 epiphany tabs

History meme

The most recent meme in Planet GNOME is listing your most used commands using a clever command line hack. Here are mine, for my own user, and my root account:


$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
115 ls
64 cd
48 svn
27 git
22 screen
20 rgrep
19 find
16 sudo
11 rm
10 less


# history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
185 dzhandle
36 ls
32 aptitude
29 screen
22 dpkg
21 vim
17 cd
13 dd
13 apt-cache
11 iwlist

This definately shows that I’ve been hard at work on a Zope/Plone project =). More on that later!

PolicyKit rules, and, when error handling bites you

PolicyKit, as I said before, is the authentication/authorization framework that will finally replace the gksu hack with a real solution. I am playing with some test code to be able to perhaps contribute with that goal. Everything was going forward pretty nicely in my tests when I hit a blocker. I spent like two hours trying to figure out the problem. Here’s the code:


sender = dbus_message_get_sender(message);
pk_caller = polkit_tracker_get_caller_from_dbus_name(pk_tracker,
sender,
&dbus_error);
if(dbus_error_is_set(&dbus_error))
{
g_error("Failed to get caller from dbus: %s: %s\n",
dbus_error.name, dbus_error.message);
return NULL;
}

When my mechanism goes to check if the caller is allowed to run the action, I first need to get the caller, of course. That code was always failing with this error message:


** ERROR **: Failed to get caller from dbus: org.freedesktop.DBus.GLib.UnmappedError.CkManagerError.Code0: Unable to lookup session information for process '25594'

It took me a long time, and a lot of code reading on PackageKit to realize the real simple problem with my code: I was assuming that the DBUS error would only be set if polkit_tracker_get_caller_from_dbus_name failed, which is just not the case. The DBUS error was set, but the function actually worked, most probably getting the information it needed from some other thing than ConsoleKit. So that brings us to something like this:


sender = dbus_message_get_sender(message);
pk_caller = polkit_tracker_get_caller_from_dbus_name(pk_tracker,
sender,
&dbus_error);
if(pk_caller == NULL)
{
if(dbus_error_is_set(&dbus_error))
{
g_error("Failed to get caller from dbus: %s: %s\n",
dbus_error.name, dbus_error.message);
return NULL;
}
}

And, voi lá!