mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-02 02:11:11 +02:00
gui/keybind_setup: fix painted key name after use loadkeys conf
This commit is contained in:
@@ -100,13 +100,16 @@ int CKeybindSetup::exec(CMenuTarget* parent, const std::string &actionKey)
|
|||||||
if (fileBrowser.exec(CONFIGDIR) == true) {
|
if (fileBrowser.exec(CONFIGDIR) == true) {
|
||||||
CNeutrinoApp::getInstance()->loadKeys(fileBrowser.getSelectedFile()->Name.c_str());
|
CNeutrinoApp::getInstance()->loadKeys(fileBrowser.getSelectedFile()->Name.c_str());
|
||||||
printf("[neutrino keybind_setup] new keys: %s\n", fileBrowser.getSelectedFile()->Name.c_str());
|
printf("[neutrino keybind_setup] new keys: %s\n", fileBrowser.getSelectedFile()->Name.c_str());
|
||||||
|
for (int i = 0; i < KEYBINDS_COUNT; i++){
|
||||||
|
keychooser[i]->reinitName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return menu_return::RETURN_REPAINT;
|
return menu_return::RETURN_REPAINT;
|
||||||
}
|
}
|
||||||
else if(actionKey == "savekeys") {
|
else if(actionKey == "savekeys") {
|
||||||
CFileBrowser fileBrowser;
|
CFileBrowser fileBrowser;
|
||||||
fileBrowser.Dir_Mode = true;
|
fileBrowser.Dir_Mode = true;
|
||||||
if (fileBrowser.exec("/media") == true) {
|
if (fileBrowser.exec(CONFIGDIR) == true) {
|
||||||
std::string fname = "keys.conf";
|
std::string fname = "keys.conf";
|
||||||
CKeyboardInput * sms = new CKeyboardInput(LOCALE_EXTRA_SAVEKEYS, &fname);
|
CKeyboardInput * sms = new CKeyboardInput(LOCALE_EXTRA_SAVEKEYS, &fname);
|
||||||
sms->exec(NULL, "");
|
sms->exec(NULL, "");
|
||||||
|
@@ -52,6 +52,11 @@ void CKeyChooser::paint()
|
|||||||
CMenuWidget::paint();
|
CMenuWidget::paint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CKeyChooser::reinitName()
|
||||||
|
{
|
||||||
|
keyName = CRCInput::getKeyName(*key);
|
||||||
|
}
|
||||||
|
|
||||||
int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &)
|
int CKeyChooserItem::exec(CMenuTarget* parent, const std::string &)
|
||||||
{
|
{
|
||||||
neutrino_msg_t msg;
|
neutrino_msg_t msg;
|
||||||
|
@@ -39,7 +39,7 @@ class CKeyChooser : public CMenuWidget
|
|||||||
public:
|
public:
|
||||||
CKeyChooser(unsigned int * const Key, const neutrino_locale_t title, const std::string & Icon = "");
|
CKeyChooser(unsigned int * const Key, const neutrino_locale_t title, const std::string & Icon = "");
|
||||||
~CKeyChooser();
|
~CKeyChooser();
|
||||||
|
void reinitName();
|
||||||
void paint();
|
void paint();
|
||||||
const std::string & getKeyName(){return keyName;};
|
const std::string & getKeyName(){return keyName;};
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user