Commit 85f28cf9 authored by Murray Cumming's avatar Murray Cumming
Browse files

Use std::ref() instead of sigc::ref().

parent 264e6ce5
......@@ -117,7 +117,7 @@ Dialog_Import_CSV::Dialog_Import_CSV(BaseObjectType* cobject, const Glib::RefPtr
auto renderer = Gtk::manage(new Gtk::CellRendererText);
m_encoding_combo->set_model(m_encoding_model);
m_encoding_combo->pack_start(*renderer);
m_encoding_combo->set_cell_data_func(*renderer, sigc::bind(sigc::mem_fun(*this, &Dialog_Import_CSV::encoding_data_func), sigc::ref(*renderer)));
m_encoding_combo->set_cell_data_func(*renderer, sigc::bind(sigc::mem_fun(*this, &Dialog_Import_CSV::encoding_data_func), std::ref(*renderer)));
m_encoding_combo->set_row_separator_func(sigc::mem_fun(*this, &Dialog_Import_CSV::row_separator_func));
m_encoding_combo->set_active(0);
......
......@@ -644,7 +644,7 @@ Glib::RefPtr<Gnome::Gda::Connection> MySQLSelfHosted::connect(const Glib::ustrin
//Wait:
auto mainloop = Glib::MainLoop::create(false);
auto connection_timeout = Glib::signal_timeout().connect(
sigc::bind(sigc::ptr_fun(&on_timeout_delay), sigc::ref(mainloop)),
sigc::bind(sigc::ptr_fun(&on_timeout_delay), std::ref(mainloop)),
1000 /* 1 second */);
mainloop->run();
connection_timeout.disconnect();
......
......@@ -550,7 +550,7 @@ Glib::RefPtr<Gnome::Gda::Connection> PostgresSelfHosted::connect(const Glib::ust
//Wait:
auto mainloop = Glib::MainLoop::create(false);
sigc::connection connection_timeout = Glib::signal_timeout().connect(
sigc::bind(sigc::ptr_fun(&on_timeout_delay), sigc::ref(mainloop)),
sigc::bind(sigc::ptr_fun(&on_timeout_delay), std::ref(mainloop)),
1000 /* 1 second */);
mainloop->run();
connection_timeout.disconnect();
......
......@@ -144,7 +144,7 @@ private:
channel->set_encoding("");
channel->set_buffered(false);
Glib::signal_io().connect(sigc::bind(sigc::mem_fun(*this, &SpawnInfo::on_io), channel, sigc::ref(string)), channel, Glib::IO_IN);
Glib::signal_io().connect(sigc::bind(sigc::mem_fun(*this, &SpawnInfo::on_io), channel, std::ref(string)), channel, Glib::IO_IN);
}
#endif // !G_OS_WIN32
......@@ -327,7 +327,7 @@ static int spawn_sync(const Glib::ustring& command_line, std::string* stdout_tex
auto info = spawn_async(command_line, redirect_flags); //This could throw
info->signal_finished().connect(
sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), sigc::ref(mainloop) ) );
sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), std::ref(mainloop) ) );
// Block until signal_finished is emitted:
mainloop->run();
......@@ -358,7 +358,7 @@ bool execute_command_line_and_wait(const std::string& command, const SlotProgres
auto mainloop = Glib::MainLoop::create(false);
info->signal_finished().connect(
sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), sigc::ref(mainloop) ) );
sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), std::ref(mainloop) ) );
// Pulse two times a second:
sigc::connection timeout_connection = Glib::signal_timeout().connect(
......@@ -403,7 +403,7 @@ bool execute_command_line_and_wait(const std::string& command, const SlotProgres
auto mainloop = Glib::MainLoop::create(false);
info->signal_finished().connect(
sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), sigc::ref(mainloop) ) );
sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), std::ref(mainloop) ) );
// Pulse two times a second:
sigc::connection timeout_connection = Glib::signal_timeout().connect(
......@@ -573,10 +573,10 @@ bool execute_command_line_and_wait_until_second_command_returns_success(const st
auto mainloop = Glib::MainLoop::create(false);
sigc::connection watch_conn = info->signal_finished().connect(
sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), sigc::ref(mainloop) ) );
sigc::bind(sigc::ptr_fun(&on_spawn_info_finished), std::ref(mainloop) ) );
// Call the second command once every second
sigc::connection timeout_conn = Glib::signal_timeout().connect(sigc::bind(sigc::ptr_fun(&second_command_on_timeout), sigc::ref(second_command), sigc::ref(success_text), slot_progress, sigc::ref(mainloop)), 1000);
sigc::connection timeout_conn = Glib::signal_timeout().connect(sigc::bind(sigc::ptr_fun(&second_command_on_timeout), std::ref(second_command), std::ref(success_text), slot_progress, std::ref(mainloop)), 1000);
if(slot_progress)
slot_progress(); //Make sure it is called at least once.
......@@ -599,7 +599,7 @@ bool execute_command_line_and_wait_until_second_command_returns_success(const st
//Sleep for a bit more, because I think that pg_ctl sometimes reports success too early.
auto mainloop = Glib::MainLoop::create(false);
sigc::connection connection_timeout = Glib::signal_timeout().connect(
sigc::bind(sigc::ptr_fun(&on_timeout_delay), sigc::ref(mainloop)),
sigc::bind(sigc::ptr_fun(&on_timeout_delay), std::ref(mainloop)),
8000);
mainloop->run();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment