ocarina: Select a directory to scan

This directory will eventually be scanned and added to the library.
Right now I just print it to the screen.
This commit is contained in:
Bryan Schumaker 2011-09-10 10:45:52 -04:00
parent 13244b880c
commit 705ca61e6a
3 changed files with 11 additions and 1 deletions

View File

@ -5,5 +5,6 @@
using namespace std;
string ocarina_choose_file();
string ocarina_choose_dir();
#endif

View File

@ -26,3 +26,8 @@ string ocarina_choose_file()
{
return ocarina_generic_chooser(GTK_FILE_CHOOSER_ACTION_OPEN);
}
string ocarina_choose_dir()
{
return ocarina_generic_chooser(GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
}

View File

@ -1,14 +1,18 @@
#include <ocarina/settings.h>
#include <ocarina/chooser.h>
#include <ocarina/button.h>
#include <ocarina/gtk.h>
#include <libsaria/print.h>
/* This is a gtk vbox */
static GtkWidget *library_settings = NULL;
static void on_click_add(GtkWidget *b, GdkEvent *e, gpointer d)
{
string dir = ocarina_choose_dir();
print("Scanning dir: " + dir);
}
static GtkWidget *make_add_button()