Fix and optimize 20200908 (#1184)
* combi: Reuse own get_num_entries in self-init * combi_mode_parse_switchers: Remove duplicated mode pointer * combi_mode_parse_switchers: Regroup mode search lines * combi_mode_result: Simplify switcher search quit * mode_result: Check for mode switch actions before hook These are over-mode actions, which should not be handled in mode hooks at all.
This commit is contained in:
@@ -278,28 +278,7 @@ static ModeMode script_mode_result ( Mode *sw, int mretv, char **input, unsigned
|
||||
DmenuScriptEntry *new_list = NULL;
|
||||
unsigned int new_length = 0;
|
||||
|
||||
if ( ( mretv & MENU_NEXT ) ) {
|
||||
retv = NEXT_DIALOG;
|
||||
}
|
||||
else if ( ( mretv & MENU_PREVIOUS ) ) {
|
||||
retv = PREVIOUS_DIALOG;
|
||||
}
|
||||
else if ( ( mretv & MENU_QUICK_SWITCH ) ) {
|
||||
//retv = 1+( mretv & MENU_LOWER_MASK );
|
||||
script_mode_reset_highlight ( sw );
|
||||
if ( selected_line != UINT32_MAX ) {
|
||||
new_list = execute_executor ( sw, rmpd->cmd_list[selected_line].entry, &new_length, 10 + ( mretv & MENU_LOWER_MASK ), &( rmpd->cmd_list[selected_line] ) );
|
||||
}
|
||||
else {
|
||||
if ( rmpd->no_custom == FALSE ) {
|
||||
new_list = execute_executor ( sw, *input, &new_length, 10 + ( mretv & MENU_LOWER_MASK ), NULL );
|
||||
}
|
||||
else {
|
||||
return RELOAD_DIALOG;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if ( ( mretv & MENU_OK ) && rmpd->cmd_list[selected_line].entry != NULL ) {
|
||||
if ( ( mretv & MENU_OK ) && rmpd->cmd_list[selected_line].entry != NULL ) {
|
||||
if ( rmpd->cmd_list[selected_line].nonselectable ) {
|
||||
return RELOAD_DIALOG;
|
||||
}
|
||||
|
Reference in New Issue
Block a user