summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
049c4f6)
Support for ellipsization in GtkTreeView and gtk_window_set_focus_on_map() are
new in 2.6, don't use them with 2.4.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63579
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void wxDataViewRenderer::EnableEllipsize(wxEllipsizeMode mode)
{
void wxDataViewRenderer::EnableEllipsize(wxEllipsizeMode mode)
{
if ( gtk_check_version(2, 6, 0) != NULL )
return;
if ( gtk_check_version(2, 6, 0) != NULL )
return;
g_value_set_enum( &gvalue, static_cast<PangoEllipsizeMode>(mode) );
g_object_set_property( G_OBJECT(rend), "ellipsize", &gvalue );
g_value_unset( &gvalue );
g_value_set_enum( &gvalue, static_cast<PangoEllipsizeMode>(mode) );
g_object_set_property( G_OBJECT(rend), "ellipsize", &gvalue );
g_value_unset( &gvalue );
+#else // GTK < 2.6
+ wxUnusedVar(mode);
+#endif // GTK 2.6/before
}
wxEllipsizeMode wxDataViewRenderer::GetEllipsizeMode() const
{
}
wxEllipsizeMode wxDataViewRenderer::GetEllipsizeMode() const
{
if ( gtk_check_version(2, 6, 0) != NULL )
return wxELLIPSIZE_NONE;
if ( gtk_check_version(2, 6, 0) != NULL )
return wxELLIPSIZE_NONE;
g_value_unset( &gvalue );
return mode;
g_value_unset( &gvalue );
return mode;
+#else // GTK < 2.6
+ return wxELLIPSIZE_NONE;
+#endif // GTK 2.6/before
eventShow.SetEventObject(win);
win->GetEventHandler()->ProcessEvent(eventShow);
}
eventShow.SetEventObject(win);
win->GetEventHandler()->ProcessEvent(eventShow);
}
- // restore focus-on-map setting in case ShowWithoutActivating() was called
- gtk_window_set_focus_on_map(GTK_WINDOW(win->m_widget), true);
+
+#if GTK_CHECK_VERSION(2,6,0)
+ if (!gtk_check_version(2,6,0))
+ {
+ // restore focus-on-map setting in case ShowWithoutActivating() was called
+ gtk_window_set_focus_on_map(GTK_WINDOW(win->m_widget), true);
+ }
+#endif // GTK+ 2.6+
+
- gtk_window_set_focus_on_map(GTK_WINDOW(m_widget), false);
+#if GTK_CHECK_VERSION(2,6,0)
+ if (!gtk_check_version(2,6,0))
+ gtk_window_set_focus_on_map(GTK_WINDOW(m_widget), false);
+#endif // GTK+ 2.6+
+