time_t t;
struct tm *tmp;
-/* XXX: Make this a configuration option */
-#ifdef WITH_DEVICE_770
-basedir=NOTES_BASEDIR_MMC1;
-if (g_mkdir_with_parents(basedir, 0775)==-1) {
- MACRO_BANNER_SHOW_INFO(_window, _("Failed to create directory for sound files!"));
- return TRUE;
-}
-#else
-basedir=g_get_home_dir();
-#endif
-
t=time(NULL);
tmp=localtime(&t);
if (tmp == NULL) {
if (ui->cfile)
g_free(ui->cfile);
-ui->cfile=g_strdup_printf("%s/an-%s.wav", basedir, buffer);
+ui->cfile=g_strdup_printf("%s/an-%s.wav", ui->basedir, buffer);
if (audio_note_record(ui->cfile)==TRUE) {
audio_note_position_display(ui, TRUE);
gtk_widget_set_sensitive(ui->btn_play, FALSE);
gtk_widget_set_sensitive(ui->btn_stop, FALSE);
-gtk_box_pack_start(GTK_BOX(ui->vbox), ui->lbl_time, TRUE, TRUE, 0);
+gtk_box_pack_start(GTK_BOX(ui->vbox), ui->lbl_time, TRUE, FALSE, 0);
+
gtk_box_pack_start(GTK_BOX(ui->vbox), ui->btn_record, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(ui->vbox), ui->btn_play, TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(ui->vbox), ui->btn_stop, TRUE, TRUE, 0);
ui->note_play=¬e_play;
ui->note_record=¬e_record;
+/* 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;
+}
+#else
+ui->basedir=g_get_home_dir();
+#endif
+
g_signal_connect(G_OBJECT(ui->btn_record), "clicked", G_CALLBACK(audio_note_record_cb), ui);
g_signal_connect(G_OBJECT(ui->btn_play), "clicked", G_CALLBACK(audio_note_play_cb), ui);
g_signal_connect(G_OBJECT(ui->btn_stop), "clicked", G_CALLBACK(audio_note_stop_cb), ui);