ui->note_play=¬e_play;
ui->note_record=¬e_record;
+ui->basedir=NULL;
/* XXX: Make this a configuration option */
#ifdef WITH_DEVICE_770
-ui->basedir=NOTES_BASEDIR_MMC1;
-if (g_mkdir_with_parents(ui->basedir, 0775)==-1) {
- MACRO_BANNER_SHOW_INFO(_window, _("Failed to create directory for sound files!"));
- return TRUE;
-}
+audio_note_set_basedir(NOTES_BASEDIR_MMC1);
#else
-ui->basedir=g_get_home_dir();
+audio_note_setbasedir(g_get_home_dir());
#endif
g_signal_connect(G_OBJECT(ui->btn_record), "clicked", G_CALLBACK(audio_note_record_cb), ui);
return ui;
}
+void
+audio_note_set_basedir(audio_note_ui *ui, const gchar *basedir)
+{
+if (ui->basedir)
+ g_free(ui->basedir)
+ui->basedir=g_strdup(basedir);
+if (g_mkdir_with_parents(ui->basedir, 0775)==-1) {
+}
+}
+
static gboolean
audio_note_bus_cb(GstBus *bus, GstMessage *msg, gpointer data)
{