[xiph-cvs] cvs commit: postfish mainpanel.c readout.c readout.h version.h
Monty
xiphmont at xiph.org
Sat Oct 18 01:10:50 PDT 2003
xiphmont 03/10/18 04:10:49
Modified: . mainpanel.c readout.c readout.h version.h
Log:
Connect A/B cue controls
Revision Changes Path
1.20 +55 -4 postfish/mainpanel.c
Index: mainpanel.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/mainpanel.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- mainpanel.c 18 Oct 2003 07:29:47 -0000 1.19
+++ mainpanel.c 18 Oct 2003 08:10:49 -0000 1.20
@@ -125,15 +125,60 @@
}
}
+static void action_entrya(GtkWidget *widget,postfish_mainpanel *p){
+ const char *time=gtk_entry_get_text(GTK_ENTRY(p->entry_a));
+ off_t cursor=input_time_to_cursor(time);
+
+ if(cursor==0){
+ time=readout_get(READOUT(p->cue));
+ gtk_entry_set_text(GTK_ENTRY(p->entry_a),time);
+ }else{
+ input_seek(cursor);
+ readout_set(READOUT(p->cue),(char *)time);
+ }
+}
+
static void action_entryb(GtkWidget *widget,postfish_mainpanel *p){
- if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
- loop_active=1;
- else
- loop_active=0;
+ if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget))){
+ const char *time=gtk_entry_get_text(GTK_ENTRY(p->entry_b));
+ off_t cursora,cursorb=input_time_to_cursor(time);
+ time=gtk_entry_get_text(GTK_ENTRY(p->entry_a));
+ cursora=input_time_to_cursor(time);
+
+ if(cursorb==0){
+ time=readout_get(READOUT(p->cue));
+ cursorb=input_time_to_cursor(time);
+ gtk_entry_set_text(GTK_ENTRY(p->entry_b),time);
+ }
+
+ if(cursora<cursorb){
+ input_Acursor_set(cursora);
+ input_Bcursor_set(cursorb);
+ loop_active=1;
+ }else{
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget),0);
+ }
+ }else
+ loop_active=0;
+
gtk_image_set_from_pixmap(GTK_IMAGE(p->playimage),
p->pf[loop_active],
p->pb[loop_active]);
+
+}
+
+static void action_reseta(GtkWidget *widget,postfish_mainpanel *p){
+ char time[14];
+ input_cursor_to_time(0,time);
+ gtk_entry_set_text(GTK_ENTRY(p->entry_a),time);
+}
+
+static void action_resetb(GtkWidget *widget,postfish_mainpanel *p){
+ char time[14];
+ input_cursor_to_time(0,time);
+ gtk_entry_set_text(GTK_ENTRY(p->entry_b),time);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(p->cue_set[1]),0);
}
/* gotta have the Fucking Fish */
@@ -441,7 +486,7 @@
char versiondate[20];
char versiontime[20];
char versionmarkup[240];
- sscanf(VERSION,"$Id: mainpanel.c,v 1.19 2003/10/18 07:29:47 xiphmont Exp $",
+ sscanf(VERSION,"$Id: mainpanel.c,v 1.20 2003/10/18 08:10:49 xiphmont Exp $",
versionnum,versiondate,versiontime);
snprintf(versionmarkup,240,"<span size=\"large\" weight=\"bold\" "
"style=\"italic\" foreground=\"dark blue\">"
@@ -735,8 +780,14 @@
g_signal_connect_after(G_OBJECT (panel->entry_b), "grab_focus",
G_CALLBACK (timeevent_unselect), NULL);
+ g_signal_connect (G_OBJECT (panel->cue_set[0]), "clicked",
+ G_CALLBACK (action_entrya), panel);
g_signal_connect (G_OBJECT (panel->cue_set[1]), "clicked",
G_CALLBACK (action_entryb), panel);
+ g_signal_connect (G_OBJECT (panel->cue_reset[0]), "clicked",
+ G_CALLBACK (action_reseta), panel);
+ g_signal_connect (G_OBJECT (panel->cue_reset[1]), "clicked",
+ G_CALLBACK (action_resetb), panel);
gtk_widget_set_name(panel->cue_reset[0],"reseta");
<p><p>1.3 +4 -0 postfish/readout.c
Index: readout.c
===================================================================
RCS file: /usr/local/cvsroot/postfish/readout.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- readout.c 10 Oct 2003 05:42:41 -0000 1.2
+++ readout.c 18 Oct 2003 08:10:49 -0000 1.3
@@ -74,4 +74,8 @@
gtk_label_set_markup(GTK_LABEL(r->label),label);
}
+const gchar *readout_get(Readout *r){
+ gtk_label_get_label(GTK_LABEL(r->label));
+}
+
<p><p>1.3 +1 -0 postfish/readout.h
Index: readout.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/readout.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- readout.h 13 Oct 2003 06:01:22 -0000 1.2
+++ readout.h 18 Oct 2003 08:10:49 -0000 1.3
@@ -39,6 +39,7 @@
GType readout_get_type (void);
GtkWidget* readout_new (char *markup);
void readout_set (Readout *m,char *markup);
+const gchar* readout_get (Readout *r);
G_END_DECLS
<p><p>1.17 +2 -2 postfish/version.h
Index: version.h
===================================================================
RCS file: /usr/local/cvsroot/postfish/version.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- version.h 18 Oct 2003 07:29:47 -0000 1.16
+++ version.h 18 Oct 2003 08:10:49 -0000 1.17
@@ -1,2 +1,2 @@
-#define VERSION "$Id: version.h,v 1.16 2003/10/18 07:29:47 xiphmont Exp $ "
-/* DO NOT EDIT: Automated versioning hack [Sat Oct 18 03:15:02 EDT 2003] */
+#define VERSION "$Id: version.h,v 1.17 2003/10/18 08:10:49 xiphmont Exp $ "
+/* DO NOT EDIT: Automated versioning hack [Sat Oct 18 04:09:51 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