Commit 0b87c144 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

config: remove unused config_PutInt() parameter

parent 3c0909d8
......@@ -148,7 +148,7 @@ VLC_API int64_t config_GetInt(const char *name) VLC_USED;
* \param name Configuration item name
* \param val New value
*/
VLC_API void config_PutInt(vlc_object_t *, const char *name, int64_t val);
VLC_API void config_PutInt(const char *name, int64_t val);
/**
* Gets an floating point configuration item.
......@@ -323,7 +323,6 @@ VLC_API void config_AddIntf( vlc_object_t *, const char * );
VLC_API void config_RemoveIntf( vlc_object_t *, const char * );
VLC_API bool config_ExistIntf( vlc_object_t *, const char * ) VLC_USED;
#define config_PutInt(a,b,c) config_PutInt(VLC_OBJECT(a),b,c)
#define config_PutFloat(a,b,c) config_PutFloat(VLC_OBJECT(a),b,c)
#define config_PutPsz(a,b,c) config_PutPsz(VLC_OBJECT(a),b,c)
......
......@@ -918,8 +918,7 @@ VolumeSet(audio_output_t * p_aout, float volume)
}
if (var_InheritBool(p_aout, "volume-save"))
config_PutInt(p_aout, "auhal-volume",
lroundf(volume * AOUT_VOLUME_DEFAULT));
config_PutInt("auhal-volume", lroundf(volume * AOUT_VOLUME_DEFAULT));
return ostatus;
}
......
......@@ -417,7 +417,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
vout_OSDMessage(p_vout, VOUT_SPU_CHANNEL_OSD, "%s", _("Random On"));
vlc_object_release(p_vout);
}
config_PutInt(p_playlist, "random", 1);
config_PutInt("random", 1);
}
else
{
......@@ -425,7 +425,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
vout_OSDMessage(p_vout, VOUT_SPU_CHANNEL_OSD, "%s", _("Random Off"));
vlc_object_release(p_vout);
}
config_PutInt(p_playlist, "random", 0);
config_PutInt("random", 0);
}
}
......@@ -439,8 +439,8 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
var_SetBool(p_playlist, "repeat", NO);
var_SetBool(p_playlist, "loop", YES);
config_PutInt(p_playlist, "repeat", NO);
config_PutInt(p_playlist, "loop", YES);
config_PutInt("repeat", NO);
config_PutInt("loop", YES);
vout_thread_t *p_vout = getVout();
if (p_vout) {
......@@ -459,8 +459,8 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
var_SetBool(p_playlist, "repeat", YES);
var_SetBool(p_playlist, "loop", NO);
config_PutInt(p_playlist, "repeat", YES);
config_PutInt(p_playlist, "loop", NO);
config_PutInt("repeat", YES);
config_PutInt("loop", NO);
vout_thread_t *p_vout = getVout();
if (p_vout) {
......@@ -479,8 +479,8 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
var_SetBool(p_playlist, "repeat", NO);
var_SetBool(p_playlist, "loop", NO);
config_PutInt(p_playlist, "repeat", NO);
config_PutInt(p_playlist, "loop", NO);
config_PutInt("repeat", NO);
config_PutInt("loop", NO);
vout_thread_t *p_vout = getVout();
if (p_vout) {
......@@ -651,7 +651,7 @@ static int BossCallback(vlc_object_t *p_this, const char *psz_var,
- (void)setAspectRatioIsLocked:(BOOL)b_value
{
config_PutInt(getIntf(), "macosx-lock-aspect-ratio", b_value);
config_PutInt("macosx-lock-aspect-ratio", b_value);
}
- (BOOL)aspectRatioIsLocked
......
......@@ -349,9 +349,9 @@ static VLCMain *sharedInstance = nil;
[[self audioEffectsPanel] saveCurrentProfileAtTerminate];
/* Save some interface state in configuration, at module quit */
config_PutInt(p_intf, "random", var_GetBool(p_playlist, "random"));
config_PutInt(p_intf, "loop", var_GetBool(p_playlist, "loop"));
config_PutInt(p_intf, "repeat", var_GetBool(p_playlist, "repeat"));
config_PutInt("random", var_GetBool(p_playlist, "random"));
config_PutInt("loop", var_GetBool(p_playlist, "loop"));
config_PutInt("repeat", var_GetBool(p_playlist, "repeat"));
var_DelCallback(p_intf->obj.libvlc, "intf-toggle-fscontrol", ShowController, (__bridge void *)self);
var_DelCallback(p_intf->obj.libvlc, "intf-show", ShowController, (__bridge void *)self);
......
......@@ -672,7 +672,7 @@
- (IBAction)toggleEffectsButton:(id)sender
{
BOOL b_value = !var_InheritBool(getIntf(), "macosx-show-effects-button");
config_PutInt(getIntf(), "macosx-show-effects-button", b_value);
config_PutInt("macosx-show-effects-button", b_value);
[(VLCMainWindowControlsBar *)[[[VLCMain sharedInstance] mainWindow] controlsBar] toggleEffectsButton];
[_toggleEffectsButton setState: b_value];
}
......@@ -680,7 +680,7 @@
- (IBAction)toggleJumpButtons:(id)sender
{
BOOL b_value = !var_InheritBool(getIntf(), "macosx-show-playback-buttons");
config_PutInt(getIntf(), "macosx-show-playback-buttons", b_value);
config_PutInt("macosx-show-playback-buttons", b_value);
[(VLCMainWindowControlsBar *)[[[VLCMain sharedInstance] mainWindow] controlsBar] toggleJumpButtons];
[[[VLCMain sharedInstance] voutController] updateWindowsUsingBlock:^(VLCVideoWindowCommon *window) {
......@@ -693,7 +693,7 @@
- (IBAction)togglePlaymodeButtons:(id)sender
{
BOOL b_value = !var_InheritBool(getIntf(), "macosx-show-playmode-buttons");
config_PutInt(getIntf(), "macosx-show-playmode-buttons", b_value);
config_PutInt("macosx-show-playmode-buttons", b_value);
[(VLCMainWindowControlsBar *)[[[VLCMain sharedInstance] mainWindow] controlsBar] togglePlaymodeButtons];
[_togglePlaymodeButtons setState: b_value];
}
......@@ -797,7 +797,7 @@
playlist_t *p_playlist = pl_Get(getIntf());
bool b_value = !var_CreateGetBool(p_playlist, "play-and-exit");
var_SetBool(p_playlist, "play-and-exit", b_value);
config_PutInt(getIntf(), "play-and-exit", b_value);
config_PutInt("play-and-exit", b_value);
}
- (IBAction)toggleRecord:(id)sender
......@@ -1013,7 +1013,7 @@
- (void)toggleFullscreenDevice:(id)sender
{
config_PutInt(getIntf(), "macosx-vdev", [sender tag]);
config_PutInt("macosx-vdev", [sender tag]);
[self refreshVoutDeviceMenu: nil];
}
......
......@@ -234,7 +234,7 @@ static const float f_min_window_height = 307.;
NSAlert *albumArtAlert = [NSAlert alertWithMessageText:_NS("Check for album art and metadata?") defaultButton:_NS("Enable Metadata Retrieval") alternateButton:_NS("No, Thanks") otherButton:nil informativeTextWithFormat:@"%@",_NS("VLC can check online for album art and metadata to enrich your playback experience, e.g. by providing track information when playing Audio CDs. To provide this functionality, VLC will send information about your contents to trusted services in an anonymized form.")];
NSInteger returnValue = [albumArtAlert runModal];
config_PutInt(getIntf(), "metadata-network-access", returnValue == NSAlertDefaultReturn);
config_PutInt("metadata-network-access", returnValue == NSAlertDefaultReturn);
}
if (self.darkInterface) {
......
......@@ -382,7 +382,7 @@
- (void)TTLChanged:(NSNotification *)notification
{
config_PutInt(getIntf(), "ttl", [self.streamTTLTextField intValue]);
config_PutInt("ttl", [self.streamTTLTextField intValue]);
}
- (IBAction)outputFileBrowse:(id)sender
......
......@@ -118,7 +118,7 @@
{
int newState = [sender state] == NSOnState ? 1 : 0;
msg_Dbg(getIntf(), "Changing resume setting to %i", newState);
config_PutInt(getIntf(), "macosx-continue-playback", newState);
config_PutInt("macosx-continue-playback", newState);
}
- (void)updateCocoaWindowLevel:(NSInteger)i_level
......
......@@ -860,7 +860,7 @@ static inline void save_int_list(intf_thread_t * p_intf, id object, const char *
NSNumber *p_valueobject = (NSNumber *)[[object selectedItem] representedObject];
if (p_valueobject) {
assert([p_valueobject isKindOfClass:[NSNumber class]]);
config_PutInt(p_intf, name, [p_valueobject intValue]);
config_PutInt(name, [p_valueobject intValue]);
}
}
......@@ -912,13 +912,13 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
[VLCSimplePrefsController updateRightToLeftSettings];
[defaults synchronize];
config_PutInt(p_intf, "metadata-network-access", [_intf_artCheckbox state]);
config_PutInt("metadata-network-access", [_intf_artCheckbox state]);
config_PutInt(p_intf, "macosx-appleremote", [_intf_appleremoteCheckbox state]);
config_PutInt(p_intf, "macosx-appleremote-sysvol", [_intf_appleremote_sysvolCheckbox state]);
config_PutInt(p_intf, "macosx-statusicon", [_intf_statusIconCheckbox state]);
config_PutInt(p_intf, "macosx-mediakeys", [_intf_mediakeysCheckbox state]);
config_PutInt(p_intf, "macosx-interfacestyle", [_intf_style_darkButtonCell state]);
config_PutInt("macosx-appleremote", [_intf_appleremoteCheckbox state]);
config_PutInt("macosx-appleremote-sysvol", [_intf_appleremote_sysvolCheckbox state]);
config_PutInt("macosx-statusicon", [_intf_statusIconCheckbox state]);
config_PutInt("macosx-mediakeys", [_intf_mediakeysCheckbox state]);
config_PutInt("macosx-interfacestyle", [_intf_style_darkButtonCell state]);
[self changeModule:@"growl" inConfig:@"control" enable:[_intf_enableNotificationsCheckbox state] == NSOnState];
......@@ -940,11 +940,11 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
* audio settings *
******************/
if (_audioSettingChanged) {
config_PutInt(p_intf, "audio", [_audio_enableCheckbox state]);
config_PutInt(p_intf, "volume-save", [_audio_autosavevol_yesButtonCell state]);
config_PutInt("audio", [_audio_enableCheckbox state]);
config_PutInt("volume-save", [_audio_autosavevol_yesButtonCell state]);
var_SetBool(p_intf, "volume-save", [_audio_autosavevol_yesButtonCell state]);
if ([_audio_volTextField isEnabled])
config_PutInt(p_intf, "auhal-volume", ([_audio_volTextField intValue] * AOUT_VOLUME_MAX) / 200);
config_PutInt("auhal-volume", ([_audio_volTextField intValue] * AOUT_VOLUME_MAX) / 200);
SaveIntList(_audio_dolbyPopup, "force-dolby-surround");
......@@ -972,21 +972,21 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
* video settings *
******************/
if (_videoSettingChanged) {
config_PutInt(p_intf, "video", [_video_enableCheckbox state]);
config_PutInt(p_intf, "fullscreen", [_video_startInFullscreenCheckbox state]);
config_PutInt(p_intf, "video-deco", [_video_videodecoCheckbox state]);
config_PutInt(p_intf, "video-on-top", [_video_onTopCheckbox state]);
config_PutInt(p_intf, "macosx-black", [_video_blackScreenCheckbox state]);
config_PutInt("video", [_video_enableCheckbox state]);
config_PutInt("fullscreen", [_video_startInFullscreenCheckbox state]);
config_PutInt("video-deco", [_video_videodecoCheckbox state]);
config_PutInt("video-on-top", [_video_onTopCheckbox state]);
config_PutInt("macosx-black", [_video_blackScreenCheckbox state]);
config_PutInt(p_intf, "macosx-pause-minimized", [_video_pauseWhenMinimizedCheckbox state]);
config_PutInt("macosx-pause-minimized", [_video_pauseWhenMinimizedCheckbox state]);
config_PutInt(p_intf, "embedded-video", [_video_embeddedCheckbox state]);
config_PutInt(p_intf, "macosx-nativefullscreenmode", [_video_nativeFullscreenCheckbox state]);
config_PutInt(p_intf, "macosx-vdev", [[_video_devicePopup selectedItem] tag]);
config_PutInt("embedded-video", [_video_embeddedCheckbox state]);
config_PutInt("macosx-nativefullscreenmode", [_video_nativeFullscreenCheckbox state]);
config_PutInt("macosx-vdev", [[_video_devicePopup selectedItem] tag]);
config_PutPsz(p_intf, "snapshot-path", [[_video_snap_folderTextField stringValue] UTF8String]);
config_PutPsz(p_intf, "snapshot-prefix", [[_video_snap_prefixTextField stringValue] UTF8String]);
config_PutInt(p_intf, "snapshot-sequential", [_video_snap_seqnumCheckbox state]);
config_PutPsz("snapshot-path", [[_video_snap_folderTextField stringValue] UTF8String]);
config_PutPsz("snapshot-prefix", [[_video_snap_prefixTextField stringValue] UTF8String]);
config_PutInt("snapshot-sequential", [_video_snap_seqnumCheckbox state]);
SaveStringList(_video_snap_formatPopup, "snapshot-format");
SaveIntList(_video_deinterlacePopup, "deinterlace");
SaveStringList(_video_deinterlace_modePopup, "deinterlace-mode");
......@@ -998,14 +998,14 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
***************************/
if (_inputSettingChanged) {
config_PutPsz(p_intf, "input-record-path", [[_input_recordTextField stringValue] UTF8String]);
config_PutInt(p_intf, "postproc-q", [_input_postprocTextField intValue]);
config_PutInt(p_intf, "skip-frames", [_input_skipFramesCheckbox state]);
config_PutInt("postproc-q", [_input_postprocTextField intValue]);
config_PutInt("skip-frames", [_input_skipFramesCheckbox state]);
SaveIntList(_input_aviPopup, "avi-index");
SaveIntList(_input_skipLoopPopup, "avcodec-skiploopfilter");
#define CaC(name, factor) config_PutInt(p_intf, name, [[_input_cachelevelPopup selectedItem] tag] * factor)
#define CaC(name, factor) config_PutInt(name, [[_input_cachelevelPopup selectedItem] tag] * factor)
if ([[_input_cachelevelPopup selectedItem] tag] == 0) {
msg_Dbg(p_intf, "Custom chosen, not adjusting cache values");
} else {
......@@ -1023,7 +1023,7 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
* subtitles settings *
**********************/
if (_osdSettingChanged) {
config_PutInt(p_intf, "osd", [_osd_osdCheckbox state]);
config_PutInt("osd", [_osd_osdCheckbox state]);
if ([_osd_encodingPopup indexOfSelectedItem] >= 0)
SaveStringList(_osd_encodingPopup, "subsdec-encoding");
......@@ -1035,8 +1035,8 @@ static inline void save_string_list(intf_thread_t * p_intf, id object, const cha
config_PutPsz(p_intf, "freetype-font", [[_osd_fontTextField stringValue] UTF8String]);
SaveIntList(_osd_font_colorPopup, "freetype-color");
SaveIntList(_osd_font_sizePopup, "freetype-rel-fontsize");
config_PutInt(p_intf, "freetype-opacity", [_osd_opacityTextField intValue] * 255.0 / 100.0 + 0.5);
config_PutInt(p_intf, "freetype-bold", [_osd_forceboldCheckbox state]);
config_PutInt("freetype-opacity", [_osd_opacityTextField intValue] * 255.0 / 100.0 + 0.5);
config_PutInt("freetype-bold", [_osd_forceboldCheckbox state]);
SaveIntList(_osd_outline_colorPopup, "freetype-outline-color");
SaveIntList(_osd_outline_thicknessPopup, "freetype-outline-thickness");
_osdSettingChanged = NO;
......
......@@ -143,7 +143,7 @@
// Sync status bar visibility with VLC setting
msg_Dbg(getIntf(), "Status bar icon visibility changed to %i", isVisible);
config_PutInt(getIntf(), "macosx-statusicon", isVisible ? 1 : 0);
config_PutInt("macosx-statusicon", isVisible ? 1 : 0);
} else {
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
}
......
......@@ -876,7 +876,7 @@ o_textfield = [[NSSecureTextField alloc] initWithFrame: s_rc]; \
var_Set(getIntf()->obj.libvlc, psz_name, val);
case CONFIG_ITEM_INTEGER:
case CONFIG_ITEM_BOOL:
config_PutInt(getIntf(), psz_name, [self intValue]);
config_PutInt(psz_name, [self intValue]);
break;
case CONFIG_ITEM_FLOAT:
config_PutFloat(getIntf(), psz_name, [self floatValue]);
......
......@@ -756,7 +756,7 @@ void ModuleListConfigControl::onUpdate()
void
VIntConfigControl::doApply()
{
config_PutInt( p_this, getName(), getValue() );
config_PutInt( getName(), getValue() );
}
/*********** Integer **************/
......
......@@ -1058,7 +1058,7 @@ void SPrefsPanel::apply()
config_PutPsz( p_intf, "cd-audio", devicepath );
}
#define CaC( name, factor ) config_PutInt( p_intf, name, i_comboValue * factor )
#define CaC( name, factor ) config_PutInt( name, i_comboValue * factor )
/* Caching */
QComboBox *cachingCombo = qobject_cast<QComboBox *>(optionWidgets["cachingCoB"]);
int i_comboValue = cachingCombo->itemData( cachingCombo->currentIndex() ).toInt();
......@@ -1093,7 +1093,7 @@ void SPrefsPanel::apply()
case SPrefsVideo:
{
int i_fullscreenScreen = qobject_cast<QComboBox *>(optionWidgets["fullscreenScreenB"])->currentData().toInt();
config_PutInt( p_intf, "qt-fullscreen-screennumber", i_fullscreenScreen );
config_PutInt( "qt-fullscreen-screennumber", i_fullscreenScreen );
break;
}
......@@ -1146,7 +1146,7 @@ void SPrefsPanel::apply()
#undef save_vol_aout
free( psz_aout );
config_PutInt( p_intf, "volume-save", !b_reset_volume );
config_PutInt( "volume-save", !b_reset_volume );
break;
}
......@@ -1154,18 +1154,18 @@ void SPrefsPanel::apply()
{
bool b_checked = qobject_cast<QCheckBox *>(optionWidgets["shadowCB"])->isChecked();
if( b_checked && config_GetInt( "freetype-shadow-opacity" ) == 0 ) {
config_PutInt( p_intf, "freetype-shadow-opacity", 128 );
config_PutInt( "freetype-shadow-opacity", 128 );
}
else if (!b_checked ) {
config_PutInt( p_intf, "freetype-shadow-opacity", 0 );
config_PutInt( "freetype-shadow-opacity", 0 );
}
b_checked = qobject_cast<QCheckBox *>(optionWidgets["backgroundCB"])->isChecked();
if( b_checked && config_GetInt( "freetype-background-opacity" ) == 0 ) {
config_PutInt( p_intf, "freetype-background-opacity", 128 );
config_PutInt( "freetype-background-opacity", 128 );
}
else if (!b_checked ) {
config_PutInt( p_intf, "freetype-background-opacity", 0 );
config_PutInt( "freetype-background-opacity", 0 );
}
}
......
......@@ -98,6 +98,6 @@ void ErrorsDialog::dontShow()
{
if( stopShowing->isChecked() )
{
config_PutInt( p_intf, "qt-show-errors", 0 );
config_PutInt( "qt-show-errors", 0 );
}
}
......@@ -210,7 +210,7 @@ void ExtendedDialog::saveConfig()
break;
case QMetaType::Int:
case QMetaType::Bool:
config_PutInt( p_intf, qtu(i.key()), value.toInt() ) ;
config_PutInt( qtu(i.key()), value.toInt() ) ;
break;
case QMetaType::Double:
case QMetaType::Float:
......
......@@ -39,11 +39,11 @@ FirstRun::FirstRun( QWidget *_p, intf_thread_t *_p_intf )
void FirstRun::save()
{
config_PutInt( p_intf, "metadata-network-access", checkbox->isChecked() );
config_PutInt( "metadata-network-access", checkbox->isChecked() );
#ifdef UPDATE_CHECK
config_PutInt( p_intf, "qt-updates-notif", checkbox2->isChecked() );
config_PutInt( "qt-updates-notif", checkbox2->isChecked() );
#endif
config_PutInt( p_intf, "qt-privacy-ask", 0 );
config_PutInt( "qt-privacy-ask", 0 );
/* FIXME Should not save here. This will not work as expected if another
* plugin overwrote items of its own. */
......
......@@ -1141,7 +1141,7 @@ void MainInputManager::pause()
void MainInputManager::toggleRandom()
{
config_PutInt( p_intf, "random", var_ToggleBool( THEPL, "random" ) );
config_PutInt( "random", var_ToggleBool( THEPL, "random" ) );
}
void MainInputManager::notifyRandom(bool value)
......@@ -1183,14 +1183,14 @@ void MainInputManager::loopRepeatLoopStatus()
var_SetBool( THEPL, "loop", loop );
var_SetBool( THEPL, "repeat", repeat );
config_PutInt( p_intf, "loop", loop );
config_PutInt( p_intf, "repeat", repeat );
config_PutInt( "loop", loop );
config_PutInt( "repeat", repeat );
}
void MainInputManager::activatePlayQuit( bool b_exit )
{
var_SetBool( THEPL, "play-and-exit", b_exit );
config_PutInt( p_intf, "play-and-exit", b_exit );
config_PutInt( "play-and-exit", b_exit );
}
bool MainInputManager::getPlayExitState()
......
......@@ -83,11 +83,11 @@ static int vlclua_config_set( lua_State *L )
break;
case VLC_VAR_INTEGER:
config_PutInt( p_this, psz_name, luaL_checkinteger( L, 2 ) );
config_PutInt( psz_name, luaL_checkinteger( L, 2 ) );
break;
case VLC_VAR_BOOL:
config_PutInt( p_this, psz_name, luaL_checkboolean( L, 2 ) );
config_PutInt( psz_name, luaL_checkboolean( L, 2 ) );
break;
case VLC_VAR_FLOAT:
......
......@@ -1022,7 +1022,7 @@ bool sout_stream_sys_t::UpdateOutput( sout_stream_t *p_stream )
return false;
perf_warning_shown = true;
if ( res == 2 )
config_PutInt(p_stream, SOUT_CFG_PREFIX "show-perf-warning", 0 );
config_PutInt(SOUT_CFG_PREFIX "show-perf-warning", 0 );
}
static const char video_maxres_hd[] = "maxwidth=1920,maxheight=1080";
......
......@@ -155,9 +155,7 @@ void config_PutPsz( vlc_object_t *p_this,
free (oldstr);
}
#undef config_PutInt
void config_PutInt( vlc_object_t *p_this, const char *psz_name,
int64_t i_value )
void config_PutInt(const char *psz_name, int64_t i_value )
{
module_config_t *p_config = config_FindConfig( psz_name );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment