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
d9dd2df2
Commit
d9dd2df2
authored
Apr 29, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused config_SaveConfigFile parameter
parent
9921f0b7
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
16 additions
and
25 deletions
+16
-25
include/vlc_configuration.h
include/vlc_configuration.h
+3
-2
modules/gui/qt4/dialogs/firstrun.cpp
modules/gui/qt4/dialogs/firstrun.cpp
+4
-1
modules/gui/qt4/dialogs/preferences.cpp
modules/gui/qt4/dialogs/preferences.cpp
+2
-2
modules/gui/skins2/src/skin_main.cpp
modules/gui/skins2/src/skin_main.cpp
+1
-1
src/config/file.c
src/config/file.c
+5
-18
src/libvlc.c
src/libvlc.c
+1
-1
No files found.
include/vlc_configuration.h
View file @
d9dd2df2
...
...
@@ -198,8 +198,9 @@ VLC_EXPORT( void, config_PutFloat, (vlc_object_t *, const char *, float) );
VLC_EXPORT
(
char
*
,
config_GetPsz
,
(
vlc_object_t
*
,
const
char
*
)
LIBVLC_USED
LIBVLC_MALLOC
);
VLC_EXPORT
(
void
,
config_PutPsz
,
(
vlc_object_t
*
,
const
char
*
,
const
char
*
)
);
VLC_EXPORT
(
int
,
config_SaveConfigFile
,
(
vlc_object_t
*
,
const
char
*
)
);
#define config_SaveConfigFile(a,b) config_SaveConfigFile(VLC_OBJECT(a),b)
VLC_EXPORT
(
int
,
config_SaveConfigFile
,
(
vlc_object_t
*
)
);
#define config_SaveConfigFile(a) config_SaveConfigFile(VLC_OBJECT(a))
VLC_EXPORT
(
void
,
config_ResetAll
,
(
vlc_object_t
*
)
);
#define config_ResetAll(a) config_ResetAll(VLC_OBJECT(a))
...
...
modules/gui/qt4/dialogs/firstrun.cpp
View file @
d9dd2df2
...
...
@@ -51,8 +51,11 @@ void FirstRun::save()
#endif
config_PutInt
(
p_intf
,
"qt-privacy-ask"
,
0
);
/* FIXME Should not save here. This will not work as expected if another
* plugin overwrote items of its own. */
#warning FIXME
/* We have to save here because the user may not launch Prefs */
config_SaveConfigFile
(
p_intf
,
NULL
);
config_SaveConfigFile
(
p_intf
);
close
();
}
...
...
modules/gui/qt4/dialogs/preferences.cpp
View file @
d9dd2df2
...
...
@@ -295,7 +295,7 @@ void PrefsDialog::save()
}
/* Save to file */
if
(
config_SaveConfigFile
(
p_intf
,
NULL
)
!=
0
)
if
(
config_SaveConfigFile
(
p_intf
)
!=
0
)
{
ErrorsDialog
::
getInstance
(
p_intf
)
->
addError
(
qtr
(
"Cannot save Configuration"
),
qtr
(
"Preferences file could not be saved"
)
);
...
...
@@ -322,7 +322,7 @@ void PrefsDialog::reset()
if
(
ret
==
QMessageBox
::
Ok
)
{
config_ResetAll
(
p_intf
);
config_SaveConfigFile
(
p_intf
,
NULL
);
config_SaveConfigFile
(
p_intf
);
getSettings
()
->
clear
();
accept
();
...
...
modules/gui/skins2/src/skin_main.cpp
View file @
d9dd2df2
...
...
@@ -283,7 +283,7 @@ static void *Run( void * p_obj )
}
// save config file
config_SaveConfigFile
(
p_intf
,
NULL
);
config_SaveConfigFile
(
p_intf
);
end:
// Destroy "singleton" objects
...
...
src/config/file.c
View file @
d9dd2df2
...
...
@@ -343,8 +343,6 @@ static int config_PrepareDir (vlc_object_t *obj)
/*****************************************************************************
* config_SaveConfigFile: Save a module's config options.
*****************************************************************************
* This will save the specified module's config options to the config file.
* If psz_module_name is NULL then we save all the modules config options.
* It's no use to save the config options that kept their default values, so
* we'll try to be a bit clever here.
*
...
...
@@ -359,8 +357,7 @@ static int config_PrepareDir (vlc_object_t *obj)
* save.
* Really stupid no ?
*****************************************************************************/
static
int
SaveConfigFile
(
vlc_object_t
*
p_this
,
const
char
*
psz_module_name
,
bool
b_autosave
)
static
int
SaveConfigFile
(
vlc_object_t
*
p_this
,
bool
b_autosave
)
{
module_t
*
p_parser
;
char
*
permanent
=
NULL
,
*
temporary
=
NULL
;
...
...
@@ -415,9 +412,7 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
for
(
int
i
=
0
;
(
p_parser
=
list
[
i
])
!=
NULL
;
i
++
)
{
if
(
!
strncmp
(
line
+
1
,
p_parser
->
psz_object_name
,
strlen
(
p_parser
->
psz_object_name
))
&&
((
psz_module_name
==
NULL
)
||
!
strcmp
(
psz_module_name
,
p_parser
->
psz_object_name
)))
strlen
(
p_parser
->
psz_object_name
)))
{
backup
=
false
;
/* no, we will rewrite it! */
break
;
...
...
@@ -507,17 +502,9 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
{
module_config_t
*
p_item
,
*
p_end
;
if
(
psz_module_name
&&
strcmp
(
psz_module_name
,
p_parser
->
psz_object_name
)
)
continue
;
if
(
!
p_parser
->
i_config_items
)
continue
;
if
(
psz_module_name
)
msg_Dbg
(
p_this
,
"saving config for module
\"
%s
\"
"
,
p_parser
->
psz_object_name
);
fprintf
(
file
,
"[%s]"
,
p_parser
->
psz_object_name
);
if
(
p_parser
->
psz_longname
)
fprintf
(
file
,
" # %s
\n\n
"
,
p_parser
->
psz_longname
);
...
...
@@ -685,7 +672,7 @@ int config_AutoSaveConfigFile( vlc_object_t *p_this )
if
(
save
)
/* Note: this will get the read lock recursively. Ok. */
ret
=
SaveConfigFile
(
p_this
,
NULL
,
true
);
ret
=
SaveConfigFile
(
p_this
,
true
);
vlc_rwlock_unlock
(
&
config_lock
);
module_list_free
(
list
);
...
...
@@ -693,7 +680,7 @@ int config_AutoSaveConfigFile( vlc_object_t *p_this )
}
#undef config_SaveConfigFile
int
config_SaveConfigFile
(
vlc_object_t
*
p_this
,
const
char
*
psz_module_name
)
int
config_SaveConfigFile
(
vlc_object_t
*
p_this
)
{
return
SaveConfigFile
(
p_this
,
psz_module_name
,
false
);
return
SaveConfigFile
(
p_this
,
false
);
}
src/libvlc.c
View file @
d9dd2df2
...
...
@@ -467,7 +467,7 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
if
(
var_InheritBool
(
p_libvlc
,
"reset-config"
)
)
{
config_ResetAll
(
p_libvlc
);
config_SaveConfigFile
(
p_libvlc
,
NULL
);
config_SaveConfigFile
(
p_libvlc
);
}
}
...
...
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