Commit b8bc19e5 authored by Clément Stenac's avatar Clément Stenac

Save hotkeys (Closes:#714)

parent be4cca98
...@@ -132,6 +132,7 @@ void ConfigControl::doApply( intf_thread_t *p_intf ) ...@@ -132,6 +132,7 @@ void ConfigControl::doApply( intf_thread_t *p_intf )
case 1: case 1:
{ {
VIntConfigControl *vicc = qobject_cast<VIntConfigControl *>(this); VIntConfigControl *vicc = qobject_cast<VIntConfigControl *>(this);
assert( vicc );
config_PutInt( p_intf, vicc->getName(), vicc->getValue() ); config_PutInt( p_intf, vicc->getName(), vicc->getValue() );
break; break;
} }
...@@ -139,6 +140,7 @@ void ConfigControl::doApply( intf_thread_t *p_intf ) ...@@ -139,6 +140,7 @@ void ConfigControl::doApply( intf_thread_t *p_intf )
{ {
VFloatConfigControl *vfcc = VFloatConfigControl *vfcc =
qobject_cast<VFloatConfigControl *>(this); qobject_cast<VFloatConfigControl *>(this);
assert( vfcc );
config_PutFloat( p_intf, vfcc->getName(), vfcc->getValue() ); config_PutFloat( p_intf, vfcc->getName(), vfcc->getValue() );
break; break;
} }
...@@ -146,11 +148,14 @@ void ConfigControl::doApply( intf_thread_t *p_intf ) ...@@ -146,11 +148,14 @@ void ConfigControl::doApply( intf_thread_t *p_intf )
{ {
VStringConfigControl *vscc = VStringConfigControl *vscc =
qobject_cast<VStringConfigControl *>(this); qobject_cast<VStringConfigControl *>(this);
assert( vscc );
config_PutPsz( p_intf, vscc->getName(), qta( vscc->getValue() ) ); config_PutPsz( p_intf, vscc->getName(), qta( vscc->getValue() ) );
break;
} }
case 4: case 4:
{ {
KeySelectorControl *ksc = qobject_cast<KeySelectorControl *>(this); KeySelectorControl *ksc = qobject_cast<KeySelectorControl *>(this);
assert( ksc );
ksc->doApply(); ksc->doApply();
} }
} }
...@@ -807,6 +812,10 @@ void KeySelectorControl::selectKey( QTreeWidgetItem *keyItem ) ...@@ -807,6 +812,10 @@ void KeySelectorControl::selectKey( QTreeWidgetItem *keyItem )
void KeySelectorControl::doApply() void KeySelectorControl::doApply()
{ {
foreach( module_config_t *p_current, values )
{
config_PutInt( p_this, p_current->psz_name, p_current->i_value );
}
} }
KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values, KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values,
......
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