6 January 2005
Travels
I've put some of the photos from my trip to Mataró, and the short stop over in Japan on the way back. The Mataró set includes a fair number taken around La Sagrida Familia, and the Japan set is mostly of things around the Naritasan temple (I didn't have enough time to get into Tokyo).
Multi-head
A few months back, I got a second monitor for my computer and configured
it in a Xinerama-style setup (I'm actually using the MergedFB
feature
of the radeon driver, but it looks like Xinerama to X clients). Overall
it has been pretty nice, but there are a few things that Gnome could do
a bit nicer in the setup:
15 December 2004
Mataró
The conference has been great so far. The PyGTK BoF on the weekend was very productive, and I got to meet Anthony Baxter (who as well as being the Python release manager, wrote a cool VoiP application called Shtoom). There was an announcement of some of the other things Canonical have been working on, which has been reported on in LWN (currently subscriber only) among other places.
Over the weekend, I had a little time to do some tourist-type things in Barcelona. I went to La Sagrada Família. It was a great place to visit, and there was an amazing level of detail in the architecture. You can walk almost to the very top of the cathedral, and see out over the Barcelona skyline (and see various bits of the cathedral not visible from the ground). I'll have to put my photos up online.
8 December 2004
Mataró
I've been in Mataró (about an hour from Barcelona) now since Sunday, and it's quite a nice place. It is a bit cooler than Perth due to it being the middle of Winter here, but the way most of the locals are rugged up you'd think it was a lot colder. It's great to catch up with everyone, and a number of pygtk developers will be turning up over the next few days for the BOF on the weekend.
Nautilus Extensions
One of the changes in the Gnome 2.9 development series is the removal of most of the Bonobo code from Nautilus, which results in a speed boost due to lower complexity and less IPC overhead. This had the effect of breaking existing bonobo based context menus, property pages and views. The first two can be converted to the Nautilus extension interface, but the second has no equivalent in the new code (partly because Nautilus is concentrating on being a file manager these days rather than a universal component shell like it was in the early days).
1 November 2004
Libtool
When looking into the libtool problem I mentioned earlier, I decided to
take a look at the libtool-2.0 betas. Overall, it looks pretty good.
I've updated the
gnome-common autogen.sh
script to support it. So if a package uses the LT_INIT
macro, it will
call libtoolize
for you.
One of the new features in these versions of libtool is that if you have
a AC_CONFIG_MACRO_DIR(directory)
call in your configure.ac
file, it
will copy the libtool M4 macros to that directory. If you then call
aclocal
with the correct -I
flag, autoconf will use that version of
the macro.
Libtool Problem (continued)
Shortly after posting the last entry about the libtool problem I sent a message to the bug-libtool list, Scott helped to track down the problem.
With the help of the test script I wrote, he managed to track down the
change on the libtool-2.0 branch that fixed the problem. Applying this
same change to a 1.5.x release fixed the problem. He has uploaded a new
Debian package with the change, and I've altered the
jhbuild bootstrap
module set to include the patch too. The copy of the
patch included with JHBuild can be found
here.
Hopefully it will also be in a future 1.5.x release (assuming that there
are any more).
25 October 2004
Drive Mount Applet
The new drive mount applet is now checked into the HEAD branch of gnome-applets, so will be in Gnome 2.10. There are a few things left to do, such as making it possible to open the file manager as well as unmounting/ejecting it. I did up a screenshot showing what it looks like as an applet.
Libtool
Finally managed to reproduce a particular libtool bug that people have
reported on and off. It does show why some people decide that .la
files are evil, since it doesn't occur when people delete those files
...
20 October 2004
Even More Icon Theme Stuff
To make it a bit easier to correctly display themed icons, I added
support to GtkImage
, so that it is as easy as calling
gtk_image_new_from_icon_name()
or gtk_image_set_from_icon_name()
.
The patch is attached to bug
#155688.
This code takes care of theme changes so the application developer doesn't need to. Once this is in, it should be trivial to add themed icon support to various other widgets that use GtkImage (such as GtkAbout and GtkToolItem).
Drive Mount Applet
I started to look at bringing the drive mount applet from gnome-applts
up to scratch, since it hasn't really had much work done on it other
than porting to the 2.x development platform.
The applet is a classic example of Gnome 1.x user interface complexity. The applet shows a button that can be clicked to mount or unmount a particular mount point. For this simple functionality, it provides the following preferences:
11 October 2004
Looks like we are going to have at least another three years with The Rodent. It also looks like they will have a majority in the senate, which will reduce the senate's effectiveness as a house of review.
We might not have John Howard for the entire term though, since he is of retirement age. NineMSN seems to think that Peter Costello is already the leader.
It also looks like The Democrats senators up for reelection got completely wiped out, with much of their support going to The Greens.
7 October 2004
Elections
Tomorrow is the Australian Federal Election. It is weird how there are some topics that none of the parties seem to have been bringing up during the election. In particular, they don't seem to be mentioning about how John Howard lied about the children overboard scandal last election (if he didn't lie, then he intentionally kept himself uninformed which is possibly even worse). This was a case where information was suppressed until just after the election had finished. If the information had been made public, it could have changed the result of the election.
More Icon Theme stuff
In an email, Jonathan pointed out that simply
using gtk_icon_theme_load_icon()
by itself is not optimal either. If
the user changes their icon theme, you should reload the icon in case it
has changed in the new theme.
This is quite easy to handle correctly though, using the "changed"
signal of GtkIconTheme
:
GtkIconTheme *icon_theme = gtk_icon_theme_get_default (); g_signal_connect (icon_theme, "changed", G_CALLBACK (callback), NULL);
Now callback()
will be called when the icon theme changes, at which
point you can reload the icon.
4 October 2004
Icon Theme APIs (continued)
Of course, after recommending that people use
gtk_icon_theme_load_icon()
to perform the icon load and scale the icon
for you, Ross manages to find a
bug in that function.
If the icon is not found in the icon theme, but instead in the legacy
$prefix/share/pixmaps
directory, then gtk_icon_theme_load_icon()
will not scale the image down (it will scale them up if necessary
though).
jhbuild
Jhbuild now includes a notification icon when running in the default terminal mode. The code is loosely based on Davyd's patch, but instead uses Zenity's notification icon support. If you have the HEAD branch of Zenity installed, it should display without any further configuration. Some of the icons are a little difficult to tell apart at notification icon sizes, so it would be good to update some of them.
29 September 2004
Ubuntu seems to have taken off very quickly since the preview release came out a few weeks ago. In general, people seem to like the small tweaks we've made to the default Gnome install. Of course, after the preview came out people found bugs in some of my Gnome patches ...
One of the things we added was the trash applet on the panel. I made a fair number of fixes that make the applet fit in with the desktop a bit better and handle error conditions a bit better.
Applets vs. Notification Icons
It seems that a lot of people get confused by what things on the panel should be applets and what should be notification icons. Originally, the main difference between the two was this:
- The lifecycle of an applet is managed by the panel, which in turn is tied to the lifecycle of the session. So applets generally live for the length of the session (unless they are added/removed part way through a session).
- Notification icons are more transient. Their lifecycle is linked to whatever app they were created by. Once the app exits the notification icon goes away too.
There are some other differences though:
Notification Icons
I decided to go ahead and write the code to allow
Zenity to listen for commands on
stdin. It was pretty easy to add, and Glynn accepted the patch so it is
in the latest CVS version. The main difference between the
implementation and what I described earlier is that you need to pass the
--listen
argument to Zenity to activate this mode (without it, it acts
as a one-shot notification icon where it exits when the icon is clicked
on). The easiest way to use it from a bash script is to tie Zenity to a
file descriptor like this:
14 September 2004
Foundation Elections (continued)
bolsh: as I
said, many real elections make modifications to an idealised STV system
to simplify vote counting. The counting for the .au
senate
elections
sounds like it takes a random sample of votes when transfering
preferences too.
Also, in my description a candidate needed to get more votes than the quota and the quota could be fractional. In contrast, the Australian senate elections say candidates must reach the Droop Quota, which is the smallest integer greater than the quota formula I used. If you are using random sampling for preference transfers so that each ballot has a weight of either 0 or 1, then this is equivalent. However, if you count fractional votes, then it does make a difference.
13 September 2004
Foundation Elections
There has been talk on the foundation list about changing the vote counting procedure to something more fair. The method being proposed is Single Transferable Vote, which is the same system used within a single electorate for the senate vote in the Australian Federal Election. As with the Australian elections, some people have some trouble understanding exactly how it works, so here is a description.
- Each voter orders every candidate on their ballot in order of preference. Each ballot is assigned a weight of 1.
- The ballots are grouped by the first preference.
- If any candidate's total reaches the quota, then they get in. The quota is chosen such that if there are s seats, then at most s candidates can reach the quota. So a candidate must get more than n/(s + 1) first preference votes in order to reach the quota.
- If any candidate gets over the quota, then the highest vote getter is elected, and their votes are redistributed at a reduced strength. If x people voted for the candidate, then the weighting of each of the votes is scaled by (x - q)/x where q is the quota (x - q is the number of votes over the quota). The winning candidate's name is removed from all ballots and we go back to step 2 and repeat to find the next winner.
- If no candidate reaches the quota, then the candidate with the least first preference votes is removed from the election. Their name is removed from all ballots, and we go back to step 2. The votes for the removed candidate are redistributed at the same strength, since they didn't help elect a candidate.
Note that this vote counting system is identical to Instant-runoff voting when there is only a single seat. The quota calculation shows that the winning candidate needs to get more than 50% of the votes to win, as expected.
6 September 2004
linux.conf.au
The LCA2004 team have put together the conference CD and DVD. Apparently they will arrive in the mail in about a week.
They put the CD contents on the web first, and I was a bit disappointed that the recording of my talk was missing (it does include my slides though). However, when they put the DVD contents up I saw that it included a video recording of the talk, which is pretty cool.
Federal Election
So the Federal election has been announced for 9th October. If you are an Australian living overseas, now would be a good time to apply for a postal vote. It'd be great if this gets rid of John Howard. Of course, even if he does win he will probably retire soon after the election ...
Last week, it also turned out that John Howard is a spammer. He paid his son's company to send out unsolicited email to members of his electorate. Apparently our anti-spam laws include exceptions for political parties, so it might not be illegal. However, the Labor party are chasing it up whether it was legal for a third party to send out the spam (since they don't have the protection of the exemption). On the brighter side, it might encourage the politicians to rethink whether the exemptions in the Spam Act are a good idea or not.
Python Unicode Weirdness
While discussing unicode on IRC with owen, we ran into a peculiarity in Python's unicode handling. It can be tested with the following code:
>>> s = u'\U00010001\U00010002' >>> len(s) >>> s[0]
Python can be compiled to use either 16-bit or 32-bit widths for
characters in its unicode strings (16-bit being the default). When
compiled in 32-bit mode, the results of the last two statements are 2
and u'\U00010001'
respectively. When compiled in 16-bit mode, the
results are 4
and u'\ud800'
.
Oxford
I've been in Oxford for the past week at the Canonical conference. There are lots of great people here, working on a lot of cool projects. Jordi's blog has a lot more info about it.
7 August 2004
Bushisms
I found this one quite good.
Compulsory Voting
tberman: I agree that voters should have the right not to vote for anyone, but don't feel that simply not turning up to vote is a good way to do so. In a non-compulsory election, the non-voter count is going to be comprised of those who are abstaining from voting, and those who are simply two lazy to turn up. With compulsory voting, those who don't wish to vote for any particular candidate can simply leave their ballot blank, which is known as an informal vote.
3 August 2004
Fahrenheit 9/11
Went to see Fahrenheit 9/11 on Monday night. It was an interesting movie, but it was clearly aimed at a US audience. It did have a fair bit of information I hadn't heard before, but in some areas he was obviously choosing which bits of information to include to increase the effect (eg. when listing the countries in the "coallition of the willing" he didn't list Britain). Other bits seemed particularly relevant like the bit about the Bush administration playing with the terror alert apparently for political reasons, given what has happened so far this week.