Mercurial > audlegacy-plugins
changeset 307:5648731be0fd trunk
[svn] Path saving functionality by TiCPU on #audacious. Whitespace fixed, again.
author | chainsaw |
---|---|
date | Fri, 24 Nov 2006 03:27:57 -0800 |
parents | b47f02042530 |
children | 1bf162c7b4b9 |
files | ChangeLog src/paranormal/cfg.c |
diffstat | 2 files changed, 23 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Nov 23 20:20:01 2006 -0800 +++ b/ChangeLog Fri Nov 24 03:27:57 2006 -0800 @@ -1,3 +1,13 @@ +2006-11-24 04:20:01 +0000 William Pitcock <nenolod@nenolod.net> + revision [668] + - pluginize the transport layer. + + trunk/configure.ac | 2 + trunk/src/stdio/Makefile | 19 ++++ + trunk/src/stdio/stdio.c | 203 +++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 223 insertions(+), 1 deletion(-) + + 2006-11-23 08:28:10 +0000 William Pitcock <nenolod@nenolod.net> revision [664] - add a preset by ticpu
--- a/src/paranormal/cfg.c Thu Nov 23 20:20:01 2006 -0800 +++ b/src/paranormal/cfg.c Fri Nov 24 03:27:57 2006 -0800 @@ -7,6 +7,7 @@ #include <glib.h> #include <gtk/gtk.h> +#include <audacious/configdb.h> #include "paranormal.h" #include "actuators.h" @@ -354,9 +355,13 @@ const char *fname; struct pn_actuator *a; GtkCTreeNode *root; + ConfigDb *db; + db = bmp_cfg_db_open(); fname = (char *) gtk_file_selection_get_filename (selector); a = load_preset (fname); + bmp_cfg_db_set_string(db, "paranormal", "last_path", (char*)fname); + bmp_cfg_db_close(db); if (! a) pn_error ("Unable to load file: \"%s\"", fname); else @@ -374,8 +379,15 @@ load_button_cb (GtkButton *button, gpointer data) { GtkWidget *selector; - + ConfigDb *db; + gchar *last_path; + + db = bmp_cfg_db_open(); selector = gtk_file_selection_new ("Load Preset"); + if(bmp_cfg_db_get_string(db, "paranormal", "last_path", &last_path)) { + gtk_file_selection_set_filename(GTK_FILE_SELECTION(selector), last_path); + } + bmp_cfg_db_close(db); gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (selector)->ok_button), "clicked", GTK_SIGNAL_FUNC (load_sel_cb), selector);