Commit c93a4c15 authored by sergeyu@chromium.org's avatar sergeyu@chromium.org

Pass correct dummy filename ("name.html" instead of "name./html") to GTK MIME...

Pass correct dummy filename ("name.html" instead of "name./html") to GTK MIME lookup, to fix the file-filter drop-down in GTK file dialogs.

BUG=none
TEST=manual

Review URL: http://codereview.chromium.org/6379001

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71812 0039d316-1c4b-4281-b951-d872f2087c98
parent 248c1383
......@@ -266,7 +266,7 @@ void SelectFileDialogImpl::AddFilters(GtkFileChooser* chooser) {
if (!filter)
filter = gtk_file_filter_new();
std::string mime_type = mime_util::GetFileMimeType(
FilePath("name.").Append(file_types_.extensions[i][j]));
FilePath("name").ReplaceExtension(file_types_.extensions[i][j]));
gtk_file_filter_add_mime_type(filter, mime_type.c_str());
}
}
......@@ -283,7 +283,7 @@ void SelectFileDialogImpl::AddFilters(GtkFileChooser* chooser) {
// There is no system default filter description so we use
// the MIME type itself if the description is blank.
std::string mime_type = mime_util::GetFileMimeType(
FilePath("name.").Append(file_types_.extensions[i][0]));
FilePath("name").ReplaceExtension(file_types_.extensions[i][0]));
gtk_file_filter_set_name(filter, mime_type.c_str());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment