Created basic UI for Astrognome

UI is a bit overrated word here. You can enter your name, birth date and
birth place with coordinates. Time zone is hard-coded +0100. Output is
textual, and created on separate tabs. Design of dialogs and the main
window is not clear yet.
This commit is contained in:
Gergely Polonkai 2013-09-03 18:10:12 +02:00
parent ff26919775
commit 5cfb27d3cd
2 changed files with 988 additions and 154 deletions

View File

@ -1,8 +1,12 @@
#include <glib.h> #include <glib.h>
#include <gtk/gtk.h>
#include "../swe-glib/src/swe-glib.h" #include "../swe-glib/src/swe-glib.h"
#define EPHEDIR "/home/polesz/Projektek/c/astrognome/swe/data" #define EPHEDIR "/home/polesz/Projektek/c/astrognome/swe/data"
#define UI_FILE "/home/polesz/Projektek/c/astrognome/src/astrognome.ui"
GtkBuilder *builder;
const char *moonStateName[] = { const char *moonStateName[] = {
"New Moon", "New Moon",
@ -16,373 +20,490 @@ const char *moonStateName[] = {
"Dark Moon" "Dark Moon"
}; };
void struct print_data {
print_house_cusp(gpointer data, gpointer user_data) GString *line;
{ GswePlanet planet;
GsweHouseData *house_data = data; };
g_print("House %2d..: %s (%f)\n", house_data->house, house_data->sign->name, house_data->cusp_position); void
print_house_cusp(GsweHouseData *house_data, GString *line)
{
g_string_append_printf(line, "House %d: %s (%f)\n", house_data->house, house_data->sign->name, house_data->cusp_position);
} }
void void
print_aspects(GsweAspectData *aspect_data, gpointer user_data) print_aspects(GsweAspectData *aspect_data, struct print_data *data)
{ {
GswePlanet planet = GPOINTER_TO_INT(user_data); GswePlanetData *other_planet = (aspect_data->planet1->planet_id == data->planet) ? aspect_data->planet2 : aspect_data->planet1;
GswePlanetData *other_planet = (aspect_data->planet1->planet_id == planet) ? aspect_data->planet2 : aspect_data->planet1;
if (aspect_data->aspect != GSWE_ASPECT_NONE) { if (aspect_data->aspect != GSWE_ASPECT_NONE) {
g_print(" %s: %s (±%f%%)\n", other_planet->planet_info->name, aspect_data->aspect_info->name, aspect_data->difference); g_string_append_printf(data->line, " %s: %s (±%f%%)\n", other_planet->planet_info->name, aspect_data->aspect_info->name, aspect_data->difference);
} }
} }
void void
print_mirrorpoints(GsweMirrorData *mirror_data, gpointer user_data) print_mirrorpoints(GsweMirrorData *mirror_data, struct print_data *data)
{ {
GswePlanet planet = GPOINTER_TO_INT(user_data); GswePlanetData *other_planet = (mirror_data->planet1->planet_id == data->planet) ? mirror_data->planet2 : mirror_data->planet1;
GswePlanetData *other_planet = (mirror_data->planet1->planet_id == planet) ? mirror_data->planet2 : mirror_data->planet1;
if (mirror_data->mirror != GSWE_MIRROR_NONE) { if (mirror_data->mirror != GSWE_MIRROR_NONE) {
g_print(" %s: %s (±%f°)\n", other_planet->planet_info->name, mirror_data->mirror_info->name, mirror_data->difference); g_string_append_printf(data->line, " %s: %s (±%f°)\n", other_planet->planet_info->name, mirror_data->mirror_info->name, mirror_data->difference);
} }
} }
int void
main(int argc, char *argv[]) action_about_activate_cb(GtkAction *action, gpointer user_data)
{ {
int year = 1981, GtkDialog *dialog_about = GTK_DIALOG(gtk_builder_get_object(builder, "dialog_about"));
month = 3,
day = 11, gtk_dialog_run(dialog_about);
hour = 23,
min = 39, gtk_widget_hide(GTK_WIDGET(dialog_about));
sec = 34; }
double lon = 20.766666,
lat = 48.2, void
alt = 200; create_new_chart(void)
GsweMoonPhaseData *moon_phase; {
guint year,
month,
day,
hour,
minute,
second;
gdouble longitude,
latitude,
altitude,
time_zone;
GsweTimestamp *timestamp; GsweTimestamp *timestamp;
GsweMoment *moment; GsweMoment *moment;
GtkTextBuffer *buffer;
GtkWidget *view;
GtkWidget *label;
GswePlanetData *planet_data; GswePlanetData *planet_data;
GsweMoonPhaseData *moon_phase;
GList *aspects, GList *aspects,
*mirrorpoints; *mirrorpoints;
GtkWidget *scrolled_window;
struct print_data data;
#if 1 gtk_calendar_get_date(GTK_CALENDAR(gtk_builder_get_object(builder, "calendar_new_date")), &year, &month, &day);
year = 1983; month++;
month = 3; hour = (guint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(gtk_builder_get_object(builder, "spin_new_hour")));
day = 7; minute = (guint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(gtk_builder_get_object(builder, "spin_new_minute")));
hour = 11; second = (guint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(gtk_builder_get_object(builder, "spin_new_second")));
min = 54; longitude = gtk_spin_button_get_value(GTK_SPIN_BUTTON(gtk_builder_get_object(builder, "spin_new_longitude")));
sec = 47; latitude = gtk_spin_button_get_value(GTK_SPIN_BUTTON(gtk_builder_get_object(builder, "spin_new_latitude")));
lon = 19.081599; // TODO: these should be real values (at least time_zone)!
lat = 47.462485; time_zone = 1.0;
#endif altitude = 200.0;
gswe_init(EPHEDIR); timestamp = gswe_timestamp_new_from_gregorian_full(year, month, day, hour, minute, second, 0, time_zone);
// TODO: Make house system configurable
timestamp = gswe_timestamp_new_from_gregorian_full(year, month, day, hour, min, sec, 0, 1.0); moment = gswe_moment_new_full(timestamp, longitude, latitude, altitude, GSWE_HOUSE_SYSTEM_PLACIDUS);
moment = gswe_moment_new_full(timestamp, lon, lat, alt, GSWE_HOUSE_SYSTEM_PLACIDUS); // TODO: Make planet list customizable
gswe_moment_add_all_planets(moment); gswe_moment_add_all_planets(moment);
g_print("Date: %02d.%02d.%d at %02d:%02d:%02d, at %f, %f\n", year, month, day, hour, min, sec, lon, lat); data.line = g_string_sized_new(300);
g_print("\nHOUSES\n======\n\n"); g_string_append_printf(data.line, "Date: %02d.%02d.%d at %02d:%02d:%02d, at %f, %f\n", year, month, day, hour, minute, second, longitude, latitude);
g_string_append_printf(data.line, "\nHOUSES\n======\n\n");
g_list_foreach(gswe_moment_get_house_cusps(moment), print_house_cusp, NULL); g_list_foreach(gswe_moment_get_house_cusps(moment), (GFunc)print_house_cusp, data.line);
g_string_append_printf(data.line, "\nPLANETS AND POINTS\n==================\n\n");
g_print("\nPLANETS AND POINTS\n==================\n\n");
// Ascendent // Ascendent
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_ASCENDENT); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_ASCENDENT);
g_print("%s: %s (%f)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->position); data.planet = GSWE_PLANET_ASCENDENT;
g_string_append_printf(data.line, "%s: %s (%f)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->position);
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_ASCENDENT); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_ASCENDENT);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_ASCENDENT)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_ASCENDENT); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_ASCENDENT);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_ASCENDENT)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Midheaven // Midheaven
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MC); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MC);
g_print("%s: %s (%f)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->position); data.planet = GSWE_PLANET_MC;
g_string_append_printf(data.line, "%s: %s (%f)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->position);
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MC); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MC);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_MC)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MC); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MC);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_MC)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Vertex // Vertex
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_VERTEX); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_VERTEX);
g_print("%s: %s (%f)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->position); data.planet = GSWE_PLANET_VERTEX;
g_string_append_printf(data.line, "%s: %s (%f)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->position);
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_VERTEX); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_VERTEX);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_VERTEX)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_VERTEX); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_VERTEX);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_VERTEX)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Sun // Sun
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_SUN); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_SUN);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_SUN;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_SUN); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_SUN);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_SUN)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_SUN); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_SUN);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_SUN)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Moon // Moon
moon_phase = gswe_moment_get_moon_phase(moment); moon_phase = gswe_moment_get_moon_phase(moment);
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MOON); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MOON);
g_print("%s: %s (%.2f%% visibility), %s, House: %d (%f%s)\n", planet_data->planet_info->name, moonStateName[moon_phase->phase], moon_phase->illumination, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_MOON;
g_string_append_printf(data.line, "%s: %s (%.2f%% visibility), %s, House: %d (%f%s)\n", planet_data->planet_info->name, moonStateName[moon_phase->phase], moon_phase->illumination, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MOON); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MOON);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_MOON)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MOON); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MOON);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_MOON)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Mercury // Mercury
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MERCURY); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MERCURY);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_MERCURY;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MERCURY); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MERCURY);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_MERCURY)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MERCURY); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MERCURY);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_MERCURY)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Venus // Venus
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_VENUS); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_VENUS);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_VENUS;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_VENUS); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_VENUS);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_VENUS)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_VENUS); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_VENUS);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_VENUS)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Mars // Mars
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MARS); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MARS);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_MARS;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MARS); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MARS);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_MARS)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MARS); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MARS);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_MARS)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Jupiter // Jupiter
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_JUPITER); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_JUPITER);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_JUPITER;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_JUPITER); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_JUPITER);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_JUPITER)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_JUPITER); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_JUPITER);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_JUPITER)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Saturn // Saturn
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_SATURN); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_SATURN);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_SATURN;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_SATURN); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_SATURN);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_SATURN)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_SATURN); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_SATURN);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_SATURN)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Uranus // Uranus
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_URANUS); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_URANUS);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_URANUS;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_URANUS); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_URANUS);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_URANUS)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_URANUS); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_URANUS);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_URANUS)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Neptune // Neptune
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_NEPTUNE); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_NEPTUNE);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_NEPTUNE;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_NEPTUNE); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_NEPTUNE);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_NEPTUNE)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_NEPTUNE); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_NEPTUNE);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_NEPTUNE)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Pluto // Pluto
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_PLUTO); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_PLUTO);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_PLUTO;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_PLUTO); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_PLUTO);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_PLUTO)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_PLUTO); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_PLUTO);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_PLUTO)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Mean node // Mean node
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MOON_NODE); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MOON_NODE);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_MOON_NODE;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MOON_NODE); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MOON_NODE);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_MOON_NODE)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MOON_NODE); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MOON_NODE);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_MOON_NODE)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Mean apogee // Mean apogee
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MOON_APOGEE); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_MOON_APOGEE);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_MOON_APOGEE;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MOON_APOGEE); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_MOON_APOGEE);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_MOON_APOGEE)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MOON_APOGEE); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_MOON_APOGEE);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_MOON_APOGEE)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Chiron // Chiron
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_CHIRON); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_CHIRON);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_CHIRON;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_CHIRON); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_CHIRON);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_CHIRON)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_CHIRON); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_CHIRON);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_CHIRON)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Ceres // Ceres
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_CERES); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_CERES);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_CERES;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_CERES); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_CERES);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_CERES)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_CERES); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_CERES);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_CERES)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Pallas // Pallas
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_PALLAS); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_PALLAS);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_PALLAS;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_PALLAS); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_PALLAS);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_PALLAS)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_PALLAS); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_PALLAS);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_PALLAS)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Juno // Juno
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_JUNO); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_JUNO);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_JUNO;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_JUNO); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_JUNO);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_JUNO)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_JUNO); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_JUNO);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_JUNO)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
// Vesta // Vesta
planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_VESTA); planet_data = gswe_moment_get_planet(moment, GSWE_PLANET_VESTA);
g_print("%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : ""); data.planet = GSWE_PLANET_VESTA;
g_string_append_printf(data.line, "%s: %s, House: %d (%f%s)\n", planet_data->planet_info->name, planet_data->sign->name, planet_data->house, planet_data->position, (planet_data->retrograde) ? ", retrograde" : "");
aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_VESTA); aspects = gswe_moment_get_planet_aspects(moment, GSWE_PLANET_VESTA);
g_print(" Aspects:\n"); g_string_append_printf(data.line, " Aspects:\n");
g_list_foreach(aspects, (GFunc)print_aspects, GINT_TO_POINTER(GSWE_PLANET_VESTA)); g_list_foreach(aspects, (GFunc)print_aspects, &data);
g_list_free(aspects); g_list_free(aspects);
mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_VESTA); mirrorpoints = gswe_moment_get_all_planet_mirrorpoints(moment, GSWE_PLANET_VESTA);
g_print(" Antiscia:\n"); g_string_append_printf(data.line, " Antiscia:\n");
g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, GINT_TO_POINTER(GSWE_PLANET_VESTA)); g_list_foreach(mirrorpoints, (GFunc)print_mirrorpoints, &data);
g_list_free(mirrorpoints); g_list_free(mirrorpoints);
g_print("\nELEMENTS\n========\n\n"); g_string_append_printf(data.line, "\nELEMENTS\n========\n\n");
g_print("Fire: %d\n", gswe_moment_get_element_points(moment, GSWE_ELEMENT_FIRE)); g_string_append_printf(data.line, "Fire: %d\n", gswe_moment_get_element_points(moment, GSWE_ELEMENT_FIRE));
g_print("Earth: %d\n", gswe_moment_get_element_points(moment, GSWE_ELEMENT_EARTH)); g_string_append_printf(data.line, "Earth: %d\n", gswe_moment_get_element_points(moment, GSWE_ELEMENT_EARTH));
g_print("Air: %d\n", gswe_moment_get_element_points(moment, GSWE_ELEMENT_AIR)); g_string_append_printf(data.line, "Air: %d\n", gswe_moment_get_element_points(moment, GSWE_ELEMENT_AIR));
g_print("Water: %d\n", gswe_moment_get_element_points(moment, GSWE_ELEMENT_WATER)); g_string_append_printf(data.line, "Water: %d\n", gswe_moment_get_element_points(moment, GSWE_ELEMENT_WATER));
g_print("\nQUALITIES\n=========\n\n"); g_string_append_printf(data.line, "\nQUALITIES\n=========\n\n");
g_print("Cardinal: %d\n", gswe_moment_get_quality_points(moment, GSWE_QUALITY_CARDINAL)); g_string_append_printf(data.line, "Cardinal: %d\n", gswe_moment_get_quality_points(moment, GSWE_QUALITY_CARDINAL));
g_print("Fix: %d\n", gswe_moment_get_quality_points(moment, GSWE_QUALITY_FIX)); g_string_append_printf(data.line, "Fix: %d\n", gswe_moment_get_quality_points(moment, GSWE_QUALITY_FIX));
g_print("Mutable: %d\n", gswe_moment_get_quality_points(moment, GSWE_QUALITY_MUTABLE)); g_string_append_printf(data.line, "Mutable: %d\n", gswe_moment_get_quality_points(moment, GSWE_QUALITY_MUTABLE));
buffer = gtk_text_buffer_new(NULL);
gtk_text_buffer_insert_at_cursor(buffer, data.line->str, data.line->len);
view = gtk_text_view_new_with_buffer(buffer);
scrolled_window = gtk_scrolled_window_new(NULL, NULL);
gtk_container_add(GTK_CONTAINER(scrolled_window), view);
label = gtk_label_new(gtk_entry_get_text(GTK_ENTRY(gtk_builder_get_object(builder, "entry_new_name"))));
gtk_notebook_append_page(GTK_NOTEBOOK(gtk_builder_get_object(builder, "notebook_chartlist")), scrolled_window, label);
gtk_widget_show_all(scrolled_window);
}
void
action_new_activate_cb(GtkAction *action, gpointer user_data)
{
gboolean cont = TRUE;
GtkDialog *dialog_new = GTK_DIALOG(gtk_builder_get_object(builder, "dialog_new"));
gtk_window_set_title(GTK_WINDOW(dialog_new), "New chart");
while (cont) {
gint response = gtk_dialog_run(dialog_new);
switch (response) {
case GTK_RESPONSE_OK:
g_print("OK\n");
{
gint name_length = gtk_entry_get_text_length(GTK_ENTRY(gtk_builder_get_object(builder, "entry_new_name")));
gboolean lat_selected = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "radio_new_north"))) || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "radio_new_south"))));
gboolean long_selected = (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "radio_new_east"))) || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(gtk_builder_get_object(builder, "radio_new_west"))));
if ((name_length > 0) && (lat_selected == TRUE) && (long_selected == TRUE)) {
cont = FALSE;
create_new_chart();
}
}
break;
case GTK_RESPONSE_CANCEL:
case GTK_RESPONSE_DELETE_EVENT:
cont = FALSE;
break;
default:
g_warning("Unknown respons from dialog!");
break;
}
}
gtk_widget_hide(GTK_WIDGET(dialog_new));
}
int
main(int argc, char *argv[])
{
GError *err = NULL;
GtkWidget *window_main;
gswe_init(EPHEDIR);
gtk_init(&argc, &argv);
builder = gtk_builder_new();
if (gtk_builder_add_from_file(builder, UI_FILE, &err) == 0) {
g_error("Builder error: %s", err->message);
}
window_main = GTK_WIDGET(gtk_builder_get_object(builder, "window_main"));
gtk_window_set_title(GTK_WINDOW(window_main), "Astrognome");
gtk_builder_connect_signals(builder, NULL);
gtk_widget_show(window_main);
gtk_main();
g_object_unref(G_OBJECT(builder));
return 0; return 0;
} }

713
src/astrognome.ui Normal file
View File

@ -0,0 +1,713 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.6 -->
<object class="GtkActionGroup" id="actions">
<property name="accel_group">accels</property>
<child>
<object class="GtkAction" id="action_new">
<property name="short_label" translatable="yes">New Chart...</property>
<property name="tooltip" translatable="yes">Create a new natal chart</property>
<property name="stock_id">gtk-new</property>
<property name="icon_name">document-new</property>
<signal name="activate" handler="action_new_activate_cb" swapped="no"/>
</object>
<accelerator key="n" modifiers="GDK_CONTROL_MASK"/>
</child>
<child>
<object class="GtkAction" id="action_about">
<property name="stock_id">gtk-about</property>
<property name="icon_name">help-about</property>
<signal name="activate" handler="action_about_activate_cb" swapped="no"/>
</object>
</child>
</object>
<object class="GtkAccelGroup" id="accels"/>
<object class="GtkAdjustment" id="adjustment_hour">
<property name="upper">23</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment_latitude">
<property name="upper">180</property>
<property name="step_increment">0.10000000000000001</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment_longitude">
<property name="upper">90</property>
<property name="step_increment">0.10000000000000001</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment_minute">
<property name="upper">59</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAdjustment" id="adjustment_second">
<property name="upper">61</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkAboutDialog" id="dialog_about">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
<property name="program_name">GRadix</property>
<property name="version">1.0</property>
<property name="copyright" translatable="yes">2013 Gergely Polonkai</property>
<property name="website">http://gergely.polonkai.eu/astrognome/</property>
<property name="authors">Gergely Polonkai &lt;gergely@polonkai.eu&gt;
Jean-André Santoni &lt;jean.andre.santoni@gmail.com&gt;</property>
<property name="license_type">gpl-3-0</property>
<child internal-child="vbox">
<object class="GtkBox" id="aboutdialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="aboutdialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
<object class="GtkDialog" id="dialog_new">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="button1">
<property name="label">gtk-cancel</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="button2">
<property name="label">gtk-ok</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_stock">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="Name">Name</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_new_name">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="Latitude of birth" comments="Label for latitude of birth">Latitude</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_new_north">
<property name="label" translatable="yes" context="Northern hemisphere">North</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_new_south">
<property name="label" translatable="yes" context="Southern hemisphere">South</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radio_new_north</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spin_new_latitude">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">6</property>
<property name="invisible_char_set">True</property>
<property name="caps_lock_warning">False</property>
<property name="adjustment">adjustment_latitude</property>
<property name="digits">4</property>
<property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="Longitude of birth">Longitude</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">2</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_new_east">
<property name="label" translatable="yes" context="Eastern hemisphere">East</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="draw_indicator">True</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkRadioButton" id="radio_new_west">
<property name="label" translatable="yes" context="Western hemisphere">West</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
<property name="xalign">0</property>
<property name="active">True</property>
<property name="draw_indicator">True</property>
<property name="group">radio_new_east</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spin_new_longitude">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">6</property>
<property name="invisible_char_set">True</property>
<property name="caps_lock_warning">False</property>
<property name="adjustment">adjustment_longitude</property>
<property name="digits">4</property>
<property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">2</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="Birth place coordinates">Coordinates</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
<property name="width">2</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkFrame" id="frame2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">none</property>
<child>
<object class="GtkAlignment" id="alignment2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="left_padding">12</property>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkCalendar" id="calendar_new_date">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">6</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spin_new_second">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">2</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment_second</property>
<property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">5</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="Second of birth" comments="Label for second of birth">Second</property>
</object>
<packing>
<property name="left_attach">4</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spin_new_minute">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">2</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment_minute</property>
<property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">3</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="Minute of birth" comments="Label for minute of birth">Minute</property>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSpinButton" id="spin_new_hour">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char">●</property>
<property name="width_chars">2</property>
<property name="invisible_char_set">True</property>
<property name="adjustment">adjustment_hour</property>
<property name="numeric">True</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="Birth hour" comments="Label for hour of birth">Hour</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="Birth date and time">Birth date and time</property>
<property name="use_markup">True</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">3</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-6">button1</action-widget>
<action-widget response="-5">button2</action-widget>
</action-widgets>
</object>
<object class="GtkWindow" id="window_main">
<property name="can_focus">False</property>
<signal name="delete-event" handler="gtk_main_quit" swapped="no"/>
<child>
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkMenuBar" id="menubar1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkMenuItem" id="menuitem1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_File</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="imagemenuitem1">
<property name="related_action">action_new</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="imagemenuitem2">
<property name="label">gtk-open</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="imagemenuitem3">
<property name="label">gtk-save</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="imagemenuitem4">
<property name="label">gtk-save-as</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separatormenuitem1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="imagemenuitem5">
<property name="label">gtk-quit</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkMenuItem" id="menuitem2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Edit</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="menu2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="imagemenuitem6">
<property name="label">gtk-cut</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="imagemenuitem7">
<property name="label">gtk-copy</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="imagemenuitem8">
<property name="label">gtk-paste</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="imagemenuitem9">
<property name="label">gtk-delete</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkMenuItem" id="menuitem3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_View</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="menuitem4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Help</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="menu3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="menu_item_about">
<property name="related_action">action_about</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="toolbar1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkToolButton" id="toolbutton1">
<property name="related_action">action_new</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">toolbutton1</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkNotebook" id="notebook_chartlist">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkStatusbar" id="statusbar1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</object>
</interface>