]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkthemes.c
actually directly return after handling column button focus; we disable
[~andy/gtk] / gtk / gtkthemes.c
index af3a2cb048c89107030f45b9f7c319ba979421da..784093554522c9e3ded1699cd35b0f2a9769719d 100644 (file)
  * 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;
 
@@ -60,28 +62,22 @@ gtk_theme_engine_load (GTypeModule *module)
 {
   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)
     {
@@ -153,7 +149,9 @@ gtk_theme_engine_get_type (void)
         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;
@@ -173,8 +171,9 @@ gtk_theme_engine_get (const gchar *name)
 
   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);
     }
@@ -192,3 +191,6 @@ gtk_theme_engine_create_rc_style (GtkThemeEngine *engine)
 
   return engine->create_rc_style ();
 }
+
+#define __GTK_THEMES_C__
+#include "gtkaliasdef.c"