Skip to content

Commit

Permalink
mainwindow: Use pattern filters for webm files on Windows
Browse files Browse the repository at this point in the history
Windows 7? doesn't know what a webm file is apparently.
  • Loading branch information
ahodesuka committed Oct 15, 2018
1 parent dfc9745 commit 3abe953
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,11 @@ void MainWindow::create_actions()
filter.add_pattern("*." + ext);

#ifdef HAVE_GSTREAMER
#ifdef _WIN32
filter.add_pattern("*.webm");
#else
filter.add_mime_type("video/webm");
#endif // _WIN32
#endif // HAVE_GSTREAMER

m_RecentAction->add_filter(filter);
Expand Down Expand Up @@ -909,8 +913,13 @@ void MainWindow::on_open_file_dialog()
imageFilter.add_pixbuf_formats();

#ifdef HAVE_GSTREAMER
#ifdef _WIN32
filter.add_pattern("*.webm");
imageFilter.add_pattern("*.webm");
#else
filter.add_mime_type("video/webm");
imageFilter.add_mime_type("video/webm");
#endif // _WIN32
#endif // HAVE_GSTREAMER

for (const std::string &mimeType : Archive::MimeTypes)
Expand Down

0 comments on commit 3abe953

Please sign in to comment.