summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-03-16 22:25:57 +0000
committerCarl Hetherington <cth@carlh.net>2015-03-16 22:25:57 +0000
commit1b0b9e4b951e305d47bb011fc4e198472bb3fecf (patch)
tree715db098b0a716a0ee3d46aa060fecadcffc1766 /src/wx
parentc416bee48d5a5829077c844c5f2b802bf13ab4cd (diff)
Hand-apply 33b76b675d747fd828aba91d9d857227cb8a8244 from master; make sure signals are disconnected in the right places.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/audio_panel.cc4
-rw-r--r--src/wx/audio_panel.h4
-rw-r--r--src/wx/config_dialog.cc4
-rw-r--r--src/wx/content_colour_conversion_dialog.cc4
-rw-r--r--src/wx/content_colour_conversion_dialog.h4
-rw-r--r--src/wx/content_menu.cc4
-rw-r--r--src/wx/content_menu.h4
-rw-r--r--src/wx/hints_dialog.cc6
-rw-r--r--src/wx/hints_dialog.h5
-rw-r--r--src/wx/job_manager_view.cc7
-rw-r--r--src/wx/properties_dialog.cc4
-rw-r--r--src/wx/properties_dialog.h4
-rw-r--r--src/wx/servers_list_dialog.cc4
-rw-r--r--src/wx/servers_list_dialog.h4
14 files changed, 40 insertions, 22 deletions
diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc
index f1d832d86..7a7b4674c 100644
--- a/src/wx/audio_panel.cc
+++ b/src/wx/audio_panel.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -114,7 +114,7 @@ AudioPanel::AudioPanel (ContentPanel* p)
_gain_calculate_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&AudioPanel::gain_calculate_button_clicked, this));
_processor->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&AudioPanel::processor_changed, this));
- _mapping->Changed.connect (boost::bind (&AudioPanel::mapping_changed, this, _1));
+ _mapping_connection = _mapping->Changed.connect (boost::bind (&AudioPanel::mapping_changed, this, _1));
}
diff --git a/src/wx/audio_panel.h b/src/wx/audio_panel.h
index 8003a5bd7..a5bfef4ca 100644
--- a/src/wx/audio_panel.h
+++ b/src/wx/audio_panel.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,4 +55,6 @@ private:
AudioMappingView* _mapping;
wxStaticText* _description;
AudioDialog* _audio_dialog;
+
+ boost::signals2::scoped_connection _mapping_connection;
};
diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc
index 368a94636..c79c21dd1 100644
--- a/src/wx/config_dialog.cc
+++ b/src/wx/config_dialog.cc
@@ -362,7 +362,7 @@ public:
_issuer->SetValue (std_to_wx (config->dcp_issuer ()));
_issuer->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&DefaultsPage::issuer_changed, this));
- config->Changed.connect (boost::bind (&DefaultsPage::config_changed, this));
+ _config_connection = config->Changed.connect (boost::bind (&DefaultsPage::config_changed, this));
return panel;
}
@@ -430,6 +430,8 @@ private:
wxChoice* _container;
wxChoice* _dcp_content_type;
wxTextCtrl* _issuer;
+
+ boost::signals2::scoped_connection _config_connection;
};
class EncodingServersPage : public wxPreferencesPage, public Page
diff --git a/src/wx/content_colour_conversion_dialog.cc b/src/wx/content_colour_conversion_dialog.cc
index 3fa8e120a..500a168f5 100644
--- a/src/wx/content_colour_conversion_dialog.cc
+++ b/src/wx/content_colour_conversion_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -59,7 +59,7 @@ ContentColourConversionDialog::ContentColourConversionDialog (wxWindow* parent)
_preset_check->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&ContentColourConversionDialog::preset_check_clicked, this));
_preset_choice->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&ContentColourConversionDialog::preset_choice_changed, this));
- _editor->Changed.connect (boost::bind (&ContentColourConversionDialog::check_for_preset, this));
+ _editor_connection = _editor->Changed.connect (boost::bind (&ContentColourConversionDialog::check_for_preset, this));
vector<PresetColourConversion> presets = Config::instance()->colour_conversions ();
for (vector<PresetColourConversion>::const_iterator i = presets.begin(); i != presets.end(); ++i) {
diff --git a/src/wx/content_colour_conversion_dialog.h b/src/wx/content_colour_conversion_dialog.h
index e6069f117..57fd5f1e5 100644
--- a/src/wx/content_colour_conversion_dialog.h
+++ b/src/wx/content_colour_conversion_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -38,4 +38,6 @@ private:
wxChoice* _preset_choice;
ColourConversionEditor* _editor;
bool _setting;
+
+ boost::signals2::scoped_connection _editor_connection;
};
diff --git a/src/wx/content_menu.cc b/src/wx/content_menu.cc
index 3bdaf2591..749337b75 100644
--- a/src/wx/content_menu.cc
+++ b/src/wx/content_menu.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -209,7 +209,7 @@ ContentMenu::find_missing ()
shared_ptr<Job> j (new ExamineContentJob (film, content));
- j->Finished.connect (
+ _job_connection = j->Finished.connect (
bind (
&ContentMenu::maybe_found_missing,
this,
diff --git a/src/wx/content_menu.h b/src/wx/content_menu.h
index cd51e86f1..996091f0c 100644
--- a/src/wx/content_menu.h
+++ b/src/wx/content_menu.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -55,6 +55,8 @@ private:
wxMenuItem* _re_examine;
wxMenuItem* _kdm;
wxMenuItem* _remove;
+
+ boost::signals2::scoped_connection _job_connection;
};
#endif
diff --git a/src/wx/hints_dialog.cc b/src/wx/hints_dialog.cc
index b5d5c6971..406bcbf0f 100644
--- a/src/wx/hints_dialog.cc
+++ b/src/wx/hints_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -48,8 +48,8 @@ HintsDialog::HintsDialog (wxWindow* parent, boost::weak_ptr<Film> f)
boost::shared_ptr<Film> film = _film.lock ();
if (film) {
- film->Changed.connect (boost::bind (&HintsDialog::film_changed, this));
- film->ContentChanged.connect (boost::bind (&HintsDialog::film_changed, this));
+ _film_changed_connection = film->Changed.connect (boost::bind (&HintsDialog::film_changed, this));
+ _film_content_changed_connection = film->ContentChanged.connect (boost::bind (&HintsDialog::film_changed, this));
}
film_changed ();
diff --git a/src/wx/hints_dialog.h b/src/wx/hints_dialog.h
index 810791453..88b2fa1ba 100644
--- a/src/wx/hints_dialog.h
+++ b/src/wx/hints_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -33,4 +33,7 @@ private:
boost::weak_ptr<Film> _film;
wxRichTextCtrl* _text;
+
+ boost::signals2::scoped_connection _film_changed_connection;
+ boost::signals2::scoped_connection _film_content_changed_connection;
};
diff --git a/src/wx/job_manager_view.cc b/src/wx/job_manager_view.cc
index 3593d2357..ec58607af 100644
--- a/src/wx/job_manager_view.cc
+++ b/src/wx/job_manager_view.cc
@@ -79,8 +79,8 @@ public:
table->Insert (n, _details, 1, wxALIGN_CENTER_VERTICAL | wxALL, 6);
++n;
- job->Progress.connect (boost::bind (&JobRecord::progress, this));
- job->Finished.connect (boost::bind (&JobRecord::finished, this));
+ _progress_connection = job->Progress.connect (boost::bind (&JobRecord::progress, this));
+ _finished_connection = job->Finished.connect (boost::bind (&JobRecord::finished, this));
table->Layout ();
panel->FitInside ();
@@ -181,6 +181,9 @@ private:
wxButton* _pause;
wxButton* _details;
std::string _last_name;
+
+ boost::signals2::scoped_connection _progress_connection;
+ boost::signals2::scoped_connection _finished_connection;
};
/** Must be called in the GUI thread */
diff --git a/src/wx/properties_dialog.cc b/src/wx/properties_dialog.cc
index 27fc75b1b..d1627edad 100644
--- a/src/wx/properties_dialog.cc
+++ b/src/wx/properties_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -44,7 +44,7 @@ PropertiesDialog::PropertiesDialog (wxWindow* parent, shared_ptr<Film> film)
add (_("Frames already encoded"), true);
_encoded = add (new ThreadedStaticText (this, _("counting..."), boost::bind (&PropertiesDialog::frames_already_encoded, this)));
- _encoded->Finished.connect (boost::bind (&PropertiesDialog::layout, this));
+ _encoded_connection = _encoded->Finished.connect (boost::bind (&PropertiesDialog::layout, this));
_frames->SetLabel (std_to_wx (lexical_cast<string> (_film->length().frames (_film->video_frame_rate ()))));
double const disk = double (_film->required_disk_space()) / 1073741824.0f;
SafeStringStream s;
diff --git a/src/wx/properties_dialog.h b/src/wx/properties_dialog.h
index aeb8927b2..fe814f7ab 100644
--- a/src/wx/properties_dialog.h
+++ b/src/wx/properties_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -35,5 +35,7 @@ private:
wxStaticText* _frames;
wxStaticText* _disk;
ThreadedStaticText* _encoded;
+
+ boost::signals2::scoped_connection _encoded_connection;
};
diff --git a/src/wx/servers_list_dialog.cc b/src/wx/servers_list_dialog.cc
index be69a14ed..299ce2f20 100644
--- a/src/wx/servers_list_dialog.cc
+++ b/src/wx/servers_list_dialog.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -61,7 +61,7 @@ ServersListDialog::ServersListDialog (wxWindow* parent)
s->Layout ();
s->SetSizeHints (this);
- ServerFinder::instance()->connect (boost::bind (&ServersListDialog::server_found, this, _1));
+ _server_finder_connection = ServerFinder::instance()->connect (boost::bind (&ServersListDialog::server_found, this, _1));
}
void
diff --git a/src/wx/servers_list_dialog.h b/src/wx/servers_list_dialog.h
index 27a3c55cb..3804d2a7e 100644
--- a/src/wx/servers_list_dialog.h
+++ b/src/wx/servers_list_dialog.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -31,4 +31,6 @@ private:
std::list<ServerDescription> _servers;
wxListCtrl* _list;
+
+ boost::signals2::scoped_connection _server_finder_connection;
};