summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
authorsergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-19 18:23:20 +0000
committersergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-19 18:23:20 +0000
commitc93a4c15da177442be707e7b024525a87cddbc09 (patch)
tree4d89b3f70c2a836d2d2101fe13b668d52982e61b /chrome/browser/ui
parent248c1383f0b434c61bbbaefe0137c3172076041e (diff)
downloadchromium_src-c93a4c15da177442be707e7b024525a87cddbc09.zip
chromium_src-c93a4c15da177442be707e7b024525a87cddbc09.tar.gz
chromium_src-c93a4c15da177442be707e7b024525a87cddbc09.tar.bz2
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
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/gtk/dialogs_gtk.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/browser/ui/gtk/dialogs_gtk.cc b/chrome/browser/ui/gtk/dialogs_gtk.cc
index 5b978ca..287116a 100644
--- a/chrome/browser/ui/gtk/dialogs_gtk.cc
+++ b/chrome/browser/ui/gtk/dialogs_gtk.cc
@@ -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());
}