summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-10-09 20:20:59 +0100
committerCarl Hetherington <cth@carlh.net>2018-10-09 20:20:59 +0100
commit23f2dc3bfb94930b938281c7f1e5663b761fa508 (patch)
treedd295cd45925133ce186d26bdc47eec6169960e3 /src/tools
parent4042290c541734f529979ed45c19b0623a1d99c2 (diff)
Quell config-save warning when we're only trying to save history.
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/dcpomatic_player.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc
index cc6e294ff..c20c3cbd8 100644
--- a/src/tools/dcpomatic_player.cc
+++ b/src/tools/dcpomatic_player.cc
@@ -137,7 +137,7 @@ public:
SetIcon (wxIcon (std_to_wx ("id")));
#endif
- _config_changed_connection = Config::instance()->Changed.connect (boost::bind (&DOMFrame::config_changed, this));
+ _config_changed_connection = Config::instance()->Changed.connect (boost::bind (&DOMFrame::config_changed, this, _1));
update_from_config ();
Bind (wxEVT_MENU, boost::bind (&DOMFrame::file_open, this), ID_file_open);
@@ -835,19 +835,21 @@ private:
_update_news_requested = false;
}
- void config_changed ()
+ void config_changed (Config::Property prop)
{
/* Instantly save any config changes when using the player GUI */
try {
Config::instance()->write_config();
} catch (FileError& e) {
- error_dialog (
- this,
- wxString::Format(
- _("Could not write to config file at %s. Your changes have not been saved."),
- std_to_wx(e.file().string())
- )
- );
+ if (prop != Config::HISTORY) {
+ error_dialog (
+ this,
+ wxString::Format(
+ _("Could not write to config file at %s. Your changes have not been saved."),
+ std_to_wx(e.file().string())
+ )
+ );
+ }
} catch (exception& e) {
error_dialog (
this,