From b6eca0c99f43e890df4cd3de79c8e40322df9f5a Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Sat, 14 Sep 2013 17:44:18 +0200 Subject: [PATCH] Changed AgWindow's moment to an AgChart for later saving functionality. --- src/ag-window.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/ag-window.c b/src/ag-window.c index 4ab59d8..dce7d2f 100644 --- a/src/ag-window.c +++ b/src/ag-window.c @@ -6,6 +6,7 @@ #include "ag-app.h" #include "ag-window.h" +#include "ag-chart.h" struct _AgWindowPrivate { GtkWidget *grid; @@ -34,7 +35,7 @@ struct _AgWindowPrivate { GtkWidget *current_tab; GsweTimestamp *timestamp; - GsweMoment *moment; + AgChart *chart; }; G_DEFINE_TYPE(AgWindow, ag_window, GTK_TYPE_APPLICATION_WINDOW); @@ -62,9 +63,9 @@ close_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data) } static void -moment_changed(GsweMoment *moment, gpointer user_data) +chart_changed(AgChart *chart, gpointer user_data) { - g_warning("Moment changed!"); + g_warning("Chart changed!"); } static void @@ -97,11 +98,11 @@ recalculate_chart(AgWindow *window) gswe_timestamp_set_gregorian_full(priv->timestamp, year, month, day, hour, minute, second, 0, 1.0, NULL); } - if (priv->moment == NULL) { + if (priv->chart == NULL) { // TODO: moke house system configurable - priv->moment = gswe_moment_new_full(priv->timestamp, longitude, latitude, 380.0, GSWE_HOUSE_SYSTEM_PLACIDUS); - g_signal_connect(priv->moment, "changed", G_CALLBACK(moment_changed), NULL); - moment_changed(priv->moment, NULL); + priv->chart = ag_chart_new_full(priv->timestamp, longitude, latitude, 380.0, GSWE_HOUSE_SYSTEM_PLACIDUS); + g_signal_connect(priv->chart, "changed", G_CALLBACK(chart_changed), NULL); + chart_changed(priv->chart, NULL); } } @@ -140,7 +141,7 @@ ag_window_init(AgWindow *window) window->priv = priv = GET_PRIVATE(window); priv->timestamp = NULL; - priv->moment = NULL; + priv->chart = NULL; gtk_window_set_hide_titlebar_when_maximized(GTK_WINDOW(window), TRUE);