summaryrefslogtreecommitdiff
path: root/platform/x11/win_main.c
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-04-13 13:28:50 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-04-13 14:13:31 +0200
commit10f857c559c30b55b90b30b8f09fd1fac3ce5fd2 (patch)
treee7092ed81d827c57e6721d78e706f6b48ba163b6 /platform/x11/win_main.c
parent241d200228e3b7cf3d5300626158833516b90a94 (diff)
downloadmupdf-10f857c559c30b55b90b30b8f09fd1fac3ce5fd2.tar.xz
Register .fb2 extension in windows viewer.
Diffstat (limited to 'platform/x11/win_main.c')
-rw-r--r--platform/x11/win_main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/platform/x11/win_main.c b/platform/x11/win_main.c
index 05c934fe..ae2801dd 100644
--- a/platform/x11/win_main.c
+++ b/platform/x11/win_main.c
@@ -53,9 +53,9 @@ static char filename[PATH_MAX];
void install_app(char *argv0)
{
char buf[512];
- HKEY software, classes, mupdf, dotpdf, dotxps, dotepub;
+ HKEY software, classes, mupdf, dotpdf, dotxps, dotepub, dotfb2;
HKEY shell, open, command, supported_types;
- HKEY pdf_progids, xps_progids, epub_progids;
+ HKEY pdf_progids, xps_progids, epub_progids, fb2_progids;
OPEN_KEY(HKEY_CURRENT_USER, "Software", software);
OPEN_KEY(software, "Classes", classes);
@@ -65,6 +65,8 @@ void install_app(char *argv0)
OPEN_KEY(dotxps, "OpenWithProgids", xps_progids);
OPEN_KEY(classes, ".epub", dotepub);
OPEN_KEY(dotepub, "OpenWithProgids", epub_progids);
+ OPEN_KEY(classes, ".fb2", dotfb2);
+ OPEN_KEY(dotfb2, "OpenWithProgids", fb2_progids);
OPEN_KEY(classes, "MuPDF", mupdf);
OPEN_KEY(mupdf, "SupportedTypes", supported_types);
OPEN_KEY(mupdf, "shell", shell);
@@ -81,7 +83,9 @@ void install_app(char *argv0)
SET_KEY(pdf_progids, "MuPDF", "");
SET_KEY(xps_progids, "MuPDF", "");
SET_KEY(epub_progids, "MuPDF", "");
+ SET_KEY(fb2_progids, "MuPDF", "");
+ RegCloseKey(dotfb2);
RegCloseKey(dotepub);
RegCloseKey(dotxps);
RegCloseKey(dotpdf);
@@ -187,7 +191,7 @@ int winfilename(wchar_t *buf, int len)
ofn.nMaxFile = len;
ofn.lpstrInitialDir = NULL;
ofn.lpstrTitle = L"MuPDF: Open PDF file";
- ofn.lpstrFilter = L"Documents (*.pdf;*.xps;*.cbz;*.epub;*.zip;*.png;*.jpeg;*.tiff)\0*.zip;*.cbz;*.xps;*.epub;*.pdf;*.jpe;*.jpg;*.jpeg;*.jfif;*.tif;*.tiff\0PDF Files (*.pdf)\0*.pdf\0XPS Files (*.xps)\0*.xps\0CBZ Files (*.cbz;*.zip)\0*.zip;*.cbz\0EPUB Files (*.epub)\0*.epub\0Image Files (*.png;*.jpeg;*.tiff)\0*.png;*.jpg;*.jpe;*.jpeg;*.jfif;*.tif;*.tiff\0All Files\0*\0\0";
+ ofn.lpstrFilter = L"Documents (*.pdf;*.xps;*.cbz;*.epub;*.fb2;*.zip;*.png;*.jpeg;*.tiff)\0*.zip;*.cbz;*.xps;*.epub;*.fb2;*.pdf;*.jpe;*.jpg;*.jpeg;*.jfif;*.tif;*.tiff\0PDF Files (*.pdf)\0*.pdf\0XPS Files (*.xps)\0*.xps\0CBZ Files (*.cbz;*.zip)\0*.zip;*.cbz\0EPUB Files (*.epub)\0*.epub\0FictionBook 2 Files (*.fb2)\0*.fb2\0Image Files (*.png;*.jpeg;*.tiff)\0*.png;*.jpg;*.jpe;*.jpeg;*.jfif;*.tif;*.tiff\0All Files\0*\0\0";
ofn.Flags = OFN_FILEMUSTEXIST|OFN_HIDEREADONLY;
return GetOpenFileNameW(&ofn);
}