[xiph-commits] r12298 - trunk/sushivision

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Wed Jan 3 16:16:57 PST 2007


Author: xiphmont
Date: 2007-01-03 16:16:55 -0800 (Wed, 03 Jan 2007)
New Revision: 12298

Modified:
   trunk/sushivision/example_fractal.c
   trunk/sushivision/panel-1d.c
   trunk/sushivision/panel-1d.h
   trunk/sushivision/sushivision.h
Log:
remove an extraneous scale setting from 1d panel
add point dropdown disable to 1d panel; haven't made use of setting in map redraw yet, however.



Modified: trunk/sushivision/example_fractal.c
===================================================================
--- trunk/sushivision/example_fractal.c	2007-01-03 22:40:43 UTC (rev 12297)
+++ trunk/sushivision/example_fractal.c	2007-01-04 00:16:55 UTC (rev 12298)
@@ -104,6 +104,7 @@
   return 0;
 }
 
+/* sushiv_atexit is entirely optional and may be ommitted */
 int sushiv_atexit(void){
   fprintf(stderr,"Done!\n");
   return 0;

Modified: trunk/sushivision/panel-1d.c
===================================================================
--- trunk/sushivision/panel-1d.c	2007-01-03 22:40:43 UTC (rev 12297)
+++ trunk/sushivision/panel-1d.c	2007-01-04 00:16:55 UTC (rev 12298)
@@ -501,27 +501,23 @@
 
 static void update_x_sel(sushiv_panel_t *p){
   sushiv_panel1d_t *p1 = p->subtype->p1;
-  int i;
+  int i, flag=0;
 
   // enable/disable dimension slider thumbs
-  
+  // enable/disable objective 'point' dropdowns
   for(i=0;i<p->dimensions;i++){
     
     if(p1->dim_xb[i] &&
        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p1->dim_xb[i]))){
-
+      
       // set the x dim flag
       p1->x_d = p->dimension_list[i].d;
       p1->x_scale = p->private->dim_scales[i];
       p1->x_dnum = i;
 
-      // set panel x scale to this dim
-      p1->x = p1->vs = scalespace_linear(p1->x_d->bracket[0],
-					 p1->x_d->bracket[1],
-					 p1->data_size,
-					 PLOT(p->private->graph)->scalespacing,
-					 p1->x_d->name);
-
+      // don't have linked panels to worry about here
+      if(p1->x_d->type == SUSHIV_DIM_DISCRETE)
+	flag = 1;
     }
     if(p1->dim_xb[i] &&
        gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(p1->dim_xb[i]))){
@@ -534,6 +530,10 @@
       _sushiv_dim_widget_set_thumb_active(p->private->dim_scales[i],2,0);
     }
   } 
+
+  p1->pointactive = flag;
+  for(i=0;i<p->objectives;i++)
+    gtk_combo_box_set_active(GTK_COMBO_BOX(p1->point_pulldowns[i]),flag);
 }
 
 static void compute_1d(sushiv_panel_t *p, 
@@ -636,10 +636,10 @@
     // recompute time, and 1d panels may be recomputed first,
     // thus duplicate the scale computaiton here
     p1->vs = scalespace_linear(p1->x_d->bracket[0],
-			      p1->x_d->bracket[1],
-			      dw,
-			      PLOT(p->private->graph)->scalespacing,
-			      p1->x_d->name);
+			       p1->x_d->bracket[1],
+			       dw,
+			       PLOT(p->private->graph)->scalespacing,
+			       p1->x_d->name);
     
     // the data iterator may need to be mapped to the dimension type
     p1->vs = _sushiv_dimension_datascale(p1->x_d, p1->vs);
@@ -1530,6 +1530,7 @@
 				       structure must be hidden */
   p->subtype->p1 = p1;
   p->type = SUSHIV_PANEL_1D;
+  p1->pointactive = 1;
   p1->range_scale = scale;
 
   if(flags && SUSHIV_PANEL_LINK_Y)

Modified: trunk/sushivision/panel-1d.h
===================================================================
--- trunk/sushivision/panel-1d.h	2007-01-03 22:40:43 UTC (rev 12297)
+++ trunk/sushivision/panel-1d.h	2007-01-04 00:16:55 UTC (rev 12298)
@@ -49,6 +49,7 @@
   Slider *range_slider;
   double range_bracket[2];
   
+  int pointactive;
   mapping *mappings;
   int *linetype;
   int *pointtype;

Modified: trunk/sushivision/sushivision.h
===================================================================
--- trunk/sushivision/sushivision.h	2007-01-03 22:40:43 UTC (rev 12297)
+++ trunk/sushivision/sushivision.h	2007-01-04 00:16:55 UTC (rev 12298)
@@ -59,7 +59,7 @@
 typedef struct sushiv_dimension_internal sushiv_dimension_internal_t;
 enum sushiv_dimension_type { SUSHIV_DIM_CONTINUOUS, 
 			     SUSHIV_DIM_DISCRETE, 
-			     SUSHIV_DIM_PICKLIST };
+			     SUSHIV_DIM_PICKLIST};
 typedef union sushiv_dimension_subtype sushiv_dimension_subtype_t;
 
 struct sushiv_dimension{ 



More information about the commits mailing list