summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/rofi.c3
-rw-r--r--source/theme.c9
2 files changed, 8 insertions, 4 deletions
diff --git a/source/rofi.c b/source/rofi.c
index c933a742..0f8d285f 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -1025,14 +1025,17 @@ int main ( int argc, char *argv[] )
if ( !dmenu_mode ) {
// setup_modi
setup_modi ();
+ TICK_N ( "Setup Modi" );
}
if ( find_arg ( "-no-config" ) < 0 ) {
// Reload for dynamic part.
load_configuration_dynamic ( );
+ TICK_N ( "Load config dynamic" );
}
// Parse command line for settings, independent of other -no-config.
config_parse_cmd_options_dynamic ( );
+ TICK_N ( "Load cmd config dynamic" );
if ( config.theme ) {
TICK_N ( "Parse theme" );
diff --git a/source/theme.c b/source/theme.c
index 7c49a9ae..13d9de44 100644
--- a/source/theme.c
+++ b/source/theme.c
@@ -314,17 +314,18 @@ static ThemeWidget *rofi_theme_find ( ThemeWidget *widget, const char *name, con
if ( widget == NULL || name == NULL ) {
return widget;
}
- char **names = g_strsplit ( name, ".", 0 );
+ char *tname = g_strdup(name );
+ char *saveptr = NULL;
int found = TRUE;
- for ( unsigned int i = 0; found && names && names[i]; i++ ) {
+ for (const char *iter = strtok_r (tname, ".", &saveptr); iter != NULL ; iter = strtok_r ( NULL, "." , &saveptr ) ) {
found = FALSE;
- ThemeWidget *f = rofi_theme_find_single ( widget, names[i] );
+ ThemeWidget *f = rofi_theme_find_single ( widget, iter );
if ( f != widget ) {
widget = f;
found = TRUE;
}
}
- g_strfreev ( names );
+ g_free ( tname );
if ( !exact || found ) {
return widget;
}