Commit 55db3ccf authored by Monty Montgomery's avatar Monty Montgomery

Avoid losing work


git-svn-id: https://svn.xiph.org/trunk/postfish@5442 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent e6f59859
......@@ -5,9 +5,9 @@
CC=gcc
LD=gcc
SRC = mainpanel.c multibar.c
OBJ = mainpanel.o multibar.o
GCF = `pkg-config --cflags gtk+-2.0`
SRC = mainpanel.c multibar.c readout.c
OBJ = mainpanel.o multibar.o readout.o
GCF = `pkg-config --cflags gtk+-2.0`
all:
$(MAKE) target CFLAGS="-W -O2 $(GCF)"
......
#ifndef __MULTIBAR_H__
#define __MULTIBAR_H__
#include <glib.h>
#include <glib-object.h>
#include <gtk/gtkcontainer.h>
G_BEGIN_DECLS
#define MULTIBAR_TYPE (multibar_get_type ())
#define MULTIBAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MULTIBAR_TYPE, Multibar))
#define MULTIBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MULTIBAR_TYPE, MultibarClass))
#define IS_MULTIBAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MULTIBAR_TYPE))
#define IS_MULTIBAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MULTIBAR_TYPE))
typedef struct _Multibar Multibar;
typedef struct _MultibarClass MultibarClass;
struct _Multibar{
GtkTable table;
GtkWidget *buttons[3][3];
};
struct _MultibarClass
{
GtkTableClass parent_class;
void (* multibar) (Multibar *ttt);
};
GType multibar_get_type (void);
GtkWidget* multibar_new (void);
void multibar_clear (Multibar *ttt);
#include <gtk/gtk.h>
#include <glib.h>
GType multibar_get_type (void){
static GType multibar_type = 0;
if (!multibar_type){
static const GTypeInfo multibar_info = {
sizeof (MultibarClass),
NULL, /* base_init */
NULL, /* base_finalize */
(GClassInitFunc) multibar_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (Multibar),
0, /* n_preallocs */
(GInstanceInitFunc) multibar_init,
};
ttt_type = g_type_register_static (GTK_TYPE_TABLE,
"Multibar",
&ttt_info,
0);
}
return ttt_type;
}
typedef struct BarWidget {
GtkWidget *toptable;
GtkWidget **leftlabels;
GtkWidget *canvasframe;
GtkWidget *canvas
GdkPixmap *backing;
} BarWidget;
/* Create a new backing pixmap of the appropriate size */
static gboolean configure_event(GtkWidget *widget,
GdkEventConfigure *event){
if (pixmap)
gdk_pixmap_unref(pixmap);
pixmap = gdk_pixmap_new(widget->window,
widget->allocation.width,
widget->allocation.height,
-1);
gdk_draw_rectangle (pixmap,
widget->style->white_gc,
TRUE,
0, 0,
widget->allocation.width,
widget->allocation.height);
return TRUE;
}
static gboolean
expose_event( GtkWidget *widget, GdkEventExpose *event )
{
gdk_draw_pixmap(widget->window,
widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
pixmap,
event->area.x, event->area.y,
event->area.x, event->area.y,
event->area.width, event->area.height);
return FALSE;
}
/* XPM */
static char * bar_home_xpm[] = {
"19 17 33 1",
" c None",
". c #020202",
"+ c #324067",
"@ c #647ECA",
"# c #6682CE",
"$ c #A6A6A6",
"% c #D4D4D4",
"& c #0F1421",
"* c #36466E",
"= c #3E4A7A",
"- c #C4C4C4",
"; c #222A44",
"> c #556AAB",
", c #AAAAAA",
"' c #2E3A5E",
") c #AEAEAE",
"! c #E2E2E2",
"~ c #5E76BE",
"{ c #161A2B",
"] c #090A11",
"^ c #B2B2B2",
"/ c #191E32",
"( c #3E4E7A",
"_ c #B6B6B6",
": c #293252",
"< c #CACACA",
"[ c #46568A",
"} c #1D253C",
"| c #BABABA",
"1 c #607AC1",
"2 c #4F64A0",
"3 c #0A0E17",
"4 c #242E4A",
" #11# #1# #1# ",
"#*;;*# >'4*@ >'4*#",
"1;!<;~ >:3%;>2:3%;~",
"~}%|}>2:3!<{*43!-}~",
"~}%_{*43!<|]&]!<_}~",
"~}%_]&]!%|^..!%_,;~",
"~}%|..!%|)..%<|$3'@",
"~}%-.%%|)..%%|,]4> ",
"~}%||<-_..<%-_.&= ",
"~}%_.|||_..<||_]4> ",
"~}%_..||||..-|||3'@",
"~}%_]&]-|__..-|__;~",
"~}%_{+43-_)]&]-_)}~",
"~}<^}22:3|,{+43|,}~",
"1;-^;~ >:3^}>2:3^;~",
"#*;;*# >'4*@ >'4*#",
" #11# @1# @1# "};
/* XPM */
static char * bar_bb_xpm[] = {
"17 17 33 1",
" c None",
". c #020202",
"+ c #324067",
"@ c #647ECA",
"# c #6682CE",
"$ c #A6A6A6",
"% c #D4D4D4",
"& c #0F1421",
"* c #36466E",
"= c #3E4A7A",
"- c #C4C4C4",
"; c #222A44",
"> c #556AAB",
", c #AAAAAA",
"' c #2E3A5E",
") c #AEAEAE",
"! c #E2E2E2",
"~ c #5E76BE",
"{ c #161A2B",
"] c #090A11",
"^ c #B2B2B2",
"/ c #191E32",
"( c #3E4E7A",
"_ c #B6B6B6",
": c #293252",
"< c #CACACA",
"[ c #46568A",
"} c #1D253C",
"| c #BABABA",
"1 c #607AC1",
"2 c #4F64A0",
"3 c #0A0E17",
"4 c #242E4A",
" #1# #1# ",
" >'4*@ >'4*#",
" >:3%;>2:3%;~",
" >:3!<{*43!-}~",
" >:3!<|]&]!<_}~",
" >:3!%|^..!%_,;~",
" >:3!%|)..%<|$3'@",
"#+3!%|)..%%|,]4> ",
"14!%<_..<%-_.&= ",
"#+3<-|_..<||_]4> ",
" >:3-|||..-|||3'@",
" >:3-|__..-|__;~",
" >:3-_)]&]-_)}~",
" >:3|,{+43|,}~",
" >:3^}>2:3^;~",
" >'4*@ >'4*#",
" @1# @1# "};
/* XPM */
static char * bar_b_xpm[] = {
"18 17 33 1",
" c None",
". c #020202",
"+ c #324067",
"@ c #647ECA",
"# c #6682CE",
"$ c #A6A6A6",
"% c #D4D4D4",
"& c #0F1421",
"* c #36466E",
"= c #3E4A7A",
"- c #C4C4C4",
"; c #222A44",
"> c #556AAB",
", c #AAAAAA",
"' c #2E3A5E",
") c #AEAEAE",
"! c #E2E2E2",
"~ c #5E76BE",
"{ c #161A2B",
"] c #090A11",
"^ c #B2B2B2",
"/ c #191E32",
"( c #3E4E7A",
"_ c #B6B6B6",
": c #293252",
"< c #CACACA",
"[ c #46568A",
"} c #1D253C",
"| c #BABABA",
"1 c #607AC1",
"2 c #4F64A0",
"3 c #0A0E17",
"4 c #242E4A",
" #11# ",
" @2';;*#",
" @2'}3!<;~",
" @2'}3!%<|}~",
" @2'}3!!%-^$;~",
" @2'}3!!%-_,$3'@",
" @2'}3!!%-_,$]/'> ",
"#*}3!!%<|)$]{:2@ ",
"14%%%<-|_..&+2 ",
"#*}3||__||-]{:2@ ",
" @2'/]_^_|-<%3}'> ",
" @2'/]___|-<<3'@",
" @2'/]___|||;~",
" @2'/]_^),}~",
" @2'/3)$;~",
" @2';;*#",
" @~1# "};
/* XPM */
static char * bar_p_xpm[] = {
"29 17 33 1",
" c None",
". c #020202",
"+ c #324067",
"@ c #647ECA",
"# c #6682CE",
"$ c #A6A6A6",
"% c #D4D4D4",
"& c #0F1421",
"* c #36466E",
"= c #3E4A7A",
"- c #C4C4C4",
"; c #222A44",
"> c #556AAB",
", c #AAAAAA",
"' c #2E3A5E",
") c #AEAEAE",
"! c #E2E2E2",
"~ c #5E76BE",
"{ c #161A2B",
"] c #090A11",
"^ c #B2B2B2",
"/ c #191E32",
"( c #3E4E7A",
"_ c #B6B6B6",
": c #293252",
"< c #CACACA",
"[ c #46568A",
"} c #1D253C",
"| c #BABABA",
"1 c #607AC1",
"2 c #4F64A0",
"3 c #0A0E17",
"4 c #242E4A",
" #11@ ",
"#*;;'2@ #1~~~~~~~~~1# ",
"1;!%3}'2@ #*;}}}}}}}}};*#",
"~}!%<%3}'2@ 1;!!!!!!!!%%<;~",
"~}!<|-<%3}'2@ ~}!%<------|_}~",
"~}!-|||-<%3}'2[/!<|||||||_,}~",
"~}!-|||||-<%3/{]!-|||||||^$}~",
"~}!-|||||||--<..%-|||||||^$}~",
"~}!-||||||__^_|%%-|||||||^$}~",
"~}!-||||_^),$$..<-|||||||^$}~",
"~}!-||_^),$$]/{]%-|||||||^$}~",
"~}!-|^),$$]/'2[/%-||||||_^$}~",
"~}%-^,$$]/'2@ ~}%|_^^^^^^)$}~",
"~}%_$$]/'2@ 1;<_,$$$$$$$$;~",
"1;-)]/'2@ #*;}}}}}}}}};*#",
"#*;;'2@ #1~~~~~~~~~~# ",
" #1~@ "};
/* XPM */
static char * bar_f_xpm[] = {
"18 17 33 1",
" c None",
". c #020202",
"+ c #324067",
"@ c #647ECA",
"# c #6682CE",
"$ c #A6A6A6",
"% c #D4D4D4",
"& c #0F1421",
"* c #36466E",
"= c #3E4A7A",
"- c #C4C4C4",
"; c #222A44",
"> c #556AAB",
", c #AAAAAA",
"' c #2E3A5E",
") c #AEAEAE",
"! c #E2E2E2",
"~ c #5E76BE",
"{ c #161A2B",
"] c #090A11",
"^ c #B2B2B2",
"/ c #191E32",
"( c #3E4E7A",
"_ c #B6B6B6",
": c #293252",
"< c #CACACA",
"[ c #46568A",
"} c #1D253C",
"| c #BABABA",
"1 c #607AC1",
"2 c #4F64A0",
"3 c #0A0E17",
"4 c #242E4A",
" #11@ ",
"#*;;'2@ ",
"1;!%3}'2@ ",
"~}!%<%3}'2@ ",
"1;%-|-<%3}'2@ ",
"#+3|__|-<%3}'2@ ",
" >'/]___|-<%3}'2@ ",
" @2:{]||||--<3}+#",
" 2+&..-|_^^_|41",
" @2:{]!%-_,$$]}+#",
" >'}3!!%-^$$]/'2@ ",
"#+&!!%-_,$]/'2@ ",
"1;!%-_,$]/'2@ ",
"~}%|,$]/'2@ ",
"1;<^]/'2@ ",
"#*;;'2@ ",
" #1~@ "};
/* XPM */
static char * bar_ff_xpm[] = {
"17 17 33 1",
" c None",
". c #020202",
"+ c #324067",
"@ c #647ECA",
"# c #6682CE",
"$ c #A6A6A6",
"% c #D4D4D4",
"& c #0F1421",
"* c #36466E",
"= c #3E4A7A",
"- c #C4C4C4",
"; c #222A44",
"> c #556AAB",
", c #AAAAAA",
"' c #2E3A5E",
") c #AEAEAE",
"! c #E2E2E2",
"~ c #5E76BE",
"{ c #161A2B",
"] c #090A11",
"^ c #B2B2B2",
"/ c #191E32",
"( c #3E4E7A",
"_ c #B6B6B6",
": c #293252",
"< c #CACACA",
"[ c #46568A",
"} c #1D253C",
"| c #BABABA",
"1 c #607AC1",
"2 c #4F64A0",
"3 c #0A0E17",
"4 c #242E4A",
" #1@ #1@ ",
"#*4'> @*4'> ",
"1;!3:2>;!3:> ",
"~}!<34*{!<3:> ",
"~}%<-]&]%<-3:> ",
"1;%-|-..%-|-3:> ",
"#+3-||-..-||-3:> ",
" >4]-|||..-|||3'@",
" (&.-_)|..-_)^;1",
" >4]!-^)..%-)$3'@",
"#+3!%_,..%<_$3:> ",
"1;!%_$..%<_$3:> ",
"~}%|$]&]%|$3:> ",
"~}<^34+{<)3:> ",
"1;-3:2>}-3:> ",
"#*4'> @*4'> ",
" #1@ #1@ "};
/* XPM */
static char * bar_end_xpm[] = {
"19 17 30 1",
" c None",
". c #6682CE",
"+ c #607AC1",
"@ c #647ECA",
"# c #36466E",
"$ c #242E4A",
"% c #2E3A5E",
"& c #556AAB",
"* c #222A44",
"= c #E2E2E2",
"- c #0A0E17",
"; c #293252",
"> c #4F64A0",
", c #5E76BE",
"' c #CACACA",
") c #1D253C",
"! c #161A2B",
"~ c #D4D4D4",
"{ c #BABABA",
"] c #C4C4C4",
"^ c #090A11",
"/ c #0F1421",
"( c #B6B6B6",
"_ c #020202",
": c #324067",
"< c #3E4E7A",
"[ c #AEAEAE",
"} c #B2B2B2",
"| c #AAAAAA",
"1 c #A6A6A6",
" .+@ .+@ .++. ",
".#$%& @#$%& .#**#.",
"+*=-;>&*=-;& ,*='*,",
",)='-$#!='-;>&)~{),",
",)~']^/^~']-$#!~(),",
"+*~]{]__~]{]^/^~(),",
".:-]{{]__]{{]__~(),",
" &$^]{{{__]{{]_~(),",
" </_]([{__]((]]}),",
" &$^=]}[__~][|_{[),",
".:-=~(|__~'(1__]}),",
"+*=~(1__~'(1^/^'}),",
",)~{1^/^~{1-$:!~(),",
",)'}-$:!'[-;>>)'}),",
"+*]-;>&)]-;& ,*]}*,",
".#$%& @#$%& .#**#.",
" .+@ .+@ .++. "};
......@@ -4,7 +4,7 @@
#include "buttonicons.h"
#include "multibar.h"
#include "readout.h"
#define VERSION "$Id: mainpanel.c,v 1.2 2003/10/08 21:22:38 xiphmont Exp $ "
#define VERSION "$Id: mainpanel.c,v 1.3 2003/10/09 00:33:36 xiphmont Exp $ "
typedef struct {
GtkWidget *toplevel;
......@@ -12,10 +12,10 @@ typedef struct {
GtkWidget *toplabel;
GtkWidget *mainbox;
GtkWidget *leftbox;
GtkWidget *box1;
GtkWidget *leftback;
GtkWidget *leftframe;
GtkWidget *rightbox;
GtkWidget *box2;
GtkWidget *wintable;
GtkWidget *twirlimage;
......@@ -51,6 +51,8 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
GdkBitmap *xbm_bar[7];
GtkWidget *gim_bar[7];
GtkWidget *topplace,*topal;
char *text_bar[7]={"[bksp]","<",",","[space]",".",">","[end]"};
GdkWindow *root=gdk_get_default_root_window();
......@@ -58,6 +60,27 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
panel->topframe=gtk_frame_new (NULL);
panel->toplabel=gtk_label_new (NULL);
topplace=gtk_table_new(1,1,0);
topal=gtk_alignment_new(1,0,0,0);
panel->quitbutton=gtk_button_new_with_mnemonic("quit");
gtk_widget_set_name(panel->quitbutton,"quitbutton");
gtk_container_add (GTK_CONTAINER(topal), panel->quitbutton);
gtk_table_attach_defaults(GTK_TABLE(topplace),
topal,0,1,0,1);
gtk_table_attach_defaults(GTK_TABLE(topplace),
panel->topframe,0,1,0,1);
gtk_container_add (GTK_CONTAINER (panel->toplevel), topplace);
gtk_container_set_border_width (GTK_CONTAINER (panel->quitbutton), 3);
g_signal_connect (G_OBJECT (panel->quitbutton), "clicked",
G_CALLBACK (shutdown), NULL);
for(i=0;i<12;i++)
panel->ff[i]=gdk_pixmap_create_from_xpm_d(root,
panel->fb+i,NULL,ff_xpm[i]);
......@@ -78,30 +101,30 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
for(i=0;i<7;i++)
gim_bar[i]=gtk_image_new_from_pixmap(xpm_bar[i],xbm_bar[i]);
panel->mainbox=gtk_hbox_new(0,0);
panel->mainbox=gtk_hbox_new(0,6);
panel->leftback=gtk_event_box_new();
panel->leftbox=gtk_event_box_new();
panel->box1=gtk_event_box_new();
panel->leftframe=gtk_frame_new(NULL);
panel->rightbox=gtk_vbox_new(0,0);
panel->leftbox=gtk_vbox_new(0,0);
panel->wintable=gtk_table_new(8,2,0);
panel->box2=gtk_vbox_new(0,0);
panel->box1=gtk_vbox_new(0,6);
panel->wintable=gtk_table_new(7,3,0);
panel->twirlimage=gtk_image_new_from_pixmap(panel->ff[0],panel->fb[0]);
gtk_container_set_border_width (GTK_CONTAINER (panel->topframe), 3);
gtk_container_set_border_width (GTK_CONTAINER (panel->mainbox), 3);
gtk_container_set_border_width (GTK_CONTAINER (panel->box1), 3);
gtk_frame_set_shadow_type(GTK_FRAME(panel->topframe),GTK_SHADOW_ETCHED_IN);
gtk_frame_set_label_widget(GTK_FRAME(panel->topframe),panel->toplabel);
gtk_label_set_markup(GTK_LABEL(panel->toplabel),
"<span size=\"large\" weight=\"bold\" "
"style=\"italic\" foreground=\"dark blue\">"
"Postfish</span> "VERSION);
gtk_container_add (GTK_CONTAINER (panel->toplevel), panel->topframe);
gtk_container_add (GTK_CONTAINER(panel->topframe), panel->mainbox);
gtk_box_pack_start(GTK_BOX(panel->mainbox),panel->leftbox,0,0,0);
gtk_box_pack_start(GTK_BOX(panel->leftbox),panel->leftback,0,0,0);
gtk_box_pack_end(GTK_BOX(panel->mainbox),panel->box1,0,0,0);
gtk_box_pack_start(GTK_BOX(panel->box1),panel->leftback,0,0,0);
gtk_container_add (GTK_CONTAINER(panel->leftback), panel->leftframe);
gtk_box_pack_end(GTK_BOX(panel->mainbox),panel->rightbox,0,0,0);
gtk_box_pack_start(GTK_BOX(panel->mainbox),panel->box2,0,0,0);
gtk_widget_set_name(panel->leftback,"winpanel");
/* left side of main panel */
......@@ -151,8 +174,9 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
GtkWidget *togglebox2=gtk_hbox_new(0,0);
GtkWidget *togglebox=gtk_hbox_new(0,0);
GtkWidget *toggleal=gtk_alignment_new(0,1,0,0);
GtkWidget *in=gtk_label_new("in");
GtkWidget *out=gtk_label_new("out");
GtkWidget *in=gtk_label_new("in:");
GtkWidget *out=gtk_label_new("out:");
GtkWidget *show=gtk_label_new("show:");
GtkWidget *inframe=gtk_frame_new(NULL);
GtkWidget *outframe=gtk_frame_new(NULL);
GtkWidget *inbar=multibar_new(12,labels,levels);
......@@ -160,6 +184,7 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
gtk_container_set_border_width(GTK_CONTAINER (ttable), 3);
gtk_table_set_col_spacings(GTK_TABLE(ttable),5);
gtk_misc_set_alignment(GTK_MISC(show),1,1);
gtk_misc_set_alignment(GTK_MISC(in),1,.5);
gtk_misc_set_alignment(GTK_MISC(out),1,.5);
gtk_box_set_spacing(GTK_BOX(togglebox),5);
......@@ -186,23 +211,14 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
gtk_container_add(GTK_CONTAINER(inframe),inbar);
gtk_container_add(GTK_CONTAINER(outframe),outbar);
gtk_table_attach_defaults(GTK_TABLE(ttable),togglebox,1,2,0,1);
gtk_table_attach_defaults(GTK_TABLE(ttable),togglebox,1,3,0,1);
gtk_table_attach(GTK_TABLE(ttable),show,0,1,0,1,GTK_FILL|GTK_SHRINK,GTK_FILL|GTK_SHRINK,0,0);
gtk_table_attach(GTK_TABLE(ttable),in,0,1,1,2,GTK_FILL|GTK_SHRINK,GTK_FILL|GTK_SHRINK,0,0);
gtk_table_attach(GTK_TABLE(ttable),out,0,1,2,3,GTK_FILL|GTK_SHRINK,GTK_FILL|GTK_SHRINK,0,0);
gtk_table_attach_defaults(GTK_TABLE(ttable),inframe,1,2,1,2);
gtk_table_attach_defaults(GTK_TABLE(ttable),outframe,1,2,2,3);
gtk_table_attach_defaults(GTK_TABLE(ttable),inframe,1,3,1,2);
gtk_table_attach_defaults(GTK_TABLE(ttable),outframe,1,3,2,3);
/* twirlfish */
{
GtkWidget *tempf=gtk_frame_new(NULL);
gtk_frame_set_shadow_type(GTK_FRAME(tempf),GTK_SHADOW_NONE);
gtk_container_set_border_width (GTK_CONTAINER (tempf), 0);
gtk_box_pack_end(GTK_BOX(togglebox),tempf,0,0,0);
gtk_container_add (GTK_CONTAINER(tempf), panel->twirlimage);
}
/* master dB slider */
{
GtkWidget *box=gtk_hbox_new(0,0);
......@@ -218,7 +234,7 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
gtk_box_pack_start(GTK_BOX(box),label,0,0,0);
gtk_box_pack_start(GTK_BOX(box),slider,1,1,0);
gtk_table_attach_defaults(GTK_TABLE(ttable),box,1,2,3,4);
gtk_table_attach_defaults(GTK_TABLE(ttable),box,1,3,3,4);
}
/* master action bar */
......@@ -248,15 +264,20 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
gtk_table_attach_defaults(GTK_TABLE(bar_table),buttons[5],6,7,0,1);
gtk_table_attach_defaults(GTK_TABLE(bar_table),buttons[6],7,8,0,1);
gtk_table_attach(GTK_TABLE(ttable),bar_table,1,2,4,5,
gtk_table_attach(GTK_TABLE(ttable),bar_table,1,3,4,5,
GTK_EXPAND|GTK_FILL,GTK_EXPAND|GTK_FILL,
0,5);
0,8);
gtk_table_attach(GTK_TABLE(ttable),panel->twirlimage,0,1,4,5,
0,0,
0,0);
}
/* cue bar */
{
GtkWidget *cuebox=gtk_hbox_new(0,0);
GtkWidget *cuelabel=gtk_label_new("cue");
GtkWidget *cuelabel=gtk_label_new("cue:");
GtkWidget *cue=readout_new("9999:99:99.99");
GtkWidget *entry_a=gtk_entry_new();
GtkWidget *entry_b=gtk_entry_new();
......@@ -269,7 +290,7 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
GtkWidget *reset_a=gtk_button_new_with_mnemonic("_A");
GtkWidget *reset_b=gtk_button_new_with_mnemonic("_B");
GtkWidget *panel=gtk_toggle_button_new_with_mnemonic("Cue_sheet");
GtkWidget *panel=gtk_check_button_new_with_mnemonic("c_ue list");
gtk_entry_set_width_chars(GTK_ENTRY(entry_a),13);
gtk_entry_set_width_chars(GTK_ENTRY(entry_b),13);
......@@ -285,6 +306,7 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
gtk_table_attach_defaults(GTK_TABLE(ttable),cuelabel,0,1,5,6);
gtk_table_attach_defaults(GTK_TABLE(ttable),cuebox,1,2,5,6);
gtk_table_attach_defaults(GTK_TABLE(ttable),panel,2,3,5,6);
gtk_box_pack_start(GTK_BOX(cuebox),cue,0,0,0);
......@@ -300,26 +322,31 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
gtk_box_pack_start(GTK_BOX(cuebox),entry_b,0,0,0);
gtk_box_pack_start(GTK_BOX(cuebox),reset_b,0,0,0);
gtk_box_pack_end(GTK_BOX(cuebox),panel,0,0,3);
}
gtk_box_pack_start(GTK_BOX(panel->rightbox),ttable,0,0,0);
/* quitbutton */
/* config bar */
{
GtkWidget *tempa=gtk_alignment_new(1,1,0,0);
panel->quitbutton=gtk_button_new_with_mnemonic("quit");
gtk_widget_set_name(panel->quitbutton,"quitbutton");
gtk_box_pack_end(GTK_BOX(panel->rightbox),tempa,0,0,0);
gtk_container_add (GTK_CONTAINER(tempa), panel->quitbutton);
g_signal_connect (G_OBJECT (panel->quitbutton), "clicked",
G_CALLBACK (shutdown), NULL);
GtkWidget *confbox=gtk_hbox_new(0,0);
GtkWidget *conflabel=gtk_label_new("setting:");
GtkWidget *conf=readout_new("");
GtkWidget *panel=gtk_check_button_new_with_mnemonic("_setting list");
gtk_misc_set_alignment(GTK_MISC(conflabel),1,.5);
gtk_table_attach_defaults(GTK_TABLE(ttable),conflabel,0,1,6,7);
gtk_table_attach(GTK_TABLE(ttable),confbox,1,2,6,7,
GTK_EXPAND|GTK_FILL,GTK_EXPAND|GTK_FILL,0,3);
gtk_table_attach(GTK_TABLE(ttable),panel,2,3,6,7,0,0,0,0);
gtk_box_pack_start(GTK_BOX(confbox),conf,1,1,0);
}
gtk_box_pack_end(GTK_BOX(panel->box2),ttable,0,0,0);
}
gtk_widget_show_all(panel->toplevel);
gtk_window_set_resizable(GTK_WINDOW(panel->toplevel),0);
}
#include <stdlib.h>
......@@ -345,3 +372,4 @@ int main(int argc, char *argv[]){
gtk_main ();
}
......@@ -5,13 +5,13 @@
static void draw(GtkWidget *widget,float *lowvals, float *highvals, int n){
int i,j;
Multibar *m=MULTIBAR(widget);
float max=lowvals[0];
float max=m->peak;
if(!m->boxcolor){
m->boxcolor=gdk_gc_new(m->backing);
gdk_gc_copy(m->boxcolor,widget->style->black_gc);
}
if(m->cliptimer.tv_sec){
struct timeval tv;
gettimeofday(&tv,NULL);
......@@ -205,11 +205,7 @@ static gboolean configure(GtkWidget *widget, GdkEventConfigure *event){
gdk_draw_rectangle(m->backing,widget->style->white_gc,1,0,0,widget->allocation.width,
widget->allocation.height);
{
float lo[]={-24,-72};
float hi[]={-7,-10};
draw(widget,lo,hi,2);