47243fb
diff -Nur audacious-plugins-2.2-orig/src/ladspa/ladspa.c audacious-plugins-2.2-ladspa/src/ladspa/ladspa.c
47243fb
--- audacious-plugins-2.2-orig/src/ladspa/ladspa.c	2009-11-22 23:49:53.000000000 +0100
45defd2
+++ audacious-plugins-2.2-ladspa/src/ladspa/ladspa.c	2010-02-04 12:07:59.000000000 +0100
47243fb
@@ -145,7 +145,6 @@
47243fb
 
47243fb
 static void restore(void)
47243fb
 {
47243fb
-#if 0
47243fb
     mcs_handle_t *db;
47243fb
     gint k, plugins = 0;
47243fb
 
47243fb
@@ -157,16 +156,20 @@
47243fb
 	gint id;
47243fb
 	int port, ports = 0;
47243fb
 	plugin_instance *instance;
47243fb
-	gchar *bn, *section;
47243fb
+	gchar *bn, *section, *file;
47243fb
 
47243fb
-	bn = g_path_get_basename(instance->filename);
47243fb
-	section = g_strdup_printf("ladspa_plugin:%s:%d", bn, k);
47243fb
-	g_free(bn);
47243fb
+	section = g_strdup_printf("ladspa_plugin%ld", k);
47243fb
 
47243fb
 	aud_cfg_db_get_int(db, section, "id", &id;;
47243fb
 	aud_cfg_db_get_int(db, section, "ports", &ports);
47243fb
-
47243fb
-	instance = add_plugin(get_plugin_by_id(id));
47243fb
+	if (!aud_cfg_db_get_string(db, section, "file", &file)) {
47243fb
+        g_free(section);
47243fb
+        continue;
47243fb
+    }
47243fb
+	bn = g_path_get_basename(file);
45defd2
+    g_free(file);
47243fb
+	instance = add_plugin(get_plugin_by_id(bn,id));
47243fb
+    g_free(bn);
47243fb
 	if (!instance)
47243fb
 	    continue;		/* couldn't load this plugin */
47243fb
 
47243fb
@@ -180,7 +183,6 @@
47243fb
     }
47243fb
 
47243fb
     aud_cfg_db_close(db);
47243fb
-#endif
47243fb
 
47243fb
     state.initialised = TRUE;
47243fb
 }
47243fb
@@ -222,8 +224,8 @@
47243fb
     if (ladspa_path == NULL)
47243fb
     {
47243fb
 	/* Fallback, look in obvious places */
47243fb
-	find_plugins("/usr/lib/ladspa");
47243fb
-	find_plugins("/usr/local/lib/ladspa");
47243fb
+	find_plugins("__RPM_LIBDIR__/ladspa");
47243fb
+	find_plugins("/usr/local/__RPM_LIB__/ladspa");
47243fb
     }
47243fb
     else
47243fb
     {
47243fb
@@ -306,7 +308,7 @@
47243fb
 	int port, ports = 0;
47243fb
 
47243fb
 	bn = g_path_get_basename(instance->filename);
47243fb
-	section = g_strdup_printf("ladspa_plugin:%s:%ld", bn, instance->descriptor->UniqueID);
47243fb
+	section = g_strdup_printf("ladspa_plugin%ld", plugins);
47243fb
 	g_free(bn);
47243fb
 
47243fb
 	aud_cfg_db_set_int(db, section, "id", instance->descriptor->UniqueID);
47243fb
@@ -325,6 +327,7 @@
47243fb
 	aud_cfg_db_set_int(db, section, "ports", ports);
47243fb
 	g_free(section);
47243fb
 	ladspa_shutdown(instance);
47243fb
+    plugins++;
47243fb
     }
47243fb
     G_UNLOCK(running_plugins);
47243fb
 
78d7f96
diff -Nur audacious-plugins-2.2-orig/src/ladspa/ladspa.c audacious-plugins-2.2/src/ladspa/ladspa.c
78d7f96
--- audacious-plugins-2.2-orig/src/ladspa/ladspa.c	2009-11-22 23:49:53.000000000 +0100
78d7f96
+++ audacious-plugins-2.2/src/ladspa/ladspa.c	2010-02-04 13:18:49.000000000 +0100
78d7f96
@@ -702,6 +702,7 @@
78d7f96
     }
78d7f96
 
78d7f96
     instance->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
78d7f96
+    gtk_window_set_type_hint(GTK_WINDOW(instance->window), GDK_WINDOW_TYPE_HINT_DIALOG);
78d7f96
     gtk_window_set_title(GTK_WINDOW(instance->window), plugin->Name);
78d7f96
 
78d7f96
     vbox = gtk_vbox_new(FALSE, 3);
78d7f96
@@ -1076,6 +1077,7 @@
78d7f96
     }
78d7f96
 
78d7f96
     config_window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
78d7f96
+    gtk_window_set_type_hint(GTK_WINDOW(config_window), GDK_WINDOW_TYPE_HINT_DIALOG);
78d7f96
     vbox = gtk_vbox_new(FALSE, 0);
78d7f96
     hbox = gtk_hbox_new(TRUE, 0);
78d7f96