From 959557870337722644b5fcbb2eada6915fd62a88 Mon Sep 17 00:00:00 2001 From: Zelly Snyder Date: Thu, 4 Apr 2019 19:14:08 -0400 Subject: [PATCH] Fix call to deprecated GTK function * Change from sigc::group (deprecated) to C++11 lambda * Remove superflous `abs` definition that conflicted with libc/c++ --- actions.cc | 3 ++- handler.cc | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actions.cc b/actions.cc index 45c03761..54383f3c 100644 --- a/actions.cc +++ b/actions.cc @@ -23,6 +23,7 @@ #include "grabber.h" #include "cellrenderertextish.h" +#include #include bool TreeViewMulti::on_button_press_event(GdkEventButton* event) { @@ -54,7 +55,7 @@ void TreeViewMulti::on_drag_begin(const Glib::RefPtr &context) bool negate(bool b) { return !b; } TreeViewMulti::TreeViewMulti() : Gtk::TreeView(), pending(false) { - get_selection()->set_select_function(sigc::group(&negate, sigc::ref(pending))); + get_selection()->set_select_function([this](const Glib::RefPtr&, const Gtk::TreePath&, const bool&) { return !this->pending; }); } enum Type { COMMAND, KEY, TEXT, SCROLL, IGNORE, BUTTON, MISC }; diff --git a/handler.cc b/handler.cc index 8830ea28..22f47e9c 100644 --- a/handler.cc +++ b/handler.cc @@ -533,7 +533,6 @@ class WaitForPongHandler : public Handler, protected Timeout { virtual Grabber::State grab_mode() { return parent->grab_mode(); } }; -static inline float abs(float x) { return x > 0 ? x : -x; } class AbstractScrollHandler : public Handler { bool have_x, have_y;