1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Add dir parser function

This commit is contained in:
Dave Davenport 2017-03-04 12:22:28 +01:00
parent 86dc1e1448
commit 8ee37012d1

View file

@ -439,24 +439,10 @@ static gboolean rofi_collect_modi_add ( Mode *mode )
}
return FALSE;
}
/**
* Find all available modi.
*/
static void rofi_collect_modi ( void )
{
#ifdef WINDOW_MODE
rofi_collect_modi_add ( &window_mode );
rofi_collect_modi_add ( &window_mode_cd );
#endif
rofi_collect_modi_add ( &run_mode );
rofi_collect_modi_add ( &ssh_mode );
#ifdef ENABLE_DRUN
rofi_collect_modi_add ( &drun_mode );
#endif
rofi_collect_modi_add ( &combi_mode );
rofi_collect_modi_add ( &help_keys_mode );
GDir *dir = g_dir_open ( PLUGIN_PATH, 0, NULL );
static void rofi_collect_modi_dir ( const char *base_dir )
{
GDir *dir = g_dir_open ( base_dir, 0, NULL );
if ( dir ) {
const char *dn = NULL;
while ( ( dn = g_dir_read_name ( dir ) ) )
@ -489,6 +475,26 @@ static void rofi_collect_modi ( void )
}
}
/**
* Find all available modi.
*/
static void rofi_collect_modi ( void )
{
#ifdef WINDOW_MODE
rofi_collect_modi_add ( &window_mode );
rofi_collect_modi_add ( &window_mode_cd );
#endif
rofi_collect_modi_add ( &run_mode );
rofi_collect_modi_add ( &ssh_mode );
#ifdef ENABLE_DRUN
rofi_collect_modi_add ( &drun_mode );
#endif
rofi_collect_modi_add ( &combi_mode );
rofi_collect_modi_add ( &help_keys_mode );
rofi_collect_modi_dir ( PLUGIN_PATH );
}
/**
* Setup configuration for config.
*/