[xiph-commits] r12077 - trunk/sushivision

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Fri Nov 10 16:12:30 PST 2006


Author: xiphmont
Date: 2006-11-10 16:12:28 -0800 (Fri, 10 Nov 2006)
New Revision: 12077

Modified:
   trunk/sushivision/panel-2d.c
   trunk/sushivision/plot.c
   trunk/sushivision/plot.h
Log:
Add 'Space' keybinding to also 'redo'.
Extend 'Esc' to clear crosshairs (temporarily) as well as box.



Modified: trunk/sushivision/panel-2d.c
===================================================================
--- trunk/sushivision/panel-2d.c	2006-11-10 23:07:53 UTC (rev 12076)
+++ trunk/sushivision/panel-2d.c	2006-11-11 00:12:28 UTC (rev 12077)
@@ -1122,9 +1122,15 @@
     return TRUE;
 
   case GDK_r:
-    // redo
+  case GDK_space:
+    // redo/forward
     panel2d_undo_up(p);
     return TRUE;
+
+  case GDK_p:
+    // find [next] peak
+    //panel2d_peak_find(p);
+    return TRUE;
   }
 
 

Modified: trunk/sushivision/plot.c
===================================================================
--- trunk/sushivision/plot.c	2006-11-10 23:07:53 UTC (rev 12076)
+++ trunk/sushivision/plot.c	2006-11-11 00:12:28 UTC (rev 12077)
@@ -292,7 +292,7 @@
     cairo_fill(c);
     
     // transient foreground
-    {
+    if(p->cross_active){
       double sx = plot_get_crosshair_xpixel(p);
       double sy = plot_get_crosshair_ypixel(p);
       cairo_set_source_rgba(c,1.,1.,1.,.8);
@@ -513,6 +513,7 @@
 
     p->selx = scalespace_value(&p->x,event->x);
     p->sely = scalespace_value(&p->y,widget->allocation.height-event->y);
+    p->cross_active=1;
 
     if(p->crosshairs_callback)
       p->crosshairs_callback(p->cross_data);
@@ -540,6 +541,7 @@
   if(!p->box_active && p->button_down){
     p->selx = scalespace_value(&p->x,event->x);
     p->sely = scalespace_value(&p->y,widget->allocation.height-event->y);
+    p->cross_active=1;
 
     if(p->crosshairs_callback)
       p->crosshairs_callback(p->cross_data);
@@ -571,6 +573,7 @@
   case GDK_Escape:
     p->button_down=0;
     p->box_active=0;
+    p->cross_active=0;
     plot_expose_request(p);
 
     return TRUE;
@@ -603,6 +606,7 @@
   case GDK_Left:
     {
       double x = scalespace_pixel(&p->x,p->selx)-1;
+      p->cross_active=1;
       if(shift)
 	x-=9;
       p->selx = scalespace_value(&p->x,x);
@@ -622,6 +626,7 @@
   case GDK_Right:
     {
       double x = scalespace_pixel(&p->x,p->selx)+1;
+      p->cross_active=1;
       if(shift)
 	x+=9;
       p->selx = scalespace_value(&p->x,x);
@@ -641,6 +646,7 @@
   case GDK_Up:
     {
       double y = widget->allocation.height - scalespace_pixel(&p->y,p->sely)-1;
+      p->cross_active=1;
       if(shift)
 	y-=9;
       p->sely = scalespace_value(&p->y,widget->allocation.height - y);
@@ -659,6 +665,7 @@
   case GDK_Down:
     {
       double y = widget->allocation.height - scalespace_pixel(&p->y,p->sely)+1;
+      p->cross_active=1;
       if(shift)
 	y+=9;
       p->sely = scalespace_value(&p->y,widget->allocation.height - y);
@@ -852,6 +859,7 @@
   gdk_threads_enter();
   p->selx = x;
   p->sely = y;
+  p->cross_active=1;
 
   plot_expose_request(p);
   gdk_threads_leave();

Modified: trunk/sushivision/plot.h
===================================================================
--- trunk/sushivision/plot.h	2006-11-10 23:07:53 UTC (rev 12076)
+++ trunk/sushivision/plot.h	2006-11-11 00:12:28 UTC (rev 12077)
@@ -54,6 +54,7 @@
 
   double selx;
   double sely;
+  int cross_active;
 
   double box_x1;
   double box_y1;



More information about the commits mailing list