[xiph-cvs] cvs commit: postfish fisharray.h mainpanel.c multibar.c readout.c Makefile.am autogen.sh barwidget.c configure.in

Monty xiphmont at xiph.org
Thu Oct 9 22:42:42 PDT 2003



xiphmont    03/10/10 01:42:42

  Modified:    .        fisharray.h mainpanel.c multibar.c readout.c
  Removed:     .        Makefile.am autogen.sh barwidget.c configure.in
  Log:
  Another incremental; not functional

Revision  Changes    Path
1.2       +258 -2    postfish/fisharray.h

Index: fisharray.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/fisharray.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- fisharray.h	16 Sep 2003 08:55:12 -0000	1.1
+++ fisharray.h	10 Oct 2003 05:42:41 -0000	1.2
@@ -1,4 +1,4 @@
-static char *ff_xpm[12][66] = {
+static char *ff_xpm[16][66] = {
   {
     "40 40 23 1",
     " 	c None",
@@ -770,5 +770,261 @@
     "                ++++####                ",
     "                 +++###                 ",
     "                  ++##                  ",
-    "                   ++                   "}
+    "                   ++                   "},
+  {"40 40 23 1",
+   " 	c None",
+   ".	c #7999B4",
+   "+	c #4B6C99",
+   "@	c #8EB0C8",
+   "#	c #27536C",
+   "$	c #111E1E",
+   "%	c #04423C",
+   "&	c #059B9A",
+   "*	c #06E1E0",
+   "=	c #147A64",
+   "-	c #3C3E04",
+   ";	c #1CC2A4",
+   ">	c #2CFEFC",
+   ",	c #84824C",
+   "'	c #EDEEEC",
+   ")	c #CCCACC",
+   "!	c #5D602C",
+   "~	c #A1A20A",
+   "{	c #E7E809",
+   "]	c #BECD18",
+   "^	c #9CEE4C",
+   "/	c #46E09D",
+   "(	c #76D260",
+   "                   .+                   ",
+   "                  @.++                  ",
+   "                 @@.+++                 ",
+   "                @@@.++++                ",
+   "               @@@@.+++++               ",
+   "              @@@@@.++++++              ",
+   "             @@@@@@.+++++++             ",
+   "            @@@@@@@.####++++            ",
+   "           @@@@@@.#$$$$$$#+++           ",
+   "          @@@@@@.$%&****=$$#++          ",
+   "         @@.. at .-$%;*>>>**;=$$++         ",
+   "        @.#$$#$$&***>>>>***&%$++        ",
+   "       @+$,')!$$$$$&;*****;*;%$++       ",
+   "      @@$,$$$!$,~~-$%=******;;%%++      ",
+   "     @@+$''-!'.!{{~{~$=;;;;;;&&$$##     ",
+   "    @@.$$''!!',!{{~{{,$=;;&&==$$$$$$$   ",
+   "   @@.$,$,''''$],]~{!{~$%%%%$$=;***&$   ",
+   "  #$$$~{]-#).$,{{{~{]{],$$$%=;******$$  ",
+   " $%&&$-{{]!$-~{{{{{{,{,{~-$%***>>***$#+ ",
+   "#$***&$-{{{{{{{{{{{{]{]]!]~-*******&$#++",
+   "#$$;;*&$-{{{{{!!!!!{,{,{]~!]*****&%$$##+",
+   " +$$$=;&$]{{{^===$-]~]~]!]~]****&%$$### ",
+   "  ##$$=;%~{{{/>*&-]],],]]],(******;#$#  ",
+   "   #%$$;&{{^/**&-]{{{{{]!{]/*******=$   ",
+   "   $$*;=${{]$$$$~{{{]]]]~]];*******=$   ",
+   "   $%%%$$~{{~,,~{{]]!------&*******=$   ",
+   "    $$$$$$,~]]]]~,-$%=*$$$$$$=&&&&=$$   ",
+   "       ++#$$----$$%&;**%$###$$$$$$$$    ",
+   "        +++#$$$$$$$%&&=$$#######        ",
+   "         +++++++++#$$$$$#######         ",
+   "          ++++++++++##########          ",
+   "           +++++++++#########           ",
+   "            ++++++++########            ",
+   "             +++++++#######             ",
+   "              ++++++######              ",
+   "               +++++#####               ",
+   "                ++++####                ",
+   "                 +++###                 ",
+   "                  ++##                  ",
+   "                   ++                   "},
+  {"40 40 23 1",
+   " 	c None",
+   ".	c #7999B4",
+   "+	c #4B6C99",
+   "@	c #8EB0C8",
+   "#	c #27536C",
+   "$	c #111E1E",
+   "%	c #04423C",
+   "&	c #059B9A",
+   "*	c #06E1E0",
+   "=	c #147A64",
+   "-	c #3C3E04",
+   ";	c #1CC2A4",
+   ">	c #2CFEFC",
+   ",	c #84824C",
+   "'	c #EDEEEC",
+   ")	c #CCCACC",
+   "!	c #5D602C",
+   "~	c #A1A20A",
+   "{	c #E7E809",
+   "]	c #BECD18",
+   "^	c #9CEE4C",
+   "/	c #46E09D",
+   "(	c #76D260",
+   "                   .+                   ",
+   "                  @.++                  ",
+   "                 @@.+++                 ",
+   "                @@@.++++                ",
+   "               @@@@.+++++               ",
+   "              @@@@@.++++++              ",
+   "             @@@@@@.+++++++             ",
+   "            @@@@@@@.####++++            ",
+   "           @@@@@@.#$$$$$$#+++           ",
+   "          @@@@@@.$%&****=$$#++          ",
+   "         @@.. at .-$%;*>>>**;=$$++         ",
+   "        @.#$$#$$&***>>>>***&%$++        ",
+   "       @+$,')!$$$$$&;*****;*;%$++       ",
+   "      @@$$!'!$$,~~-$%=******;;%%++      ",
+   "     @@+$!$$$!.!{{~{~$=;;;;;;&&$$##     ",
+   "    @@.$$''!!',!{{~{{,$=;;&&==$$$$$$$   ",
+   "   @@.$,$,''''$],]~{!{~$%%%%$$=;***&$   ",
+   "  #$$$~{]-#).$,{{{~{]{],$$$%=;******$$  ",
+   " $%&&$-{{]!$-~{{{{{{,{,{~-$%***>>***$#+ ",
+   "#$***&$-{{{{{{{{{{{{]{]]!]~-*******&$#++",
+   "#$$;;*&$-{{{{{!!!!!{,{,{]~!]*****&%$$##+",
+   " +$$$=;&$]{{{^===$-]~]~]!]~]****&%$$### ",
+   "  ##$$=;%~{{{/>*&-]],],]]],(******;#$#  ",
+   "   #%$$;&{{^/**&-]{{{{{]!{]/*******=$   ",
+   "   $$*;=${{]$$$$~{{{]]]]~]];*******=$   ",
+   "   $%%%$$~{{~,,~{{]]!------&*******=$   ",
+   "    $$$$$$,~]]]]~,-$%=*$$$$$$=&&&&=$$   ",
+   "       ++#$$----$$%&;**%$###$$$$$$$$    ",
+   "        +++#$$$$$$$%&&=$$#######        ",
+   "         +++++++++#$$$$$#######         ",
+   "          ++++++++++##########          ",
+   "           +++++++++#########           ",
+   "            ++++++++########            ",
+   "             +++++++#######             ",
+   "              ++++++######              ",
+   "               +++++#####               ",
+   "                ++++####                ",
+   "                 +++###                 ",
+   "                  ++##                  ",
+   "                   ++                   "},
+  {"40 40 23 1",
+   " 	c None",
+   ".	c #7999B4",
+   "+	c #4B6C99",
+   "@	c #8EB0C8",
+   "#	c #27536C",
+   "$	c #111E1E",
+   "%	c #04423C",
+   "&	c #059B9A",
+   "*	c #06E1E0",
+   "=	c #147A64",
+   "-	c #3C3E04",
+   ";	c #1CC2A4",
+   ">	c #2CFEFC",
+   ",	c #84824C",
+   "'	c #EDEEEC",
+   ")	c #CCCACC",
+   "!	c #5D602C",
+   "~	c #A1A20A",
+   "{	c #E7E809",
+   "]	c #BECD18",
+   "^	c #9CEE4C",
+   "/	c #46E09D",
+   "(	c #76D260",
+   "                   .+                   ",
+   "                  @.++                  ",
+   "                 @@.+++                 ",
+   "                @@@.++++                ",
+   "               @@@@.+++++               ",
+   "              @@@@@.++++++              ",
+   "             @@@@@@.+++++++             ",
+   "            @@@@@@@.####++++            ",
+   "           @@@@@@.#$$$$$$#+++           ",
+   "          @@@@@@.$%&****=$$#++          ",
+   "         @@.. at .-$%;*>>>**;=$$++         ",
+   "        @.#$$#$$&***>>>>***&%$++        ",
+   "       @+$,')!$$$$$&;*****;*;%$++       ",
+   "      @@$$''''$,~~-$%=******;;%%++      ",
+   "     @@+$'''''.!{{~{~$=;;;;;;&&$$##     ",
+   "    @@.$$$'''$,!{{~{{,$=;;&&==$$$$$$$   ",
+   "   @@.$,$!$$$!$],]~{!{~$%%%%$$=;***&$   ",
+   "  #$$$~{]-#).$,{{{~{]{],$$$%=;******$$  ",
+   " $%&&$-{{]!$-~{{{{{{,{,{~-$%***>>***$#+ ",
+   "#$***&$-{{{{{{{{{{{{]{]]!]~-*******&$#++",
+   "#$$;;*&$-{{{{{!!!!!{,{,{]~!]*****&%$$##+",
+   " +$$$=;&$]{{{^===$-]~]~]!]~]****&%$$### ",
+   "  ##$$=;%~{{{/>*&-]],],]]],(******;#$#  ",
+   "   #%$$;&{{^/**&-]{{{{{]!{]/*******=$   ",
+   "   $$*;=${{]$$$$~{{{]]]]~]];*******=$   ",
+   "   $%%%$$~{{~,,~{{]]!------&*******=$   ",
+   "    $$$$$$,~]]]]~,-$%=*$$$$$$=&&&&=$$   ",
+   "       ++#$$----$$%&;**%$###$$$$$$$$    ",
+   "        +++#$$$$$$$%&&=$$#######        ",
+   "         +++++++++#$$$$$#######         ",
+   "          ++++++++++##########          ",
+   "           +++++++++#########           ",
+   "            ++++++++########            ",
+   "             +++++++#######             ",
+   "              ++++++######              ",
+   "               +++++#####               ",
+   "                ++++####                ",
+   "                 +++###                 ",
+   "                  ++##                  ",
+   "                   ++                   "},
+  {"40 40 23 1",
+   " 	c None",
+   ".	c #7999B4",
+   "+	c #4B6C99",
+   "@	c #8EB0C8",
+   "#	c #27536C",
+   "$	c #111E1E",
+   "%	c #04423C",
+   "&	c #059B9A",
+   "*	c #06E1E0",
+   "=	c #147A64",
+   "-	c #3C3E04",
+   ";	c #1CC2A4",
+   ">	c #2CFEFC",
+   ",	c #84824C",
+   "'	c #EDEEEC",
+   ")	c #CCCACC",
+   "!	c #5D602C",
+   "~	c #A1A20A",
+   "{	c #E7E809",
+   "]	c #BECD18",
+   "^	c #9CEE4C",
+   "/	c #46E09D",
+   "(	c #76D260",
+   "                   .+                   ",
+   "                  @.++                  ",
+   "                 @@.+++                 ",
+   "                @@@.++++                ",
+   "               @@@@.+++++               ",
+   "              @@@@@.++++++              ",
+   "             @@@@@@.+++++++             ",
+   "            @@@@@@@.####++++            ",
+   "           @@@@@@.#$$$$$$#+++           ",
+   "          @@@@@@.$%&****=$$#++          ",
+   "         @@.. at .-$%;*>>>**;=$$++         ",
+   "        @.#$$#$$&***>>>>***&%$++        ",
+   "       @+$,')!$$$$$&;*****;*;%$++       ",
+   "      @@$,''''$,~~-$%=******;;%%++      ",
+   "     @@+$'''''.!{{~{~$=;;;;;;&&$$##     ",
+   "    @@.$$''''',!{{~{{,$=;;&&==$$$$$$$   ",
+   "   @@.$,$-'''-$],]~{!{~$%%%%$$=;***&$   ",
+   "  #$$$~{]----$,{{{~{]{],$$$%=;******$$  ",
+   " $%&&$-{{]!$-~{{{{{{,{,{~-$%***>>***$#+ ",
+   "#$***&$-{{{{{{{{{{{{]{]]!]~-*******&$#++",
+   "#$$;;*&$-{{{{{!!!!!{,{,{]~!]*****&%$$##+",
+   " +$$$=;&$]{{{^===$-]~]~]!]~]****&%$$### ",
+   "  ##$$=;%~{{{/>*&-]],],]]],(******;#$#  ",
+   "   #%$$;&{{^/**&-]{{{{{]!{]/*******=$   ",
+   "   $$*;=${{]$$$$~{{{]]]]~]];*******=$   ",
+   "   $%%%$$~{{~,,~{{]]!------&*******=$   ",
+   "    $$$$$$,~]]]]~,-$%=*$$$$$$=&&&&=$$   ",
+   "       ++#$$----$$%&;**%$###$$$$$$$$    ",
+   "        +++#$$$$$$$%&&=$$#######        ",
+   "         +++++++++#$$$$$#######         ",
+   "          ++++++++++##########          ",
+   "           +++++++++#########           ",
+   "            ++++++++########            ",
+   "             +++++++#######             ",
+   "              ++++++######              ",
+   "               +++++#####               ",
+   "                ++++####                ",
+   "                 +++###                 ",
+   "                  ++##                  ",
+   "                   ++                   "}
 };

<p><p>1.4       +257 -29   postfish/mainpanel.c

Index: mainpanel.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/mainpanel.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mainpanel.c	9 Oct 2003 00:33:36 -0000	1.3
+++ mainpanel.c	10 Oct 2003 05:42:41 -0000	1.4
@@ -1,10 +1,13 @@
 
 #include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <signal.h>
+#include <stdio.h>
 #include "fisharray.h"
 #include "buttonicons.h"
 #include "multibar.h"
 #include "readout.h"
-#define VERSION "$Id: mainpanel.c,v 1.3 2003/10/09 00:33:36 xiphmont Exp $ "
+#define VERSION "$Id: mainpanel.c,v 1.4 2003/10/10 05:42:41 xiphmont Exp $ "
 
 typedef struct {
   GtkWidget *toplevel;
@@ -19,19 +22,224 @@
 
   GtkWidget *wintable;
   GtkWidget *twirlimage;
-  GdkPixmap *ff[12];
-  GdkBitmap *fb[12];
+  GdkPixmap *ff[16];
+  GdkBitmap *fb[16];
 
   GtkWidget *buttonpanel[7];
   GtkWidget *buttonactive[7];
 
+
   GtkWidget *quitbutton;
+  
+  /* we need these widgets */
+  GtkWidget *masterdB_r;
+  GtkWidget *masterdB_s;
+  GtkWidget *masterdB_a;
+  
 } postfish_mainpanel;
 
-static void shutdown(void){
 
+
+static void shutdown(void){
   gtk_main_quit ();
+}
+
+
+sig_atomic_t master_att;
+static void masterdB_change(GtkRange *r, gpointer in){
+  postfish_mainpanel *p=in;
+  char buf[80];
+  gdouble val=gtk_range_get_value(r);
+  sprintf(buf,"%.1f dB",val);
+  readout_set(READOUT(p->masterdB_r),buf);
+}
+
+static void timeentry_fix(char *buffer){
+  if(buffer[0]=='0')buffer[0]=' ';
+  if(!strncmp(buffer," 0",2))buffer[1]=' ';
+  if(!strncmp(buffer,"  0",3))buffer[2]=' ';
+  if(!strncmp(buffer,"   0",4))buffer[3]=' ';
+  if(!strncmp(buffer,"    :0",6))buffer[5]=' ';
+  if(!strncmp(buffer,"    : 0",7))buffer[6]=' ';
+  
+  if(buffer[0]!=' ' && buffer[1]==' ')buffer[1]='0';
+  if(buffer[1]!=' ' && buffer[2]==' ')buffer[2]='0';
+  if(buffer[2]!=' ' && buffer[3]==' ')buffer[3]='0';
+  if(buffer[3]!=' ' && buffer[5]==' ')buffer[5]='0';
+  if(buffer[5]!=' ' && buffer[6]==' ')buffer[6]='0';
+
+}
+
+static gboolean timeevent_unselect(GtkWidget *widget,
+				   gpointer dummy){
+
+  gtk_editable_select_region(GTK_EDITABLE(widget),0,0);
+  return FALSE;
+}
+
+static gboolean timeevent_keybinding(GtkWidget *widget,
+				     GdkEventKey *event,
+				     gpointer in){
+  GtkWidget *toplevel=GTK_WIDGET(in);
+  GtkEntry *e=GTK_ENTRY(widget);
+  gint pos=gtk_editable_get_position(GTK_EDITABLE(widget));
+  const gchar *text=gtk_entry_get_text(e);
+
+  /* we accept only numerals, forward arrow keys, Enter, tab, alt-tab,
+     block all else */
+  switch(event->keyval){
+  case GDK_6:
+  case GDK_7:
+  case GDK_8:
+  case GDK_9:
+    if(pos==5 || pos==8)return TRUE;
+  case GDK_0:
+  case GDK_1:
+  case GDK_2:
+  case GDK_3:
+  case GDK_4:
+  case GDK_5:
+    if(pos>12)return TRUE;
+    {
+      char buffer[15];
+      strncpy(buffer,text,15);
+      if(pos>13)pos=13;
+      buffer[pos]=event->keyval;
+
+      timeentry_fix(buffer);
+
+      pos++;
+      if(pos==4 || pos==7 || pos==10)pos++;
+      gtk_entry_set_text(e,buffer);
+      gtk_editable_set_position(GTK_EDITABLE(widget),pos);
+      return TRUE;
+    }
+    break;
+  case GDK_BackSpace:
+    /* rewrite to left arrow */
+  case GDK_Left:
+    if(pos==0){
+      /* back up focus */
+      gtk_widget_child_focus(toplevel,GTK_DIR_TAB_BACKWARD);
+      return TRUE;
+    }
+
+    pos--;
+    if(pos==4 || pos==7 || pos==10)pos--;
+    gtk_editable_set_position(GTK_EDITABLE(widget),pos);
+    return  TRUE;
+
+  case GDK_Right:
+    if(pos>=12){
+      /* advance focus */
+      gtk_widget_child_focus(toplevel,GTK_DIR_TAB_FORWARD);
+      return TRUE;
+    }
+
+    pos++;
+    if(pos==4 || pos==7 || pos==10)pos++;
+    gtk_editable_set_position(GTK_EDITABLE(widget),pos);
+    return  TRUE;
+
+  case GDK_Tab:
+  case GDK_ISO_Left_Tab:
+  case GDK_Up:
+  case GDK_Down:
+    return FALSE;
+
+  default:
+    return TRUE;
+  }
+}
+
+static gboolean keybinding(GtkWidget *widget,
+			   GdkEventKey *event,
+			   gpointer in){
+  fprintf(stderr,"keypress: M%d C%d S%d L%d '%x'\n",
+	  event->state&GDK_MOD1_MASK,
+	  event->state&GDK_CONTROL_MASK,
+	  event->state&GDK_SHIFT_MASK,
+	  event->state&GDK_LOCK_MASK,
+	  event->keyval);
+
+  /* do not capture Alt accellerators */
+  if(event->state&GDK_MOD1_MASK) return FALSE;
+
+  switch(event->keyval){
+  case GDK_m:
+    /* trigger master dB */
+    break;
+  case GDK_minus:
 
+    break;
+  case GDK_underscore:
+
+    break;
+  case GDK_equal:
+
+    break;
+  case GDK_plus:
+
+    break;
+  case GDK_d:
+
+    break;
+  case GDK_t:
+
+    break;
+  case GDK_n:
+
+    break;
+  case GDK_e:
+
+    break;
+  case GDK_c:
+
+    break;
+  case GDK_l:
+
+    break;
+  case GDK_o:
+
+    break;
+  case GDK_a:
+
+    break;
+  case GDK_A:
+
+    break;
+  case GDK_b:
+
+    break;
+  case GDK_B:
+
+    break;
+    //  case GDK_BackSpace:
+
+    break;
+  case GDK_less:
+
+    break;
+  case GDK_comma:
+
+    break;
+  case GDK_space:
+
+    break;
+  case GDK_period:
+
+    break;
+  case GDK_greater:
+
+    break;
+  case GDK_End:
+
+    break;
+  default:
+    return FALSE;
+  }
+
+  return TRUE;
 }
 
 static void mainpanel_panelentry(postfish_mainpanel *p,
@@ -53,7 +261,7 @@
 
   GtkWidget *topplace,*topal;
 
-  char *text_bar[7]={"[bksp]","<",",","[space]",".",">","[end]"};
+  char *text_bar[7]={"[bksp]","[<]","[,]","[space]","[.]","[>]","[end]"};
 
   GdkWindow *root=gdk_get_default_root_window();
   panel->toplevel=gtk_window_new (GTK_WINDOW_TOPLEVEL);
@@ -63,7 +271,7 @@
   topplace=gtk_table_new(1,1,0);
   topal=gtk_alignment_new(1,0,0,0);
 
-  panel->quitbutton=gtk_button_new_with_mnemonic("quit");
+  panel->quitbutton=gtk_button_new_with_mnemonic("_quit");
   gtk_widget_set_name(panel->quitbutton,"quitbutton");
   gtk_container_add (GTK_CONTAINER(topal), panel->quitbutton);
   
@@ -81,7 +289,11 @@
                     G_CALLBACK (shutdown), NULL);
   
 
-  for(i=0;i<12;i++)
+  g_signal_connect (G_OBJECT (panel->toplevel), "key-press-event",
+		    G_CALLBACK (keybinding), panel);
+  
+
+  for(i=0;i<16;i++)
     panel->ff[i]=gdk_pixmap_create_from_xpm_d(root,
                                               panel->fb+i,NULL,ff_xpm[i]);
   xpm_bar[0]=gdk_pixmap_create_from_xpm_d(root,
@@ -148,13 +360,13 @@
     gtk_table_attach_defaults(GTK_TABLE(panel->wintable),temp,1,2,0,1);
   }
 
-  mainpanel_panelentry(panel,"_Declip ","d",0);
-  mainpanel_panelentry(panel,"Cross_Talk ","t",1);
-  mainpanel_panelentry(panel,"_Noise Filter ","n",2);
-  mainpanel_panelentry(panel,"_Equalizer ","e",3);
-  mainpanel_panelentry(panel,"_Compander ","c",4);
-  mainpanel_panelentry(panel,"_Limiter ","l",5);
-  mainpanel_panelentry(panel,"_Output Cal. ","o",6);
+  mainpanel_panelentry(panel,"_Declip ","[d]",0);
+  mainpanel_panelentry(panel,"Cross_Talk ","[t]",1);
+  mainpanel_panelentry(panel,"_Noise Filter ","[n]",2);
+  mainpanel_panelentry(panel,"_Equalizer ","[e]",3);
+  mainpanel_panelentry(panel,"_Compander ","[c]",4);
+  mainpanel_panelentry(panel,"_Limiter ","[l]",5);
+  mainpanel_panelentry(panel,"_Output Cal. ","[o]",6);
 
 
   g_signal_connect (G_OBJECT (panel->toplevel), "delete_event",
@@ -222,19 +434,24 @@
     /* master dB slider */
     {
       GtkWidget *box=gtk_hbox_new(0,0);
-      GtkWidget *active=gtk_toggle_button_new_with_mnemonic("_master");
-      GtkWidget *label=readout_new(" -50.0 dB");
-      GtkWidget *slider=gtk_hscale_new_with_range(-50,50,.1);
 
-      gtk_scale_set_draw_value(GTK_SCALE(slider),FALSE);
+      panel->masterdB_a=gtk_toggle_button_new_with_label("[m]aster");
+      panel->masterdB_r=readout_new("  0.0 dB");
+      panel->masterdB_s=gtk_hscale_new_with_range(-50,50,.1);
+
+      gtk_range_set_value(GTK_RANGE(panel->masterdB_s),0);
+      gtk_scale_set_draw_value(GTK_SCALE(panel->masterdB_s),FALSE);
     
-      gtk_table_attach(GTK_TABLE(ttable),active,0,1,3,4,
+      gtk_table_attach(GTK_TABLE(ttable),panel->masterdB_a,0,1,3,4,
                        GTK_FILL,GTK_FILL,0,0);
       
-      gtk_box_pack_start(GTK_BOX(box),label,0,0,0);
-      gtk_box_pack_start(GTK_BOX(box),slider,1,1,0);
+      gtk_box_pack_start(GTK_BOX(box),panel->masterdB_r,0,0,0);
+      gtk_box_pack_start(GTK_BOX(box),panel->masterdB_s,1,1,0);
       
       gtk_table_attach_defaults(GTK_TABLE(ttable),box,1,3,3,4);
+
+      g_signal_connect_after (G_OBJECT(panel->masterdB_s), "value-changed",
+			G_CALLBACK(masterdB_change), (gpointer)panel);
     }
 
     /* master action bar */
@@ -278,19 +495,19 @@
     {
       GtkWidget *cuebox=gtk_hbox_new(0,0);
       GtkWidget *cuelabel=gtk_label_new("cue:");
-      GtkWidget *cue=readout_new("9999:99:99.99");
+      GtkWidget *cue=readout_new("    :  :00.00");
       GtkWidget *entry_a=gtk_entry_new();
       GtkWidget *entry_b=gtk_entry_new();
 
       GtkWidget *framea=gtk_vseparator_new();
       GtkWidget *frameb=gtk_vseparator_new();
 
-      GtkWidget *set_a=gtk_button_new_with_mnemonic("_a");
-      GtkWidget *set_b=gtk_button_new_with_mnemonic("_b");
-      GtkWidget *reset_a=gtk_button_new_with_mnemonic("_A");
-      GtkWidget *reset_b=gtk_button_new_with_mnemonic("_B");
+      GtkWidget *set_a=gtk_button_new_with_label("[a]");
+      GtkWidget *set_b=gtk_button_new_with_label("[b]");
+      GtkWidget *reset_a=gtk_button_new_with_label("[A]");
+      GtkWidget *reset_b=gtk_button_new_with_label("[B]");
 
-      GtkWidget *panel=gtk_check_button_new_with_mnemonic("c_ue list");
+      GtkWidget *panelb=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);
@@ -298,6 +515,16 @@
       gtk_entry_set_text(GTK_ENTRY(entry_b),"    :  :00.00");
 
 
+      g_signal_connect (G_OBJECT (entry_a), "key-press-event",
+			G_CALLBACK (timeevent_keybinding), panel->toplevel);
+      g_signal_connect (G_OBJECT (entry_b), "key-press-event",
+			G_CALLBACK (timeevent_keybinding), panel->toplevel);
+      g_signal_connect_after(G_OBJECT (entry_a), "grab_focus",
+			G_CALLBACK (timeevent_unselect), NULL);
+      g_signal_connect_after(G_OBJECT (entry_b), "grab_focus",
+			G_CALLBACK (timeevent_unselect), NULL);
+
+
       gtk_widget_set_name(reset_a,"reseta");
       gtk_widget_set_name(reset_b,"resetb");
 
@@ -306,7 +533,7 @@
 
       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_table_attach_defaults(GTK_TABLE(ttable),panelb,2,3,5,6);
 
       gtk_box_pack_start(GTK_BOX(cuebox),cue,0,0,0);
 
@@ -347,6 +574,7 @@
 
   gtk_widget_show_all(panel->toplevel);
   gtk_window_set_resizable(GTK_WINDOW(panel->toplevel),0);
+
 }
 
 #include <stdlib.h>
@@ -366,7 +594,7 @@
   gtk_init (&argc, &argv);
 
   {
-    char *labels[]={"left","right","mid","side",0};
+    char *labels[]={"_0 left","_1 right","_2 mid","_3 side",0};
     mainpanel_create(&mainpanel,labels);
   }
 

<p><p>1.3       +1 -3      postfish/multibar.c

Index: multibar.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/multibar.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- multibar.c	9 Oct 2003 00:33:36 -0000	1.2
+++ multibar.c	10 Oct 2003 05:42:41 -0000	1.3
@@ -238,9 +238,7 @@
 static GtkDrawingAreaClass *parent_class = NULL;
 
 static void multibar_class_init (MultibarClass *class){
-  GtkWidgetClass *widget_class;
-  widget_class = (GtkWidgetClass*) class;
-
+  GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
   parent_class = g_type_class_peek_parent (class);
 
   widget_class->expose_event = expose;

<p><p>1.2       +26 -5     postfish/readout.c

Index: readout.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/readout.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- readout.c	9 Oct 2003 00:33:36 -0000	1.1
+++ readout.c	10 Oct 2003 05:42:41 -0000	1.2
@@ -3,20 +3,40 @@
 static GtkFrameClass *parent_class = NULL;
 
 static void readout_class_init (ReadoutClass *class){
+  GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
   parent_class = g_type_class_peek_parent (class);
+
 }
 
 static void readout_init (Readout *r){
   GtkWidget *widget=GTK_WIDGET(r);
+  GtkWidget *notebook=gtk_notebook_new();
+  GtkWidget *box=gtk_event_box_new();
+  
+  gtk_notebook_popup_disable(GTK_NOTEBOOK(notebook));
+  gtk_notebook_set_show_tabs(GTK_NOTEBOOK(notebook),FALSE);
+  gtk_notebook_set_show_border(GTK_NOTEBOOK(notebook),FALSE);
+  gtk_notebook_set_scrollable(GTK_NOTEBOOK(notebook),FALSE);
 
-  r->box=gtk_event_box_new();
+  r->sizelabel=gtk_label_new(NULL);
   r->label=gtk_label_new(NULL);
-  gtk_container_add(GTK_CONTAINER(widget),r->box);
-  gtk_container_add(GTK_CONTAINER(r->box),r->label);
+  gtk_container_add(GTK_CONTAINER(box),r->label);
+  
+  gtk_container_add(GTK_CONTAINER(widget),notebook);
+  gtk_notebook_append_page(GTK_NOTEBOOK(notebook),box,NULL);
+  gtk_notebook_append_page(GTK_NOTEBOOK(notebook),r->sizelabel,NULL);
+
   gtk_misc_set_alignment(GTK_MISC(r->label),1.0,.5);
-  gtk_misc_set_padding(GTK_MISC(r->label),4,0);
-  gtk_widget_show(r->box);
+  gtk_misc_set_padding(GTK_MISC(r->label),4,3);
+  gtk_misc_set_padding(GTK_MISC(r->sizelabel),4,3);
+
+  gtk_notebook_set_current_page(GTK_NOTEBOOK(notebook),0);
+
+  gtk_widget_show(notebook);
+  gtk_widget_show(box);
   gtk_widget_show(r->label);
+  gtk_widget_show(r->sizelabel);
+
 }
 
 GType readout_get_type (void){
@@ -45,6 +65,7 @@
   GtkWidget *ret= GTK_WIDGET (g_object_new (readout_get_type (), NULL));
   Readout *r=READOUT(ret);
 
+  gtk_label_set_markup(GTK_LABEL(r->sizelabel),markup);
   readout_set(r,markup);
   return ret;
 }

<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