Re: gtkmm affected by recent changes to gtk (GdkNativeWindow, gtk_toolbar_[gs]et_tooltips)



Armin Burgmeier wrote:
The problem is not the all-in-one GTK+ package, but these few lines at
the top of toolbar.ccg:

//Define this to make sure that we don't use any of the deprecated
GtkToolbar API.
//Normally we just deprecate it in gtkmm too,
//but the GtkToolbar compatibility system is particularly unpleasant, so
we just removed it in gtkmm 2.4. murrayc.
//In future, this GTK_DISABLE_DEPRECATED might be inappropriate because
it might cover extra GTK+ API. Just remove it then.

#define GTK_DISABLE_DEPRECATED

This has already been fixed in gtkmm 2.13.8, though.
I see the changes in 2.13.8.  Just as I did in
2.12.7, the #ifndef GTKMM_DISABLE_DEPRECATED was added, so I assumed that
I was on the right track.  I removed #define GTK_DISABLE_DEPRECATED
from toolbar.ccg and toolbar.cc.  Compiling gtkmm 2.12.7 almost works

toolbar.cc compile fails at

#ifndef GTKMM_DISABLE_DEPRECATED
Tooltips* Toolbar::get_tooltips_object() const
{
  //Note that the _tooltips field is deprecated and broken since GTK+ 2.12:
  return Glib::wrap((GtkTooltips*)gobj()->_tooltips);
}
#endif //GTKMM_DISABLE_DEPRECATED

The troublemaker seems to be gtktoolbar.h where GtkToolbar has member
tooltips or _tooltips if GTK_DISABLE_DEPRECATED
Why the name change in Gtk?  To force problems like this to show up?

I suppose there are several solutions.  gtkmm could contain the
#ifndef GTK_DISABLE_DEPRECATED but that seems messy.  I could mask
the problem by keeping the #define GTK_DISABLE_DEPRECATED in
toolbar.cc

For now I just commented the cc function to see if there were any
other compile problems with the #define GTK_DISABLE_DEPRECATED removed.
It appears that is the only problem.  The gtkmm compiled ok


Damon Register



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]