Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2de3d95e
Commit
2de3d95e
authored
Jun 06, 2007
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Jun 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wordpad: Allow toggling of statusbar.
parent
10b34839
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
38 additions
and
6 deletions
+38
-6
De.rc
programs/wordpad/De.rc
+1
-0
En.rc
programs/wordpad/En.rc
+1
-0
Fr.rc
programs/wordpad/Fr.rc
+1
-0
Hu.rc
programs/wordpad/Hu.rc
+1
-0
Ko.rc
programs/wordpad/Ko.rc
+1
-0
Nl.rc
programs/wordpad/Nl.rc
+1
-0
No.rc
programs/wordpad/No.rc
+1
-0
Pl.rc
programs/wordpad/Pl.rc
+1
-0
Ru.rc
programs/wordpad/Ru.rc
+1
-0
Tr.rc
programs/wordpad/Tr.rc
+1
-0
resource.h
programs/wordpad/resource.h
+1
-0
wordpad.c
programs/wordpad/wordpad.c
+27
-6
No files found.
programs/wordpad/De.rc
View file @
2de3d95e
...
...
@@ -55,6 +55,7 @@ BEGIN
POPUP "&View"
BEGIN
MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "F&ormat"
BEGIN
...
...
programs/wordpad/En.rc
View file @
2de3d95e
...
...
@@ -55,6 +55,7 @@ BEGIN
POPUP "&View"
BEGIN
MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "F&ormat"
BEGIN
...
...
programs/wordpad/Fr.rc
View file @
2de3d95e
...
...
@@ -55,6 +55,7 @@ BEGIN
POPUP "&View"
BEGIN
MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "Forma&t"
BEGIN
...
...
programs/wordpad/Hu.rc
View file @
2de3d95e
...
...
@@ -55,6 +55,7 @@ BEGIN
POPUP "&View"
BEGIN
MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "F&ormtum"
BEGIN
...
...
programs/wordpad/Ko.rc
View file @
2de3d95e
...
...
@@ -56,6 +56,7 @@ BEGIN
POPUP "&View"
BEGIN
MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "형식(&O)"
BEGIN
...
...
programs/wordpad/Nl.rc
View file @
2de3d95e
...
...
@@ -55,6 +55,7 @@ BEGIN
POPUP "&View"
BEGIN
MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&Opmaak"
BEGIN
...
...
programs/wordpad/No.rc
View file @
2de3d95e
...
...
@@ -55,6 +55,7 @@ BEGIN
POPUP "&Vis"
BEGIN
MENUITEM "Verk&tylinje", ID_TOGGLE_TOOLBAR
MENUITEM "&Statuslinje", ID_TOGGLE_STATUSBAR
END
POPUP "F&ormat"
BEGIN
...
...
programs/wordpad/Pl.rc
View file @
2de3d95e
...
...
@@ -56,6 +56,7 @@ BEGIN
POPUP "&View"
BEGIN
MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "F&ormat"
BEGIN
...
...
programs/wordpad/Ru.rc
View file @
2de3d95e
...
...
@@ -53,6 +53,7 @@ BEGIN
POPUP "&View"
BEGIN
MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&"
BEGIN
...
...
programs/wordpad/Tr.rc
View file @
2de3d95e
...
...
@@ -57,6 +57,7 @@ BEGIN
POPUP "&View"
BEGIN
MENUITEM "&Toolbar", ID_TOGGLE_TOOLBAR
MENUITEM "&Statusbar", ID_TOGGLE_STATUSBAR
END
POPUP "&Biim"
BEGIN
...
...
programs/wordpad/resource.h
View file @
2de3d95e
...
...
@@ -54,6 +54,7 @@
#define ID_FORMAT_UNDERLINE 1402
#define ID_TOGGLE_TOOLBAR 1500
#define ID_TOGGLE_STATUSBAR 1501
#define BANDID_TOOLBAR 0
...
...
programs/wordpad/wordpad.c
View file @
2de3d95e
...
...
@@ -326,11 +326,19 @@ static void DoDefaultFont(void)
SendMessage
(
hEditorWnd
,
EM_SETCHARFORMAT
,
SCF_DEFAULT
,
(
LPARAM
)
&
fmt
);
}
static
void
update_window
(
void
)
{
RECT
rect
;
GetWindowRect
(
hMainWnd
,
&
rect
);
(
void
)
OnSize
(
hMainWnd
,
SIZE_RESTORED
,
MAKELONG
(
rect
.
bottom
,
rect
.
right
));
}
static
void
toggle_toolbar
(
int
bandId
)
{
HWND
hwndReBar
=
GetDlgItem
(
hMainWnd
,
IDC_REBAR
);
REBARBANDINFOW
rbbinfo
;
RECT
rect
;
if
(
!
hwndReBar
)
return
;
...
...
@@ -342,9 +350,7 @@ static void toggle_toolbar(int bandId)
SendMessageW
(
hwndReBar
,
RB_SHOWBAND
,
bandId
,
(
rbbinfo
.
fStyle
&
RBBS_HIDDEN
));
GetWindowRect
(
hMainWnd
,
&
rect
);
(
void
)
OnSize
(
hMainWnd
,
SIZE_RESTORED
,
MAKELONG
(
rect
.
bottom
,
rect
.
right
));
update_window
();
}
static
int
rebar_height
(
void
)
...
...
@@ -518,6 +524,7 @@ static LRESULT OnNotify( HWND hWnd, WPARAM wParam, LPARAM lParam)
static
LRESULT
OnCommand
(
HWND
hWnd
,
WPARAM
wParam
,
LPARAM
lParam
)
{
HWND
hwndEditor
=
GetDlgItem
(
hWnd
,
IDC_EDITOR
);
HWND
hwndStatus
=
GetDlgItem
(
hWnd
,
IDC_STATUSBAR
);
if
((
HWND
)
lParam
==
hwndEditor
)
return
0
;
...
...
@@ -717,6 +724,11 @@ static LRESULT OnCommand( HWND hWnd, WPARAM wParam, LPARAM lParam)
toggle_toolbar
(
BANDID_TOOLBAR
);
break
;
case
ID_TOGGLE_STATUSBAR
:
ShowWindow
(
hwndStatus
,
IsWindowVisible
(
hwndStatus
)
?
SW_HIDE
:
SW_SHOW
);
update_window
();
break
;
default:
SendMessage
(
hwndEditor
,
WM_COMMAND
,
wParam
,
lParam
);
break
;
...
...
@@ -729,6 +741,7 @@ static LRESULT OnInitPopupMenu( HWND hWnd, WPARAM wParam, LPARAM lParam )
HMENU
hMenu
=
(
HMENU
)
wParam
;
HWND
hwndEditor
=
GetDlgItem
(
hWnd
,
IDC_EDITOR
);
HWND
hwndReBar
=
GetDlgItem
(
hWnd
,
IDC_REBAR
);
HWND
hwndStatus
=
GetDlgItem
(
hWnd
,
IDC_STATUSBAR
);
PARAFORMAT
pf
;
int
nAlignment
=
-
1
;
REBARBANDINFOW
rbbinfo
;
...
...
@@ -754,6 +767,8 @@ static LRESULT OnInitPopupMenu( HWND hWnd, WPARAM wParam, LPARAM lParam )
CheckMenuItem
(
hMenu
,
ID_TOGGLE_TOOLBAR
,
MF_BYCOMMAND
|
(
rbbinfo
.
fStyle
&
RBBS_HIDDEN
)
?
MF_UNCHECKED
:
MF_CHECKED
);
CheckMenuItem
(
hMenu
,
ID_TOGGLE_STATUSBAR
,
MF_BYCOMMAND
|
IsWindowVisible
(
hwndStatus
)
?
MF_CHECKED
:
MF_UNCHECKED
);
return
0
;
}
...
...
@@ -770,8 +785,14 @@ static LRESULT OnSize( HWND hWnd, WPARAM wParam, LPARAM lParam )
if
(
hwndStatusBar
)
{
SendMessage
(
hwndStatusBar
,
WM_SIZE
,
0
,
0
);
GetClientRect
(
hwndStatusBar
,
&
rc
);
nStatusSize
=
rc
.
bottom
-
rc
.
top
;
if
(
IsWindowVisible
(
hwndStatusBar
))
{
GetClientRect
(
hwndStatusBar
,
&
rc
);
nStatusSize
=
rc
.
bottom
-
rc
.
top
;
}
else
{
nStatusSize
=
0
;
}
}
if
(
hwndToolBar
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment