wordpad: Show page numbers in statusbar for print preview.
This commit is contained in:
parent
2f7053e6c0
commit
bb58537e95
|
@ -245,6 +245,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "Luk"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -247,6 +247,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Ver&größern"
|
||||
STRING_PREVIEW_ZOOMOUT, "Ver&kleinern"
|
||||
STRING_PREVIEW_CLOSE, "&Schließen"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -237,6 +237,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "Close"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
STRING_UNITS_CM, "cm"
|
||||
END
|
||||
|
||||
|
|
|
@ -248,6 +248,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom avant"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom arrière"
|
||||
STRING_PREVIEW_CLOSE, "Fermer"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -245,6 +245,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "Close"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -241,6 +241,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Ingrandisci"
|
||||
STRING_PREVIEW_ZOOMOUT, "Rimpicciolisci"
|
||||
STRING_PREVIEW_CLOSE, "Chiudi"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
STRING_UNITS_CM, "cm"
|
||||
END
|
||||
|
||||
|
|
|
@ -248,6 +248,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "閉じる"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -239,7 +239,9 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "닫기"
|
||||
STRING_UNITS_CM, "cm"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
STRING_UNITS_CM, "cm"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -248,6 +248,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Didinti"
|
||||
STRING_PREVIEW_ZOOMOUT, "Mažinti"
|
||||
STRING_PREVIEW_CLOSE, "Užverti"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -238,6 +238,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "Sluiten"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -247,6 +247,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "Lukk"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -246,6 +246,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "Zamknij"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -249,6 +249,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "Fechar"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -248,6 +248,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Приблизить"
|
||||
STRING_PREVIEW_ZOOMOUT, "Отдалить"
|
||||
STRING_PREVIEW_CLOSE, "Закрыть"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -247,6 +247,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "Zapri"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -247,6 +247,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zooma in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zooma ut"
|
||||
STRING_PREVIEW_CLOSE, "Stäng"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -247,6 +247,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "Close"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -244,6 +244,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Збільшити"
|
||||
STRING_PREVIEW_ZOOMOUT, "Зменшити"
|
||||
STRING_PREVIEW_CLOSE, "Закрити"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
STRING_UNITS_CM, "cm"
|
||||
END
|
||||
|
||||
|
|
|
@ -250,6 +250,8 @@ BEGIN
|
|||
STRING_PREVIEW_ZOOMIN, "Zoom in"
|
||||
STRING_PREVIEW_ZOOMOUT, "Zoom out"
|
||||
STRING_PREVIEW_CLOSE, "关闭"
|
||||
STRING_PREVIEW_PAGE, "Page"
|
||||
STRING_PREVIEW_PAGES, "Pages"
|
||||
END
|
||||
|
||||
STRINGTABLE DISCARDABLE
|
||||
|
|
|
@ -942,6 +942,27 @@ LRESULT print_preview(HWND hwndPreview)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void update_preview_statusbar(HWND hMainWnd)
|
||||
{
|
||||
HWND hStatusbar = GetDlgItem(hMainWnd, IDC_STATUSBAR);
|
||||
HINSTANCE hInst = GetModuleHandleW(0);
|
||||
WCHAR *p;
|
||||
WCHAR wstr[MAX_STRING_LEN];
|
||||
|
||||
p = wstr;
|
||||
if (preview.pages_shown < 2 || is_last_preview_page(preview.page))
|
||||
{
|
||||
static const WCHAR fmt[] = {' ','%','d','\0'};
|
||||
p += LoadStringW(hInst, STRING_PREVIEW_PAGE, wstr, MAX_STRING_LEN);
|
||||
wsprintfW(p, fmt, preview.page);
|
||||
} else {
|
||||
static const WCHAR fmt[] = {' ','%','d','-','%','d','\0'};
|
||||
p += LoadStringW(hInst, STRING_PREVIEW_PAGES, wstr, MAX_STRING_LEN);
|
||||
wsprintfW(p, fmt, preview.page, preview.page + 1);
|
||||
}
|
||||
SetWindowTextW(hStatusbar, wstr);
|
||||
}
|
||||
|
||||
/* Update for page changes. */
|
||||
static void update_preview(HWND hMainWnd)
|
||||
{
|
||||
|
@ -995,6 +1016,7 @@ static void update_preview(HWND hMainWnd)
|
|||
|
||||
update_scaled_preview(hMainWnd);
|
||||
update_preview_buttons(hMainWnd);
|
||||
update_preview_statusbar(hMainWnd);
|
||||
}
|
||||
|
||||
static void toggle_num_pages(HWND hMainWnd)
|
||||
|
|
|
@ -2117,7 +2117,7 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
|
|||
{
|
||||
int index = reg_formatindex(fileFormat);
|
||||
DWORD tmp = barState[index];
|
||||
barState[index] = 0;
|
||||
barState[index] = 1 << BANDID_STATUSBAR;
|
||||
set_bar_states();
|
||||
barState[index] = tmp;
|
||||
ShowWindow(hEditorWnd, FALSE);
|
||||
|
|
|
@ -218,8 +218,10 @@
|
|||
#define STRING_PREVIEW_ZOOMIN 1453
|
||||
#define STRING_PREVIEW_ZOOMOUT 1454
|
||||
#define STRING_PREVIEW_CLOSE 1455
|
||||
#define STRING_PREVIEW_PAGE 1456
|
||||
#define STRING_PREVIEW_PAGES 1457
|
||||
|
||||
#define STRING_UNITS_CM 1456
|
||||
#define STRING_UNITS_CM 1458
|
||||
|
||||
#define STRING_DEFAULT_FILENAME 1700
|
||||
#define STRING_PROMPT_SAVE_CHANGES 1701
|
||||
|
|
Loading…
Reference in New Issue