Merge branch 'master' into city-chooser
This commit is contained in:
commit
0c327ddba6
2
libgd
2
libgd
@ -1 +1 @@
|
||||
Subproject commit 62f9b8b92599b38d986bd26d5780edd400d318c9
|
||||
Subproject commit 4d0e605e81517beb550c212fd14d5060eefe321c
|
@ -308,7 +308,7 @@ const gchar *action_accels[] = {
|
||||
"app.help", "F1", NULL,
|
||||
"win.change-tab::chart", "F5", NULL,
|
||||
"win.change-tab::aspects", "F9", NULL,
|
||||
"win.change-tab::edit", "F10", NULL,
|
||||
"win.change-tab::edit", "F4", NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
|
@ -403,12 +403,12 @@ ag_chart_set_name(AgChart *chart, const gchar *name)
|
||||
g_object_notify_by_pspec(G_OBJECT(chart), properties[PROP_NAME]);
|
||||
}
|
||||
|
||||
gchar *
|
||||
const gchar *
|
||||
ag_chart_get_name(AgChart *chart)
|
||||
{
|
||||
AgChartPrivate *priv = ag_chart_get_instance_private(chart);
|
||||
|
||||
return g_strdup(priv->name);
|
||||
return priv->name;
|
||||
}
|
||||
|
||||
void
|
||||
@ -425,12 +425,12 @@ ag_chart_set_country(AgChart *chart, const gchar *country)
|
||||
g_object_notify_by_pspec(G_OBJECT(chart), properties[PROP_COUNTRY]);
|
||||
}
|
||||
|
||||
gchar *
|
||||
const gchar *
|
||||
ag_chart_get_country(AgChart *chart)
|
||||
{
|
||||
AgChartPrivate *priv = ag_chart_get_instance_private(chart);
|
||||
|
||||
return g_strdup(priv->country);
|
||||
return priv->country;
|
||||
}
|
||||
|
||||
void
|
||||
@ -447,12 +447,12 @@ ag_chart_set_city(AgChart *chart, const gchar *city)
|
||||
g_object_notify_by_pspec(G_OBJECT(chart), properties[PROP_CITY]);
|
||||
}
|
||||
|
||||
gchar *
|
||||
const gchar *
|
||||
ag_chart_get_city(AgChart *chart)
|
||||
{
|
||||
AgChartPrivate *priv = ag_chart_get_instance_private(chart);
|
||||
|
||||
return g_strdup(priv->city);
|
||||
return priv->city;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1353,6 +1353,7 @@ create_save_doc(AgChart *chart)
|
||||
GsweTimestamp *timestamp;
|
||||
GEnumClass *house_system_class;
|
||||
GEnumValue *enum_value;
|
||||
AgChartPrivate *priv = ag_chart_get_instance_private(chart);
|
||||
|
||||
doc = xmlNewDoc(BAD_CAST "1.0");
|
||||
root_node = xmlNewNode(NULL, BAD_CAST "chartinfo");
|
||||
@ -1361,20 +1362,14 @@ create_save_doc(AgChart *chart)
|
||||
// Begin <data> node
|
||||
data_node = xmlNewChild(root_node, NULL, BAD_CAST "data", NULL);
|
||||
|
||||
value = ag_chart_get_name(chart);
|
||||
xmlNewChild(data_node, NULL, BAD_CAST "name", BAD_CAST value);
|
||||
g_free(value);
|
||||
xmlNewChild(data_node, NULL, BAD_CAST "name", BAD_CAST priv->name);
|
||||
|
||||
// Begin <place> node
|
||||
place_node = xmlNewChild(data_node, NULL, BAD_CAST "place", NULL);
|
||||
|
||||
value = ag_chart_get_country(chart);
|
||||
xmlNewChild(place_node, NULL, BAD_CAST "country", BAD_CAST value);
|
||||
g_free(value);
|
||||
xmlNewChild(place_node, NULL, BAD_CAST "country", BAD_CAST priv->country);
|
||||
|
||||
value = ag_chart_get_city(chart);
|
||||
xmlNewChild(place_node, NULL, BAD_CAST "city", BAD_CAST value);
|
||||
g_free(value);
|
||||
xmlNewChild(place_node, NULL, BAD_CAST "city", BAD_CAST priv->city);
|
||||
|
||||
coordinates = gswe_moment_get_coordinates(GSWE_MOMENT(chart));
|
||||
|
||||
@ -1687,6 +1682,16 @@ ag_chart_create_svg(AgChart *chart, gsize *length, GError **err)
|
||||
xmlNewProp(node, BAD_CAST "degree", BAD_CAST value);
|
||||
g_free(value);
|
||||
|
||||
xmlNewProp(
|
||||
node,
|
||||
BAD_CAST "retrograde",
|
||||
BAD_CAST (
|
||||
gswe_planet_data_get_retrograde(planet_data)
|
||||
? "True"
|
||||
: "False"
|
||||
)
|
||||
);
|
||||
|
||||
value = g_strdup_printf("%d", dist);
|
||||
xmlNewProp(node, BAD_CAST "dist", BAD_CAST value);
|
||||
g_free(value);
|
||||
@ -1895,7 +1900,8 @@ ag_chart_set_note(AgChart *chart, const gchar *note)
|
||||
g_object_notify_by_pspec(G_OBJECT(chart), properties[PROP_NOTE]);
|
||||
}
|
||||
|
||||
const gchar *ag_chart_get_note(AgChart *chart)
|
||||
const gchar *
|
||||
ag_chart_get_note(AgChart *chart)
|
||||
{
|
||||
AgChartPrivate *priv = ag_chart_get_instance_private(chart);
|
||||
|
||||
|
@ -70,17 +70,17 @@ void ag_chart_export_svg_to_file(AgChart *chart,
|
||||
void ag_chart_set_name(AgChart *chart,
|
||||
const gchar *name);
|
||||
|
||||
gchar *ag_chart_get_name(AgChart *chart);
|
||||
const gchar *ag_chart_get_name(AgChart *chart);
|
||||
|
||||
void ag_chart_set_country(AgChart *chart,
|
||||
const gchar *country);
|
||||
|
||||
gchar *ag_chart_get_country(AgChart *chart);
|
||||
const gchar *ag_chart_get_country(AgChart *chart);
|
||||
|
||||
void ag_chart_set_city(AgChart *chart,
|
||||
const gchar *city);
|
||||
|
||||
gchar *ag_chart_get_city(AgChart *chart);
|
||||
const gchar *ag_chart_get_city(AgChart *chart);
|
||||
|
||||
gchar *ag_chart_create_svg(AgChart *chart,
|
||||
gsize *length,
|
||||
|
@ -548,6 +548,11 @@ ag_window_update_from_chart(AgWindow *window)
|
||||
);
|
||||
}
|
||||
|
||||
gtk_header_bar_set_subtitle(
|
||||
GTK_HEADER_BAR(priv->header_bar),
|
||||
ag_chart_get_name(priv->chart)
|
||||
);
|
||||
|
||||
g_free(coordinates);
|
||||
|
||||
ag_window_redraw_chart(window);
|
||||
@ -751,8 +756,6 @@ ag_window_export_svg(AgWindow *window, GError **err)
|
||||
name = ag_chart_get_name(priv->chart);
|
||||
|
||||
if ((name == NULL) || (*name == 0)) {
|
||||
g_free(name);
|
||||
|
||||
ag_app_message_dialog(
|
||||
GTK_WIDGET(window),
|
||||
GTK_MESSAGE_ERROR,
|
||||
@ -768,7 +771,6 @@ ag_window_export_svg(AgWindow *window, GError **err)
|
||||
}
|
||||
|
||||
file_name = g_strdup_printf("%s.svg", name);
|
||||
g_free(name);
|
||||
|
||||
fs = gtk_file_chooser_dialog_new(_("Export Chart as SVG"),
|
||||
GTK_WINDOW(window),
|
||||
@ -844,8 +846,6 @@ ag_window_export(AgWindow *window, GError **err)
|
||||
name = ag_chart_get_name(priv->chart);
|
||||
|
||||
if ((name == NULL) || (*name == 0)) {
|
||||
g_free(name);
|
||||
|
||||
ag_app_message_dialog(
|
||||
GTK_WIDGET(window),
|
||||
GTK_MESSAGE_ERROR,
|
||||
@ -861,7 +861,6 @@ ag_window_export(AgWindow *window, GError **err)
|
||||
}
|
||||
|
||||
file_name = g_strdup_printf("%s.agc", name);
|
||||
g_free(name);
|
||||
|
||||
fs = gtk_file_chooser_dialog_new(_("Export Chart"),
|
||||
GTK_WINDOW(window),
|
||||
|
@ -569,6 +569,14 @@
|
||||
<xsl:attribute name="xlink:href"><xsl:value-of select="concat('#', $planet_base, '_tmpl')"/></xsl:attribute>
|
||||
<xsl:attribute name="transform"><xsl:value-of select="concat('translate(', 330 + @dist * 35, ',-15) rotate(', @degree - $asc_rotate ,',15,15)')"/></xsl:attribute>
|
||||
</use>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@retrograde='True'">
|
||||
<text>
|
||||
<xsl:attribute name="transform"><xsl:value-of select="concat('translate(', 365 + @dist * 35, ',15) rotate(', @degree - $asc_rotate, ',-20,-20)')"/></xsl:attribute>
|
||||
R
|
||||
</text>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</g>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@name='GSWE_PLANET_MOON_NODE'">
|
||||
|
Loading…
Reference in New Issue
Block a user