mirror of
https://github.com/transmission/transmission.git
synced 2025-12-19 18:08:31 +00:00
This reverts commit 27fbfd8da6.
Fixes #3088.
This commit is contained in:
@@ -813,8 +813,8 @@ Session::Session(tr_session* session)
|
||||
Session::~Session() = default;
|
||||
|
||||
Session::Impl::Impl(Session& core, tr_session* session)
|
||||
: core_{ core }
|
||||
, session_{ session }
|
||||
: core_(core)
|
||||
, session_(session)
|
||||
{
|
||||
raw_model_ = Gtk::ListStore::create(torrent_cols);
|
||||
sorted_model_ = Gtk::TreeModelSort::create(raw_model_);
|
||||
@@ -828,16 +828,6 @@ Session::Impl::Impl(Session& core, tr_session* session)
|
||||
on_pref_changed(TR_KEY_peer_limit_global);
|
||||
on_pref_changed(TR_KEY_inhibit_desktop_hibernation);
|
||||
signal_prefs_changed.connect([this](auto key) { on_pref_changed(key); });
|
||||
|
||||
tr_sessionSetMetadataCallback(
|
||||
session_,
|
||||
[](auto* tor2, gpointer impl) { static_cast<Impl*>(impl)->on_torrent_metadata_changed(tor2); },
|
||||
this);
|
||||
tr_sessionSetCompletenessCallback(
|
||||
session_,
|
||||
[](auto* tor2, auto completeness, bool was_running, gpointer impl)
|
||||
{ static_cast<Impl*>(impl)->on_torrent_completeness_changed(tor2, completeness, was_running); },
|
||||
this);
|
||||
}
|
||||
|
||||
tr_session* Session::close()
|
||||
@@ -996,6 +986,16 @@ void Session::Impl::add_torrent(tr_torrent* tor, bool do_notify)
|
||||
{
|
||||
gtr_notify_torrent_added(get_core_ptr(), tr_torrentId(tor));
|
||||
}
|
||||
|
||||
tr_torrentSetMetadataCallback(
|
||||
tor,
|
||||
[](auto* tor2, gpointer impl) { static_cast<Impl*>(impl)->on_torrent_metadata_changed(tor2); },
|
||||
this);
|
||||
tr_torrentSetCompletenessCallback(
|
||||
tor,
|
||||
[](auto* tor2, auto completeness, bool was_running, gpointer impl)
|
||||
{ static_cast<Impl*>(impl)->on_torrent_completeness_changed(tor2, completeness, was_running); },
|
||||
this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user