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
73424dcf
Commit
73424dcf
authored
Nov 24, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Add a dialog at firststart to ask about the privacy policy.
parent
a773582e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
92 additions
and
3 deletions
+92
-3
modules/gui/qt4/components/preferences_widgets.hpp
modules/gui/qt4/components/preferences_widgets.hpp
+2
-2
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+84
-1
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/main_interface.hpp
+2
-0
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+4
-0
No files found.
modules/gui/qt4/components/preferences_widgets.hpp
View file @
73424dcf
...
...
@@ -23,8 +23,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef _
INFOPANEL
S_H_
#define _
INFOPANEL
S_H_
#ifndef _
PREFERENCESWIDGET
S_H_
#define _
PREFERENCESWIDGET
S_H_
#include <vlc/vlc.h>
...
...
modules/gui/qt4/main_interface.cpp
View file @
73424dcf
...
...
@@ -32,6 +32,7 @@
#include "dialogs/playlist.hpp"
#include "menus.hpp"
#include <QMenuBar>
#include <QCloseEvent>
#include <QPushButton>
...
...
@@ -46,6 +47,7 @@
#include <QWidgetAction>
#include <QDockWidget>
#include <QToolBar>
#include <QGroupBox>
#include <assert.h>
#include <vlc_keys.h>
...
...
@@ -95,6 +97,23 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
embeddedPlaylistWasActive
=
videoIsActive
=
false
;
input_name
=
""
;
/* Ask for the network policy on first startup */
if
(
config_GetInt
(
p_intf
,
"privacy-ask"
)
)
{
QList
<
ConfigControl
*>
controls
;
privacyDialog
(
controls
);
QList
<
ConfigControl
*>::
Iterator
i
;
for
(
i
=
controls
.
begin
()
;
i
!=
controls
.
end
()
;
i
++
)
{
ConfigControl
*
c
=
qobject_cast
<
ConfigControl
*>
(
*
i
);
c
->
doApply
(
p_intf
);
}
config_PutInt
(
p_intf
,
"privacy-ask"
,
0
);
config_SaveConfigFile
(
p_intf
,
NULL
);
}
/**
* Configuration and settings
**/
...
...
@@ -103,7 +122,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
/* Main settings */
setFocusPolicy
(
Qt
::
StrongFocus
);
setAcceptDrops
(
true
);
setAcceptDrops
(
true
);
setWindowIcon
(
QApplication
::
windowIcon
()
);
setWindowOpacity
(
config_GetFloat
(
p_intf
,
"qt-opacity"
)
);
...
...
@@ -120,6 +139,7 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
visualSelectorEnabled
=
settings
->
value
(
"visual-selector"
,
false
).
toBool
();
notificationEnabled
=
config_GetInt
(
p_intf
,
"qt-notification"
)
?
true
:
false
;
/**************************
* UI and Widgets design
**************************/
...
...
@@ -379,6 +399,69 @@ void MainInterface::handleMainUi( QSettings *settings )
setMinimumSize
(
PREF_W
,
addSize
.
height
()
);
}
void
MainInterface
::
privacyDialog
(
QList
<
ConfigControl
*>
controls
)
{
QDialog
*
privacy
=
new
QDialog
(
this
);
privacy
->
setWindowTitle
(
qtr
(
"Privacy and Network policies"
)
);
QGridLayout
*
gLayout
=
new
QGridLayout
(
privacy
);
QGroupBox
*
blabla
=
new
QGroupBox
(
qtr
(
"Privacy and Network Warning"
)
);
QGridLayout
*
blablaLayout
=
new
QGridLayout
(
blabla
);
QLabel
*
text
=
new
QLabel
(
qtr
(
"<p>The <i>VideoLAN Team</i> doesn't like when an application goes online without "
"authorisation.</p>
\n
"
"<p><i>VLC media player</i> can request limited information on "
"Internet, espically to get CD Covers and songs metadata or to know "
"if updates are available.</p>
\n
"
"<p><i>VLC media player</i> <b>DOES NOT</b> send or collect <b>ANY</b> information, even anonymously about your "
"usage.</p>
\n
"
"<p>Therefore please check the following options, the default being almost no "
"access on the web.</p>
\n
"
)
);
text
->
setWordWrap
(
true
);
text
->
setTextFormat
(
Qt
::
RichText
);
blablaLayout
->
addWidget
(
text
,
0
,
0
)
;
QGroupBox
*
options
=
new
QGroupBox
;
QGridLayout
*
optionsLayout
=
new
QGridLayout
(
options
);
gLayout
->
addWidget
(
blabla
,
0
,
0
,
1
,
3
);
gLayout
->
addWidget
(
options
,
1
,
0
,
1
,
3
);
module_config_t
*
p_config
;
ConfigControl
*
control
;
int
line
=
0
;
#define CONFIG_GENERIC( option, type ) \
p_config = config_FindConfig( VLC_OBJECT(p_intf), option ); \
if( p_config ) \
{ \
control = new type ## ConfigControl( VLC_OBJECT(p_intf), \
p_config, options, false, optionsLayout, line ); \
}
#define CONFIG_GENERIC_NOBOOL( option, type ) \
p_config = config_FindConfig( VLC_OBJECT(p_intf), option ); \
if( p_config ) \
{ \
control = new type ## ConfigControl( VLC_OBJECT(p_intf), \
p_config, options, optionsLayout, line ); \
}
CONFIG_GENERIC
(
"album-art"
,
IntegerList
);
line
++
;
CONFIG_GENERIC_NOBOOL
(
"fetch-meta"
,
Bool
);
line
++
;
CONFIG_GENERIC_NOBOOL
(
"qt-updates-notif"
,
Bool
);
QPushButton
*
ok
=
new
QPushButton
(
qtr
(
"Ok"
)
);
gLayout
->
addWidget
(
ok
,
2
,
2
);
CONNECT
(
ok
,
clicked
(),
privacy
,
accept
()
);
privacy
->
exec
();
}
void
MainInterface
::
debug
()
{
msg_Dbg
(
p_intf
,
"size: %i - %i"
,
controls
->
size
().
height
(),
controls
->
size
().
width
()
);
...
...
modules/gui/qt4/main_interface.hpp
View file @
73424dcf
...
...
@@ -27,6 +27,7 @@
#include "qt4.hpp"
#include "util/qvlcframe.hpp"
#include "components/preferences_widgets.hpp"
#include <vlc_aout.h>
...
...
@@ -98,6 +99,7 @@ private:
void
handleSystray
();
void
doComponentsUpdate
();
void
createSystray
();
void
privacyDialog
(
QList
<
ConfigControl
*>
controls
);
/* Video */
VideoWidget
*
videoWidget
;
...
...
modules/gui/qt4/qt4.cpp
View file @
73424dcf
...
...
@@ -107,6 +107,8 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define BLING_TEXT N_("Use non native buttons and volume slider")
#define PRIVACY_TEXT N_("Ask for network policy at start")
vlc_module_begin
();
set_shortname
(
(
char
*
)
"Qt"
);
set_description
(
(
char
*
)
_
(
"Qt interface"
)
);
...
...
@@ -162,6 +164,8 @@ vlc_module_begin();
VLC_META_ENGINE_DURATION
|
VLC_META_ENGINE_COLLECTION
,
NULL
,
SHOWFLAGS_TEXT
,
SHOWFLAGS_LONGTEXT
,
VLC_TRUE
);
add_bool
(
"privacy-ask"
,
VLC_TRUE
,
NULL
,
PRIVACY_TEXT
,
PRIVACY_TEXT
,
VLC_FALSE
);
set_callbacks
(
OpenDialogs
,
Close
);
vlc_module_end
();
...
...
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