From ee03faee2a0e73f7a952289ae8fd0c4f8df8ca41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20Pettersen?= Date: Sun, 7 Mar 1999 10:46:34 +0000 Subject: add gen_8_3_dll_name() --- gtk/gtkthemes.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'gtk/gtkthemes.c') diff --git a/gtk/gtkthemes.c b/gtk/gtkthemes.c index 18801056f4..b92a218ae1 100644 --- a/gtk/gtkthemes.c +++ b/gtk/gtkthemes.c @@ -53,6 +53,17 @@ struct _GtkThemeEnginePrivate { static GHashTable *engine_hash = NULL; +#ifdef __EMX__ +static void gen_8_3_dll_name(gchar *name, gchar *fullname) +{ + /* 8.3 dll filename restriction */ + fullname[0] = '_'; + strncpy (fullname + 1, name, 7); + fullname[8] = '\0'; + strcat (fullname, ".dll"); +} +#endif + GtkThemeEngine* gtk_theme_engine_get (gchar *name) { @@ -71,8 +82,20 @@ gtk_theme_engine_get (gchar *name) gchar *engine_path; GModule *library; +#ifndef __EMX__ g_snprintf (fullname, 1024, "lib%s.so", name); +#else + gen_8_3_dll_name(name, fullname); +#endif engine_path = gtk_rc_find_module_in_path (fullname); +#ifdef __EMX__ + if (!engine_path) + { + /* try theme name without prefix '_' */ + memmove(fullname, fullname + 1, strlen(fullname)); + engine_path = gtk_rc_find_module_in_path (fullname); + } +#endif if (!engine_path) { -- cgit v1.2.1