[gnote] Remove boost::bind from utils
- From: Aurimas Černius <aurimasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnote] Remove boost::bind from utils
- Date: Fri, 13 Jan 2017 21:18:17 +0000 (UTC)
commit 778da162c6ec8158f50b05378af948b82571cff7
Author: Aurimas Černius <aurisc4 gmail com>
Date: Fri Jan 13 23:06:52 2017 +0200
Remove boost::bind from utils
src/utils.cpp | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/utils.cpp b/src/utils.cpp
index 3de155f..d61f351 100644
--- a/src/utils.cpp
+++ b/src/utils.cpp
@@ -27,8 +27,6 @@
#include <iostream>
#include <algorithm>
-#include <boost/bind.hpp>
-
#include <gtk/gtk.h>
#include <glibmm/i18n.h>
@@ -132,7 +130,9 @@ namespace gnote {
void popup_menu(Gtk::Menu &menu, const GdkEventButton * ev)
{
menu.signal_deactivate().connect(sigc::bind(&deactivate_menu, &menu));
- menu.popup(boost::bind(&get_menu_position, &menu, _1, _2, _3),
+ menu.popup([&menu](int & x, int & y, bool & push_in) {
+ get_menu_position(&menu, x, y, push_in);
+ },
(ev ? ev->button : 0),
(ev ? ev->time : gtk_get_current_event_time()));
if(menu.get_attach_widget()) {
@@ -280,8 +280,9 @@ namespace gnote {
Glib::Threads::Cond cond;
mutex.lock();
- main_context_invoke(boost::bind(
- sigc::ptr_fun(main_context_call_func), slot, &cond, &mutex));
+ main_context_invoke([slot, &cond, &mutex]() {
+ main_context_call_func(slot, &cond, &mutex);
+ });
cond.wait(mutex);
mutex.unlock();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]