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:
parent
13244b880c
commit
705ca61e6a
|
@ -5,5 +5,6 @@
|
|||
using namespace std;
|
||||
|
||||
string ocarina_choose_file();
|
||||
string ocarina_choose_dir();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user