Re: cannot create a long tree
- From: Havoc Pennington <hp redhat com>
- To: Mike Dailey <daileyml sbcglobal net>
- Cc: Dave Malcolm <david davemalcolm demon co uk>, gtk-list gnome org
- Subject: Re: cannot create a long tree
- Date: Thu, 15 May 2003 00:35:35 -0400
On Wed, May 14, 2003 at 10:10:48AM -0700, Mike Dailey wrote:
> I, amoung several others, have posted GTKTreeView
> questions and havn't received any help.
Remember that you're posting to a mailing list where there are a few
volunteers that answer questions when they have time, and that's it.
Most people that get help here don't come back and give help to others
later on, unfortunately.
> My question, for instance, asked if there was a way to
> change the "look and feel" or the GTKTreeView widget
> from the spinning selector arrow to the more standard
> "+" and "-" collapse/expand view.
Short answer: no
Long answer:
As a general rule, GTK doesn't do this sort of thing (except in
deprecated API). Look and feel are the domain of the theme; they
should be configured per-platform, or per-user, but they are not
intended to be configured per-application-developer. This abstraction
preserves the ability of the toolkit to track the platform's L&F as it
evolves, and blend in to new platforms. e.g. imagine the Windows 95 ->
98 -> XP -> Longhorn transition, L&F changed significantly in that
time. Or imagine an OS X port. If the API has
gtk_tree_view_set_looks_like_windows_95() that breaks the abstraction.
If you want to do L&F per-application what you essentially have to do
is write a custom theme engine (GtkStyle subclass) and then hardcode
the application's theme.
If you just want to look like windows on windows, you might check out
http://gtk-wimp.sourceforge.net/ (something like that will hopefully
be integrated into GTK itself at some point)
> Can you or anyone else recommend a good tutorial--if
> one exists--for GTKTreeView? The API reference and
> GTK 2.0 tutorial on gtk.org are practically useless
> for all but the very basic use of GTKTreeView, and my
> web searchs for GTK info are coming up empty.
2.x has significantly better reference docs and examples than 1.2, but
worse situation on books/tutorials. Mostly because publishers didn't
sell enough of the 1.2 books I believe, the market got a bit flooded.
People that get along without tutorials know two secrets:
1) the internet has thousands of open source applications that use
GTK and contain sample code. The place to start (which is good for
treeview) is gtk-demo, and apps that come with or are part of
GNOME are also generally well-informed about "best practice" for
GTK.
2) GTK comes with source code.
Yes, everyone knows tutorials would be better. However, counting GTK
and other stuff I've written two free books and a pile of reference
docs and answered hundreds or even thousands of questions on mailing
lists over a period of 5 years, so don't complain to me about it. ;-)
Pick any of the hundreds of people out there who could help and
didn't, and pester them instead. Or when you are forced to resort to
source code and examples, write down what you learn in the form of a
GTK documentation patch, and submit it to bugzilla.gnome.org.
Open source is like voting; if everyone votes no single vote seems
important, but if no one votes, the system falls apart.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]