ocarina: Call the add_library() function

This function will add a new path to the library map and then scan it,
adding music files to the library.
This commit is contained in:
Bryan Schumaker 2011-09-12 14:18:30 -04:00
parent b43fcc4b05
commit 6cd4cbdba8
1 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,7 @@
#include <ocarina/button.h>
#include <ocarina/gtk.h>
#include <libsaria/library.h>
#include <libsaria/print.h>
/* This is a gtk vbox */
@ -12,8 +13,10 @@ static GtkWidget *library_settings = NULL;
static void on_click_add(GtkWidget *b, GdkEvent *e, gpointer d)
{
string dir = ocarina_choose_dir();
if (dir != "" )
if (dir != "" ) {
print("Scanning dir: " + dir);
libsaria_add_library(dir);
}
}
static GtkWidget *make_add_button()