]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkthemes.c
Separate out tracking of the X server focus window from tracking our idea
[~andy/gtk] / gtk / gtkthemes.c
index af3a2cb048c89107030f45b9f7c319ba979421da..70201b75c5a59d638deceac83693862a3b5f2017 100644 (file)
@@ -60,23 +60,17 @@ 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));
@@ -153,7 +147,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, "GtkThemeEngine",
+                               &theme_engine_info, 0);
     }
   
   return theme_engine_type;
@@ -173,8 +169,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);
     }