[xiph-commits] r12285 - trunk/sushivision
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Mon Jan 1 20:16:42 PST 2007
Author: xiphmont
Date: 2007-01-01 20:16:40 -0800 (Mon, 01 Jan 2007)
New Revision: 12285
Modified:
trunk/sushivision/internal.h
trunk/sushivision/panel-1d.c
Log:
Add new objective config in 1d panel to undo engine
Modified: trunk/sushivision/internal.h
===================================================================
--- trunk/sushivision/internal.h 2007-01-02 04:10:55 UTC (rev 12284)
+++ trunk/sushivision/internal.h 2007-01-02 04:16:40 UTC (rev 12285)
@@ -41,8 +41,7 @@
// for now we use a master undo type which leaves one or two fields
// unused for a given panel.
typedef struct sushiv_panel_undo {
- int *mappings;
- int *submappings;
+ u_int32_t *mappings;
double *scale_vals[3];
double *dim_vals[3];
Modified: trunk/sushivision/panel-1d.c
===================================================================
--- trunk/sushivision/panel-1d.c 2007-01-02 04:10:55 UTC (rev 12284)
+++ trunk/sushivision/panel-1d.c 2007-01-02 04:16:40 UTC (rev 12285)
@@ -813,14 +813,12 @@
// alloc fields as necessary
if(!u->mappings)
u->mappings = calloc(p->objectives,sizeof(*u->mappings));
- if(!u->submappings)
- u->submappings = calloc(p->objectives,sizeof(*u->submappings));
if(!u->scale_vals[0])
u->scale_vals[0] = calloc(1,sizeof(**u->scale_vals));
if(!u->scale_vals[1])
u->scale_vals[1] = calloc(1,sizeof(**u->scale_vals));
if(!u->scale_vals[2])
- u->scale_vals[2] = calloc(1,sizeof(**u->scale_vals));
+ u->scale_vals[2] = calloc(p->objectives,sizeof(**u->scale_vals));
if(!u->dim_vals[0])
u->dim_vals[0] = calloc(p->dimensions+1,sizeof(**u->dim_vals)); // +1 for possible linked dim
if(!u->dim_vals[1])
@@ -833,8 +831,11 @@
u->scale_vals[1][0] = slider_get_value(p1->range_slider,1);
for(i=0;i<p->objectives;i++){
- u->mappings[i] = p1->mappings[i].mapnum;
- u->submappings[i] = p1->linetype[i];
+ u->mappings[i] =
+ (p1->mappings[i].mapnum<<24) |
+ (p1->linetype[i]<<16) |
+ (p1->pointtype[i]<<8);
+ u->scale_vals[2][0] = slider_get_value(p1->alpha_scale[i],0);
}
for(i=0;i<p->dimensions;i++){
@@ -867,8 +868,10 @@
slider_set_value(p1->range_slider,1,u->scale_vals[1][0]);
for(i=0;i<p->objectives;i++){
- gtk_combo_box_set_active(GTK_COMBO_BOX(p1->map_pulldowns[i]),u->mappings[i]);
- gtk_combo_box_set_active(GTK_COMBO_BOX(p1->line_pulldowns[i]),u->submappings[i]);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(p1->map_pulldowns[i]), (u->mappings[i]>>24)&0xff );
+ gtk_combo_box_set_active(GTK_COMBO_BOX(p1->line_pulldowns[i]), (u->mappings[i]>>16)&0xff );
+ gtk_combo_box_set_active(GTK_COMBO_BOX(p1->point_pulldowns[i]), (u->mappings[i]>>8)&0xff );
+ slider_set_value(p1->alpha_scale[i],0,u->scale_vals[2][i]);
}
for(i=0;i<p->dimensions;i++){
More information about the commits
mailing list