diff options
Diffstat (limited to 'source/theme.c')
-rw-r--r-- | source/theme.c | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/source/theme.c b/source/theme.c index 26a4b854..4bf005ea 100644 --- a/source/theme.c +++ b/source/theme.c @@ -1062,94 +1062,8 @@ gboolean rofi_theme_is_empty ( void ) #ifdef THEME_CONVERTER -static char * rofi_theme_convert_color ( char *col ) -{ - char *r = g_strstrip ( col ); - if ( *r == '#' && strlen ( r ) == 9 ) { - char a1 = r[1]; - char a2 = r[2]; - r[1] = r[3]; - r[2] = r[4]; - r[3] = r[5]; - r[4] = r[6]; - r[5] = r[7]; - r[6] = r[8]; - r[7] = a1; - r[8] = a2; - } - - return r; -} void rofi_theme_convert_old ( void ) { - { - char *str = g_strdup_printf ( "#window { border: %d; padding: %d;}", config.menu_bw, config.padding ); - rofi_theme_parse_string ( str ); - g_free ( str ); - } - if ( config.color_window ) { - char **retv = g_strsplit ( config.color_window, ",", -1 ); - const char * const conf[] = { - "* { background: %s; }", - "* { border-color: %s; }", - "* { separatorcolor: %s; }" - }; - for ( int i = 0; retv && i < 3 && retv[i]; i++ ) { - char *str = g_strdup_printf ( conf[i], rofi_theme_convert_color ( retv[i] ) ); - rofi_theme_parse_string ( str ); - g_free ( str ); - } - g_strfreev ( retv ); - } - if ( config.color_normal ) { - char **retv = g_strsplit ( config.color_normal, ",", -1 ); - const char * const conf[] = { - "* { normal-background: %s; }", - "* { foreground: %s; normal-foreground: @foreground; alternate-normal-foreground: @foreground; }", - "* { alternate-normal-background: %s; }", - "* { selected-normal-background: %s; }", - "* { selected-normal-foreground: %s; }" - }; - for ( int i = 0; retv && retv[i] && i < 5; i++ ) { - char *str = g_strdup_printf ( conf[i], rofi_theme_convert_color ( retv[i] ) ); - rofi_theme_parse_string ( str ); - g_free ( str ); - } - g_strfreev ( retv ); - } - if ( config.color_urgent ) { - char **retv = g_strsplit ( config.color_urgent, ",", -1 ); - const char * const conf[] = { - "* { urgent-background: %s; }", - "* { urgent-foreground: %s; alternate-urgent-foreground: @urgent-foreground;}", - "* { alternate-urgent-background: %s; }", - "* { selected-urgent-background: %s; }", - "* { selected-urgent-foreground: %s; }" - }; - for ( int i = 0; retv && retv[i] && i < 5; i++ ) { - char *str = g_strdup_printf ( conf[i], rofi_theme_convert_color ( retv[i] ) ); - rofi_theme_parse_string ( str ); - g_free ( str ); - } - g_strfreev ( retv ); - } - if ( config.color_active ) { - char **retv = g_strsplit ( config.color_active, ",", -1 ); - const char * const conf[] = { - "* { active-background: %s; }", - "* { active-foreground: %s; alternate-active-foreground: @active-foreground;}", - "* { alternate-active-background: %s; }", - "* { selected-active-background: %s; }", - "* { selected-active-foreground: %s; }" - }; - for ( int i = 0; retv && retv[i] && i < 5; i++ ) { - char *str = g_strdup_printf ( conf[i], rofi_theme_convert_color ( retv[i] ) ); - rofi_theme_parse_string ( str ); - g_free ( str ); - } - g_strfreev ( retv ); - } - if ( config.separator_style != NULL ) { if ( g_strcmp0 ( config.separator_style, "none" ) == 0 ) { const char *const str = "#listview { border: 0px; }"; |