summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/win_main.c101
-rw-r--r--apps/win_res.rc36
-rw-r--r--win32/libmupdf.vcproj16
3 files changed, 10 insertions, 143 deletions
diff --git a/apps/win_main.c b/apps/win_main.c
index fcfd5020..c421fac7 100644
--- a/apps/win_main.c
+++ b/apps/win_main.c
@@ -20,7 +20,6 @@
#endif
#define ID_ABOUT 0x1000
-#define ID_DOCINFO 0x1001
static HWND hwndframe = NULL;
static HWND hwndview = NULL;
@@ -166,100 +165,6 @@ char *winpassword(pdfapp_t *app, char *filename)
}
INT CALLBACK
-dloginfoproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
-{
- char buf[256];
- pdf_document *doc = gapp.pdf;
- fz_obj *info, *obj;
-
- switch(message)
- {
- case WM_INITDIALOG:
-
- SetDlgItemTextW(hwnd, 0x10, wbuf);
-
- if (!doc)
- {
- SetDlgItemTextA(hwnd, 0x11, "XPS");
- SetDlgItemTextA(hwnd, 0x12, "None");
- SetDlgItemTextA(hwnd, 0x13, "n/a");
- return TRUE;
- }
-
- sprintf(buf, "PDF %d.%d", doc->version / 10, doc->version % 10);
- SetDlgItemTextA(hwnd, 0x11, buf);
-
- if (doc->crypt)
- {
- sprintf(buf, "Standard V%d %d-bit %s", pdf_get_crypt_revision(doc),
- pdf_get_crypt_length(doc), pdf_get_crypt_method(doc));
- SetDlgItemTextA(hwnd, 0x12, buf);
- strcpy(buf, "");
- if (pdf_has_permission(doc, PDF_PERM_PRINT))
- strcat(buf, "print, ");
- if (pdf_has_permission(doc, PDF_PERM_CHANGE))
- strcat(buf, "modify, ");
- if (pdf_has_permission(doc, PDF_PERM_COPY))
- strcat(buf, "copy, ");
- if (pdf_has_permission(doc, PDF_PERM_NOTES))
- strcat(buf, "annotate, ");
- if (strlen(buf) > 2)
- buf[strlen(buf)-2] = 0;
- else
- strcpy(buf, "none");
- SetDlgItemTextA(hwnd, 0x13, buf);
- }
- else
- {
- SetDlgItemTextA(hwnd, 0x12, "None");
- SetDlgItemTextA(hwnd, 0x13, "n/a");
- }
-
- info = fz_dict_gets(doc->trailer, "Info");
- if (!info)
- return TRUE;
-
-#define SETUCS(ID) \
- { \
- unsigned short *ucs; \
- ucs = pdf_to_ucs2(doc->ctx, obj); \
- SetDlgItemTextW(hwnd, ID, ucs); \
- fz_free(context, ucs); \
- }
-
- if ((obj = fz_dict_gets(info, "Title")))
- SETUCS(0x20);
- if ((obj = fz_dict_gets(info, "Author")))
- SETUCS(0x21);
- if ((obj = fz_dict_gets(info, "Subject")))
- SETUCS(0x22);
- if ((obj = fz_dict_gets(info, "Keywords")))
- SETUCS(0x23);
- if ((obj = fz_dict_gets(info, "Creator")))
- SETUCS(0x24);
- if ((obj = fz_dict_gets(info, "Producer")))
- SETUCS(0x25);
- if ((obj = fz_dict_gets(info, "CreationDate")))
- SETUCS(0x26);
- if ((obj = fz_dict_gets(info, "ModDate")))
- SETUCS(0x27);
- return TRUE;
-
- case WM_COMMAND:
- EndDialog(hwnd, 1);
- return TRUE;
- }
- return FALSE;
-}
-
-void info()
-{
- int code = DialogBoxW(NULL, L"IDD_DLOGINFO", hwndframe, dloginfoproc);
- if (code <= 0)
- winerror(&gapp, "cannot create info dialog");
-}
-
-INT CALLBACK
dlogaboutproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
@@ -382,7 +287,6 @@ void winopen()
menu = GetSystemMenu(hwndframe, 0);
AppendMenuW(menu, MF_SEPARATOR, 0, NULL);
AppendMenuW(menu, MF_STRING, ID_ABOUT, L"About MuPDF...");
- AppendMenuW(menu, MF_STRING, ID_DOCINFO, L"Document Properties...");
SetCursor(arrowcurs);
}
@@ -692,11 +596,6 @@ frameproc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
winhelp(&gapp);
return 0;
}
- if (wParam == ID_DOCINFO)
- {
- info();
- return 0;
- }
if (wParam == SC_MAXIMIZE)
gapp.shrinkwrap = 0;
break;
diff --git a/apps/win_res.rc b/apps/win_res.rc
index 23faa9e2..e57d20e3 100644
--- a/apps/win_res.rc
+++ b/apps/win_res.rc
@@ -13,42 +13,6 @@ BEGIN
LTEXT "Password:", 5, 17, 22, 40, 10, 0x00000
END
-IDD_DLOGINFO DIALOG 50, 50, 300, 145
-STYLE 128 | 0x80000000
-CAPTION " Document Properties "
-FONT 8, "MS Shell Dlg"
-BEGIN
- DEFPUSHBUTTON "Okay", 1, 300-10-50, 145-7-14, 50, 14, 0x50010001
-
- LTEXT "File:", -1, 10, 10, 50, 10, 0
- LTEXT "Format:", -1, 10, 20, 50, 10, 0
- LTEXT "Encryption:", -1, 10, 30, 50, 10, 0
- LTEXT "Permissions:", -1, 10, 40, 50, 10, 0
-
- LTEXT "<file", 0x10, 60, 10, 230, 10, 0
- LTEXT "<version", 0x11, 60, 20, 230, 10, 0
- LTEXT "<encryption", 0x12, 60, 30, 230, 10, 0
- LTEXT "<permissions", 0x13, 60, 40, 230, 10, 0
-
- LTEXT "Title:", -1, 10, 55, 50, 10, 0
- LTEXT "Author:", -1, 10, 65, 50, 10, 0
- LTEXT "Subject:", -1, 10, 75, 50, 10, 0
- LTEXT "Keywords:", -1, 10, 85, 50, 10, 0
- LTEXT "Creator:", -1, 10, 95, 50, 10, 0
- LTEXT "Producer:", -1, 10, 105, 50, 10, 0
- LTEXT "Created:", -1, 10, 115, 50, 10, 0
- LTEXT "Modified:", -1, 10, 125, 50, 10, 0
-
- LTEXT "", 0x20, 60, 55, 230, 10, 0
- LTEXT "", 0x21, 60, 65, 230, 10, 0
- LTEXT "", 0x22, 60, 75, 230, 10, 0
- LTEXT "", 0x23, 60, 85, 230, 10, 0
- LTEXT "", 0x24, 60, 95, 230, 10, 0
- LTEXT "", 0x25, 60, 105, 230, 10, 0
- LTEXT "", 0x26, 60, 115, 100, 10, 0
- LTEXT "", 0x27, 60, 125, 100, 10, 0
-END
-
IDD_DLOGABOUT DIALOG 50, 50, 200, 220
STYLE 128 | 0x80000000
CAPTION " About MuPDF "
diff --git a/win32/libmupdf.vcproj b/win32/libmupdf.vcproj
index b34426c0..67b91df2 100644
--- a/win32/libmupdf.vcproj
+++ b/win32/libmupdf.vcproj
@@ -355,10 +355,6 @@
>
</File>
<File
- RelativePath="..\fitz\base_link.c"
- >
- </File>
- <File
RelativePath="..\fitz\base_memory.c"
>
</File>
@@ -411,6 +407,14 @@
>
</File>
<File
+ RelativePath="..\fitz\doc_document.c"
+ >
+ </File>
+ <File
+ RelativePath="..\fitz\doc_link.c"
+ >
+ </File>
+ <File
RelativePath="..\fitz\doc_outline.c"
>
</File>
@@ -627,11 +631,11 @@
Name="cbz"
>
<File
- RelativePath="..\cbz\mucbz.h"
+ RelativePath="..\cbz\mucbz.c"
>
</File>
<File
- RelativePath="..\cbz\mucbz.c"
+ RelativePath="..\cbz\mucbz.h"
>
</File>
</Filter>