summaryrefslogtreecommitdiff
path: root/x11/efltk/patches/patch-ag
diff options
context:
space:
mode:
Diffstat (limited to 'x11/efltk/patches/patch-ag')
-rw-r--r--x11/efltk/patches/patch-ag40
1 files changed, 40 insertions, 0 deletions
diff --git a/x11/efltk/patches/patch-ag b/x11/efltk/patches/patch-ag
new file mode 100644
index 00000000000..07fecaecade
--- /dev/null
+++ b/x11/efltk/patches/patch-ag
@@ -0,0 +1,40 @@
+$NetBSD: patch-ag,v 1.1 2006/02/18 14:07:54 joerg Exp $
+
+--- src/core/Fl_Style.cpp.orig 2003-02-02 10:50:33.000000000 +0000
++++ src/core/Fl_Style.cpp
+@@ -284,21 +284,34 @@ Fl_Theme Fl_Style::load_theme(const char
+
+ Fl_Theme Fl_Style::load_theme(const char* name)
+ {
++ static const char so_suffix[] = ".so";
++ const char *suffix = so_suffix;
++
+ // no name leaves the built-in default:
+ if (!name || !*name) return fltk_theme;
+
++retry:
+ // add ".theme" if it is not there:
+ char name_buf[FL_PATH_MAX];
+ int n = strlen(name);
+ if (n < 6 || strcasecmp(name+n-6, ".theme"))
+ {
+- snprintf(name_buf, FL_PATH_MAX, "%s.theme", name);
++ snprintf(name_buf, FL_PATH_MAX, "%s.theme%s", name, suffix);
++ name = name_buf;
++ } else {
++ snprintf(name_buf, FL_PATH_MAX, "%s%s", name, suffix);
+ name = name_buf;
+ }
+
++
++
+ // search for the file:
+ const char *path = fl_find_config_file(name);
+ if (!path) {
++ if (suffix == so_suffix) {
++ suffix = "";
++ goto retry;
++ }
+ // If they said "default" it is ok if the plugin is not found:
+ if (!strncmp(name, "default.", 8)) return fltk_theme;
+ return 0;