GTK+ Is My Bitch

Thanks to some pointers from Kris, I've got some subtle new bling in Tasks. The core of the code is KotoCellRendererPixbuf, a GtkCellRendererPixbuf subclass which implements the activate virtual method, so that it is clickable. However because the other renderer in the column is not activatable (a text renderer), clicking on the row activates the pixbuf renderer. A quick bit of logic in the activate virtual function to look at where was clicked solves this, and now Tasks shows clickable icons when a task has a URL set.

Tasks

I particularly like how space for the icon isn't allocated in every row, so if there is no icon the text extends all the way across the view.

NP: The Herd, The Herd

13:40 Tuesday, 26 Jun 2007 [#] [computers] (9 comments)

Posted by Alexandre at Tue Jun 26 15:19:13 2007:
Heh, and I like ellipsizing the text instead of either using ugly horizontal scrollbars or extending the dialog until text fills it :)
Posted by alex at Tue Jun 26 15:50:44 2007:
Another idea, as you now have clickable icons for urls, how about clickable icons for email adresses?

like:

meeting with tom
tom@someurl.invalid

click on the icon to open your email apps new message dialog with toms adress filled in?

keep up the good work!
best wishes, alex
Posted by tm at Tue Jun 26 17:06:06 2007:
Yeah. Clickable links was a totally essential feature!

You rock!
Posted by Adam Williamson at Tue Jun 26 17:23:08 2007:
woot!

new release! new release! :)
Posted by Trent Lloyd at Tue Jun 26 19:05:24 2007:
Something like this would be great in menus to add eject buttons to the places menu
Posted by Ross at Tue Jun 26 19:08:12 2007:
Trent: shame the implementations are radically different.  This is tree view magic, not GtkMenu hackery.  :)
Posted by Leonardo Fontenelle at Tue Jun 26 23:26:34 2007:
Yet another "thanks" for the new URL icons!
Posted by steve-e at Wed Jun 27 00:28:45 2007:
"I particularly like how space for the icon isn't allocated in every row, so if there is no icon the text extends all the way across the view."

Is the magic done in KotoCellRendererPixbuf or somewhere in task code?
Posted by Ross at Wed Jun 27 07:10:12 2007:
Steve-e: the trick is to set the "visible" property to FALSE when the icon should not be shown, instead of setting the "icon-name" property to NULL.

Name:


E-mail:


URL:


Add 3 and 10 (required):


Comment: