Commit ff6613e3 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - Unification of Hotkeys for Sprefs et Adv Preferences.

parent 0b8e11bd
...@@ -391,7 +391,7 @@ void StringListConfigControl::actionRequested( int i_action ) ...@@ -391,7 +391,7 @@ void StringListConfigControl::actionRequested( int i_action )
if( i_action < 0 || i_action >= p_item->i_action ) return; if( i_action < 0 || i_action >= p_item->i_action ) return;
vlc_value_t val; vlc_value_t val;
val.psz_string = val.psz_string =
qtu( (combo->itemData( combo->currentIndex() ).toString() ) ); qtu( (combo->itemData( combo->currentIndex() ).toString() ) );
p_item->ppf_action[i_action]( p_this, getName(), val, val, 0 ); p_item->ppf_action[i_action]( p_this, getName(), val, val, 0 );
...@@ -982,11 +982,11 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this, ...@@ -982,11 +982,11 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
label = new QLabel( label = new QLabel(
qtr( "Select an action to change the associated hotkey") ); qtr( "Select an action to change the associated hotkey") );
/* Deactivated for now /* Deactivated for now
QLabel *searchLabel = new QLabel( qtr( "Search" ) ); QLabel *searchLabel = new QLabel( qtr( "Search" ) );
QLineEdit *actionSearch = new QLineEdit;*/ QLineEdit *actionSearch = new QLineEdit;*/
table = new QTreeWidget; table = new QTreeWidget;
table->setColumnCount(2); table->setColumnCount(2);
table->headerItem()->setText( 0, qtr( "Action" ) ); table->headerItem()->setText( 0, qtr( "Action" ) );
...@@ -1005,7 +1005,7 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this, ...@@ -1005,7 +1005,7 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
gLayout->addWidget( actionSearch, 1, 2, 1, 2 ); */ gLayout->addWidget( actionSearch, 1, 2, 1, 2 ); */
gLayout->addWidget( table, 2, 0, 1, 4 ); gLayout->addWidget( table, 2, 0, 1, 4 );
gLayout->addWidget( clearButton, 3, 0, 1, 1 ); gLayout->addWidget( clearButton, 3, 0, 1, 1 );
gLayout->addWidget( shortcutValue, 3, 1, 1, 2 ); gLayout->addWidget( shortcutValue, 3, 1, 1, 2 );
gLayout->addWidget( setButton, 3, 3, 1, 1 ); gLayout->addWidget( setButton, 3, 3, 1, 1 );
if( !l ) /* This shouldn't happen */ if( !l ) /* This shouldn't happen */
...@@ -1016,7 +1016,7 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this, ...@@ -1016,7 +1016,7 @@ KeySelectorControl::KeySelectorControl( vlc_object_t *_p_this,
} }
else else
{ {
l->addWidget( keyContainer, 0, 0, 1, 2 ); l->addWidget( keyContainer, line, 0, 1, 2 );
} }
CONNECT( clearButton, clicked(), shortcutValue, clear() ); CONNECT( clearButton, clicked(), shortcutValue, clear() );
BUTTONACT( setButton, setTheKey() ); BUTTONACT( setButton, setTheKey() );
...@@ -1068,7 +1068,7 @@ void KeySelectorControl::selectKey( QTreeWidgetItem *keyItem ) ...@@ -1068,7 +1068,7 @@ void KeySelectorControl::selectKey( QTreeWidgetItem *keyItem )
{ {
/* This happens when triggered by ClickEater */ /* This happens when triggered by ClickEater */
if( keyItem == NULL ) keyItem = table->currentItem(); if( keyItem == NULL ) keyItem = table->currentItem();
/* This can happen when nothing is selected on the treeView /* This can happen when nothing is selected on the treeView
and the shortcutValue is clicked */ and the shortcutValue is clicked */
if( !keyItem ) return; if( !keyItem ) return;
...@@ -1121,7 +1121,7 @@ KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values, ...@@ -1121,7 +1121,7 @@ KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values,
values = _values; values = _values;
conflicts = false; conflicts = false;
keyToChange = _keyToChange; keyToChange = _keyToChange;
setWindowTitle( qtr( "Hotkey for " ) + qfu( keyToChange) ); setWindowTitle( qtr( "Hotkey for " ) + qfu( keyToChange) );
QVBoxLayout *l = new QVBoxLayout( this ); QVBoxLayout *l = new QVBoxLayout( this );
...@@ -1137,7 +1137,7 @@ KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values, ...@@ -1137,7 +1137,7 @@ KeyInputDialog::KeyInputDialog( QList<module_config_t*>& _values,
buttonBox->addButton( cancel, QDialogButtonBox::RejectRole ); buttonBox->addButton( cancel, QDialogButtonBox::RejectRole );
l->addWidget( buttonBox ); l->addWidget( buttonBox );
CONNECT( buttonBox, accepted(), this, accept() ); CONNECT( buttonBox, accepted(), this, accept() );
CONNECT( buttonBox, rejected(), this, reject() ); CONNECT( buttonBox, rejected(), this, reject() );
} }
......
...@@ -451,7 +451,6 @@ private: ...@@ -451,7 +451,6 @@ private:
QTreeWidget *table; QTreeWidget *table;
KeyShortcutEdit *shortcutValue; KeyShortcutEdit *shortcutValue;
QList<module_config_t *> values; QList<module_config_t *> values;
//QWidget *parent;
private slots: private slots:
void setTheKey(); void setTheKey();
void selectKey( QTreeWidgetItem * = NULL ); void selectKey( QTreeWidgetItem * = NULL );
......
...@@ -420,10 +420,23 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent, ...@@ -420,10 +420,23 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
END_SPREFS_CAT; END_SPREFS_CAT;
START_SPREFS_CAT( Hotkeys, "Configure Hotkeys" ); case SPrefsHotkeys:
//FIMXE {
END_SPREFS_CAT; p_config = config_FindConfig( VLC_OBJECT(p_intf), "key-fullscreen" );
QGridLayout *gLayout = new QGridLayout;
panel->setLayout( gLayout );
int line = 0;
KeySelectorControl *ksCtrl =
new KeySelectorControl( VLC_OBJECT(p_intf), p_config ,
this, gLayout, line );
panel_label->setText( qtr( "Configure Hotkeys" ) );
break;
} }
}
panel_layout->addWidget( panel_label ); panel_layout->addWidget( panel_label );
panel_layout->addWidget( title_line ); panel_layout->addWidget( title_line );
......
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