Skip to content

Commit

Permalink
OSC: Fix some things while loading the profile of a plot.
Browse files Browse the repository at this point in the history
  • Loading branch information
dNechita committed Feb 14, 2014
1 parent 0e6572d commit ac39d4b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions oscplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2431,27 +2431,35 @@ static int cfg_read_handler(void *user, const char* section, const char* name, c
get_iter_by_name(tree, &ch_iter, dev_name, ch_name);
gtk_tree_store_set(store, &ch_iter, CHANNEL_ACTIVE, enabled, -1);
} else if (MATCH(ch_property, "color_red")) {
get_iter_by_name(tree, &ch_iter, dev_name, ch_name);
gtk_tree_model_get(gtk_tree_view_get_model(tree), &ch_iter, CHANNEL_SETTINGS, &csettings, -1);
csettings->graph_color.red = atoi(value);
} else if (MATCH(ch_property, "color_green")) {
get_iter_by_name(tree, &ch_iter, dev_name, ch_name);
gtk_tree_model_get(gtk_tree_view_get_model(tree), &ch_iter, CHANNEL_SETTINGS, &csettings, -1);
csettings->graph_color.green = atoi(value);
} else if (MATCH(ch_property, "color_blue")) {
get_iter_by_name(tree, &ch_iter, dev_name, ch_name);
gtk_tree_model_get(gtk_tree_view_get_model(tree), &ch_iter, CHANNEL_SETTINGS, &csettings, -1);
csettings->graph_color.blue = atoi(value);
} else if (MATCH(ch_property, "math_apply_inverse_funct")) {
get_iter_by_name(tree, &ch_iter, dev_name, ch_name);
gtk_tree_model_get(gtk_tree_view_get_model(tree), &ch_iter, CHANNEL_SETTINGS, &csettings, -1);
csettings->apply_inverse_funct = atoi(value);
} else if (MATCH(ch_property, "math_apply_multiply_funct")) {
get_iter_by_name(tree, &ch_iter, dev_name, ch_name);
gtk_tree_model_get(gtk_tree_view_get_model(tree), &ch_iter, CHANNEL_SETTINGS, &csettings, -1);
csettings->apply_multiply_funct = atoi(value);
} else if (MATCH(ch_property, "math_apply_add_funct")) {
get_iter_by_name(tree, &ch_iter, dev_name, ch_name);
gtk_tree_model_get(gtk_tree_view_get_model(tree), &ch_iter, CHANNEL_SETTINGS, &csettings, -1);
csettings->apply_add_funct = atoi(value);
} else if (MATCH(ch_property, "math_multiply_value")) {
get_iter_by_name(tree, &ch_iter, dev_name, ch_name);
gtk_tree_model_get(gtk_tree_view_get_model(tree), &ch_iter, CHANNEL_SETTINGS, &csettings, -1);
csettings->multiply_value = atof(value);
} else if (MATCH(ch_property, "math_add_value")) {
get_iter_by_name(tree, &ch_iter, dev_name, ch_name);
gtk_tree_model_get(gtk_tree_view_get_model(tree), &ch_iter, CHANNEL_SETTINGS, &csettings, -1);
csettings->add_value = atof(value);
}
Expand Down

0 comments on commit ac39d4b

Please sign in to comment.