diff --git a/livesupport/src/modules/core/include/LiveSupport/Core/OptionsContainer.h b/livesupport/src/modules/core/include/LiveSupport/Core/OptionsContainer.h index 5c80760cd..bfd3268e6 100644 --- a/livesupport/src/modules/core/include/LiveSupport/Core/OptionsContainer.h +++ b/livesupport/src/modules/core/include/LiveSupport/Core/OptionsContainer.h @@ -97,9 +97,9 @@ class OptionsContainer Ptr::Ref configFileName; /** - * Remember if we have been changed. + * Remember if we have been touched. */ - bool changed; + bool touched; /** * Default constructor. @@ -172,17 +172,17 @@ class OptionsContainer throw (); /** - * Report if the object has been changed. + * Report if the object has been touched. * * It returns true if there has been any calls to setOptionItem() * since its construction or the last call to writeToFile(). * - * @return whether the options have been changed + * @return whether the options have been touched */ bool - isChanged(void) throw () + isTouched(void) throw () { - return changed; + return touched; } /** diff --git a/livesupport/src/modules/core/src/OptionsContainer.cxx b/livesupport/src/modules/core/src/OptionsContainer.cxx index ec00ccfbe..470082b82 100644 --- a/livesupport/src/modules/core/src/OptionsContainer.cxx +++ b/livesupport/src/modules/core/src/OptionsContainer.cxx @@ -61,7 +61,7 @@ OptionsContainer :: OptionsContainer( Ptr::Ref configFileName) throw () : configFileName(configFileName), - changed(false) + touched(false) { optionsDocument.create_root_node_by_import(&optionsElement, true); // true == recursive @@ -83,14 +83,14 @@ OptionsContainer :: setOptionItem(OptionItemString optionItem, xmlpp::Attribute * attr = dynamic_cast(targetNode); if (attr != 0) { attr->set_value(*value); - changed = true; + touched = true; return; } } else { xmlpp::TextNode * text = dynamic_cast(targetNode); if (text != 0) { text->set_content(*value); - changed = true; + touched = true; return; } } @@ -147,7 +147,7 @@ OptionsContainer :: setKeyboardShortcutItem( xmlpp::Attribute * attr = dynamic_cast(targetNode); if (attr != 0) { attr->set_value(*value); - changed = true; + touched = true; return; } else { @@ -274,7 +274,7 @@ OptionsContainer :: writeToFile(void) throw () std::ofstream file(configFileName->c_str()); if (file.good()) { optionsDocument.write_to_stream_formatted(file, "utf-8"); - changed = false; + touched = false; } file.close(); } diff --git a/livesupport/src/products/gLiveSupport/src/GLiveSupport.cxx b/livesupport/src/products/gLiveSupport/src/GLiveSupport.cxx index 89b89224d..0b9d92ab7 100644 --- a/livesupport/src/products/gLiveSupport/src/GLiveSupport.cxx +++ b/livesupport/src/products/gLiveSupport/src/GLiveSupport.cxx @@ -570,7 +570,7 @@ GLiveSupport :: logout(void) throw () authentication->logout(sessionId); sessionId.reset(); - if (optionsContainer->isChanged()) { + if (optionsContainer->isTouched()) { optionsContainer->writeToFile(); } diff --git a/livesupport/src/products/gLiveSupport/src/OptionsWindow.cxx b/livesupport/src/products/gLiveSupport/src/OptionsWindow.cxx index 653e8b193..da341c122 100644 --- a/livesupport/src/products/gLiveSupport/src/OptionsWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/OptionsWindow.cxx @@ -75,8 +75,6 @@ OptionsWindow :: OptionsWindow (Ptr::Ref gLiveSupport, LocalizedObject(bundle), gLiveSupport(gLiveSupport) { - isChanged = false; - Ptr::Ref wf = WidgetFactory::getInstance(); try { diff --git a/livesupport/src/products/gLiveSupport/src/OptionsWindow.h b/livesupport/src/products/gLiveSupport/src/OptionsWindow.h index 5826f6c8a..4f0a325a8 100644 --- a/livesupport/src/products/gLiveSupport/src/OptionsWindow.h +++ b/livesupport/src/products/gLiveSupport/src/OptionsWindow.h @@ -137,11 +137,6 @@ class OptionsWindow : public WhiteWindow, public LocalizedObject */ Ptr::Ref gLiveSupport; - /** - * Signals if any changes have been made. - */ - bool isChanged; - /** * Create a new user entry field item. *