diff options
Diffstat (limited to 'src/Theme.cc')
-rw-r--r-- | src/Theme.cc | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/Theme.cc b/src/Theme.cc index 564a157..c57c850 100644 --- a/src/Theme.cc +++ b/src/Theme.cc | |||
@@ -57,6 +57,7 @@ | |||
57 | #include "i18n.hh" | 57 | #include "i18n.hh" |
58 | #include "Basemenu.hh" | 58 | #include "Basemenu.hh" |
59 | #include "fluxbox.hh" | 59 | #include "fluxbox.hh" |
60 | #include "StringUtil.hh" | ||
60 | 61 | ||
61 | #include <X11/Xresource.h> | 62 | #include <X11/Xresource.h> |
62 | #include <stdio.h> | 63 | #include <stdio.h> |
@@ -67,21 +68,6 @@ | |||
67 | # define FONT_ELEMENT_SIZE 50 | 68 | # define FONT_ELEMENT_SIZE 50 |
68 | #endif // FONT_ELEMENT_SIZE | 69 | #endif // FONT_ELEMENT_SIZE |
69 | 70 | ||
70 | #ifndef HAVE_STRCASESTR | ||
71 | |||
72 | const char * strcasestr(const char *str, const char *ptn) { | ||
73 | const char *s2, *p2; | ||
74 | for( ; *str; str++) { | ||
75 | for(s2=str,p2=ptn; ; s2++,p2++) { | ||
76 | if (!*p2) return str; | ||
77 | if (toupper(*s2) != toupper(*p2)) break; | ||
78 | } | ||
79 | } | ||
80 | return NULL; | ||
81 | } | ||
82 | |||
83 | #endif | ||
84 | |||
85 | Theme::Theme(Display *display, Window rootwindow, Colormap colormap, int screennum, BImageControl *ic, const char *filename) { | 71 | Theme::Theme(Display *display, Window rootwindow, Colormap colormap, int screennum, BImageControl *ic, const char *filename) { |
86 | 72 | ||
87 | m_screennum = screennum; | 73 | m_screennum = screennum; |
@@ -1161,7 +1147,7 @@ const char *Theme::getFontElement(const char *pattern, char *buf, int bufsiz, .. | |||
1161 | buf[bufsiz-1] = 0; | 1147 | buf[bufsiz-1] = 0; |
1162 | buf[bufsiz-2] = '*'; | 1148 | buf[bufsiz-2] = '*'; |
1163 | while((v = va_arg(va, char *)) != NULL) { | 1149 | while((v = va_arg(va, char *)) != NULL) { |
1164 | p = strcasestr(pattern, v); | 1150 | p = StringUtil::strcasestr(pattern, v); |
1165 | if (p) { | 1151 | if (p) { |
1166 | strncpy(buf, p+1, bufsiz-2); | 1152 | strncpy(buf, p+1, bufsiz-2); |
1167 | p2 = strchr(buf, '-'); | 1153 | p2 = strchr(buf, '-'); |