GTK: make the file filter hack more robust.

pull/4/head
whitequark 2016-03-25 11:08:04 +00:00
parent fb0aee91ea
commit 6f67ec2d48
1 changed files with 1 additions and 1 deletions

View File

@ -1114,7 +1114,7 @@ static void ChooserFilterChanged(Gtk::FileChooserDialog *chooser)
any way to list the patterns, so we extract it from the filter name.
Gross. */
std::string filter_name = chooser->get_filter()->get_name();
int lparen = filter_name.find('(') + 1;
int lparen = filter_name.rfind('(') + 1;
int rdelim = filter_name.find(',', lparen);
if(rdelim < 0)
rdelim = filter_name.find(')', lparen);