Commit b7f2bb6d authored by Monty Montgomery's avatar Monty Montgomery

More channel/master panell functionality in place; clippanel reenabled

altered multibar >1 thumb cosmetics (full thumbs that shrink on 'overlap')



git-svn-id: https://svn.xiph.org/trunk/postfish@6518 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 6641c7a3
......@@ -30,7 +30,7 @@
#include "subpanel.h"
#include "declip.h"
extern sig_atomic_t declip_active;
extern sig_atomic_t *declip_active;
extern sig_atomic_t declip_visible;
extern int input_ch;
extern int input_size;
......@@ -108,16 +108,17 @@ static void limit_slider_change(GtkWidget *w,gpointer in){
}
void clippanel_create(postfish_mainpanel *mp,
GtkWidget *windowbutton,
GtkWidget *activebutton){
GtkWidget **windowbutton,
GtkWidget **activebutton){
int i;
char *labels[2]={"10%","100%"};
float levels[3]={0.,10.,100.};
int block_choices=0;
subpanel_generic *panel=subpanel_create(mp,windowbutton,activebutton,
&declip_active,&declip_visible,
"_Declipping filter setup"," [d] ");
subpanel_generic *panel=subpanel_create(mp,windowbutton[0],activebutton,
declip_active,&declip_visible,
"_Declipping filter setup",NULL,
0,input_ch);
GtkWidget *framebox=gtk_hbox_new(1,0);
GtkWidget *framebox_right=gtk_vbox_new(0,0);
......
......@@ -24,7 +24,7 @@
#include "postfish.h"
extern void clippanel_create(postfish_mainpanel *mp,
GtkWidget *windowbutton,
GtkWidget *activebutton);
GtkWidget **windowbutton,
GtkWidget **activebutton);
extern void clippanel_feedback(int workp);
extern void clippanel_reset(void);
......@@ -510,11 +510,13 @@ void compandpanel_create(postfish_mainpanel *mp,
float per_levels[9]={0,12.5,25,37.5,50,62.5,75,87.5,100};
char *per_labels[8]={"","25%","","50%","","75%","","100%"};
char *shortcut[]={" m "};
subpanel_generic *panel=subpanel_create(mp,windowbutton,activebutton,
subpanel_generic *panel=subpanel_create(mp,windowbutton,&activebutton,
&compand_active,
&compand_visible,
"_Multiband Compand"," [m] ");
"_Multiband Compand",shortcut,
0,1);
GtkWidget *hbox=gtk_hbox_new(0,0);
GtkWidget *sliderbox=gtk_vbox_new(0,0);
......
......@@ -52,7 +52,7 @@ static int fillstate=0; /* 0: uninitialized
static time_linkage out;
/* accessed across threads */
sig_atomic_t declip_active=0;
sig_atomic_t *declip_active;
sig_atomic_t declip_visible=0;
sig_atomic_t declip_converge=2; /* 0=over, 1=full, 2=half, 3=partial, 4=approx */
......@@ -105,6 +105,7 @@ int pull_declip_feedback(int *clip,float *peak,int *total){
/* called only by initial setup */
int declip_load(void){
int i;
declip_active=calloc(input_ch,sizeof(*declip_active));
chtrigger=malloc(input_ch*sizeof(*chtrigger));
for(i=0;i<input_ch;i++)
chtrigger[i]=1.;
......@@ -205,7 +206,8 @@ static void sliding_bark_average(float *f,int n,float width){
static void declip(float *lap,float *out,
int blocksize,float trigger,
float epsilon, float iteration,
int *runningtotal, int *runningcount,float *peak){
int *runningtotal, int *runningcount,float *peak,
int active){
float flag[blocksize*2];
int iterbound,i,j,count=0;
......@@ -221,7 +223,7 @@ static void declip(float *lap,float *out,
*runningtotal+=blocksize;
*runningcount+=count;
if(declip_active){
if(active){
for(i=0;i<blocksize/2;i++)flag[i]=0.;
for(i=blocksize*3/2;i<blocksize*2;i++)flag[i]=0.;
......@@ -323,7 +325,7 @@ time_linkage *declip_read(time_linkage *in){
memcpy(work+blocksize,temp,sizeof(*work)*blocksize/2);
declip(lap[i],0,blocksize,
local_trigger[i],local_convergence,local_iterations,
&total,count+i,peak+i);
&total,count+i,peak+i,declip_active[i]);
memset(cache[i],0,sizeof(**cache)*input_size);
in->data[i]=cache[i];
......@@ -347,14 +349,14 @@ time_linkage *declip_read(time_linkage *in){
memcpy(work+blocksize/2,temp+j,sizeof(*work)*blocksize);
declip(lap[i],out.data[i]+j,blocksize,
local_trigger[i],local_convergence,local_iterations,
&total,count+i,peak+i);
&total,count+i,peak+i,declip_active[i]);
}
memcpy(work+blocksize/2,temp+j,sizeof(*work)*blocksize/2);
memcpy(work+blocksize,in->data[i],sizeof(*work)*blocksize/2);
declip(lap[i],out.data[i]+j,blocksize,
local_trigger[i],local_convergence,local_iterations,
&total,count+i,peak+i);
&total,count+i,peak+i,declip_active[i]);
cache[i]=in->data[i];
in->data[i]=temp;
......
......@@ -66,11 +66,13 @@ void eqpanel_create(postfish_mainpanel *mp,
"30","20","10","0","+10","+20","+30"};
float levels[16]={-120,-110,-100,-90,-80,-70,-60,-50,-40,
-30,-20,-10,0,10,20,30};
char *shortcut[]={" e "};
subpanel_generic *panel=subpanel_create(mp,windowbutton,activebutton,
subpanel_generic *panel=subpanel_create(mp,windowbutton,&activebutton,
&eq_active,
&eq_visible,
"_Equalization filter"," [e] ");
"_Equalization filter",shortcut,
0,1);
GtkWidget *slidertable=gtk_table_new(eq_freqs,3,0);
......
......@@ -105,10 +105,13 @@ void limitpanel_create(postfish_mainpanel *mp,
float timing_levels[6]={.1,1,10,100,1000,10000};
char *timing_labels[5]={"1ms","10ms","100ms","1s","10s"};
subpanel_generic *panel=subpanel_create(mp,windowbutton,activebutton,
char *shortcut[]={" l "};
subpanel_generic *panel=subpanel_create(mp,windowbutton,&activebutton,
&limit_active,
&limit_visible,
"Hard _Limiter"," [l] ");
"Hard _Limiter",shortcut,
0,1);
GtkWidget *slidertable=gtk_table_new(4,4,0);
......
......@@ -469,7 +469,7 @@ static void mainpanel_chentry(postfish_mainpanel *p,
int channelwinp,
void (*panel_create)
(postfish_mainpanel *,
GtkWidget *, GtkWidget *)){
GtkWidget **, GtkWidget **)){
int j;
GtkWidget *wm[input_ch];
......@@ -528,8 +528,7 @@ static void mainpanel_chentry(postfish_mainpanel *p,
}
//p->buttonactive[i]=wa;
//if(panel_create)(*panel_create)(p,ww,wa);
if(panel_create)(*panel_create)(p,wm,wa);
}
static void mainpanel_masterentry(postfish_mainpanel *p,
......@@ -977,7 +976,7 @@ void mainpanel_create(postfish_mainpanel *panel,char **chlabels){
}
mainpanel_chentry(panel,channeltable,"Mute ",0,0,0,0);
mainpanel_chentry(panel,channeltable,"_Declip ",1,1,0,0);
mainpanel_chentry(panel,channeltable,"_Declip ",1,1,0,clippanel_create);
mainpanel_chentry(panel,channeltable,"_Multicomp ",2,0,1,0);
mainpanel_chentry(panel,channeltable,"_Onecomp ",3,0,1,0);
mainpanel_chentry(panel,channeltable,"De_verb ",4,1,0,0);
......
......@@ -454,178 +454,112 @@ static void draw(GtkWidget *widget,int n){
/* draw slider thumbs */
if(m->thumbs){
int height=widget->allocation.height;
int height=widget->allocation.height,i,j;
GdkGC *black_gc=widget->style->black_gc;
int y=height/2-3;
int y0=height/3-1;
int y1=height-3;
int yM=(y1+y0)/2-y0;
int outer=(y1-y-2)+y*3/2;
int inner=(y1+y0)/2-y0;
int A[3]={outer,outer,outer};
int B[3]={inner,inner,inner};
int C[3]={inner,inner,inner};
int D[3]={outer,outer,outer};
GdkColor yellow={0,0xff00,0xd000,0};
if(m->thumbs==1){
/* single thumb: wide center */
GdkGC *gc=widget->style->bg_gc[m->thumbstate[0]];
GdkGC *light_gc=widget->style->light_gc[m->thumbstate[0]];
GdkGC *dark_gc=widget->style->dark_gc[m->thumbstate[0]];
int x=m->thumbpixel[0]+xpad;
int x0=x-(y1-y-2);
int x1=x+(y1-y-2);
int x2=x0-y*3/2;
int x3=x1+y*3/2;
GdkPoint tp[7]={ {x,y0},{x-yM,y0+yM},{x2,y0+yM},{x2,y1+1},{x3,y1+1},{x3,y0+yM},{x+yM,y0+yM} };
gdk_draw_polygon(m->backing,gc,TRUE,tp,7);
gdk_draw_line(m->backing,dark_gc,x2+1,y1,x3-1,y1);
gdk_draw_line(m->backing,dark_gc,x3-1,y1,x3-1,y0+yM+1);
if(m->thumbfocus==0){
if(x&1)
gdk_gc_set_stipple(black_gc,stipple);
else
gdk_gc_set_stipple(black_gc,stippleB);
gdk_gc_set_fill(black_gc,GDK_STIPPLED);
gdk_draw_polygon(m->backing,black_gc,TRUE,tp,7);
gdk_gc_set_fill(black_gc,GDK_SOLID);
}
gdk_draw_line(m->backing,light_gc,x3-1,y0+yM,x+yM,y0+yM);
gdk_draw_line(m->backing,light_gc,x+yM,y0+yM,x,y0);
gdk_draw_line(m->backing,light_gc,x,y0,x-yM,y0+yM);
gdk_draw_line(m->backing,light_gc,x-yM,y0+yM,x2,y0+yM);
gdk_draw_line(m->backing,light_gc,x2,y0+yM,x2,y1);
gdk_draw_line(m->backing,black_gc,x2,y1+1,x3,y1+1);
gdk_draw_line(m->backing,black_gc,x3,y1+1,x3,y0+yM);
gdk_gc_set_rgb_fg_color(m->boxcolor,&yellow);
gdk_draw_line(m->backing,m->boxcolor,x,y1-1,x,0);
if(m->thumbs==2){
/* adjustment required for overlapping thumbs? */
int mid=m->thumbpixel[1]-m->thumbpixel[0]-1;
int midA=(mid<0?0:mid)/2;
int midB=(mid<0?0:mid)-midA;
if(midA<D[0])D[0]=midA;
if(midA<C[0])C[0]=midA;
if(midB<A[1])A[1]=midB;
if(midB<B[1])B[1]=midB;
}
if(m->thumbs>1){
/* two thumbs: left */
{
GdkGC *gc=widget->style->bg_gc[m->thumbstate[0]];
GdkGC *light_gc=widget->style->light_gc[m->thumbstate[0]];
GdkGC *dark_gc=widget->style->dark_gc[m->thumbstate[0]];
int x=m->thumbpixel[0]+xpad;
int x0=x-(y1-y-2);
int x2=x0-y*3/2;
GdkPoint tp[5]={ {x,y0},{x-yM,y0+yM},{x2,y0+yM},{x2,y1+1},
{x,y1+1}};
gdk_draw_polygon(m->backing,gc,TRUE,tp,5);
gdk_draw_line(m->backing,dark_gc,x2+1,y1,x-1,y1);
gdk_draw_line(m->backing,dark_gc,x-1,y1,x-1,y0+1);
if(m->thumbs==3){
/* adjust for 0,1 overlap if any; different from the 2 case */
int mid=m->thumbpixel[1]-m->thumbpixel[0]-1;
int midA=(mid<0?0:mid)/2;
int midB=(mid<0?0:mid)-midA;
if(m->thumbfocus==0){
if(x&1)
gdk_gc_set_stipple(black_gc,stipple);
else
gdk_gc_set_stipple(black_gc,stippleB);
gdk_gc_set_fill(black_gc,GDK_STIPPLED);
gdk_draw_polygon(m->backing,black_gc,TRUE,tp,5);
gdk_gc_set_fill(black_gc,GDK_SOLID);
}
gdk_draw_line(m->backing,light_gc,x,y0,x-yM,y0+yM);
gdk_draw_line(m->backing,light_gc,x-yM-1,y0+yM,x2,y0+yM);
gdk_draw_line(m->backing,light_gc,x2,y0+yM,x2,y1+1);
if(midA<D[0])D[0]=midA;
if(D[0]<C[0]+2)D[0]=C[0]+2;
if(midB<A[1])A[1]=midB;
if(A[1]<B[1]+2)A[1]=B[1]+2;
gdk_draw_line(m->backing,black_gc,x2,y1+1,x,y1+1);
gdk_draw_line(m->backing,black_gc,x,y1+1,x,y0);
gdk_gc_set_rgb_fg_color(m->boxcolor,&yellow);
gdk_draw_line(m->backing,m->boxcolor,x,y1-1,x,0);
}
/* two thumbs: right */
/* adjust for 1,2 overlap if any */
mid=m->thumbpixel[2]-m->thumbpixel[1]-1;
midA=(mid<0?0:mid)/2;
midB=(mid<0?0:mid)-midA;
if(midA<D[1])D[1]=midA;
if(D[1]<C[1]+2)D[1]=C[1]+2;
if(midB<A[2])A[2]=midB;
if(A[2]<B[2]+2)A[2]=B[2]+2;
}
for(i=0;i<m->thumbs;i++){
if(m->thumbs==3){
/* in the three-thumb case, the middle thumb is drawn last */
switch(i){
case 0:
j=0;
break;
case 1:
j=2;
break;
case 2:
j=1;
break;
}
}else
j=i;
{
int num=(m->thumbs>2?2:1);
GdkGC *gc=widget->style->bg_gc[m->thumbstate[num]];
GdkGC *light_gc=widget->style->light_gc[m->thumbstate[num]];
GdkGC *dark_gc=widget->style->dark_gc[m->thumbstate[num]];
int x=m->thumbpixel[j]+xpad;
GdkPoint p[8]={ {x+D[j],y0+C[j]},
{x+C[j],y0+C[j]},
{x ,y0 },
{x-B[j],y0+B[j]},
{x-A[j],y0+B[j]},
{x-A[j],y1+1 },
{x+D[j],y1+1 },
{x+D[j],y0+C[j]}};
int x=m->thumbpixel[num]+xpad;
int x1=x+(y1-y-2);
int x3=x1+y*3/2;
GdkPoint d[3]={ {x-A[j]+1,y1},
{x+D[j]-1,y1},
{x+D[j]-1,y0+C[j]+1}};
GdkPoint tp[5]={ {x,y0},{x+yM,y0+yM},{x3,y0+yM},{x3,y1+1},
{x,y1+1}};
gdk_draw_polygon(m->backing,gc,TRUE,tp,5);
gdk_draw_line(m->backing,dark_gc,x+1,y1,x3-1,y1);
gdk_draw_line(m->backing,dark_gc,x3-1,y1,x3-1,y0+yM+1);
if(m->thumbfocus==num){
GdkGC *gc=widget->style->bg_gc[m->thumbstate[j]];
GdkGC *light_gc=widget->style->light_gc[m->thumbstate[j]];
GdkGC *dark_gc=widget->style->dark_gc[m->thumbstate[j]];
gdk_draw_polygon(m->backing,gc,TRUE,p,7);
gdk_draw_lines(m->backing,dark_gc,d,3);
if(m->thumbfocus==j){
if(x&1)
gdk_gc_set_stipple(black_gc,stipple);
else
gdk_gc_set_stipple(black_gc,stippleB);
gdk_gc_set_fill(black_gc,GDK_STIPPLED);
gdk_draw_polygon(m->backing,black_gc,TRUE,tp,5);
gdk_draw_polygon(m->backing,black_gc,TRUE,p,7);
gdk_gc_set_fill(black_gc,GDK_SOLID);
}
gdk_draw_line(m->backing,light_gc,x3-1,y0+yM,x+yM,y0+yM);
gdk_draw_line(m->backing,light_gc,x+yM,y0+yM,x,y0);
gdk_draw_line(m->backing,light_gc,x,y0,x,y1);
gdk_draw_line(m->backing,black_gc,x,y1+1,x3,y1+1);
gdk_draw_line(m->backing,black_gc,x3,y1+1,x3,y0+yM);
gdk_gc_set_rgb_fg_color(m->boxcolor,&yellow);
gdk_draw_line(m->backing,m->boxcolor,x,y1-1,x,0);
}
if(m->thumbs==3){
/* three thumbs: minimal center */
GdkGC *gc=widget->style->bg_gc[m->thumbstate[1]];
GdkGC *light_gc=widget->style->light_gc[m->thumbstate[1]];
GdkGC *dark_gc=widget->style->dark_gc[m->thumbstate[1]];
int x=m->thumbpixel[1]+xpad;
int x0=x-(y1-y0-3);
int x1=x+(y1-y0-3);
GdkPoint tp[5]={ {x,y0},{x0,y1-3},{x0,y1+1},{x1,y1+1},{x1,y1-3} };
gdk_draw_polygon(m->backing,gc,TRUE,tp,5);
gdk_draw_line(m->backing,dark_gc,x0+1,y1,x1-1,y1);
gdk_draw_line(m->backing,dark_gc,x1-1,y1,x1-1,y1-3);
if(m->thumbfocus==1){
for(i=0;i<(height-1)/2;i++)
for(j=0;j<=i*2;j++)
if(!(j&1))
gdk_draw_point(m->backing,black_gc,x-i+j,y0+i+2);
for(j=0;j<=(i-1)*2;j++)
if((j&1))
gdk_draw_point(m->backing,black_gc,x-(i-1)+j,y0+i+2);
}
gdk_draw_line(m->backing,light_gc,x,y0,x1,y1-3);
gdk_draw_line(m->backing,light_gc,x,y0,x0,y1-3);
gdk_draw_line(m->backing,light_gc,x0,y1-3,x0,y1+1);
gdk_draw_line(m->backing,black_gc,x0,y1+1,x1,y1+1);
gdk_draw_line(m->backing,black_gc,x1,y1+1,x1,y1-2);
gdk_draw_lines(m->backing,light_gc,p,6);
gdk_draw_lines(m->backing,black_gc,p+5,3);
gdk_gc_set_rgb_fg_color(m->boxcolor,&yellow);
gdk_draw_line(m->backing,m->boxcolor,x,y1-1,x,0);
}
}
}
......
......@@ -232,7 +232,7 @@ void *playback_thread(void *dummy){
/* get data */
link=input_read();
result=link->samples;
//link=declip_read(link);
link=declip_read(link);
result|=link->samples;
link=multicompand_read(link);
result|=link->samples;
......
......@@ -217,11 +217,13 @@ void singlepanel_create(postfish_mainpanel *mp,
float per_levels[9]={0,12.5,25,37.5,50,62.5,75,87.5,100};
char *per_labels[8]={"","25%","","50%","","75%","","100%"};
char *shortcut[]={" o "};
subpanel_generic *panel=subpanel_create(mp,windowbutton,activebutton,
subpanel_generic *panel=subpanel_create(mp,windowbutton,&activebutton,
&singlecomp_active,
&singlecomp_visible,
"_Oneband Compand"," o ");
"_Oneband Compand",shortcut,
0,1);
GtkWidget *sliderframe=gtk_frame_new(NULL);
GtkWidget *allbox=gtk_vbox_new(0,0);
......
......@@ -63,17 +63,23 @@ static int windowbutton_action(GtkWidget *widget,
static int activebutton_action(GtkWidget *widget,
gpointer in){
subpanel_generic *p=in;
int active;
if(widget==p->subpanel_activebutton){
active=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p->subpanel_activebutton));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p->mainpanel_activebutton),active);
}else{
active=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p->mainpanel_activebutton));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p->subpanel_activebutton),active);
int active,i;
for(i=0;i<p->active_button_count;i++){
if(widget==p->subpanel_activebutton[i]){
active=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p->subpanel_activebutton[i]));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p->mainpanel_activebutton[i]),active);
p->activevar[i]=active;
break;
}
if(widget==p->mainpanel_activebutton[i]){
active=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p->mainpanel_activebutton[i]));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p->subpanel_activebutton[i]),active);
p->activevar[i]=active;
break;
}
}
*p->activevar=active;
return FALSE;
}
......@@ -97,6 +103,14 @@ static gboolean rebind_space(GtkWidget *widget,
static gboolean forward_events(GtkWidget *widget,
GdkEvent *event,
gpointer in){
/* if this is a shortcutless panel, check first for a numeral
keypress; the intent of this mechanism is to handle focus
rotation on the activation buttons on a panel handling > 10
channels with multiple activation buttons. */
subpanel_generic *p=in;
GdkEvent copy=*(GdkEvent *)event;
copy.any.window=p->mainpanel->toplevel->window;
......@@ -110,10 +124,11 @@ void subpanel_show_all_but_toplevel(subpanel_generic *s){
subpanel_generic *subpanel_create(postfish_mainpanel *mp,
GtkWidget *windowbutton,
GtkWidget *activebutton,
GtkWidget **activebutton,
sig_atomic_t *activevar,
sig_atomic_t *mappedvar,
char *prompt,char *shortcut){
char *prompt,char **shortcut,
int start,int num){
subpanel_generic *panel=calloc(1,sizeof(*panel));
......@@ -121,22 +136,36 @@ subpanel_generic *subpanel_create(postfish_mainpanel *mp,
GtkWidget *toplabelframe=gtk_frame_new(NULL);
GtkWidget *toplabel=gtk_hbox_new(0,0);
GtkWidget *toplabelwb=windowbutton_new(prompt);
GtkWidget *toplabelab=0;
if(activebutton && activevar)
toplabelab=gtk_toggle_button_new_with_label(shortcut);
GtkWidget *toplabelab[num];
int i;
panel->subpanel_topframe=gtk_frame_new (NULL);
for(i=0;i<num;i++){
if(shortcut && shortcut[i]){
toplabelab[i]=gtk_toggle_button_new_with_label(shortcut[i]);
}else{
char buf[80];
sprintf(buf," %d ",i+start+1);
toplabelab[i]=gtk_toggle_button_new_with_label(buf);
}
}
panel->active_button_count=num;
panel->active_button_start=start;
panel->subpanel_topframe=gtk_frame_new(NULL);
panel->subpanel_windowbutton=toplabelwb;
panel->subpanel_activebutton=toplabelab;
panel->subpanel_activebutton=malloc(num*sizeof(*panel->subpanel_activebutton));
memcpy(panel->subpanel_activebutton,toplabelab,num*sizeof(*toplabelab));
panel->mainpanel_windowbutton=windowbutton;
panel->mainpanel_activebutton=activebutton;
panel->mainpanel_activebutton=calloc(num,sizeof(*activebutton));
memcpy(panel->mainpanel_activebutton,activebutton,num*sizeof(*activebutton));
panel->activevar=activevar;
panel->mappedvar=mappedvar;
gtk_box_pack_start(GTK_BOX(toplabel),toplabelwb,0,0,5);
gtk_box_pack_end(GTK_BOX(toplabel),toplabelab,0,0,5);
for(i=num-1;i>=0;i--)
gtk_box_pack_end(GTK_BOX(toplabel),toplabelab[i],0,0,5);
gtk_widget_set_name(toplabelwb,"panelbutton");
gtk_widget_set_name(toplabelbox,"panelbox");
......@@ -176,10 +205,11 @@ subpanel_generic *subpanel_create(postfish_mainpanel *mp,
G_CALLBACK (windowbutton_action), panel);
g_signal_connect_after (G_OBJECT (panel->subpanel_windowbutton), "clicked",
G_CALLBACK (windowbutton_action), panel);
if(activebutton && activevar){
g_signal_connect_after (G_OBJECT (panel->mainpanel_activebutton), "clicked",
for(i=0;i<num;i++){
g_signal_connect_after (G_OBJECT (panel->mainpanel_activebutton[i]), "clicked",
G_CALLBACK (activebutton_action), panel);
g_signal_connect_after (G_OBJECT (panel->subpanel_activebutton), "clicked",
g_signal_connect_after (G_OBJECT (panel->subpanel_activebutton[i]), "clicked",
G_CALLBACK (activebutton_action), panel);
}
......
......@@ -23,13 +23,17 @@
typedef struct{
GtkWidget *mainpanel_windowbutton;
GtkWidget *mainpanel_activebutton;
GtkWidget **mainpanel_activebutton;
GtkWidget *subpanel_windowbutton;
GtkWidget *subpanel_activebutton;
GtkWidget **subpanel_activebutton;
GtkWidget *subpanel_toplevel;
GtkWidget *subpanel_topframe;
GtkWidget *subpanel_box;
sig_atomic_t *activevar;
int active_button_count; /* silliness around the rotating non-alt-shortcut */
int active_button_start; /* silliness around the rotating non-alt-shortcut */
sig_atomic_t *mappedvar;
postfish_mainpanel *mainpanel;
......@@ -37,8 +41,10 @@ typedef struct{
extern subpanel_generic *subpanel_create(postfish_mainpanel *mp,
GtkWidget *windowbutton,
GtkWidget *activebutton,
GtkWidget **activebutton,
sig_atomic_t *activevar,
sig_atomic_t *mappedvar,
char *prompt,char *shortcut);
char *prompt,char **shortcut,
int start,int num);
extern void subpanel_show_all_but_toplevel(subpanel_generic *s);
......@@ -126,11 +126,14 @@ void suppresspanel_create(postfish_mainpanel *mp,
float timing_levels[5]={1, 10, 100, 1000, 10000};
char *timing_labels[4]={"10ms"," 100ms","1s","10s"};
char *shortcut[]={" v "};
subpanel_generic *panel=subpanel_create(mp,windowbutton,activebutton,
subpanel_generic *panel=subpanel_create(mp,windowbutton,&activebutton,
&suppress_active,
&suppress_visible,
"De_verberation filter"," [v] ");
"De_verberation filter",shortcut,
0,1);
GtkWidget *table=gtk_table_new(suppress_freqs+4,5,0);
......
#define VERSION "$Id$ "
/* DO NOT EDIT: Automated versioning hack [Thu Apr 15 02:15:37 EDT 2004] */
/* DO NOT EDIT: Automated versioning hack [Fri Apr 16 19:43:08 EDT 2004] */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment