Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
af8cb7dc
Commit
af8cb7dc
authored
Jul 09, 2009
by
Geoffroy Couprie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32: Add support for Vista file associations
parent
6ceccc7d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
95 additions
and
1 deletion
+95
-1
configure.ac
configure.ac
+1
-1
modules/gui/qt4/Modules.am
modules/gui/qt4/Modules.am
+1
-0
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+26
-0
modules/gui/qt4/components/vistaassoc.h
modules/gui/qt4/components/vistaassoc.h
+67
-0
No files found.
configure.ac
View file @
af8cb7dc
...
...
@@ -4966,7 +4966,7 @@ AS_IF([test "${enable_qt4}" != "no"], [
AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce" -a "${SYS}" != "cygwin" -a "${SYS}" != "darwin"], [
VLC_ADD_LIBS([qt4],[$QT4_LIBS -lX11])
], [
VLC_ADD_LIBS([qt4],[$QT4_LIBS])
VLC_ADD_LIBS([qt4],[$QT4_LIBS
-lole32
])
])
QT4LOCALEDIR="$($PKG_CONFIG --variable=prefix QtCore)/share/qt4/translations/"
AC_SUBST(QT4LOCALEDIR)
...
...
modules/gui/qt4/Modules.am
View file @
af8cb7dc
...
...
@@ -280,6 +280,7 @@ noinst_HEADERS = \
components/sout/profile_selector.hpp \
components/sout/sout_widgets.hpp \
components/sout/profiles.hpp \
components/vistaassoc.h \
util/input_slider.hpp \
util/customwidgets.hpp \
util/qvlcframe.hpp \
...
...
modules/gui/qt4/components/simple_preferences.cpp
View file @
af8cb7dc
...
...
@@ -46,6 +46,10 @@
#define ICON_HEIGHT 64
#ifdef WIN32
#include "vistaassoc.h"
#endif
/*********************************************************************
* The List of categories
*********************************************************************/
...
...
@@ -810,6 +814,28 @@ bool SPrefsPanel::addType( const char * psz_ext, QTreeWidgetItem* current,
void
SPrefsPanel
::
assoDialog
()
{
OSVERSIONINFO
winVer
;
winVer
.
dwOSVersionInfoSize
=
sizeof
(
OSVERSIONINFO
);
//Vista specific file associations
if
(
GetVersionEx
(
&
winVer
)
&&
winVer
.
dwMajorVersion
>
5
)
{
LPAPPASSOCREGUI
p_appassoc
;
CoInitialize
(
0
);
if
(
S_OK
==
CoCreateInstance
(
&
clsid_IApplication2
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IApplicationAssociationRegistrationUI
,
(
void
**
)
&
p_appassoc
)
)
{
if
(
S_OK
==
p_appassoc
->
vt
->
LaunchAdvancedAssociationUI
(
p_appassoc
,
L"VLC"
)
)
{
CoUninitialize
();
return
;
}
}
CoUninitialize
();
}
QDialog
*
d
=
new
QDialog
(
this
);
QGridLayout
*
assoLayout
=
new
QGridLayout
(
d
);
...
...
modules/gui/qt4/components/vistaassoc.h
0 → 100644
View file @
af8cb7dc
/*****************************************************************************
* vistaext.h : "Vista file associations support"
****************************************************************************
* Copyright (C) 2006-2008 the VideoLAN team
* $Id$
*
* Authors: Geoffroy Couprie <geal@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef VISTAASSOC_H
#define VISTAASSOC_H
const
GUID
clsid_IApplication2
=
{
0x1968106d
,
0xf3b5
,
0x44cf
,{
0x89
,
0x0e
,
0x11
,
0x6f
,
0xcb
,
0x9e
,
0xce
,
0xf1
}};
const
GUID
IID_IApplicationAssociationRegistrationUI
=
{
0x1f76a169
,
0xf994
,
0x40ac
,
{
0x8f
,
0xc8
,
0x09
,
0x59
,
0xe8
,
0x87
,
0x47
,
0x10
}};
#undef IUnknown
typedef
struct
_IUnknown
IUnknown
;
typedef
struct
_IApplicationAssociationRegistrationUI
IApplicationAssociationRegistrationUI
;
typedef
struct
IUnknown_vt
{
long
(
STDCALL
*
QueryInterface
)(
IUnknown
*
This
,
const
GUID
*
riid
,
void
**
ppvObject
);
long
(
STDCALL
*
AddRef
)(
IUnknown
*
This
);
long
(
STDCALL
*
Release
)(
IUnknown
*
This
);
}
IUnknown_vt
;
struct
_IUnknown
{
IUnknown_vt
*
vt
;
};
typedef
IUnknown
*
LPUNKNOWN
;
typedef
struct
IApplicationAssociationRegistrationUI_vt
{
/* IUnknown methods */
long
(
STDCALL
*
QueryInterface
)(
IUnknown
*
This
,
const
GUID
*
riid
,
void
**
ppvObject
);
long
(
STDCALL
*
AddRef
)(
IUnknown
*
This
);
long
(
STDCALL
*
Release
)(
IUnknown
*
This
);
long
(
STDCALL
*
LaunchAdvancedAssociationUI
)(
IApplicationAssociationRegistrationUI
*
This
,
LPCWSTR
app
);
}
IApplicationAssociationRegistrationUI_vt
;
struct
_IApplicationAssociationRegistrationUI
{
IApplicationAssociationRegistrationUI_vt
*
vt
;
};
typedef
IApplicationAssociationRegistrationUI
*
LPAPPASSOCREGUI
,
*
PAPPASSOCREGUI
;
#define CLSCTX_INPROC_SERVER 1
typedef
GUID
IID
;
#define REFIID const IID* const
extern
"C"
{
HRESULT
WINAPI
CoCreateInstance
(
const
GUID
*
,
LPUNKNOWN
,
DWORD
,
REFIID
,
PVOID
*
);
HRESULT
WINAPI
CoInitialize
(
PVOID
);
void
WINAPI
CoUninitialize
(
void
);
};
#endif //VISTAASSOC_H
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