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