Don't use deprecated GTK APIs (#2129)

* Don't use deprecated Glib::Thread

* Don't use deprecated stock ID APIs

* Don't use deprecated operator const void* in IconInfo

* Don't use deprecated Gtk::TreeView::set_rules_hint()

* Don't use deprecated Gtk::Widget::set_margin_left()

* Don't use deprecated Gtk::UIManager

* Don't use deprecated sigc::mem_ptr accepting object pointer

* Enable {GDK,GIO,GLIB,GTK,PANGO,SIGCXX}MM deprecation guards

* Enable GTK deprecation guard

Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
Mike Gelfand
2021-11-12 12:12:50 +03:00
committed by GitHub
parent 319e1fc6bb
commit 82b3da0a54
23 changed files with 864 additions and 501 deletions

View File

@@ -198,6 +198,16 @@ inline T* gtr_get_ptr(Glib::RefPtr<T> const& ptr)
#endif
}
template<typename T, typename U>
inline Glib::RefPtr<T> gtr_ptr_static_cast(Glib::RefPtr<U> const& ptr)
{
#if G_ENCODE_VERSION(GLIBMM_MAJOR_VERSION, GLIBMM_MINOR_VERSION) < G_ENCODE_VERSION(2, 68)
return Glib::RefPtr<T>::cast_static(ptr);
#else
return std::static_pointer_cast<T>(ptr);
#endif
}
template<>
struct std::hash<Glib::ustring>
{