mirror of
https://github.com/transmission/transmission.git
synced 2025-12-25 04:45:56 +00:00
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:
10
gtk/Utils.h
10
gtk/Utils.h
@@ -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>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user