Merge branch 'hotfixes-1.0.1' into develop

Conflicts:
	.gitignore
	include/nana/deploy.hpp
	source/deploy.cpp
	source/gui/widgets/listbox.cpp
This commit is contained in:
Jinhao
2015-05-03 03:08:26 +08:00
81 changed files with 2639 additions and 1737 deletions

View File

@@ -973,6 +973,7 @@ namespace nana
const nana::char_t * filter;
nana::string filter_holder;
nana::string default_extension;
if(impl_->filters.size())
{
for(auto & f : impl_->filters)
@@ -990,6 +991,21 @@ namespace nana
}
filter_holder += fs;
filter_holder += static_cast<nana::string::value_type>('\0');
//Get the default file extentsion
if (default_extension.empty())
{
pos = fs.find_last_of('.');
if (pos != fs.npos)
{
fs = fs.substr(pos + 1);
if (fs != L"*")
{
default_extension = fs;
ofn.lpstrDefExt = default_extension.data();
}
}
}
}
filter = filter_holder.data();
}
@@ -1002,6 +1018,10 @@ namespace nana
ofn.lpstrFileTitle = nullptr;
ofn.nMaxFileTitle = 0;
ofn.lpstrInitialDir = (impl_->path.size() ? impl_->path.c_str() : nullptr);
if (!impl_->open_or_save)
ofn.Flags = OFN_OVERWRITEPROMPT; //Overwrite prompt if it is save mode
if(FALSE == (impl_->open_or_save ? ::GetOpenFileName(&ofn) : ::GetSaveFileName(&ofn)))
return false;