Use get_layer_descriptions() to format the layer list rather than including a copy...
[synfig.git] / synfig-studio / trunk / src / synfigapp / settings.cpp
index 73d927f..43fcb8f 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2007 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -34,6 +35,8 @@
 #include "settings.h"
 #include <synfig/general.h>
 
+#include "general.h"
+
 #endif
 
 /* === U S I N G =========================================================== */
@@ -194,7 +197,8 @@ Settings::save_to_file(const synfig::String& filename)const
                        for(iter=key_list.begin();iter!=key_list.end();++iter)
                        {
                                if(!file)return false;
-                               file<<*iter<<'='<<get_value(*iter)<<endl;
+                               String ret = get_value(*iter);
+                               if (ret != String()) file<<*iter<<'='<<ret<<endl;
                        }
                }
 
@@ -245,7 +249,7 @@ Settings::load_from_file(const synfig::String& filename)
                        }
                        catch(...)
                        {
-                               synfig::error("Settings::load_from_file(): Attept to set key \"%s\" with a value of \"%s\" has thrown an exception.",key.c_str(),value.c_str());
+                               synfig::error("Settings::load_from_file(): Attempt to set key \"%s\" with a value of \"%s\" has thrown an exception.",key.c_str(),value.c_str());
                                throw;
                        }
                }