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
6d381a4c
Commit
6d381a4c
authored
Aug 03, 2010
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Aug 04, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shdocvw: Add View menu to IE with list of installed toolbars.
parent
80b1c5e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
88 additions
and
1 deletion
+88
-1
En.rc
dlls/shdocvw/En.rc
+8
-0
iexplore.c
dlls/shdocvw/iexplore.c
+77
-1
resource.h
dlls/shdocvw/resource.h
+3
-0
No files found.
dlls/shdocvw/En.rc
View file @
6d381a4c
...
...
@@ -50,6 +50,14 @@ IDR_BROWSE_MAIN_MENU MENU
MENUITEM SEPARATOR
MENUITEM "&Properties...", ID_BROWSE_PROPERTIES
}
POPUP "&View"
{
POPUP "&Toolbars"
{
MENUITEM "&Standard bar" ID_BROWSE_BAR_STD
MENUITEM "&Address bar" ID_BROWSE_BAR_ADDR
}
}
POPUP "&Favorites"
{
MENUITEM "&Add to Favorites..." ID_BROWSE_ADDFAV
...
...
dlls/shdocvw/iexplore.c
View file @
6d381a4c
...
...
@@ -78,9 +78,16 @@ void adjust_ie_docobj_rect(HWND frame, RECT* rc)
}
}
static
HMENU
get_tb_menu
(
HMENU
menu
)
{
HMENU
menu_view
=
GetSubMenu
(
menu
,
1
);
return
GetSubMenu
(
menu_view
,
0
);
}
static
HMENU
get_fav_menu
(
HMENU
menu
)
{
return
GetSubMenu
(
menu
,
1
);
return
GetSubMenu
(
menu
,
2
);
}
static
LPWSTR
get_fav_url_from_id
(
HMENU
menu
,
UINT
id
)
...
...
@@ -234,12 +241,81 @@ static void add_favs_to_menu(HMENU favmenu, HMENU menu, LPCWSTR dir)
FindClose
(
findhandle
);
}
static
void
add_tbs_to_menu
(
HMENU
menu
)
{
HUSKEY
toolbar_handle
;
WCHAR
toolbar_key
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'n'
,
'e'
,
't'
,
' '
,
'E'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'\\'
,
'T'
,
'o'
,
'o'
,
'l'
,
'b'
,
'a'
,
'r'
,
0
};
if
(
SHRegOpenUSKeyW
(
toolbar_key
,
KEY_READ
,
NULL
,
&
toolbar_handle
,
TRUE
)
==
ERROR_SUCCESS
)
{
HUSKEY
classes_handle
;
WCHAR
classes_key
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
'e'
,
's'
,
'\\'
,
'C'
,
'L'
,
'S'
,
'I'
,
'D'
,
0
};
WCHAR
guid
[
39
];
DWORD
value_len
=
sizeof
(
guid
)
/
sizeof
(
guid
[
0
]);
int
i
;
if
(
SHRegOpenUSKeyW
(
classes_key
,
KEY_READ
,
NULL
,
&
classes_handle
,
TRUE
)
!=
ERROR_SUCCESS
)
{
SHRegCloseUSKey
(
toolbar_handle
);
ERR
(
"Failed to open key %s
\n
"
,
debugstr_w
(
classes_key
));
return
;
}
for
(
i
=
0
;
SHRegEnumUSValueW
(
toolbar_handle
,
i
,
guid
,
&
value_len
,
NULL
,
NULL
,
NULL
,
SHREGENUM_HKLM
)
==
ERROR_SUCCESS
;
i
++
)
{
WCHAR
tb_name
[
100
];
DWORD
tb_name_len
=
sizeof
(
tb_name
)
/
sizeof
(
tb_name
[
0
]);
HUSKEY
tb_class_handle
;
MENUITEMINFOW
item
;
LSTATUS
ret
;
value_len
=
sizeof
(
guid
)
/
sizeof
(
guid
[
0
]);
if
(
lstrlenW
(
guid
)
!=
38
)
{
TRACE
(
"Found invalid IE toolbar entry: %s
\n
"
,
debugstr_w
(
guid
));
continue
;
}
if
(
SHRegOpenUSKeyW
(
guid
,
KEY_READ
,
classes_handle
,
&
tb_class_handle
,
TRUE
)
!=
ERROR_SUCCESS
)
{
ERR
(
"Failed to get class info for %s
\n
"
,
debugstr_w
(
guid
));
continue
;
}
ret
=
SHRegQueryUSValueW
(
tb_class_handle
,
NULL
,
NULL
,
tb_name
,
&
tb_name_len
,
TRUE
,
NULL
,
0
);
SHRegCloseUSKey
(
tb_class_handle
);
if
(
ret
!=
ERROR_SUCCESS
)
{
ERR
(
"Failed to get toolbar name for %s
\n
"
,
debugstr_w
(
guid
));
continue
;
}
item
.
cbSize
=
sizeof
(
item
);
item
.
fMask
=
MIIM_STRING
;
item
.
dwTypeData
=
tb_name
;
InsertMenuItemW
(
menu
,
GetMenuItemCount
(
menu
),
TRUE
,
&
item
);
}
SHRegCloseUSKey
(
classes_handle
);
SHRegCloseUSKey
(
toolbar_handle
);
}
}
static
HMENU
create_ie_menu
(
void
)
{
HMENU
menu
=
LoadMenuW
(
shdocvw_hinstance
,
MAKEINTRESOURCEW
(
IDR_BROWSE_MAIN_MENU
));
HMENU
favmenu
=
get_fav_menu
(
menu
);
WCHAR
path
[
MAX_PATH
];
add_tbs_to_menu
(
get_tb_menu
(
menu
));
if
(
SHGetFolderPathW
(
NULL
,
CSIDL_COMMON_FAVORITES
,
NULL
,
SHGFP_TYPE_CURRENT
,
path
)
==
S_OK
)
add_favs_to_menu
(
favmenu
,
favmenu
,
path
);
...
...
dlls/shdocvw/resource.h
View file @
6d381a4c
...
...
@@ -43,6 +43,9 @@
#define ID_BROWSE_ADDFAV 1200
#define ID_BROWSE_HOME 1201
#define ID_BROWSE_BAR_STD 1300
#define ID_BROWSE_BAR_ADDR 1301
#define ID_BROWSE_GOTOFAV_FIRST 2000
#define ID_BROWSE_GOTOFAV_MAX 65000
...
...
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