A few KDM dialog fixes.
[dcpomatic.git] / src / wx / kdm_dialog.cc
index 1f4d62bde1f90a03d9b2819369c6f69e3454edab..295287f42a13f323478655f8ac33034a76b25000 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
@@ -263,8 +263,6 @@ KDMDialog::add_cinema_clicked ()
        Config::instance()->add_cinema (c);
        add_cinema (c);
 
-       Config::instance()->write ();
-       
        d->Destroy ();
 }
 
@@ -284,7 +282,7 @@ KDMDialog::edit_cinema_clicked ()
        c.second->email = d->email ();
        _targets->SetItemText (c.first, std_to_wx (d->name()));
 
-       Config::instance()->write ();
+       Config::instance()->changed ();
 
        d->Destroy ();  
 }
@@ -300,8 +298,6 @@ KDMDialog::remove_cinema_clicked ()
 
        Config::instance()->remove_cinema (c.second);
        _targets->Delete (c.first);
-
-       Config::instance()->write ();   
 }
 
 void
@@ -322,7 +318,7 @@ KDMDialog::add_screen_clicked ()
        c->add_screen (s);
        add_screen (c, s);
 
-       Config::instance()->write ();
+       Config::instance()->changed ();
 
        d->Destroy ();
 }
@@ -343,7 +339,7 @@ KDMDialog::edit_screen_clicked ()
        s.second->certificate = d->certificate ();
        _targets->SetItemText (s.first, std_to_wx (d->name()));
 
-       Config::instance()->write ();
+       Config::instance()->changed ();
 
        d->Destroy ();
 }
@@ -370,7 +366,7 @@ KDMDialog::remove_screen_clicked ()
        i->second->remove_screen (s.second);
        _targets->Delete (s.first);
 
-       Config::instance()->write ();
+       Config::instance()->changed ();
 }
 
 list<shared_ptr<Screen> >