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:
parent
b43fcc4b05
commit
6cd4cbdba8
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue