diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2009-05-05 05:14:51 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2009-05-05 05:14:51 +0000 |
commit | 4287b4ba5c10adecf38b014084cbf475b7fba92a (patch) | |
tree | 5a8d45fa1990da53c054e41e497295b137b9f3ed /science | |
parent | e9b0c36292995642c3e0c813dcff8dc1f9f5e6ba (diff) | |
download | ports-4287b4ba5c10adecf38b014084cbf475b7fba92a.tar.gz ports-4287b4ba5c10adecf38b014084cbf475b7fba92a.zip |
Notes
Diffstat (limited to 'science')
5 files changed, 274 insertions, 3 deletions
diff --git a/science/gchemutils/files/patch-libs_gcu_spectrumdoc.cc b/science/gchemutils/files/patch-libs_gcu_spectrumdoc.cc new file mode 100644 index 000000000000..43ac941d08f6 --- /dev/null +++ b/science/gchemutils/files/patch-libs_gcu_spectrumdoc.cc @@ -0,0 +1,81 @@ +--- libs/gcu/spectrumdoc.cc.orig 2009-01-05 14:09:59.000000000 -0500 ++++ libs/gcu/spectrumdoc.cc 2009-05-05 00:55:23.000000000 -0400 +@@ -28,12 +28,13 @@ + #include <goffice/graph/gog-axis.h> + #include <goffice/graph/gog-plot.h> + #include <goffice/graph/gog-series-lines.h> +-#include <goffice/graph/gog-style.h> + #include <goffice/math/go-fft.h> + #include <goffice/math/go-math.h> + #include <goffice/math/go-rangefunc.h> + #include <goffice/math/go-regression.h> + #include <goffice/utils/go-color.h> ++#include <goffice/utils/go-style.h> ++#include <goffice/utils/go-styled-object.h> + #include <gio/gio.h> + #include <glib/gi18n-lib.h> + #include <cstring> +@@ -668,8 +669,8 @@ + case JCAMP_PEAK_TABLE: { + // in that case, add drop lines ans remove the normal line + GogSeries *series = m_View->GetSeries (); +- gog_object_add_by_name (GOG_OBJECT (series), "Vertical drop lines", GOG_OBJECT (g_object_new (GOG_SERIES_LINES_TYPE, NULL))); +- GogStyle *style = gog_styled_object_get_style (GOG_STYLED_OBJECT (series)); ++ gog_object_add_by_name (GOG_OBJECT (series), "Vertical drop lines", GOG_OBJECT (g_object_new (GOG_TYPE_SERIES_LINES, NULL))); ++ GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (series)); + style->line.dash_type = GO_LINE_NONE; + style->line.auto_dash = false; + } +@@ -1898,7 +1899,7 @@ + + static double expm (double val, double f, double offset) + { +- return exp10 (-val) * f + offset; ++ return pow (10, -val) * f + offset; + } + + double (*SpectrumDocument::GetConversionFunction (SpectrumUnitType oldu, SpectrumUnitType newu, double &factor, double &shift)) (double, double, double) +@@ -1966,7 +1967,7 @@ + void SpectrumDocument::OnShowIntegral () + { + m_IntegralVisible = !m_IntegralVisible; +- GogStyle *style; ++ GOStyle *style; + if (m_IntegralVisible) { + if (integral < 0) { + integral = variables.size (); +@@ -2036,15 +2037,15 @@ + gog_series_set_dim (v.Series, 0, godata, NULL); + godata = go_data_vector_val_new (v.Values, v.NbValues, NULL); + gog_series_set_dim (v.Series, 1, godata, NULL); +- GogStyledObject *axis = GOG_STYLED_OBJECT (g_object_new (GOG_AXIS_TYPE, "major-tick-labeled", false, NULL)); ++ GOStyledObject *axis = GO_STYLED_OBJECT (g_object_new (GOG_TYPE_AXIS, "major-tick-labeled", false, NULL)); + GogPlot *plot = gog_series_get_plot (v.Series); + GogObject *chart = GOG_OBJECT (gog_object_get_parent (GOG_OBJECT (plot))); + gog_object_add_by_name (chart, "Y-Axis", GOG_OBJECT (axis)); + gog_plot_set_axis (plot, GOG_AXIS (axis)); +- style = gog_styled_object_get_style (axis); ++ style = go_styled_object_get_style (axis); + style->line.auto_dash = false; + style->line.dash_type = GO_LINE_NONE; +- style = gog_styled_object_get_style (GOG_STYLED_OBJECT (v.Series)); ++ style = go_styled_object_get_style (GO_STYLED_OBJECT (v.Series)); + style->line.auto_dash = false; + style->line.auto_color = false; + style->line.color = RGBA_RED; +@@ -2056,13 +2057,13 @@ + delete [] xn[4]; + delete [] yb; + } else +- style = gog_styled_object_get_style (GOG_STYLED_OBJECT (variables[integral].Series)); ++ style = go_styled_object_get_style (GO_STYLED_OBJECT (variables[integral].Series)); + // show the series + style->line.dash_type = GO_LINE_SOLID; + gog_object_request_update (GOG_OBJECT (variables[integral].Series)); + } else { + // hide the series +- style = gog_styled_object_get_style (GOG_STYLED_OBJECT (variables[integral].Series)); ++ style = go_styled_object_get_style (GO_STYLED_OBJECT (variables[integral].Series)); + style->line.dash_type = GO_LINE_NONE; + gog_object_request_update (GOG_OBJECT (variables[integral].Series)); + } diff --git a/science/gchemutils/files/patch-libs_gcu_spectrumview.cc b/science/gchemutils/files/patch-libs_gcu_spectrumview.cc new file mode 100644 index 000000000000..642e640a2a40 --- /dev/null +++ b/science/gchemutils/files/patch-libs_gcu_spectrumview.cc @@ -0,0 +1,41 @@ +--- libs/gcu/spectrumview.cc.orig 2009-01-05 14:09:59.000000000 -0500 ++++ libs/gcu/spectrumview.cc 2009-05-05 00:56:31.000000000 -0400 +@@ -30,9 +30,10 @@ + #include <goffice/graph/gog-object.h> + #include <goffice/graph/gog-plot.h> + #include <goffice/graph/gog-series.h> +-#include <goffice/graph/gog-style.h> + #include <goffice/gtk/go-graph-widget.h> + #include <goffice/utils/go-image.h> ++#include <goffice/utils/go-style.h> ++#include <goffice/utils/go-styled-object.h> + #include <gsf/gsf-output-gio.h> + #include <glib/gi18n-lib.h> + #include <cmath> +@@ -65,7 +66,7 @@ SpectrumView::SpectrumView (SpectrumDocu + m_Widget = go_graph_widget_new (NULL); + GogGraph *graph = go_graph_widget_get_graph (GO_GRAPH_WIDGET (m_Widget)); + /* Add a title */ +- GogLabel *label = (GogLabel *) g_object_new (GOG_LABEL_TYPE, NULL); ++ GogLabel *label = (GogLabel *) g_object_new (GOG_TYPE_LABEL, NULL); + gog_object_add_by_name (GOG_OBJECT (graph), "Title", GOG_OBJECT (label)); + /* Get the chart created by the widget initialization */ + GogChart *chart = go_graph_widget_get_chart (GO_GRAPH_WIDGET (m_Widget)); +@@ -144,7 +145,7 @@ void SpectrumView::SetAxisLabel (GogAxis + gog_object_clear_parent (label); + g_object_unref (label); + } +- label = GOG_OBJECT (g_object_new (GOG_LABEL_TYPE, NULL)); ++ label = GOG_OBJECT (g_object_new (GOG_TYPE_LABEL, NULL)); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, NULL); + gog_object_add_by_name (axis, "Label", label); + +@@ -156,7 +157,7 @@ void SpectrumView::ShowAxis (GogAxisType + GSList *axes = gog_chart_get_axes (chart, target); + GogObject *axis = GOG_OBJECT (axes->data); + g_object_set (G_OBJECT (axis), "major-tick-labeled", false, NULL); +- GogStyle *style = gog_styled_object_get_style (GOG_STYLED_OBJECT (axis)); ++ GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (axis)); + style->line.dash_type = GO_LINE_NONE; + style->line.auto_dash = false; + } diff --git a/science/gchemutils/files/patch-programs_calc_gchemcalc.cc b/science/gchemutils/files/patch-programs_calc_gchemcalc.cc index 9383fabbf27a..b5c7b7c24b7e 100644 --- a/science/gchemutils/files/patch-programs_calc_gchemcalc.cc +++ b/science/gchemutils/files/patch-programs_calc_gchemcalc.cc @@ -1,6 +1,21 @@ ---- programs/calc/gchemcalc.cc.orig 2009-05-03 13:55:23.000000000 -0400 -+++ programs/calc/gchemcalc.cc 2009-05-03 13:55:34.000000000 -0400 -@@ -736,7 +736,7 @@ int main (int argc, char *argv[]) +--- programs/calc/gchemcalc.cc.orig 2009-01-05 14:09:59.000000000 -0500 ++++ programs/calc/gchemcalc.cc 2009-05-05 01:04:35.000000000 -0400 +@@ -56,11 +56,11 @@ + #include <goffice/gtk/goffice-gtk.h> + #include <goffice/graph/gog-axis.h> + #include <goffice/graph/gog-data-set.h> +-#include <goffice/graph/gog-object.h> ++#include <goffice/graph/gog-object-xml.h> + #include <goffice/graph/gog-plot.h> + #include <goffice/graph/gog-series.h> +-#include <goffice/graph/gog-style.h> +-#include <goffice/graph/gog-styled-object.h> ++#include <goffice/utils/go-style.h> ++#include <goffice/utils/go-styled-object.h> + #include <goffice/utils/go-locale.h> + #include <goffice/utils/go-image.h> + #include <goffice/utils/go-line.h> +@@ -736,7 +736,7 @@ App = new GChemCalc (); /* Initialize plugins manager */ @@ -9,3 +24,12 @@ GladeXML *xml = glade_xml_new (GLADEDIR"/gchemcalc.glade", "gchemcalc", NULL); App->window = GTK_WINDOW (glade_xml_get_widget (xml, "gchemcalc")); +@@ -808,7 +808,7 @@ + // Create a series for the plot and populate it with some simple data + App->series = gog_plot_new_series (App->plot); + gog_object_add_by_name (GOG_OBJECT (App->series), "Vertical drop lines", NULL); +- GogStyle *style = gog_styled_object_get_style (GOG_STYLED_OBJECT (App->series)); ++ GOStyle *style = go_styled_object_get_style (GO_STYLED_OBJECT (App->series)); + go_marker_set_shape (style->marker.mark, GO_MARKER_NONE); + style->marker.auto_shape = false; + style->line.dash_type = GO_LINE_NONE; diff --git a/science/gchemutils/files/patch-programs_table_gchemtable-curve.cc b/science/gchemutils/files/patch-programs_table_gchemtable-curve.cc new file mode 100644 index 000000000000..26912a5b510e --- /dev/null +++ b/science/gchemutils/files/patch-programs_table_gchemtable-curve.cc @@ -0,0 +1,105 @@ +--- programs/table/gchemtable-curve.cc.orig 2009-01-05 14:10:00.000000000 -0500 ++++ programs/table/gchemtable-curve.cc 2009-05-05 01:11:15.000000000 -0400 +@@ -37,11 +37,9 @@ + #include <goffice/graph/gog-data-set.h> + #include <goffice/graph/gog-guru.h> + #include <goffice/graph/gog-label.h> +-#include <goffice/graph/gog-object.h> ++#include <goffice/graph/gog-object-xml.h> + #include <goffice/graph/gog-plot.h> + #include <goffice/graph/gog-series.h> +-#include <goffice/graph/gog-style.h> +-#include <goffice/graph/gog-styled-object.h> + #include <goffice/math/go-math.h> + #include <goffice/utils/go-locale.h> + #include <goffice/utils/go-line.h> +@@ -332,7 +330,7 @@ GChemTableCurve::GChemTableCurve (GChemT + obj = gog_object_get_child_by_role (GOG_OBJECT (chart), + gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); + data = go_data_scalar_str_new (_("Pauling electronegativity"), FALSE); +- label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); ++ label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); + gog_object_add_by_name (obj, "Label", label); + gtk_window_set_title (dialog, _("Pauling electronegativity")); +@@ -348,7 +346,7 @@ GChemTableCurve::GChemTableCurve (GChemT + obj = gog_object_get_child_by_role (GOG_OBJECT (chart), + gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); + data = go_data_scalar_str_new (_("Electron affinity (kJ/mol)"), FALSE); +- label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); ++ label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); + gog_object_add_by_name (obj, "Label", label); + gtk_window_set_title (dialog, _("Electron affinity")); +@@ -381,7 +379,7 @@ GChemTableCurve::GChemTableCurve (GChemT + obj = gog_object_get_child_by_role (GOG_OBJECT (chart), + gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); + data = go_data_scalar_str_new (buf, TRUE); +- label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); ++ label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); + gog_object_add_by_name (obj, "Label", label); + buf = g_strconcat (rk, _("ionization energy"), NULL); +@@ -404,7 +402,7 @@ GChemTableCurve::GChemTableCurve (GChemT + obj = gog_object_get_child_by_role (GOG_OBJECT (chart), + gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); + data = go_data_scalar_str_new (_("Covalent radii"), FALSE); +- label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); ++ label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); + gog_object_add_by_name (obj, "Label", label); + gtk_window_set_title (dialog, _("Covalent radii")); +@@ -424,7 +422,7 @@ GChemTableCurve::GChemTableCurve (GChemT + obj = gog_object_get_child_by_role (GOG_OBJECT (chart), + gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); + data = go_data_scalar_str_new (_("Van der Waals radii"), FALSE); +- label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); ++ label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); + gog_object_add_by_name (obj, "Label", label); + gtk_window_set_title (dialog, _("Van der Waals radii")); +@@ -444,7 +442,7 @@ GChemTableCurve::GChemTableCurve (GChemT + obj = gog_object_get_child_by_role (GOG_OBJECT (chart), + gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); + data = go_data_scalar_str_new (_("Metallic radii"), FALSE); +- label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); ++ label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); + gog_object_add_by_name (obj, "Label", label); + gtk_window_set_title (dialog, _("Metallic radii")); +@@ -459,7 +457,7 @@ GChemTableCurve::GChemTableCurve (GChemT + obj = gog_object_get_child_by_role (GOG_OBJECT (chart), + gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); + data = go_data_scalar_str_new (_("Melting point"), FALSE); +- label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); ++ label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); + gog_object_add_by_name (obj, "Label", label); + gtk_window_set_title (dialog, _("Melting point")); +@@ -474,7 +472,7 @@ GChemTableCurve::GChemTableCurve (GChemT + obj = gog_object_get_child_by_role (GOG_OBJECT (chart), + gog_object_find_role_by_name (GOG_OBJECT (chart), "Y-Axis")); + data = go_data_scalar_str_new (_("Boiling point"), FALSE); +- label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); ++ label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); + gog_object_add_by_name (obj, "Label", label); + gtk_window_set_title (dialog, _("Boiling point")); +@@ -496,7 +494,7 @@ GChemTableCurve::GChemTableCurve (GChemT + obj = gog_object_get_child_by_role (GOG_OBJECT (chart), + gog_object_find_role_by_name (GOG_OBJECT (chart), "X-Axis")); + data = go_data_scalar_str_new ("Z", FALSE); +- label = (GogObject*) g_object_new (GOG_LABEL_TYPE, NULL); ++ label = (GogObject*) g_object_new (GOG_TYPE_LABEL, NULL); + gog_dataset_set_dim (GOG_DATASET (label), 0, data, &error); + gog_object_add_by_name (obj, "Label", label); + } +@@ -571,7 +569,7 @@ graph_user_config_free_data (gpointer da + static void + on_update_graph (GogGraph *graph, gpointer data) + { +- g_return_if_fail (IS_GOG_GRAPH (graph)); ++ g_return_if_fail (GOG_IS_GRAPH (graph)); + GctControlGUI *tcg = GCT_CONTROL_GUI (data); + GChemTableCurve *curve = gct_control_gui_get_owner (tcg); + curve->SetGraph (graph); diff --git a/science/gchemutils/files/patch-programs_table_gchemtable-data-allocator.cc b/science/gchemutils/files/patch-programs_table_gchemtable-data-allocator.cc new file mode 100644 index 000000000000..f81054ea227e --- /dev/null +++ b/science/gchemutils/files/patch-programs_table_gchemtable-data-allocator.cc @@ -0,0 +1,20 @@ +--- programs/table/gchemtable-data-allocator.cc.orig 2009-05-05 01:12:11.000000000 -0400 ++++ programs/table/gchemtable-data-allocator.cc 2009-05-05 01:12:44.000000000 -0400 +@@ -106,7 +106,7 @@ gct_data_allocator_editor (GogDataAlloca + editor->dim_i = dim_i; + editor->data_type = data_type; + +- if (IS_GOG_SERIES (dataset) && data_type != GOG_DATA_SCALAR) { ++ if (GOG_IS_SERIES (dataset) && data_type != GOG_DATA_SCALAR) { + GogPlot *plot = gog_series_get_plot (GOG_SERIES (dataset)); + if (plot->desc.series.dim[dim_i].priority == GOG_SERIES_ERRORS) { + // FIXME: we might know the errors +@@ -189,7 +189,7 @@ gct_control_gui_class_init (GObjectClass + GSF_CLASS_FULL (GctControlGUI, gct_control_gui, + NULL, NULL, gct_control_gui_class_init, NULL, + gct_control_gui_init, G_TYPE_OBJECT, 0, +- GSF_INTERFACE (gct_go_plot_data_allocator_init, GOG_DATA_ALLOCATOR_TYPE)); ++ GSF_INTERFACE (gct_go_plot_data_allocator_init, GOG_TYPE_DATA_ALLOCATOR)); + + void + gct_control_gui_set_owner (GctControlGUI *gui, GChemTableCurve *curve) |