diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/skin_engine/skin_tokens.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/apps/gui/skin_engine/skin_tokens.c b/apps/gui/skin_engine/skin_tokens.c index fa80e86ab6..105a6789ee 100644 --- a/apps/gui/skin_engine/skin_tokens.c +++ b/apps/gui/skin_engine/skin_tokens.c | |||
@@ -901,10 +901,10 @@ const char *get_token_value(struct gui_wps *gwps, | |||
901 | 901 | ||
902 | case WPS_TOKEN_SETTING: | 902 | case WPS_TOKEN_SETTING: |
903 | { | 903 | { |
904 | const struct settings_list *s = settings+token->value.i; | ||
904 | if (intval) | 905 | if (intval) |
905 | { | 906 | { |
906 | /* Handle contionals */ | 907 | /* Handle contionals */ |
907 | const struct settings_list *s = settings+token->value.i; | ||
908 | switch (s->flags&F_T_MASK) | 908 | switch (s->flags&F_T_MASK) |
909 | { | 909 | { |
910 | case F_T_INT: | 910 | case F_T_INT: |
@@ -930,6 +930,7 @@ const char *get_token_value(struct gui_wps *gwps, | |||
930 | *intval = *(bool*)s->setting?1:2; | 930 | *intval = *(bool*)s->setting?1:2; |
931 | break; | 931 | break; |
932 | case F_T_CHARPTR: | 932 | case F_T_CHARPTR: |
933 | case F_T_UCHARPTR: | ||
933 | /* %?St|name|<if non empty string|if empty> | 934 | /* %?St|name|<if non empty string|if empty> |
934 | * The string's emptyness discards the setting's | 935 | * The string's emptyness discards the setting's |
935 | * prefix and suffix */ | 936 | * prefix and suffix */ |
@@ -941,6 +942,13 @@ const char *get_token_value(struct gui_wps *gwps, | |||
941 | break; | 942 | break; |
942 | } | 943 | } |
943 | } | 944 | } |
945 | /* Special handlng for filenames because we dont want to show the prefix */ | ||
946 | if ((s->flags&F_T_MASK) == F_T_UCHARPTR || | ||
947 | (s->flags&F_T_MASK) == F_T_UCHARPTR) | ||
948 | { | ||
949 | if (s->filename_setting->prefix) | ||
950 | return (char*)s->setting; | ||
951 | } | ||
944 | cfg_to_string(token->value.i,buf,buf_size); | 952 | cfg_to_string(token->value.i,buf,buf_size); |
945 | return buf; | 953 | return buf; |
946 | } | 954 | } |