You are viewing hughsient

Technical Blog of Richard Hughes - Another GTK Problem

Richard Hughes
Date: 2008-03-01 01:28
Subject: Another GTK Problem
Security: Public
Dear lazyweb,

Anybody know how I can put embedded links (for example http://www.moo.com) into a GtkTreeView? Please tell me I don't need to create my own renderer. Ideas welcome, code snippets or links rewarded with beer.

Thanks.
Post A Comment | 4 Comments | Share | Link






Matthew Barnes
User: mbarnes
Date: 2008-03-01 05:21 (UTC)
Subject: (no subject)
I don't see any way around creating your own renderer, but it shouldn't be hard. Subclass GtkCellRendererText, set the underline and foreground color properties to make the text look like a link, and implement the activate() method. May need to change the mouse cursor too, not sure.
Reply | Thread | Link



User: glatzor
Date: 2008-03-01 06:30 (UTC)
Subject: (no subject)
What we use in gnome-app-install:
http://glatzor.de/files/ReleaseNotesViewer.py
Reply | Parent | Thread | Link



Richard Hughes
User: hughsient
Date: 2008-03-01 09:52 (UTC)
Subject: (no subject)
That's the best plan, thanks.
Reply | Parent | Thread | Link



User: kamstrup
Date: 2008-03-01 12:48 (UTC)
Subject: (no subject)
I have been wanting to do the same a few times.

The above snippet creates links in a GtkTextView which is not what was asked for (that was links in a GtkTreeView). Am I missing something - because to my knowledge the GtkTextBuffer approach can not be ported to a GtkCellRendererText approach..?
Reply | Parent | Thread | Link



browse
my journal
April 2008