Small fixes
This commit is contained in:
parent
12ec2b0574
commit
493b1231fd
|
@ -493,35 +493,35 @@ inline FApplication::CmdMap& FApplication::mapCmdOptions()
|
||||||
static CmdMap cmd_map{};
|
static CmdMap cmd_map{};
|
||||||
|
|
||||||
// --encoding
|
// --encoding
|
||||||
cmd_map['e'] = [enc] (char* arg) { enc(FString(arg)); };
|
cmd_map['e'] = [enc] (const char* arg) { enc(FString(arg)); };
|
||||||
// --log-file
|
// --log-file
|
||||||
cmd_map['l'] = [log] (char* arg) { log(FString(arg)); };
|
cmd_map['l'] = [log] (const char* arg) { log(FString(arg)); };
|
||||||
// --no-mouse
|
// --no-mouse
|
||||||
cmd_map['m'] = [opt] (char*) { opt().mouse_support = false; };
|
cmd_map['m'] = [opt] (const char*) { opt().mouse_support = false; };
|
||||||
// --no-optimized-cursor
|
// --no-optimized-cursor
|
||||||
cmd_map['o'] = [opt] (char*) { opt().cursor_optimisation = false; };
|
cmd_map['o'] = [opt] (const char*) { opt().cursor_optimisation = false; };
|
||||||
// --no-terminal-detection
|
// --no-terminal-detection
|
||||||
cmd_map['d'] = [opt] (char*) { opt().terminal_detection = false; };
|
cmd_map['d'] = [opt] (const char*) { opt().terminal_detection = false; };
|
||||||
// --no-terminal-data-request
|
// --no-terminal-data-request
|
||||||
cmd_map['r'] = [opt] (char*) { opt().terminal_data_request = false; };
|
cmd_map['r'] = [opt] (const char*) { opt().terminal_data_request = false; };
|
||||||
// --no-color-change
|
// --no-color-change
|
||||||
cmd_map['c'] = [opt] (char*) { opt().color_change = false; };
|
cmd_map['c'] = [opt] (const char*) { opt().color_change = false; };
|
||||||
// --no-sgr-optimizer
|
// --no-sgr-optimizer
|
||||||
cmd_map['s'] = [opt] (char*) { opt().sgr_optimizer = false; };
|
cmd_map['s'] = [opt] (const char*) { opt().sgr_optimizer = false; };
|
||||||
// --vgafont
|
// --vgafont
|
||||||
cmd_map['v'] = [opt] (char*) { opt().vgafont = true; };
|
cmd_map['v'] = [opt] (const char*) { opt().vgafont = true; };
|
||||||
// --newfont
|
// --newfont
|
||||||
cmd_map['n'] = [opt] (char*) { opt().newfont = true; };
|
cmd_map['n'] = [opt] (const char*) { opt().newfont = true; };
|
||||||
// --dark-theme
|
// --dark-theme
|
||||||
cmd_map['t'] = [opt] (char*) { opt().dark_theme = true; };
|
cmd_map['t'] = [opt] (const char*) { opt().dark_theme = true; };
|
||||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||||
// --no-esc-for-alt-meta
|
// --no-esc-for-alt-meta
|
||||||
cmd_map['E'] = [opt] (char*) { opt().meta_sends_escape = false; };
|
cmd_map['E'] = [opt] (const char*) { opt().meta_sends_escape = false; };
|
||||||
// --no-cursorstyle-change
|
// --no-cursorstyle-change
|
||||||
cmd_map['C'] = [opt] (char*) { opt().change_cursorstyle = false; };
|
cmd_map['C'] = [opt] (const char*) { opt().change_cursorstyle = false; };
|
||||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
// --no-esc-for-alt-meta
|
// --no-esc-for-alt-meta
|
||||||
cmd_map['E'] = [opt] (char*) { opt().meta_sends_escape = false; };
|
cmd_map['E'] = [opt] (const char*) { opt().meta_sends_escape = false; };
|
||||||
#endif
|
#endif
|
||||||
return cmd_map;
|
return cmd_map;
|
||||||
}
|
}
|
||||||
|
@ -836,7 +836,7 @@ bool FApplication::processAccelerator (const FWidget* const& widget) const
|
||||||
{
|
{
|
||||||
bool accpt{false};
|
bool accpt{false};
|
||||||
|
|
||||||
if ( widget && widget->getAcceleratorList().empty() )
|
if ( widget || widget->getAcceleratorList().empty() )
|
||||||
return accpt;
|
return accpt;
|
||||||
|
|
||||||
for (auto&& item : widget->getAcceleratorList())
|
for (auto&& item : widget->getAcceleratorList())
|
||||||
|
|
|
@ -451,7 +451,7 @@ void FButtonGroup::drawText ( const FString& label_text
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
bool FButtonGroup::directFocusCheckedRadioButton (FToggleButton* item)
|
bool FButtonGroup::directFocusCheckedRadioButton (FToggleButton* item) const
|
||||||
{
|
{
|
||||||
if ( ! isRadioButton(item) )
|
if ( ! isRadioButton(item) )
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -1622,7 +1622,7 @@ inline bool FListBox::deletePreviousCharacter()
|
||||||
{
|
{
|
||||||
const std::size_t inc_len = inc_search.getLength();
|
const std::size_t inc_len = inc_search.getLength();
|
||||||
|
|
||||||
if ( inc_len <= 0 )
|
if ( inc_len == 0 )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
inc_search.remove(inc_len - 1, 1);
|
inc_search.remove(inc_len - 1, 1);
|
||||||
|
|
|
@ -127,7 +127,7 @@ class FButtonGroup : public FScrollView
|
||||||
// Methods
|
// Methods
|
||||||
void init();
|
void init();
|
||||||
void drawText (const FString&, std::size_t);
|
void drawText (const FString&, std::size_t);
|
||||||
bool directFocusCheckedRadioButton (FToggleButton*);
|
bool directFocusCheckedRadioButton (FToggleButton*) const;
|
||||||
bool directFocusRadioButton();
|
bool directFocusRadioButton();
|
||||||
void directFocus();
|
void directFocus();
|
||||||
void focusCheckedRadioButton (FToggleButton*, FFocusEvent*);
|
void focusCheckedRadioButton (FToggleButton*, FFocusEvent*);
|
||||||
|
|
Loading…
Reference in New Issue