]> git.saurik.com Git - wxWidgets.git/commit - src/gtk/dataview.cpp
Avoid setting attributes in GTK wxDataViewRenderer if not supported.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Nov 2009 17:41:22 +0000 (17:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 10 Nov 2009 17:41:22 +0000 (17:41 +0000)
commitc2a738e372126950e5c70f72a3e8876f1ac89bf5
tree94d0009811bce97de3c1aa533c0c464359f256f0
parent62265c2c67bd9ee1c78e57700277dc0baf2f14d6
Avoid setting attributes in GTK wxDataViewRenderer if not supported.

If the native renderer doesn't support the properties which we map our
attributes to, trying to set them is useless and results in GTK+ warnings so
don't do it.

Add wxDataViewRenderer::GtkSupportsAttrs() which can be overridden to indicate
whether the renderer supports attributes or not. We probably could use
g_object_class_find_property() instead to detect it automatically but for now
these properties are all supported only by GtkCellRendererText and not
supported anywhere else so using a single virtual function seems tidier.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62591 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
include/wx/gtk/dvrenderer.h
include/wx/gtk/dvrenderers.h
src/gtk/dataview.cpp