mirror of
https://github.com/lbonn/rofi
synced 2024-11-27 14:21:07 +00:00
parent
79f6cf2038
commit
56c373bffc
2 changed files with 10 additions and 1 deletions
|
@ -125,7 +125,14 @@ static int combi_mode_init ( Mode *sw )
|
||||||
static unsigned int combi_mode_get_num_entries ( const Mode *sw )
|
static unsigned int combi_mode_get_num_entries ( const Mode *sw )
|
||||||
{
|
{
|
||||||
const CombiModePrivateData *pd = (const CombiModePrivateData *) mode_get_private_data ( sw );
|
const CombiModePrivateData *pd = (const CombiModePrivateData *) mode_get_private_data ( sw );
|
||||||
return pd->cmd_list_length;
|
unsigned int length = 0;
|
||||||
|
for ( unsigned int i = 0; i < pd->num_switchers; i++ ) {
|
||||||
|
unsigned int entries = mode_get_num_entries ( pd->switchers[i].mode );
|
||||||
|
pd->starts[i] = length;
|
||||||
|
pd->lengths[i] = entries;
|
||||||
|
length+=entries;
|
||||||
|
}
|
||||||
|
return length;
|
||||||
}
|
}
|
||||||
static void combi_mode_destroy ( Mode *sw )
|
static void combi_mode_destroy ( Mode *sw )
|
||||||
{
|
{
|
||||||
|
|
|
@ -579,6 +579,8 @@ static int add_mode ( const char * token )
|
||||||
// If not build in, use custom modi.
|
// If not build in, use custom modi.
|
||||||
Mode *sw = script_switcher_parse_setup ( token );
|
Mode *sw = script_switcher_parse_setup ( token );
|
||||||
if ( sw != NULL ) {
|
if ( sw != NULL ) {
|
||||||
|
// Add to available list, so combi can find it.
|
||||||
|
rofi_collect_modi_add(sw);
|
||||||
modi[num_modi] = sw;
|
modi[num_modi] = sw;
|
||||||
num_modi++;
|
num_modi++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue