From c0432fc4bad9495182bf8b4b7084a1fb379a75db Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Sat, 17 May 2008 13:38:12 +0300 Subject: [PATCH] AudioNote: - Don't expand time label - Add a tree view for upcoming note file list thingy --- src/audio-note.c | 24 +++++++++++++++++++----- src/audio-note.h | 2 ++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/audio-note.c b/src/audio-note.c index c01003f..8b4e268 100644 --- a/src/audio-note.c +++ b/src/audio-note.c @@ -177,23 +177,37 @@ audio_note_ui * audio_note_new(void) { audio_note_ui *ui; +GtkWidget *v; + ui=g_slice_new(audio_note_ui); ui->pos_sid=0; ui->cfile=NULL; -ui->vbox=gtk_vbox_new(FALSE, 0); + +ui->vbox=gtk_vbox_new(FALSE, 3); +v=gtk_vbox_new(FALSE, 3); +ui->hbox=gtk_hbox_new(FALSE, 3); ui->lbl_time=gtk_label_new(""); + ui->btn_record=gtk_button_new_from_stock(GTK_STOCK_MEDIA_RECORD); ui->btn_play=gtk_button_new_from_stock(GTK_STOCK_MEDIA_PLAY); ui->btn_stop=gtk_button_new_from_stock(GTK_STOCK_MEDIA_STOP); +ui->file_tree=gtk_tree_view_new(); + 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, FALSE, 0); +gtk_box_pack_start(GTK_BOX(ui->vbox), ui->lbl_time, FALSE, FALSE, 0); +gtk_box_pack_start(GTK_BOX(ui->vbox), ui->hbox, TRUE, TRUE, 0); + +gtk_box_pack_start(GTK_BOX(v), ui->btn_record, TRUE, TRUE, 0); +gtk_box_pack_start(GTK_BOX(v), ui->btn_play, TRUE, TRUE, 0); +gtk_box_pack_start(GTK_BOX(v), ui->btn_stop, TRUE, TRUE, 0); + +gtk_box_pack_start(GTK_BOX(ui->hbox), ui->file_tree, TRUE, TRUE, 0); +gtk_box_pack_start(GTK_BOX(ui->hbox), v, TRUE, TRUE, 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); +gtk_label_set_text(GTK_LABEL(ui->lbl_time), "--:--"); ui->note_play=¬e_play; ui->note_record=¬e_record; diff --git a/src/audio-note.h b/src/audio-note.h index 5c0f013..4757d65 100644 --- a/src/audio-note.h +++ b/src/audio-note.h @@ -39,6 +39,8 @@ struct _note_pipeline { typedef struct _audio_note_ui audio_note_ui; struct _audio_note_ui { GtkWidget *vbox; + GtkWidget *hbox; + GtkWidget *file_tree; GtkWidget *lbl_time; GtkWidget *btn_record; GtkWidget *btn_play; -- 2.39.5