ocarina: Don't do anything if chooser result is blank
If we don't have a filepath to scan or play then we shouldn't do anything with the path.
This commit is contained in:
parent
705ca61e6a
commit
36212af3a4
|
@ -60,8 +60,10 @@ GtkWidget *make_text_button(const gchar *stockid,
|
|||
static void on_click_open_file(GtkWidget *b, GdkEvent *e, gpointer d)
|
||||
{
|
||||
string file = ocarina_choose_file();
|
||||
print("Playing file: " + file);
|
||||
libsaria_load(file);
|
||||
if (file != "") {
|
||||
print("Playing file: " + file);
|
||||
libsaria_load(file);
|
||||
}
|
||||
}
|
||||
|
||||
GtkWidget *make_open_button()
|
||||
|
|
|
@ -12,7 +12,8 @@ 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);
|
||||
if (dir != "" )
|
||||
print("Scanning dir: " + dir);
|
||||
}
|
||||
|
||||
static GtkWidget *make_add_button()
|
||||
|
|
Loading…
Reference in New Issue