[xiph-cvs] cvs commit: postfish clippanel.c mainpanel.c multibar.c multibar.h postfish-gtkrc readout.c version.h

Monty xiphmont at xiph.org
Sun Feb 15 07:14:19 PST 2004



xiphmont    04/02/15 10:14:18

  Modified:    .        clippanel.c mainpanel.c multibar.c multibar.h
                        postfish-gtkrc readout.c version.h
  Log:
  Some quick UI additions; extend multibar to offer sliders.

Revision  Changes    Path
1.9       +27 -30    postfish/clippanel.c

Index: clippanel.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/clippanel.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- clippanel.c	13 Feb 2004 18:35:27 -0000	1.8
+++ clippanel.c	15 Feb 2004 15:14:14 -0000	1.9
@@ -56,7 +56,7 @@
 static void trigger_slider_change(GtkWidget *w,gpointer in){
   char buffer[80];
   clipslider *p=(clipslider *)in;
-  gdouble linear=gtk_range_get_value(GTK_RANGE(p->slider))*.01;
+  gdouble linear=multibar_get_value(MULTIBAR(p->slider),0);
   
   sprintf(buffer,"%1.2f",linear);
   readout_set(READOUT(p->readout),buffer);
@@ -125,7 +125,7 @@
   GtkWidget *limit_frame=gtk_frame_new (" filter CPU throttle ");
   GtkWidget *converge_box=gtk_vbox_new(0,0);
   GtkWidget *limit_box=gtk_vbox_new(0,0);
-  GtkWidget *channel_table=gtk_table_new(input_ch,4,0);
+  GtkWidget *channel_table=gtk_table_new(input_ch,5,0);
 
   gtk_widget_set_name(blocksize_box,"choiceframe");
   gtk_widget_set_name(converge_box,"choiceframe");
@@ -240,28 +240,19 @@
     gtk_range_set_value(GTK_RANGE(slider),100.);
   }
 
-
-  gtk_container_add(GTK_CONTAINER(converge_frame),converge_box);
-  gtk_container_add(GTK_CONTAINER(limit_frame),limit_box);
-
-  gtk_box_pack_start(GTK_BOX(framebox),blocksize_frame,1,1,4);
-  gtk_box_pack_start(GTK_BOX(framebox),framebox_right,1,1,4);
-
-  gtk_box_pack_start(GTK_BOX(framebox_right),converge_frame,1,1,0);
-  gtk_box_pack_start(GTK_BOX(framebox_right),limit_frame,1,1,0);
-
-  gtk_box_pack_start(GTK_BOX(panel->subpanel_box),framebox,0,1,4);
-  gtk_box_pack_start(GTK_BOX(panel->subpanel_box),channel_table,0,1,4);
-
   for(i=0;i<input_ch;i++){
+    char *slabels[8]={".05",".1",".2",".3",".4",
+		      ".6",".8","1."};
+    double slevels[9]={.01,.05,.1,.2,.3,.4,.6,
+                       .8,1.};
+
     char buffer[80];
     clipslider *cs=calloc(1,sizeof(*cs));
     GtkWidget *label;
-    GtkWidget *slider=gtk_hscale_new_with_range(1,100,1);
+    GtkWidget *slider=multibar_new(8,slabels,slevels,HI_DECAY|ZERO_DAMP|PEAK_FOLLOW);
     GtkWidget *readout=readout_new("0.00");
     GtkWidget *readoutdB=readout_new("-40 dB");
-    GtkWidget *barframe=gtk_frame_new(NULL);
-    GtkWidget *bar=multibar_new(2,labels,levels,HI_DECAY|ZERO_DAMP);
+    GtkWidget *bar=multibar_new(2,labels,levels,HI_DECAY|ZERO_DAMP|PEAK_FOLLOW);
 
     cs->slider=slider;
     cs->readout=readout;
@@ -269,11 +260,9 @@
     cs->number=i;
     feedback_bars[i]=bar;
 
-    gtk_widget_set_size_request (slider,200,-1);
     gtk_widget_set_name(bar,"clipbar");
-    gtk_scale_set_draw_value(GTK_SCALE(slider),FALSE);
-    gtk_range_set_value(GTK_RANGE(slider),100.);
-    gtk_frame_set_shadow_type(GTK_FRAME(barframe),GTK_SHADOW_ETCHED_IN);
+    multibar_thumb_set(MULTIBAR(slider),1.,0);
+    multibar_thumb_bounds(MULTIBAR(slider),.01,1.);
 
     switch(input_ch){
     case 1:
@@ -298,19 +287,27 @@
     gtk_table_attach(GTK_TABLE(channel_table),label,0,1,i,i+1,GTK_FILL,GTK_FILL,2,0);
     gtk_table_attach(GTK_TABLE(channel_table),readout,1,2,i,i+1,GTK_FILL,GTK_FILL,0,0);
     gtk_table_attach(GTK_TABLE(channel_table),readoutdB,2,3,i,i+1,GTK_FILL,GTK_FILL,0,0);
-    gtk_table_attach_defaults(GTK_TABLE(channel_table),slider,3,4,i,i+1);
-    gtk_table_attach(GTK_TABLE(channel_table),barframe,4,5,i,i+1,GTK_FILL,GTK_FILL,0,0);
-    gtk_container_add(GTK_CONTAINER(barframe),bar);
+    gtk_table_attach(GTK_TABLE(channel_table),slider,3,4,i,i+1,GTK_FILL|GTK_EXPAND,GTK_FILL,0,0);
+    gtk_table_attach(GTK_TABLE(channel_table),bar,4,5,i,i+1,GTK_FILL,GTK_FILL,0,0);
 
+    multibar_callback(MULTIBAR(slider),trigger_slider_change,(gpointer)cs);
 
-    g_signal_connect_after (G_OBJECT(slider), "value-changed",
-			    G_CALLBACK(trigger_slider_change), (gpointer)cs);
-    g_signal_connect (G_OBJECT (slider), "key-press-event",
-		      G_CALLBACK (slider_keymodify), NULL);
-    
     trigger_slider_change(NULL,cs);
   }
 
+  gtk_container_add(GTK_CONTAINER(converge_frame),converge_box);
+  gtk_container_add(GTK_CONTAINER(limit_frame),limit_box);
+
+  gtk_box_pack_start(GTK_BOX(framebox),blocksize_frame,1,1,4);
+  gtk_box_pack_start(GTK_BOX(framebox),framebox_right,1,1,4);
+
+  gtk_box_pack_start(GTK_BOX(framebox_right),converge_frame,1,1,0);
+  gtk_box_pack_start(GTK_BOX(framebox_right),limit_frame,1,1,0);
+
+  gtk_box_pack_start(GTK_BOX(panel->subpanel_box),framebox,1,1,4);
+  gtk_box_pack_start(GTK_BOX(panel->subpanel_box),channel_table,1,1,4);
+
+
   mainpanel_inbar=mp->inbar;
 
 }

<p><p>1.27      +4 -11     postfish/mainpanel.c

Index: mainpanel.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/mainpanel.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- mainpanel.c	13 Feb 2004 18:11:35 -0000	1.26
+++ mainpanel.c	15 Feb 2004 15:14:14 -0000	1.27
@@ -592,11 +592,9 @@
     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);
 
-    panel->inbar=multibar_new(12,labels,levels, LO_ATTACK|LO_DECAY|HI_DECAY );
-    panel->outbar=multibar_new(12,labels,levels, LO_ATTACK|LO_DECAY|HI_DECAY );
+    panel->inbar=multibar_new(12,labels,levels, LO_ATTACK|LO_DECAY|HI_DECAY|PEAK_FOLLOW );
+    panel->outbar=multibar_new(12,labels,levels, LO_ATTACK|LO_DECAY|HI_DECAY|PEAK_FOLLOW );
 
     gtk_container_set_border_width(GTK_CONTAINER (ttable), 3);
     gtk_table_set_col_spacings(GTK_TABLE(ttable),5);
@@ -619,17 +617,12 @@
       panel->channelshow[i]=button;
     }
 
-    gtk_frame_set_shadow_type(GTK_FRAME(inframe),GTK_SHADOW_ETCHED_IN);
-    gtk_frame_set_shadow_type(GTK_FRAME(outframe),GTK_SHADOW_ETCHED_IN);
-    gtk_container_add(GTK_CONTAINER(inframe),panel->inbar);
-    gtk_container_add(GTK_CONTAINER(outframe),panel->outbar);
-    
     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,3,1,2);
-    gtk_table_attach_defaults(GTK_TABLE(ttable),outframe,1,3,2,3);
+    gtk_table_attach_defaults(GTK_TABLE(ttable),panel->inbar,1,3,1,2);
+    gtk_table_attach_defaults(GTK_TABLE(ttable),panel->outbar,1,3,2,3);
 
 
     /* master dB slider */

<p><p>1.15      +700 -68   postfish/multibar.c

Index: multibar.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/multibar.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- multibar.c	26 Dec 2003 09:55:57 -0000	1.14
+++ multibar.c	15 Feb 2004 15:14:15 -0000	1.15
@@ -1,7 +1,12 @@
 #include <stdio.h>
 #include <stdlib.h>
+#include <math.h>
+#include <gdk/gdkkeysyms.h>
 #include "multibar.h"
 
+static GdkBitmap *stipple=NULL;
+static GdkBitmap *stippleB=NULL;
+
 static double compute_dampening(double target,double current,double delta,int zerodamp){
   double raw_delta=target-current;
   
@@ -29,9 +34,21 @@
 
 /* call me roughly 10-20fps */
 static void compute(GtkWidget *widget,double *lowvals, double *highvals, int n){
-  int i,j;
+  int i,j,xpad;
   Multibar *m=MULTIBAR(widget);
   double max=-400;
+  int height=widget->allocation.height;
+
+  /* figure out the x padding */
+  if(m->thumbs<1){
+    xpad=2;
+  }else{
+    if(m->thumbs>1)
+      xpad=height+(height/2-1)/2-1;
+    else
+      xpad=height/2+1;
+  }
+  m->xpad=xpad;
 
   if(n>m->bars){
     if(!m->bartrackers)
@@ -86,10 +103,10 @@
         if(lowvals[i]>=m->levels[j]){
           if(lowvals[i]<=m->levels[j+1]){
             double del=(lowvals[i]-m->levels[j])/(m->levels[j+1]-m->levels[j]);
-	    pixlo[i]=(j+del)/m->labels*widget->allocation.width;
+	    pixlo[i]=(j+del)/m->labels*(widget->allocation.width-xpad*2)-xpad;
             break;
           }else if(j==m->labels){
-	    pixlo[i]=widget->allocation.width+1;
+	    pixlo[i]=widget->allocation.width-xpad+1;
           }
         }else
           break;
@@ -99,10 +116,10 @@
         if(highvals[i]>=m->levels[j]){
           if(highvals[i]<=m->levels[j+1]){
             double del=(highvals[i]-m->levels[j])/(m->levels[j+1]-m->levels[j]);
-	    pixhi[i]=(j+del)/m->labels*widget->allocation.width;
+	    pixhi[i]=(j+del)/m->labels*(widget->allocation.width-xpad*2)+xpad;
             break;
           }else if(j==m->labels){
-	    pixhi[i]=widget->allocation.width+1;
+	    pixhi[i]=widget->allocation.width-xpad+1;
           }
         }else
           break;
@@ -146,6 +163,16 @@
 static void draw(GtkWidget *widget,int n){
   int i,j,x=-1;
   Multibar *m=MULTIBAR(widget);
+  int xpad=m->xpad,upad=2,lpad=2;
+  int height=widget->allocation.height;
+
+  if(m->thumbs>0){
+    int leftover=height-widget->requisition.height;
+    if(leftover<height/4)
+      lpad+=leftover;
+    else
+      lpad+=height/4;
+  }
 
   if(!m->boxcolor){
     m->boxcolor=gdk_gc_new(m->backing);
@@ -214,43 +241,51 @@
     rgb.green=g;
     rgb.blue=b;
     gdk_gc_set_rgb_fg_color(m->boxcolor,&rgb);
-    gdk_draw_rectangle(m->backing,m->boxcolor,1,x+1,1,next-x,widget->allocation.height-3);
+
+    gdk_draw_rectangle(m->backing,m->boxcolor,1,x+1,upad+1,next-x,widget->allocation.height-lpad-upad-3);
     
     x=next;
   }
-  
-  
+
+  gdk_draw_line (m->backing,
+		 widget->style->white_gc,
+		 xpad, widget->allocation.height-lpad-1, 
+		 widget->allocation.width-1-xpad, 
+		 widget->allocation.height-lpad-1);
+
   if(m->clipdelay){
     gdk_draw_line (m->backing,
                    widget->style->fg_gc[1],
-		   0, 0, widget->allocation.width-1, 0);
+		   xpad, upad, widget->allocation.width-1-xpad, upad);
     
     gdk_draw_line (m->backing,
                    widget->style->fg_gc[1],
-		   0, widget->allocation.height-2, 
-		   widget->allocation.width-1, widget->allocation.height-2);
+		   xpad, widget->allocation.height-lpad-2, 
+		   widget->allocation.width-1-xpad, 
+		   widget->allocation.height-lpad-2);
   }else{
     gdk_draw_line (m->backing,
                    widget->style->white_gc,
-		   0, 0, widget->allocation.width-1, 0);
+		   xpad, upad, widget->allocation.width-1-xpad, upad);
     
     gdk_draw_line (m->backing,
                    widget->style->white_gc,
-		   0, widget->allocation.height-2, 
-		   widget->allocation.width-1, widget->allocation.height-2);
+		   xpad, widget->allocation.height-lpad-2, 
+		   widget->allocation.width-1-xpad, 
+		   widget->allocation.height-lpad-2);
   }
   
   /* peak follower */
-  {
+  if(m->dampen_flags & PEAK_FOLLOW){
     int x=-10;
     for(j=0;j<=m->labels+1;j++)
       if(m->peak>=m->levels[j]){
         if(m->peak<=m->levels[j+1]){
           double del=(m->peak-m->levels[j])/(m->levels[j+1]-m->levels[j]);
-	  x=(j+del)/m->labels*widget->allocation.width;
+	  x=(j+del)/m->labels*(widget->allocation.width-xpad*2)+xpad;
           break;
         }else if (j==m->labels){
-	  x=widget->allocation.width+1;
+	  x=widget->allocation.width-xpad+1;
         }
       }else
         break;
@@ -260,14 +295,14 @@
         x=m->bartrackers[j].pixelposhi;
     
     {
-      int y=widget->allocation.height-1;
+      int y=widget->allocation.height-lpad-1;
       
       gdk_draw_line(m->backing,widget->style->fg_gc[0],
-		    x-3,0,x+3,0);
+		    x-3,upad,x+3,upad);
       gdk_draw_line(m->backing,widget->style->fg_gc[0],
-		    x-2,1,x+2,1);
+		    x-2,upad+1,x+2,upad+1);
       gdk_draw_line(m->backing,widget->style->fg_gc[0],
-		    x-1,2,x+1,2);
+		    x-1,upad+2,x+1,upad+2);
       gdk_draw_line(m->backing,widget->style->fg_gc[0],
                     x-3,y-1,x+3,y-1);
       gdk_draw_line(m->backing,widget->style->fg_gc[0],
@@ -276,13 +311,13 @@
                     x-1,y-3,x+1,y-3);
       
       gdk_draw_line(m->backing,widget->style->fg_gc[1],
-		    x,1,x,y-2);
+		    x,upad+1,x,y-2);
     }
   }
 
   for(i=0;i<m->labels;i++){
-    int x=widget->allocation.width*(i+1)/m->labels;
-    int y=widget->allocation.height;
+    int x=rint((i+1.)/m->labels*(widget->allocation.width-xpad*2)+xpad);
+    int y=widget->allocation.height-lpad-upad;
     int px,py;
     int gc=0;
     
@@ -290,7 +325,7 @@
     
     gdk_draw_line (m->backing,
                    widget->style->text_gc[gc],
-		   x, 0, x, y);
+		   x, upad, x, y+upad);
     
     pango_layout_get_pixel_size(m->layout[i],&px,&py);
     x-=px+2;
@@ -299,27 +334,195 @@
 
     gdk_draw_layout (m->backing,
                      widget->style->text_gc[gc],
-		     x, y,
+		     x, y+upad,
                      m->layout[i]);
 
   }
+
+  /* draw frame */
+  {
+    int width=widget->allocation.width-xpad;
+    int height=widget->allocation.height;
+    GtkWidget *parent=gtk_widget_get_parent(widget);
+    GdkGC *gc=parent->style->bg_gc[0];
+    GdkGC *light_gc=parent->style->light_gc[0];
+    GdkGC *dark_gc=parent->style->dark_gc[0];
+    GdkGC *mid_gc=parent->style->mid_gc[0];
+
+    /* blank side padding to bg of parent */
+    gdk_draw_rectangle(m->backing,gc,1,0,0,xpad,height);
+    gdk_draw_rectangle(m->backing,gc,1,width,0,xpad,height);
+    
+    /* dark trough */
+    gdk_draw_rectangle(m->backing,mid_gc,1,
+		       xpad,height-lpad,width-xpad,lpad);
+
+    /* frame */
+    gdk_draw_line(m->backing,dark_gc,xpad-1,0,width,0);
+    gdk_draw_line(m->backing,dark_gc,xpad-1,0,xpad-1,height-2);
+
+    gdk_draw_line(m->backing,light_gc,xpad-1,height-1,width+1,height-1);
+    gdk_draw_line(m->backing,light_gc,width+1,0,width+1,height-1);
+
+    gdk_draw_line(m->backing,dark_gc,xpad,height-lpad,width,height-lpad);
+    gdk_draw_line(m->backing,dark_gc,width,height-lpad,width,1);
+
+
+    gdk_draw_line(m->backing,light_gc,xpad,1,width-1,1);
+    if(lpad>2)
+      gdk_draw_line(m->backing,light_gc,xpad,1,xpad,height-lpad);
+    else
+      gdk_draw_line(m->backing,light_gc,xpad,1,xpad,height-lpad-1);
+
+  }
+
+  /* draw slider thumbs */
+  if(m->thumbs){
+    int height=widget->allocation.height;
+    GdkGC *black_gc=widget->style->black_gc;
+    int y=height/2-2;
+    int y1=height-2;
+    int y0=y-(y1-y-1);
+
+    GdkColor yellow={0,0xff00,0xd000,0};
+
+    if(m->thumbs>1){
+      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[6]={ {x-1,y},{x2+3,y},{x2,y+3},
+		       {x2,y1+1},{x0-1,y1+1},{x0-1,y1-2}};
+
+      gdk_draw_polygon(m->backing,gc,TRUE,tp,6);
+
+      gdk_draw_line(m->backing,light_gc,x-2,y,x2+3,y);
+      gdk_draw_line(m->backing,light_gc,x2+3,y,x2,y+3);
+      gdk_draw_line(m->backing,light_gc,x2,y+3,x2,y1);
+
+      gdk_draw_line(m->backing,dark_gc,x2+1,y1,x0-2,y1);
+      gdk_draw_line(m->backing,dark_gc,x0-2,y1,x0-2,y1-2);
+      gdk_draw_line(m->backing,dark_gc,x0-2,y1-2,x-3,y+1);
+
+      gdk_draw_line(m->backing,black_gc,x2,y1+1,x0-1,y1+1);
+      gdk_draw_line(m->backing,black_gc,x0-1,y1+1,x0-1,y1-2);
+      gdk_draw_line(m->backing,black_gc,x0,y1-3,x-2,y+1);
+
+      gdk_gc_set_rgb_fg_color(m->boxcolor,&yellow);
+      gdk_draw_line(m->backing,m->boxcolor,x,0,x,height-lpad);
+
+      if(m->thumbfocus==0){
+	GdkPoint tp[6]={ {x-3,y+1},{x2+3,y+1},{x2+1,y+3},
+			 {x2+1,y1+1},{x0-1,y1+1},{x0-1,y1-2}};
+
+	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,6);
+	gdk_gc_set_fill(black_gc,GDK_SOLID);
+      }
+
+    }
+
+    if(m->thumbs>1){
+      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[num]+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[6]={ {x+1,y},{x3-3,y},{x3,y+3},
+		       {x3,y1+1},{x1+1,y1+1},{x1+1,y1-2}};
+
+      gdk_draw_polygon(m->backing,gc,TRUE,tp,6);
+
+      gdk_draw_line(m->backing,light_gc,x+1,y,x3-3,y);
+      gdk_draw_line(m->backing,light_gc,x3-3,y,x3-1,y+2);
+      gdk_draw_line(m->backing,light_gc,x1+1,y1-2,x1+1,y1);
+
+      gdk_draw_line(m->backing,dark_gc,x+3,y+1,x1+1,y1-3);
+      gdk_draw_point(m->backing,dark_gc,x1+1,y1-2);
+      gdk_draw_line(m->backing,dark_gc,x1+2,y1,x3-1,y1);
+      gdk_draw_line(m->backing,dark_gc,x3-1,y1,x3-1,y+3);
+
+      gdk_draw_line(m->backing,black_gc,x+2,y+1,x1,y1-3);
+      gdk_draw_line(m->backing,black_gc,x1+1,y1+1,x3,y1+1);
+      gdk_draw_line(m->backing,black_gc,x3,y1+1,x3,y+4);
+
+      gdk_gc_set_rgb_fg_color(m->boxcolor,&yellow);
+      gdk_draw_line(m->backing,m->boxcolor,x,0,x,height-lpad);
+
+      if(m->thumbfocus==num){
+	GdkPoint tp[6]={ {x+3,y+1},{x3-2,y+1},{x3,y+3},
+			 {x3,y1+1},{x1+1,y1+1},{x1+1,y1-2}};
+
+	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,6);
+	gdk_gc_set_fill(black_gc,GDK_SOLID);
+      }
+    }
+
+    if(m->thumbs==1 || m->thumbs==3){
+      int num=(m->thumbs>1?1:0);
+
+      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[num]+xpad;
+      int x0=x-(y1-y-2);
+      int x1=x+(y1-y-2);
+
+      GdkPoint tp[5]={ {x,y},{x0,y1-2},{x0,y1+1},{x1,y1+1},{x1,y1-2} };
+
+      gdk_draw_polygon(m->backing,gc,TRUE,tp,5);
+
+      gdk_draw_line(m->backing,light_gc,x,y,x1,y1-2);
+      gdk_draw_line(m->backing,light_gc,x,y,x0,y1-2);
+      gdk_draw_line(m->backing,light_gc,x0,y1-2,x0,y1+1);
+
+      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-2);
+
+      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-1);
+
+      gdk_gc_set_rgb_fg_color(m->boxcolor,&yellow);
+      gdk_draw_line(m->backing,m->boxcolor,x,y+(y1-y)/2,x,0);
+
+      if(m->thumbfocus==num){
+	for(i=0;i<height/2;i++)
+	  for(j=0;j<=i*2;j++)
+	    if(!(j&1))
+	      gdk_draw_point(m->backing,black_gc,x-i+j,y+i+2);
+      } 
+    }
+  }
 }
 
-static gboolean configure(GtkWidget *widget, GdkEventConfigure *event){
+static void draw_and_expose(GtkWidget *widget){
   Multibar *m=MULTIBAR(widget);
-  
-  if (m->backing)
-    gdk_drawable_unref(m->backing);
-  
-  m->backing = gdk_pixmap_new(widget->window,
-			      widget->allocation.width,
-			      widget->allocation.height,
-			      -1);
-  gdk_draw_rectangle(m->backing,widget->style->white_gc,1,0,0,widget->allocation.width,
-		     widget->allocation.height);
-  
-  compute(widget,0,0,0);
-  draw(widget,0);
+  if(!GDK_IS_DRAWABLE(m->backing))return;
+  draw(widget,m->bars);
+  if(!GTK_WIDGET_DRAWABLE(widget))return;
+  if(!GDK_IS_DRAWABLE(widget->window))return;
   gdk_draw_drawable(widget->window,
                     widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
                     m->backing,
@@ -327,7 +530,6 @@
                     0, 0,
                     widget->allocation.width,		  
                     widget->allocation.height);
-  return TRUE;
 }
 
 static gboolean expose( GtkWidget *widget, GdkEventExpose *event ){
@@ -343,7 +545,7 @@
 }
 
 static void size_request (GtkWidget *widget,GtkRequisition *requisition){
-  int i,maxx=0,maxy=0,x,y;
+  int i,maxx=0,maxy=0,x,y,xpad;
   Multibar *m=MULTIBAR(widget);
   for(i=0;i<m->labels;i++){
     pango_layout_get_pixel_size(m->layout[i],&x,&y);
@@ -352,22 +554,380 @@
     if(y>maxy)maxy=y;
   }
 
+  maxy+=4;
+
   requisition->width = (maxx*1.5+2)*m->labels;
   requisition->height = maxy;
+
+  fprintf(stderr,"reqwidth=%d, maxx=%d, maxy=%d labels=%d\n",requisition->width,maxx,maxy,m->labels);
+}
+
+static gboolean multibar_focus (GtkWidget         *widget,
+				GtkDirectionType   direction){
+  Multibar *m=MULTIBAR(widget);
+  int ret=TRUE;
+
+  if(m->thumbs==0)return FALSE;
+
+  fprintf(stderr,"thumbfocus=%d thumbs=%d ",m->thumbfocus,m->thumbs);
+
+  switch(direction){
+  case GTK_DIR_DOWN:
+  case GTK_DIR_TAB_FORWARD:
+  case GTK_DIR_RIGHT:
+    if(m->thumbfocus+1>=m->thumbs){
+      m->thumbfocus=-1;
+      ret=FALSE;
+    }else
+      m->thumbfocus++;
+    break;
+
+  case GTK_DIR_UP:
+  case GTK_DIR_TAB_BACKWARD:
+  case GTK_DIR_LEFT:
+    if(m->thumbfocus==-1)
+      m->thumbfocus=m->thumbs-1;
+    else{
+      if(m->thumbfocus-1<0){
+	m->thumbfocus=-1;
+	ret=FALSE;
+      }else
+	m->thumbfocus--;
+    }
+    break;
+  default:
+    ret=FALSE;
+  }
+  fprintf(stderr,"thumbfocus=%d thumbs=%d ",m->thumbfocus,m->thumbs);
+
+  m->prev_thumbfocus=m->thumbfocus;
+  if(ret==TRUE) gtk_widget_grab_focus(widget);
+  draw_and_expose(widget);
+  fprintf(stderr,"thumbfocus=%d \n",m->thumbfocus);
+  return ret;
+}
+
+static gint determine_thumb(GtkWidget *widget,int ix, int iy){
+  Multibar *m=MULTIBAR(widget);
+  int height=widget->allocation.height;
+  double distances[3]={-1,-1,-1};
+  int thumb=-1;
+
+  /* lower thumb */
+  if(m->thumbs==1 || m->thumbs>2){
+    int num=(m->thumbs==1?0:1);
+
+    int x= ix-m->thumbpixel[num];
+    int y= iy-(height*4/5-1);
+    distances[num]=sqrt(x*x + y*y);
+  }
+
+  /* left thumb */
+  if(m->thumbs>1){
+    int x= ix-(m->thumbpixel[0]-(height/2));
+    int y= iy-(height/2-2);
+    distances[0]=sqrt(x*x + y*y);
+  }
+  
+  /* right thumb */
+  if(m->thumbs>1){
+    int num=(m->thumbs==2?1:2);
+    int x= ix-(m->thumbpixel[num]+(height/2));
+    int y= iy-(height/2-2);
+    distances[num]=sqrt(x*x + y*y);
+  }
+  
+  if(m->thumbs && distances[0]<height)thumb=0;
+  if(m->thumbs>1 && distances[1]<height)
+    if(thumb == -1 || distances[1]<distances[0])thumb=1;
+  if(m->thumbs>2 && distances[2]<height)
+    if(thumb == -1 || (distances[2]<distances[0] && 
+		       distances[2]<distances[1]))thumb=2;
+  return thumb;
+}
+
+static int pixel_bound(GtkWidget *w,int x){
+  Multibar *m=MULTIBAR(w);
+  if(x<0)return 0;
+  if(x>w->allocation.width-m->xpad*2)
+    return w->allocation.width-m->xpad*2;
+  return x;
+}
+
+static double pixel_to_val(GtkWidget *w,int x){
+  Multibar *m=MULTIBAR(w);
+  int j;
+
+  for(j=0;j<=m->labels;j++){
+    int pixlo=rint((double)j/m->labels*(w->allocation.width-m->xpad*2));
+    int pixhi=rint((double)(j+1)/m->labels*(w->allocation.width-m->xpad*2));
+
+    if(x>=pixlo && x<=pixhi){
+      if(pixlo==pixhi)return m->levels[j];
+      double del=(double)(x-pixlo)/(pixhi-pixlo);
+      return (1.-del)*m->levels[j] + del*m->levels[j+1];
+    }
+  }
+  return 0.;
+}
+
+static int val_to_pixel(GtkWidget *w,double v){
+  Multibar *m=MULTIBAR(w);
+  int j,ret=0;
+
+  if(v<m->levels[0]){
+    ret=0;
+  }else if(v>m->levels[m->labels]){
+    ret=w->allocation.width-m->xpad*2;
+  }else{
+    for(j=0;j<=m->labels;j++){
+      if(v>=m->levels[j] && v<=m->levels[j+1]){
+	double del=(v-m->levels[j])/(m->levels[j+1]-m->levels[j]);
+	int pixlo=rint((double)j/m->labels*(w->allocation.width-m->xpad*2));
+	int pixhi=rint((double)(j+1)/m->labels*(w->allocation.width-m->xpad*2));
+	ret=rint(pixlo*(1.-del)+pixhi*del);
+	break;
+      }
+    }
+  }
+
+  ret=pixel_bound(w,ret);
+  return ret;
+}
+
+static gboolean configure(GtkWidget *widget, GdkEventConfigure *event){
+  Multibar *m=MULTIBAR(widget);
+  int i;
+  
+  if (m->backing)
+    gdk_drawable_unref(m->backing);
+  
+  m->backing = gdk_pixmap_new(widget->window,
+			      widget->allocation.width,
+			      widget->allocation.height,
+			      -1);
+  gdk_draw_rectangle(m->backing,widget->style->white_gc,1,0,0,widget->allocation.width,
+		     widget->allocation.height);
+  
+  compute(widget,0,0,0);
+  for(i=0;i<m->thumbs;i++)
+    m->thumbpixel[i]=val_to_pixel(widget,m->thumbval[i]);
+  draw_and_expose(widget);
+  fprintf(stderr,"acwidth=%d\n",widget->allocation.width);
+  return TRUE;
+}
+
+static void vals_bound(Multibar *m){
+  int i;
+  for(i=0;i<m->thumbs;i++){
+    if(m->thumbval[i]<m->thumblo){
+      m->thumbval[i]=m->thumblo;
+      m->thumbpixel[i]=val_to_pixel(GTK_WIDGET(m),m->thumblo);
+    }
+    if(m->thumbval[i]>m->thumbhi){
+      m->thumbval[i]=m->thumbhi;
+      m->thumbpixel[i]=val_to_pixel(GTK_WIDGET(m),m->thumbhi);
+    }
+  }
+}
+
+static gint multibar_motion(GtkWidget        *w,
+			    GdkEventMotion   *event){
+  Multibar *m=MULTIBAR(w);
+
+  /* is a thumb already grabbed? */
+  if(m->thumbgrab>=0){
+    
+    int x=event->x+m->thumbx;
+    double v;
+
+    x=pixel_bound(w,x);
+    m->thumbval[m->thumbgrab]=pixel_to_val(w,x);
+    vals_bound(m);
+    v=m->thumbval[m->thumbgrab];
+    x=m->thumbpixel[m->thumbgrab]=val_to_pixel(w,v);
+
+    if(m->thumbgrab==2){
+      if(m->thumbpixel[1]>x){
+	m->thumbpixel[1]=x;
+	m->thumbval[1]=v;
+      }
+      if(m->thumbpixel[0]>x){
+	m->thumbpixel[0]=x;
+	m->thumbval[0]=v;
+      }
+    }
+
+    if(m->thumbgrab==1){
+      if(m->thumbpixel[2]<x){
+	m->thumbpixel[2]=x;
+	m->thumbval[2]=v;
+      }
+      if(m->thumbpixel[0]>x){
+	m->thumbpixel[0]=x;
+	m->thumbval[0]=v;
+      }
+    }
+
+    if(m->thumbgrab==0){
+      if(m->thumbpixel[2]<x){
+	m->thumbpixel[2]=x;
+	m->thumbval[2]=v;
+      }
+      if(m->thumbpixel[1]<x){
+	m->thumbpixel[1]=x;
+	m->thumbval[1]=v;
+      }
+    }
+
+    if(m->callback)m->callback(GTK_WIDGET(m),m->callbackp);
+    draw_and_expose(w);
+
+  }else{
+    /* nothing grabbed right now; determine if we're in a a thumb's area */
+    int thumb=determine_thumb(w,event->x-m->xpad,event->y);
+    GtkStateType thumbstate[3];
+    thumbstate[0]=GTK_STATE_NORMAL;
+    thumbstate[1]=GTK_STATE_NORMAL;
+    thumbstate[2]=GTK_STATE_NORMAL;
+    if(thumb>=0)thumbstate[thumb]=GTK_STATE_PRELIGHT;
+
+    if(thumbstate[0]!=m->thumbstate[0] ||
+       thumbstate[1]!=m->thumbstate[1] ||
+       thumbstate[2]!=m->thumbstate[2]){
+      m->thumbstate[0]=thumbstate[0];
+      m->thumbstate[1]=thumbstate[1];
+      m->thumbstate[2]=thumbstate[2];
+
+      draw_and_expose(w);
+    }
+  }
+  return TRUE;
+}
+
+static gint multibar_leave(GtkWidget        *widget,
+			   GdkEventCrossing *event){
+  Multibar *m=MULTIBAR(widget);
+
+  if(m->thumbgrab<0){
+    if(0!=m->thumbstate[0] ||
+       0!=m->thumbstate[1] ||
+       0!=m->thumbstate[2]){
+      m->thumbstate[0]=0;
+      m->thumbstate[1]=0;
+      m->thumbstate[2]=0;
+      
+      draw_and_expose(widget);
+    }
+  }
+  return TRUE;
+}
+
+static gint button_press   (GtkWidget        *widget,
+			    GdkEventButton   *event){
+  Multibar *m=MULTIBAR(widget);
+  if(m->thumbstate[0]){
+    gtk_widget_grab_focus(widget);
+    m->thumbgrab=0;
+    m->thumbfocus=0;
+    m->thumbx=m->thumbpixel[0]-event->x;
+  }else if(m->thumbstate[1]){
+    gtk_widget_grab_focus(widget);
+    m->thumbgrab=1;
+    m->thumbfocus=1;
+    m->thumbx=m->thumbpixel[1]-event->x;
+  }else if(m->thumbstate[2]){
+    gtk_widget_grab_focus(widget);
+    m->thumbgrab=2;
+    m->thumbfocus=2;
+    m->thumbx=m->thumbpixel[2]-event->x;
+  }
+  draw_and_expose(widget);
+}
+
+static gint button_release   (GtkWidget        *widget,
+			    GdkEventButton   *event){
+  Multibar *m=MULTIBAR(widget);
+  m->thumbgrab=-1;
+  draw_and_expose(widget);
+}
+
+static gboolean unfocus(GtkWidget        *widget,
+			GdkEventFocus       *event){
+  Multibar *m=MULTIBAR(widget);
+  m->prev_thumbfocus=m->thumbfocus;
+  m->thumbfocus=-1;
+  draw_and_expose(widget);
 }
 
+static gboolean refocus(GtkWidget        *widget,
+			GdkEventFocus       *event){
+  Multibar *m=MULTIBAR(widget);
+  m->thumbfocus=m->prev_thumbfocus;
+  m->thumbgrab=-1;
+  draw_and_expose(widget);
+}
+
+gboolean key_press(GtkWidget *w,GdkEventKey *event){
+  Multibar *m=MULTIBAR(w);
+  int x;
+  if(event->state&GDK_MOD1_MASK) return FALSE;
+  if(event->state&GDK_CONTROL_MASK) return FALSE;
+
+  if(m->thumbfocus>=0){
+    switch(event->keyval){
+    case GDK_minus:
+      x=m->thumbpixel[m->thumbfocus]-1;
+      break;
+    case GDK_underscore:
+      x=m->thumbpixel[m->thumbfocus]-10;
+      break;
+    case GDK_equal:
+      x=m->thumbpixel[m->thumbfocus]+1;
+      break;
+    case GDK_plus:
+      x=m->thumbpixel[m->thumbfocus]+10;
+      break;
+    default:
+      return FALSE;
+    }
+
+    x=pixel_bound(w,x);
+    m->thumbpixel[m->thumbfocus]=x;
+    m->thumbval[m->thumbfocus]=pixel_to_val(w,x);
+    vals_bound(m);
+    if(m->callback)m->callback(GTK_WIDGET(m),m->callbackp);
+
+    draw_and_expose(w);
+    return TRUE;
+  }
+  return FALSE;
+}
+
+
 static GtkDrawingAreaClass *parent_class = NULL;
 
 static void multibar_class_init (MultibarClass *class){
-  GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
+  GObjectClass   *gobject_class = G_OBJECT_CLASS (class);
+  GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
+  GdkWindow *root=gdk_get_default_root_window();
   parent_class = g_type_class_peek_parent (class);
 
   widget_class->expose_event = expose;
   widget_class->configure_event = configure;
   widget_class->size_request = size_request;
-  //widget_class->button_press_event = gtk_dial_button_press;
-  //widget_class->button_release_event = gtk_dial_button_release;
-  //widget_class->motion_notify_event = gtk_dial_motion_notify;
+  widget_class->focus=multibar_focus;
+  widget_class->key_press_event = key_press;
+  widget_class->button_press_event = button_press;
+  widget_class->button_release_event = button_release;
+  widget_class->leave_notify_event = multibar_leave;
+  widget_class->motion_notify_event = multibar_motion;
+  widget_class->focus_out_event = unfocus;
+  widget_class->focus_in_event = refocus;
+
+  stipple=gdk_bitmap_create_from_data(NULL,"\125\352",2,2);
+  stippleB=gdk_bitmap_create_from_data(NULL,"\352\125",2,2);
+
 }
 
 static void multibar_init (Multibar *m){
@@ -414,25 +974,81 @@
     m->layout[i]=gtk_widget_create_pango_layout(ret,labels[i]);
 
   m->dampen_flags=flags;
+  m->thumbfocus=-1;
+  m->thumbgrab=-1;
+  m->thumblo=levels[0];
+  m->thumbhi=levels[n];
+
+  {
+    int events=gtk_widget_get_events(ret);
+    gtk_widget_set_events(ret,              events|
+			  GDK_POINTER_MOTION_MASK|
+			  GDK_BUTTON_PRESS_MASK	 |
+			  GDK_BUTTON_RELEASE_MASK|
+			  GDK_KEY_PRESS_MASK     |
+			  GDK_KEY_RELEASE_MASK   |
+			  GDK_ENTER_NOTIFY_MASK  |
+			  GDK_LEAVE_NOTIFY_MASK  |
+			  GDK_FOCUS_CHANGE_MASK  );
+  }
+
   return ret;
 }
 
 void multibar_set(Multibar *m,double *lo, double *hi, int n){
   GtkWidget *widget=GTK_WIDGET(m);
   compute(widget,lo,hi,n);
+  draw_and_expose(widget);
+}
 
-  if(!GTK_WIDGET_DRAWABLE(widget))return;
-  if(!GDK_IS_DRAWABLE(widget->window))return;
-  if(!GDK_IS_DRAWABLE(m->backing))return;
+void multibar_thumb_set(Multibar *m,double v, int n){
+  GtkWidget *w=GTK_WIDGET(m);
+
+  if(n<0)return;
+  if(n>2)return;
+
+  if(m->thumbs==0)  GTK_WIDGET_SET_FLAGS (m, GTK_CAN_FOCUS);
   
-  draw(widget,n);
-  gdk_draw_drawable(widget->window,
-		    widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
-		    m->backing,
-		    0, 0,
-		    0, 0,
-		    widget->allocation.width,		  
-		    widget->allocation.height);
+  if(n+1>m->thumbs)m->thumbs=n+1;
+  {
+    int x=m->thumbpixel[n]=val_to_pixel(w,v);
+    m->thumbval[n]=v;
+  
+    if(n==0){
+      if(m->thumbpixel[1]<x){
+	m->thumbval[1]=v;
+	m->thumbpixel[1]=x;
+      }
+      if(m->thumbpixel[2]<x){
+	m->thumbval[2]=v;
+	m->thumbpixel[2]=x;
+      }
+    }
+
+    if(n==1){
+      if(m->thumbpixel[0]>x){
+	m->thumbval[0]=v;
+	m->thumbpixel[0]=x;
+      }
+      if(m->thumbpixel[2]<x){
+	m->thumbval[2]=v;
+	m->thumbpixel[2]=x;
+      }
+    }
+
+    if(n==2){
+      if(m->thumbpixel[0]>x){
+	m->thumbval[0]=v;
+	m->thumbpixel[0]=x;
+      }
+      if(m->thumbpixel[1]>x){
+	m->thumbval[1]=v;
+	m->thumbpixel[1]=x;
+      }
+    }
+  }
+  if(m->callback)m->callback(GTK_WIDGET(m),m->callbackp);
+  draw_and_expose(w);
 }
 
 void multibar_reset(Multibar *m){
@@ -448,17 +1064,33 @@
   if(!m->clipdelay){
     m->clipdelay=15*10;
 
-    if(!GTK_WIDGET_DRAWABLE(widget))return;
-    if(!GDK_IS_DRAWABLE(widget->window))return;
-    if(!GDK_IS_DRAWABLE(m->backing))return;
-    draw(widget,m->bars);
-    gdk_draw_drawable(widget->window,
-		      widget->style->fg_gc[GTK_WIDGET_STATE (widget)],
-		      m->backing,
-		      0, 0,
-		      0, 0,
-		      widget->allocation.width,		  
-		      widget->allocation.height);
+    draw_and_expose(widget);
   }else
     m->clipdelay=15*10; /* ~ ten second hold */
 }
+
+/* because closures are ludicrously complex for doing something this simple */
+void multibar_callback(Multibar *m,void (*callback)(GtkWidget *,gpointer),
+		       gpointer p){
+  m->callback=callback;
+  m->callbackp=p;
+}
+  
+double multibar_get_value(Multibar *m,int n){
+  if(n<0)return 0.;
+  if(n>m->thumbs)return 0.;
+  return m->thumbval[n];
+}
+
+void multibar_thumb_bounds(Multibar *m,double lo, double hi){
+  GtkWidget *w=GTK_WIDGET(m);
+  if(lo>hi)return;
+  m->thumblo=lo;
+  m->thumbhi=hi;
+
+  vals_bound(m);
+  if(m->callback)m->callback(GTK_WIDGET(m),m->callbackp);
+  draw_and_expose(w);
+}
+
+

<p><p>1.8       +31 -6     postfish/multibar.h

Index: multibar.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/multibar.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- multibar.h	26 Dec 2003 09:55:57 -0000	1.7
+++ multibar.h	15 Feb 2004 15:14:15 -0000	1.8
@@ -27,11 +27,13 @@
   double pixeldeltalo;
 } bartrack;
 
-#define HI_ATTACK (1<<0)
-#define LO_ATTACK (1<<1)
-#define HI_DECAY  (1<<2)
-#define LO_DECAY  (1<<3)
-#define ZERO_DAMP (1<<4)
+#define HI_ATTACK   (1<<0)
+#define LO_ATTACK   (1<<1)
+#define HI_DECAY    (1<<2)
+#define LO_DECAY    (1<<3)
+#define ZERO_DAMP   (1<<4)
+#define PEAK_FOLLOW (1<<5)
+
 
 struct _Multibar{
 
@@ -52,13 +54,28 @@
   bartrack *bartrackers;
   int bars;
   int dampen_flags;
+
+  int    thumbs;
+  double thumbval[3];
+  int    thumbpixel[3];
+  GtkStateType thumbstate[3];
+  int    thumbfocus;
+  int    prev_thumbfocus;
+  int    thumbgrab;
+  int    thumbx;
+  double    thumblo;
+  double    thumbhi;
+
+  int       xpad;
+
+  void  (*callback)(GtkWidget *,gpointer);
+  gpointer callbackp;
 };
 
 struct _MultibarClass{
 
   GtkDrawingAreaClass parent_class;
   void (* multibar) (Multibar *m);
-
 };
 
 GType          multibar_get_type        (void);
@@ -66,10 +83,18 @@
                                          int flags);
 void	       multibar_clear           (Multibar *m);
 void	       multibar_set             (Multibar *m,double *lo,double *hi, int n);
+void	       multibar_thumb_set       (Multibar *m,double v, int n);
 void	       multibar_setwarn         (Multibar *m);
 void           multibar_reset           (Multibar *m);
+void           multibar_callback        (Multibar *m,
+					 void (*callback)
+					 (GtkWidget *,gpointer),
+					 gpointer);
+double multibar_get_value(Multibar *m,int n);
+void multibar_thumb_bounds(Multibar *m,double lo, double hi);
 
 G_END_DECLS
 
 #endif
 
+

<p><p>1.3       +12 -5     postfish/postfish-gtkrc

Index: postfish-gtkrc
===================================================================
RCS file: /usr/local/cvsroot/postfish/postfish-gtkrc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- postfish-gtkrc	26 Dec 2003 09:55:57 -0000	1.2
+++ postfish-gtkrc	15 Feb 2004 15:14:15 -0000	1.3
@@ -33,17 +33,24 @@
 
 style "slider" {
         bg[NORMAL]="#80a0ff" 
+	bg[PRELIGHT]="#c0f0ff" 
         GtkWidget::focus-padding = 0
         GtkWidget::focus-line-width = 1
         GtkWidget::interior-focus = 0
 }
 
 style "multibar" {
-	fg[NORMAL]="#404040" 
-	fg[ACTIVE]="#ff8080" 
-	text[NORMAL]="#c0c0d0" 
-	text[ACTIVE]="#ffb0b0" 
-	font_name = "sans 8"	
+        bg[NORMAL]="#80a0ff" 
+        bg[ACTIVE]="#c0f0ff" 
+        bg[PRELIGHT]="#c0f0ff" 
+
+        fg[NORMAL]="#000000" 
+        fg[ACTIVE]="#ff8080" 
+        fg[PRELIGHT]="#f0f080" 
+
+        text[NORMAL]="#c0c0d0" 
+        text[ACTIVE]="#ffb0b0" 
+        font_name = "sans 8"    
 }
 
 style "clipbar" {

<p><p>1.5       +0 -1      postfish/readout.c

Index: readout.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/readout.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- readout.c	18 Oct 2003 11:10:09 -0000	1.4
+++ readout.c	15 Feb 2004 15:14:15 -0000	1.5
@@ -36,7 +36,6 @@
   gtk_widget_show(box);
   gtk_widget_show(r->label);
   gtk_widget_show(r->sizelabel);
-
 }
 
 GType readout_get_type (void){

<p><p>1.27      +2 -2      postfish/version.h

Index: version.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/version.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- version.h	13 Feb 2004 18:35:27 -0000	1.26
+++ version.h	15 Feb 2004 15:14:15 -0000	1.27
@@ -1,2 +1,2 @@
-#define VERSION "$Id: version.h,v 1.26 2004/02/13 18:35:27 xiphmont Exp $ "
-/* DO NOT EDIT: Automated versioning hack [Fri Feb 13 13:34:00 EST 2004] */
+#define VERSION "$Id: version.h,v 1.27 2004/02/15 15:14:15 xiphmont Exp $ "
+/* DO NOT EDIT: Automated versioning hack [Sun Feb 15 09:50:39 EST 2004] */

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list