modules/demux/util/id3*: fixed up some dead comments

 modules/gui/kde/*: only set variable the user actually have changed when
apply is pressed in the preferences window.
parent 80921ca7
/*****************************************************************************
* audio.c : mpeg audio Stream input module for vlc
* id3.c: simple id3 tag skipper
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: id3.c,v 1.1 2002/08/24 21:35:31 sigmunau Exp $
* $Id: id3.c,v 1.2 2002/10/13 14:26:48 sigmunau Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
* 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
......
/*****************************************************************************
* audio.c : mpeg audio Stream input module for vlc
* id3tag.c: id3 tag parser/skipper based on libid3tag
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: id3tag.c,v 1.1 2002/08/24 21:35:31 sigmunau Exp $
* $Id: id3tag.c,v 1.2 2002/10/13 14:26:48 sigmunau Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
* 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
......
......@@ -2,7 +2,7 @@
* QConfigItem.cpp: The QConfigItem class
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: QConfigItem.cpp,v 1.2 2002/08/12 17:38:10 sigmunau Exp $
* $Id: QConfigItem.cpp,v 1.3 2002/10/13 14:26:47 sigmunau Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon 12.08.2002
*
......@@ -27,6 +27,7 @@ QConfigItem::QConfigItem(QObject *parent, QString name, int iType, int i_val) :
{
type = iType;
iVal = i_val;
bChanged = false;
}
QConfigItem::QConfigItem(QObject *parent, QString name, int iType, float f_val) :
......@@ -34,6 +35,7 @@ QConfigItem::QConfigItem(QObject *parent, QString name, int iType, float f_val)
{
type = iType;
fVal = f_val;
bChanged = false;
}
QConfigItem::QConfigItem(QObject *parent, QString name, int iType, QString s_val) :
......@@ -41,6 +43,7 @@ QConfigItem::QConfigItem(QObject *parent, QString name, int iType, QString s_val
{
type = iType;
sVal = s_val;
bChanged = false;
}
QConfigItem::~QConfigItem()
......@@ -71,19 +74,33 @@ QString QConfigItem::sValue()
void QConfigItem::setValue(int val)
{
iVal = val;
bChanged = true;
}
void QConfigItem::setValue(float val)
{
fVal = val;
bChanged = true;
}
void QConfigItem::setValue(double val)
{
fVal = (float)val;
bChanged = true;
}
void QConfigItem::setValue(const QString &val)
{
sVal = val;
bChanged = true;
}
bool QConfigItem::changed()
{
return bChanged;
}
void QConfigItem::resetChanged()
{
bChanged = false;
}
......@@ -2,7 +2,7 @@
* QConfigItem.h : includes for the QConfigItem class
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: QConfigItem.h,v 1.2 2002/08/12 17:38:10 sigmunau Exp $
* $Id: QConfigItem.h,v 1.3 2002/10/13 14:26:47 sigmunau Exp $
*
* Authors: Andres Krapf <dae@chez.com> Sun Mar 25 2001
*
......@@ -42,16 +42,19 @@ class QConfigItem : public QObject
float fValue();
int iValue();
QString sValue();
bool changed();
public slots:
void setValue(int val);
void setValue(float val);
void setValue(double val);
void setValue(const QString &val);
void resetChanged();
private:
int iVal, type;
float fVal;
QString sVal;
bool bChanged;
};
#endif
......@@ -2,7 +2,7 @@
* preferences.cpp: preferences window for the kde gui
*****************************************************************************
* Copyright (C) 2001 VideoLAN
* $Id: preferences.cpp,v 1.6 2002/10/10 19:34:06 sigmunau Exp $
* $Id: preferences.cpp,v 1.7 2002/10/13 14:26:47 sigmunau Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon Aug 12 2002
*
......@@ -183,10 +183,10 @@ KPreferences::KPreferences(intf_thread_t *p_intf, const char *psz_module_name,
QConfigItem *ci = new QConfigItem(this, p_item->psz_name,
p_item->i_type,
p_item->i_value);
item_adj->setValue( p_item->i_value );
connect(item_adj, SIGNAL(valueChanged( int)),
ci, SLOT(setValue(int)));
QToolTip::add(item_adj, p_item->psz_longtext);
item_adj->setValue( p_item->i_value );
}
break;
......@@ -281,6 +281,8 @@ void KPreferences::slotApply()
while ( (obj=it.current()) != 0 ) {
++it;
QConfigItem *p_config = (QConfigItem *)obj;
if ( p_config->changed() )
{
msg_Dbg( p_intf, const_cast<char *>(p_config->name()));
msg_Dbg( p_intf, "%d", p_config->getType());
......@@ -305,6 +307,8 @@ void KPreferences::slotApply()
config_PutFloat( p_intf, p_config->name(), p_config->fValue() );
break;
}
p_config->resetChanged();
}
}
delete l;
}
......
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