Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
8c7eaa23
Commit
8c7eaa23
authored
Feb 04, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: simple FirstRun dialog and rewording
parent
c338f4fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
42 deletions
+24
-42
modules/gui/qt4/dialogs/firstrun.cpp
modules/gui/qt4/dialogs/firstrun.cpp
+22
-40
modules/gui/qt4/dialogs/firstrun.hpp
modules/gui/qt4/dialogs/firstrun.hpp
+2
-2
No files found.
modules/gui/qt4/dialogs/firstrun.cpp
View file @
8c7eaa23
...
@@ -23,10 +23,11 @@
...
@@ -23,10 +23,11 @@
#include "dialogs/firstrun.hpp"
#include "dialogs/firstrun.hpp"
#include "components/preferences_widgets.hpp"
#include <QGridLayout>
#include <QGridLayout>
#include <QGroupBox>
#include <QGroupBox>
#include <QCheckBox>
#include <QLabel>
#include <QPushButton>
#include <QSettings>
#include <QSettings>
FirstRun
::
FirstRun
(
QWidget
*
_p
,
intf_thread_t
*
_p_intf
)
FirstRun
::
FirstRun
(
QWidget
*
_p
,
intf_thread_t
*
_p_intf
)
...
@@ -39,15 +40,14 @@ FirstRun::FirstRun( QWidget *_p, intf_thread_t *_p_intf )
...
@@ -39,15 +40,14 @@ FirstRun::FirstRun( QWidget *_p, intf_thread_t *_p_intf )
#endif
#endif
}
}
#define ALBUM_ART_WHEN_ASKED 0
#define ALBUM_ART_ALL 2
void
FirstRun
::
save
()
void
FirstRun
::
save
()
{
{
QList
<
ConfigControl
*>::
Iterator
i
;
config_PutInt
(
p_intf
,
"album-art"
,
checkbox
->
isChecked
()
?
ALBUM_ART_ALL
:
ALBUM_ART_WHEN_ASKED
);
for
(
i
=
controlsList
.
begin
()
;
i
!=
controlsList
.
end
()
;
i
++
)
config_PutInt
(
p_intf
,
"qt-updates-notif"
,
checkbox2
->
isChecked
()
);
{
ConfigControl
*
c
=
qobject_cast
<
ConfigControl
*>
(
*
i
);
c
->
doApply
(
p_intf
);
}
config_PutInt
(
p_intf
,
"qt-privacy-ask"
,
0
);
config_PutInt
(
p_intf
,
"qt-privacy-ask"
,
0
);
/* We have to save here because the user may not launch Prefs */
/* We have to save here because the user may not launch Prefs */
config_SaveConfigFile
(
p_intf
,
NULL
);
config_SaveConfigFile
(
p_intf
,
NULL
);
close
();
close
();
...
@@ -66,50 +66,32 @@ void FirstRun::buildPrivDialog()
...
@@ -66,50 +66,32 @@ void FirstRun::buildPrivDialog()
QGroupBox
*
blabla
=
new
QGroupBox
(
qtr
(
"Privacy and Network Warning"
)
);
QGroupBox
*
blabla
=
new
QGroupBox
(
qtr
(
"Privacy and Network Warning"
)
);
QGridLayout
*
blablaLayout
=
new
QGridLayout
(
blabla
);
QGridLayout
*
blablaLayout
=
new
QGridLayout
(
blabla
);
QLabel
*
text
=
new
QLabel
(
qtr
(
QLabel
*
text
=
new
QLabel
(
qtr
(
"<p>The <i>VideoLAN Team</i> doesn't like when an application goes "
"<p><i>VideoLAN</i> prefers when applications request authorization "
"online without authorization.</p>
\n
"
"before accessing Internet.</p>
\n
"
"<p><i>VLC media player</i> can retreive limited information from "
"<p><b>VLC media player</b> can get information from the Internet "
"the Internet in order to get CD covers or to check "
"in order to get <b>media informations</b> or to check for available <b>updates</b>.</p>
\n
"
"for available updates.</p>
\n
"
"<p><i>VLC media player</i> <b>doesn't</b> send or collect any "
"<p><i>VLC media player</i> <b>DOES NOT</b> send or collect <b>ANY</b> "
"information, even anonymously, about your usage.</p>
\n
"
)
);
"information, even anonymously, about your usage.</p>
\n
"
"<p>Therefore please select from the following options, the default being "
"almost no access to the web.</p>
\n
"
)
);
text
->
setWordWrap
(
true
);
text
->
setWordWrap
(
true
);
text
->
setTextFormat
(
Qt
::
RichText
);
text
->
setTextFormat
(
Qt
::
RichText
);
blablaLayout
->
addWidget
(
text
,
0
,
0
)
;
blablaLayout
->
addWidget
(
text
,
0
,
0
)
;
QGroupBox
*
options
=
new
QGroupBox
;
QGroupBox
*
options
=
new
QGroupBox
(
qtr
(
"Options"
)
)
;
QGridLayout
*
optionsLayout
=
new
QGridLayout
(
options
);
QGridLayout
*
optionsLayout
=
new
QGridLayout
(
options
);
gLayout
->
addWidget
(
blabla
,
0
,
0
,
1
,
3
);
gLayout
->
addWidget
(
blabla
,
0
,
0
,
1
,
3
);
gLayout
->
addWidget
(
options
,
1
,
0
,
1
,
3
);
gLayout
->
addWidget
(
options
,
1
,
0
,
1
,
3
);
module_config_t
*
p_config
;
ConfigControl
*
control
;
int
line
=
0
;
int
line
=
0
;
#define CONFIG_GENERIC( option, type ) \
checkbox
=
new
QCheckBox
(
qtr
(
"Allow fetching media information from Internet"
)
);
p_config = config_FindConfig( VLC_OBJECT(p_intf), option ); \
checkbox
->
setChecked
(
true
);
if( p_config ) \
optionsLayout
->
addWidget
(
checkbox
,
line
++
,
0
);
{ \
control = new type ## ConfigControl( VLC_OBJECT(p_intf), \
p_config, options, false, optionsLayout, line ); \
controlsList.append( control ); \
}
#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 ); \
controlsList.append( control ); \
}
CONFIG_GENERIC
(
"album-art"
,
IntegerList
);
line
++
;
#ifdef UPDATE_CHECK
#ifdef UPDATE_CHECK
CONFIG_GENERIC_NOBOOL
(
"qt-updates-notif"
,
Bool
);
line
++
;
checkbox2
=
new
QCheckBox
(
qtr
(
"Check for updates"
)
);
checkbox2
->
setChecked
(
true
);
optionsLayout
->
addWidget
(
checkbox2
,
line
++
,
0
);
#endif
#endif
QPushButton
*
ok
=
new
QPushButton
(
qtr
(
"OK"
)
);
QPushButton
*
ok
=
new
QPushButton
(
qtr
(
"OK"
)
);
...
...
modules/gui/qt4/dialogs/firstrun.hpp
View file @
8c7eaa23
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
#include <QWidget>
#include <QWidget>
#include <QSettings>
#include <QSettings>
class
ConfigControl
;
class
QCheckBox
;
class
FirstRun
:
public
QWidget
class
FirstRun
:
public
QWidget
{
{
Q_OBJECT
Q_OBJECT
...
@@ -44,7 +44,7 @@ class FirstRun : public QWidget
...
@@ -44,7 +44,7 @@ class FirstRun : public QWidget
}
}
FirstRun
(
QWidget
*
,
intf_thread_t
*
);
FirstRun
(
QWidget
*
,
intf_thread_t
*
);
private:
private:
Q
List
<
ConfigControl
*>
controlsList
;
Q
CheckBox
*
checkbox
,
*
checkbox2
;
intf_thread_t
*
p_intf
;
intf_thread_t
*
p_intf
;
void
buildPrivDialog
();
void
buildPrivDialog
();
private
slots
:
private
slots
:
...
...
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