* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
+#include <config.h>
+
#include <stdio.h>
#include <stdlib.h>
#include <gmodule.h>
#include "gtkthemes.h"
#include "gtkrc.h"
-#include "config.h"
#include "gtkintl.h"
+#include "gtkalias.h"
typedef struct _GtkThemeEngineClass GtkThemeEngineClass;
{
GtkThemeEngine *engine = GTK_THEME_ENGINE (module);
- gchar *fullname;
gchar *engine_path;
- fullname = g_module_build_path (NULL, engine->name);
- engine_path = gtk_rc_find_module_in_path (fullname);
+ engine_path = gtk_rc_find_module_in_path (engine->name);
if (!engine_path)
{
- g_warning (_("Unable to locate loadable module in module_path: \"%s\","),
- fullname);
-
- g_free (fullname);
+ g_warning (_("Unable to locate theme engine in module_path: \"%s\","),
+ engine->name);
return FALSE;
}
- g_free (fullname);
-
/* load the lib */
GTK_NOTE (MISC, g_message ("Loading Theme %s\n", engine_path));
- engine->library = g_module_open (engine_path, 0);
+ engine->library = g_module_open (engine_path, G_MODULE_BIND_LAZY | G_MODULE_BIND_LOCAL);
g_free(engine_path);
if (!engine->library)
{
NULL, /* instance_init */
};
- theme_engine_type = g_type_register_static (G_TYPE_TYPE_MODULE, "GtkThemeEngine", &theme_engine_info, 0);
+ theme_engine_type =
+ g_type_register_static (G_TYPE_TYPE_MODULE, I_("GtkThemeEngine"),
+ &theme_engine_info, 0);
}
return theme_engine_type;
if (!result)
{
- result = GTK_THEME_ENGINE (g_object_new (GTK_TYPE_THEME_ENGINE, NULL));
+ result = g_object_new (GTK_TYPE_THEME_ENGINE, NULL);
g_type_module_set_name (G_TYPE_MODULE (result), name);
+ result->name = g_strdup (name);
g_hash_table_insert (engine_hash, result->name, result);
}
return engine->create_rc_style ();
}
+
+#define __GTK_THEMES_C__
+#include "gtkaliasdef.c"