Author: martinf
Date: Fri Jan 8 22:51:43 2010
New Revision: 45011
URL:
http://svn.reactos.org/svn/reactos?rev=45011&view=rev
Log:
avoid warning messages on Explorer startup when missing configuration files
Modified:
trunk/reactos/base/shell/explorer/explorer.cpp
trunk/reactos/base/shell/explorer/taskbar/favorites.cpp
Modified: trunk/reactos/base/shell/explorer/explorer.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/explor…
==============================================================================
--- trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/explorer.cpp [iso-8859-1] Fri Jan 8 22:51:43 2010
@@ -94,9 +94,9 @@
_cfg_path.printf(TEXT("%s\\ros-explorer-cfg.xml"), _cfg_dir.c_str());
if (!_cfg.read_file(_cfg_path)) {
- //if (_cfg._last_error != XML_ERROR_NO_ELEMENTS)
- MessageBox(_hwndDesktop, _cfg._errors.str(),
- TEXT("ROS Explorer - reading user settings"), MB_OK);
+ if (!_cfg._errors.empty())
+ MessageBox(_hwndDesktop, _cfg._errors.str(),
+ TEXT("ROS Explorer - reading user settings"), MB_OK);
_cfg.read_file(TEXT("explorer-cfg-template.xml"));
}
Modified: trunk/reactos/base/shell/explorer/taskbar/favorites.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskba…
==============================================================================
--- trunk/reactos/base/shell/explorer/taskbar/favorites.cpp [iso-8859-1] (original)
+++ trunk/reactos/base/shell/explorer/taskbar/favorites.cpp [iso-8859-1] Fri Jan 8
22:51:43 2010
@@ -427,8 +427,9 @@
XMLDoc xbel;
if (!xbel.read_file(path)) {
- MessageBox(g_Globals._hwndDesktop, xbel._errors.str(),
- TEXT("ROS Explorer - reading bookmark file"), MB_OK);
+ if (!xbel._errors.empty())
+ MessageBox(g_Globals._hwndDesktop, xbel._errors.str(),
+ TEXT("ROS Explorer - reading bookmark file"), MB_OK);
}
const_XMLPos pos(&xbel);