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

Monty xiphmont at xiph.org
Sat Oct 18 04:10:10 PDT 2003



xiphmont    03/10/18 07:10:10

  Modified:    .        clippanel.c main.c mainpanel.c mainpanel.h
                        postfish.h readout.c version.h
  Log:
  Fix to A/B (readout_get)
  more clipping filter panel

Revision  Changes    Path
1.2       +32 -26    postfish/clippanel.c

Index: clippanel.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/clippanel.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- clippanel.c	18 Oct 2003 09:53:22 -0000	1.1
+++ clippanel.c	18 Oct 2003 11:10:09 -0000	1.2
@@ -4,7 +4,6 @@
 #include <gdk/gdkkeysyms.h>
 #include "readout.h"
 #include "mainpanel.h"
-#include "clippanel.h"
 
 void clippanel_show(postfish_clippanel *p){
   gtk_widget_show_all(p->toplevel);
@@ -13,48 +12,55 @@
   gtk_widget_hide_all(p->toplevel);
 }
 
-extern gboolean mainpanel_keybinding(GtkWidget *widget,
-				     GdkEventKey *event,
-				     gpointer in);
+static gboolean forward_events(GtkWidget *widget,
+			       GdkEvent *event,
+			       gpointer in){
+  postfish_clippanel *p=in;
+  GdkEvent copy=*(GdkEvent *)event;
+  copy.any.window=p->mainpanel->toplevel->window;
+  gtk_main_do_event((GdkEvent *)(&copy));
+  return TRUE;
+}
 
 void clippanel_create(postfish_clippanel *panel,postfish_mainpanel *mp){
   GdkWindow *root=gdk_get_default_root_window();
   GtkWidget *topframe=gtk_frame_new (NULL);
   GtkWidget *toplabel=gtk_label_new (" declipping filter ");
-  GtkWidget *topplace=gtk_table_new(1,1,0);
-  GtkWidget *topal=gtk_alignment_new(1,0,0,0);
-  GtkWidget *closebutton=gtk_button_new_with_mnemonic("_X");
-  gtk_widget_set_name(closebutton,"quitbutton");
+  GtkWidget *topvbox=gtk_vbox_new (0,0);
+
+  GtkWidget *indframe=gtk_frame_new (NULL);
+  GtkWidget *allframe=gtk_frame_new (NULL);
+  GtkWidget *indcheck=
+    gtk_radio_button_new_with_label (NULL, 
+				     "individual channels ");
+  GtkWidget *allcheck=
+    gtk_radio_button_new_with_label_from_widget (GTK_RADIO_BUTTON(indcheck), 
+						 "all channels ");
+
+  gtk_frame_set_label_widget(GTK_FRAME(indframe),indcheck);
+  gtk_frame_set_label_widget(GTK_FRAME(allframe),allcheck);
+
+  gtk_box_pack_end(GTK_BOX(topvbox),allframe,0,1,4);
+  gtk_box_pack_end(GTK_BOX(topvbox),indframe,0,1,4);
 
   panel->toplevel=gtk_window_new (GTK_WINDOW_TOPLEVEL);
   panel->mainpanel=mp;
-  gtk_container_add (GTK_CONTAINER(topal), closebutton);
-  
-  gtk_table_attach_defaults(GTK_TABLE(topplace),
-			    topal,0,1,0,1);
-  gtk_table_attach_defaults(GTK_TABLE(topplace),
-			    topframe,0,1,0,1);
     
-  gtk_container_add (GTK_CONTAINER (panel->toplevel), topplace);
-  gtk_container_set_border_width (GTK_CONTAINER (closebutton), 3);
-
+  gtk_container_add (GTK_CONTAINER (panel->toplevel), topframe);
+  gtk_container_add (GTK_CONTAINER (topframe), topvbox);
   gtk_container_set_border_width (GTK_CONTAINER (topframe), 3);
+  gtk_container_set_border_width (GTK_CONTAINER (topvbox), 5);
   gtk_frame_set_shadow_type(GTK_FRAME(topframe),GTK_SHADOW_ETCHED_IN);
   gtk_frame_set_label_widget(GTK_FRAME(topframe),toplabel);
 
+    
 
 
-#if 0
-  g_signal_connect (G_OBJECT (panel->quitbutton), "clicked",
-		    G_CALLBACK (shutdown), NULL);
-#endif
-  
 
-  /* no, no; forward events, don't call the keyhandler directly; that
-     way accellerators go too */
+  /* forward unhandled events to the main window */
   g_signal_connect_after (G_OBJECT (panel->toplevel), "key-press-event",
-			  G_CALLBACK (mainpanel_keybinding), 
-			  panel->mainpanel);
+			  G_CALLBACK (forward_events), 
+			  panel);
 
 
   gtk_window_set_resizable(GTK_WINDOW(panel->toplevel),0);

<p><p>1.7       +0 -1      postfish/main.c

Index: main.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/main.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- main.c	16 Oct 2003 23:10:16 -0000	1.6
+++ main.c	18 Oct 2003 11:10:09 -0000	1.7
@@ -28,7 +28,6 @@
 
 /* sound playback code is OSS-specific for now */
 #include "postfish.h"
-#include "mainpanel.h"
 #include "input.h"
 #include "output.h"
 

<p><p>1.22      +3 -54     postfish/mainpanel.c

Index: mainpanel.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/mainpanel.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- mainpanel.c	18 Oct 2003 09:53:22 -0000	1.21
+++ mainpanel.c	18 Oct 2003 11:10:09 -0000	1.22
@@ -11,59 +11,6 @@
 #include "output.h"
 #include "mainpanel.h"
 
-#include "clippanel.h"
-
-struct postfish_mainpanel{
-  GtkWidget *topframe;
-  GtkWidget *toplabel;
-
-  GtkWidget *mainbox;
-  GtkWidget *box1;
-  GtkWidget *leftback;
-  GtkWidget *leftframe;
-  GtkWidget *box2;
-
-  GtkWidget *wintable;
-  GtkWidget *twirlimage;
-  GdkPixmap *ff[19];
-  GdkBitmap *fb[19];
-
-  GtkWidget *quitbutton;
-  
-  GtkWidget *playimage;
-  GdkPixmap *pf[2];
-  GdkBitmap *pb[2];
-
-  /* we need these widgets */
-  GtkWidget *toplevel;
-
-  GtkWidget *masterdB_r;
-  GtkWidget *masterdB_s;
-  GtkWidget *masterdB_a;
-
-  GtkWidget *buttonactive[7];
-  GtkWidget *cue_set[2];
-  GtkWidget *cue_reset[2];
-
-  GtkWidget *deckactive[7];
-
-  GtkWidget *inbar;
-  GtkWidget *outbar;
-
-  GtkWidget *channelshow[10]; /* support only up to 8 + mid/side */
-
-  GtkWidget *cue;
-  GtkWidget *entry_a;
-  GtkWidget *entry_b;
-
-  postfish_clippanel clippanel;
-
-  /* ui state */
-  int fishframe;
-  int fishframe_init;
-  guint fishframe_timer;
- 
-};
 
 static void action_clippanel_window(GtkWidget *widget,postfish_mainpanel *p){
   if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))){
@@ -348,7 +295,7 @@
   }
 }
 
-gboolean mainpanel_keybinding(GtkWidget *widget,
+static gboolean mainpanel_keybinding(GtkWidget *widget,
                               GdkEventKey *event,
                               gpointer in){
   postfish_mainpanel *p=in;
@@ -361,6 +308,7 @@
           event->state&GDK_LOCK_MASK,
           event->keyval);
 #endif
+
   /* do not capture Alt accellerators */
   if(event->state&GDK_MOD1_MASK) return FALSE;
   if(event->state&GDK_CONTROL_MASK) return FALSE;
@@ -481,6 +429,7 @@
   GtkWidget *ww=gtk_check_button_new_with_mnemonic(label);
   GtkWidget *wa=gtk_toggle_button_new_with_label(shortcut);
 
+  p->buttonwindow[i]=ww;
   p->buttonactive[i]=wa;
   
   gtk_table_attach_defaults(GTK_TABLE(p->wintable),ww,0,1,i+1,i+2);

<p><p>1.4       +56 -1     postfish/mainpanel.h

Index: mainpanel.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/mainpanel.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mainpanel.h	18 Oct 2003 09:53:22 -0000	1.3
+++ mainpanel.h	18 Oct 2003 11:10:09 -0000	1.4
@@ -3,4 +3,59 @@
 struct postfish_mainpanel;
 typedef struct postfish_mainpanel postfish_mainpanel;
 
-extern void mainpanel_go(int n,char *list[],int ch);
+#include "clippanel.h"
+
+struct postfish_mainpanel{
+  GtkWidget *topframe;
+  GtkWidget *toplabel;
+
+  GtkWidget *mainbox;
+  GtkWidget *box1;
+  GtkWidget *leftback;
+  GtkWidget *leftframe;
+  GtkWidget *box2;
+
+  GtkWidget *wintable;
+  GtkWidget *twirlimage;
+  GdkPixmap *ff[19];
+  GdkBitmap *fb[19];
+
+  GtkWidget *quitbutton;
+  
+  GtkWidget *playimage;
+  GdkPixmap *pf[2];
+  GdkBitmap *pb[2];
+
+  /* we need these widgets */
+  GtkWidget *toplevel;
+
+  GtkWidget *masterdB_r;
+  GtkWidget *masterdB_s;
+  GtkWidget *masterdB_a;
+
+  GtkWidget *buttonwindow[7];
+  GtkWidget *buttonactive[7];
+
+  GtkWidget *cue_set[2];
+  GtkWidget *cue_reset[2];
+
+  GtkWidget *deckactive[7];
+
+  GtkWidget *inbar;
+  GtkWidget *outbar;
+
+  GtkWidget *channelshow[10]; /* support only up to 8 + mid/side */
+
+  GtkWidget *cue;
+  GtkWidget *entry_a;
+  GtkWidget *entry_b;
+
+  postfish_clippanel clippanel;
+
+  /* ui state */
+  int fishframe;
+  int fishframe_init;
+  guint fishframe_timer;
+ 
+};
+

<p><p>1.8       +2 -0      postfish/postfish.h

Index: postfish.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/postfish.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- postfish.h	18 Oct 2003 09:53:22 -0000	1.7
+++ postfish.h	18 Oct 2003 11:10:09 -0000	1.8
@@ -75,4 +75,6 @@
 extern int eventpipe[2];
 extern int input_ch;
 
+extern void mainpanel_go(int n,char *list[],int ch);
+
 #endif

<p><p>1.4       +1 -1      postfish/readout.c

Index: readout.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/readout.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- readout.c	18 Oct 2003 08:10:49 -0000	1.3
+++ readout.c	18 Oct 2003 11:10:09 -0000	1.4
@@ -75,7 +75,7 @@
 }
 
 const gchar *readout_get(Readout  *r){
-  gtk_label_get_label(GTK_LABEL(r->label));
+  return gtk_label_get_label(GTK_LABEL(r->label));
 }
 
 

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

Index: version.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/version.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- version.h	18 Oct 2003 09:53:22 -0000	1.18
+++ version.h	18 Oct 2003 11:10:09 -0000	1.19
@@ -1,2 +1,2 @@
-#define VERSION "$Id: version.h,v 1.18 2003/10/18 09:53:22 xiphmont Exp $ "
-/* DO NOT EDIT: Automated versioning hack [Sat Oct 18 05:49:45 EDT 2003] */
+#define VERSION "$Id: version.h,v 1.19 2003/10/18 11:10:09 xiphmont Exp $ "
+/* DO NOT EDIT: Automated versioning hack [Sat Oct 18 07:08:26 EDT 2003] */

<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