mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Partially fix switching between modi, does not work for script mode.
Issue: #1286
This commit is contained in:
parent
8ac9890e8b
commit
a3f12837cb
6 changed files with 17 additions and 2 deletions
|
@ -1058,6 +1058,8 @@ static ModeMode drun_mode_result ( Mode *sw, int mretv, char **input, unsigned i
|
|||
rmpd->cmd_list_length--;
|
||||
}
|
||||
retv = RELOAD_DIALOG;
|
||||
} else if ( mretv & MENU_CUSTOM_COMMAND ) {
|
||||
retv = ( mretv & MENU_LOWER_MASK );
|
||||
}
|
||||
return retv;
|
||||
}
|
||||
|
|
|
@ -238,8 +238,9 @@ static ModeMode file_browser_mode_result ( Mode *sw, int mretv, char **input, un
|
|||
}
|
||||
else if ( mretv & MENU_QUICK_SWITCH ) {
|
||||
retv = ( mretv & MENU_LOWER_MASK );
|
||||
}
|
||||
else if ( ( mretv & MENU_OK ) ) {
|
||||
} else if ( mretv & MENU_CUSTOM_COMMAND ) {
|
||||
retv = ( mretv & MENU_LOWER_MASK );
|
||||
} else if ( ( mretv & MENU_OK ) ) {
|
||||
if ( selected_line < pd->array_length ) {
|
||||
if ( pd->array[selected_line].type == UP ) {
|
||||
GFile *new = g_file_get_parent ( pd->current_dir );
|
||||
|
|
|
@ -71,6 +71,11 @@ static ModeMode help_keys_mode_result ( G_GNUC_UNUSED Mode *sw,
|
|||
G_GNUC_UNUSED char **input,
|
||||
G_GNUC_UNUSED unsigned int selected_line )
|
||||
{
|
||||
|
||||
if ( mretv & MENU_CUSTOM_COMMAND ) {
|
||||
int retv = ( mretv & MENU_LOWER_MASK );
|
||||
return retv;
|
||||
}
|
||||
return MODE_EXIT;
|
||||
}
|
||||
static void help_keys_mode_destroy ( Mode *sw )
|
||||
|
|
|
@ -391,6 +391,9 @@ static ModeMode run_mode_result ( Mode *sw, int mretv, char **input, unsigned in
|
|||
retv = RELOAD_DIALOG;
|
||||
run_mode_destroy ( sw );
|
||||
run_mode_init ( sw );
|
||||
|
||||
} else if ( mretv & MENU_CUSTOM_COMMAND ) {
|
||||
retv = ( mretv & MENU_LOWER_MASK );
|
||||
}
|
||||
return retv;
|
||||
}
|
||||
|
|
|
@ -606,6 +606,8 @@ static ModeMode ssh_mode_result ( Mode *sw, int mretv, char **input, unsigned in
|
|||
retv = RELOAD_DIALOG;
|
||||
ssh_mode_destroy ( sw );
|
||||
ssh_mode_init ( sw );
|
||||
} else if ( mretv & MENU_CUSTOM_COMMAND ) {
|
||||
retv = ( mretv & MENU_LOWER_MASK );
|
||||
}
|
||||
return retv;
|
||||
}
|
||||
|
|
|
@ -715,6 +715,8 @@ static ModeMode window_mode_result ( Mode *sw, int mretv, G_GNUC_UNUSED char **i
|
|||
retv = RELOAD_DIALOG;
|
||||
}
|
||||
g_free ( lf_cmd );
|
||||
} else if ( mretv & MENU_CUSTOM_COMMAND ) {
|
||||
retv = ( mretv & MENU_LOWER_MASK );
|
||||
}
|
||||
return retv;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue