Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
22405050
Commit
22405050
authored
Nov 22, 2010
by
Erwan Tulou
Committed by
Joseph
Nov 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins2: avoid multiple strings with same value.
parent
f91eaf0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
14 deletions
+21
-14
modules/gui/skins2/win32/win32_factory.cpp
modules/gui/skins2/win32/win32_factory.cpp
+11
-7
modules/gui/skins2/win32/win32_window.cpp
modules/gui/skins2/win32/win32_window.cpp
+10
-7
No files found.
modules/gui/skins2/win32/win32_factory.cpp
View file @
22405050
...
...
@@ -133,6 +133,10 @@ Win32Factory::Win32Factory( intf_thread_t *pIntf ):
bool
Win32Factory
::
init
()
{
const
char
*
vlc_name
=
"VLC Media Player"
;
const
char
*
vlc_icon
=
"VLC_ICON"
;
const
char
*
vlc_class
=
"SkinWindowClass"
;
// Get instance handle
m_hInst
=
GetModuleHandle
(
NULL
);
if
(
m_hInst
==
NULL
)
...
...
@@ -144,13 +148,13 @@ bool Win32Factory::init()
WNDCLASS
skinWindowClass
;
skinWindowClass
.
style
=
CS_DBLCLKS
;
skinWindowClass
.
lpfnWndProc
=
(
WNDPROC
)
Win32Factory
::
Win32Proc
;
skinWindowClass
.
lpszClassName
=
_T
(
"SkinWindowClass"
);
skinWindowClass
.
lpszClassName
=
_T
(
vlc_class
);
skinWindowClass
.
lpszMenuName
=
NULL
;
skinWindowClass
.
cbClsExtra
=
0
;
skinWindowClass
.
cbWndExtra
=
0
;
skinWindowClass
.
hbrBackground
=
NULL
;
skinWindowClass
.
hCursor
=
LoadCursor
(
NULL
,
IDC_ARROW
);
skinWindowClass
.
hIcon
=
LoadIcon
(
m_hInst
,
_T
(
"VLC_ICON"
)
);
skinWindowClass
.
hIcon
=
LoadIcon
(
m_hInst
,
_T
(
vlc_icon
)
);
skinWindowClass
.
hInstance
=
m_hInst
;
// Register class and check it
...
...
@@ -160,7 +164,7 @@ bool Win32Factory::init()
// Check why it failed. If it's because the class already exists
// then fine, otherwise return with an error.
if
(
!
GetClassInfo
(
m_hInst
,
_T
(
"SkinWindowClass"
),
&
wndclass
)
)
if
(
!
GetClassInfo
(
m_hInst
,
_T
(
vlc_class
),
&
wndclass
)
)
{
msg_Err
(
getIntf
(),
"cannot register window class"
);
return
false
;
...
...
@@ -168,8 +172,8 @@ bool Win32Factory::init()
}
// Create Window
m_hParentWindow
=
CreateWindowEx
(
WS_EX_TOOLWINDOW
,
_T
(
"SkinWindowClass"
),
_T
(
"VLC media player"
),
WS_POPUP
|
WS_SYSMENU
|
WS_MINIMIZEBOX
,
m_hParentWindow
=
CreateWindowEx
(
WS_EX_TOOLWINDOW
,
_T
(
vlc_class
),
_T
(
vlc_name
),
WS_POPUP
|
WS_SYSMENU
|
WS_MINIMIZEBOX
,
-
200
,
-
200
,
0
,
0
,
0
,
0
,
m_hInst
,
0
);
if
(
m_hParentWindow
==
NULL
)
{
...
...
@@ -194,8 +198,8 @@ bool Win32Factory::init()
m_trayIcon
.
uID
=
42
;
m_trayIcon
.
uFlags
=
NIF_ICON
|
NIF_TIP
|
NIF_MESSAGE
;
m_trayIcon
.
uCallbackMessage
=
MY_WM_TRAYACTION
;
m_trayIcon
.
hIcon
=
LoadIcon
(
m_hInst
,
_T
(
"VLC_ICON"
)
);
strcpy
(
m_trayIcon
.
szTip
,
"VLC media player"
);
m_trayIcon
.
hIcon
=
LoadIcon
(
m_hInst
,
_T
(
vlc_icon
)
);
strcpy
(
m_trayIcon
.
szTip
,
vlc_name
);
// Show the systray icon if needed
if
(
var_InheritBool
(
getIntf
(),
"skins2-systray"
)
)
...
...
modules/gui/skins2/win32/win32_window.cpp
View file @
22405050
...
...
@@ -53,22 +53,25 @@ Win32Window::Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
{
Win32Factory
*
pFactory
=
(
Win32Factory
*
)
Win32Factory
::
instance
(
getIntf
()
);
const
char
*
vlc_name
=
"VlC Media Player"
;
const
char
*
vlc_class
=
"SkinWindowClass"
;
// Create the window
if
(
type
==
GenericWindow
::
VoutWindow
)
{
// Child window (for vout)
m_hWnd_parent
=
pParentWindow
->
getHandle
();
m_hWnd
=
CreateWindowEx
(
WS_EX_TOOLWINDOW
|
WS_EX_NOPARENTNOTIFY
,
"SkinWindowClass"
,
"default name"
,
vlc_class
,
vlc_name
,
WS_CHILD
|
WS_CLIPCHILDREN
|
WS_CLIPSIBLINGS
,
0
,
0
,
0
,
0
,
m_hWnd_parent
,
0
,
hInst
,
NULL
);
}
else
if
(
type
==
GenericWindow
::
FullscreenWindow
)
{
// top-level window
m_hWnd
=
CreateWindowEx
(
WS_EX_APPWINDOW
,
"SkinWindowClass"
,
"default name"
,
WS_POPUP
|
WS_CLIPCHILDREN
,
0
,
0
,
0
,
0
,
NULL
,
0
,
hInst
,
NULL
);
m_hWnd
=
CreateWindowEx
(
WS_EX_APPWINDOW
,
vlc_class
,
vlc_name
,
WS_POPUP
|
WS_CLIPCHILDREN
,
0
,
0
,
0
,
0
,
NULL
,
0
,
hInst
,
NULL
);
// Store with it a pointer to the interface thread
SetWindowLongPtr
(
m_hWnd
,
GWLP_USERDATA
,
(
LONG_PTR
)
getIntf
()
);
...
...
@@ -77,9 +80,9 @@ Win32Window::Win32Window( intf_thread_t *pIntf, GenericWindow &rWindow,
{
// top-level window (owned by the root window)
HWND
hWnd_owner
=
pFactory
->
getParentWindow
();
m_hWnd
=
CreateWindowEx
(
0
,
"SkinWindowClass"
,
"default name"
,
WS_POPUP
|
WS_CLIPCHILDREN
,
0
,
0
,
0
,
0
,
hWnd_owner
,
0
,
hInst
,
NULL
);
m_hWnd
=
CreateWindowEx
(
0
,
vlc_class
,
vlc_name
,
WS_POPUP
|
WS_CLIPCHILDREN
,
0
,
0
,
0
,
0
,
hWnd_owner
,
0
,
hInst
,
NULL
);
// Store with it a pointer to the interface thread
SetWindowLongPtr
(
m_hWnd
,
GWLP_USERDATA
,
(
LONG_PTR
)
getIntf
()
);
...
...
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