commit
bf9328c620
@ -18,7 +18,6 @@
|
|||||||
<second>45</second>
|
<second>45</second>
|
||||||
<timezone>1</timezone>
|
<timezone>1</timezone>
|
||||||
</time>
|
</time>
|
||||||
<housesystem>placidus</housesystem>
|
|
||||||
</data>
|
</data>
|
||||||
<note>This is my own chart.</note>
|
<note>This is my own chart.</note>
|
||||||
</chartinfo>
|
</chartinfo>
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 27 KiB |
@ -37,6 +37,7 @@
|
|||||||
#include "ag-db.h"
|
#include "ag-db.h"
|
||||||
#include "ag-chart.h"
|
#include "ag-chart.h"
|
||||||
#include "placidus.h"
|
#include "placidus.h"
|
||||||
|
#include "ag-settings.h"
|
||||||
|
|
||||||
typedef struct _AgChartPrivate {
|
typedef struct _AgChartPrivate {
|
||||||
gchar *name;
|
gchar *name;
|
||||||
@ -1228,9 +1229,9 @@ ag_chart_new_from_db_save(AgDbChartSave *save_data,
|
|||||||
GError **err)
|
GError **err)
|
||||||
{
|
{
|
||||||
GsweTimestamp *timestamp;
|
GsweTimestamp *timestamp;
|
||||||
gchar *house_system_enum_name;
|
|
||||||
GsweHouseSystem house_system;
|
GsweHouseSystem house_system;
|
||||||
AgChart *chart;
|
AgChart *chart;
|
||||||
|
AgSettings *settings;
|
||||||
|
|
||||||
if (save_data == NULL) {
|
if (save_data == NULL) {
|
||||||
g_set_error(
|
g_set_error(
|
||||||
@ -1242,9 +1243,9 @@ ag_chart_new_from_db_save(AgDbChartSave *save_data,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
house_system_enum_name = g_utf8_strdown(save_data->house_system, -1);
|
settings = ag_settings_get();
|
||||||
house_system = ag_house_system_nick_to_id(house_system_enum_name);
|
house_system = ag_settings_get_house_system(settings);
|
||||||
g_free(house_system_enum_name);
|
g_object_unref(settings);
|
||||||
|
|
||||||
timestamp = gswe_timestamp_new_from_gregorian_full(
|
timestamp = gswe_timestamp_new_from_gregorian_full(
|
||||||
save_data->year, save_data->month, save_data->day,
|
save_data->year, save_data->month, save_data->day,
|
||||||
@ -2012,8 +2013,6 @@ ag_chart_get_db_save(AgChart *chart, gint db_id)
|
|||||||
AgChartPrivate *priv = ag_chart_get_instance_private(chart);
|
AgChartPrivate *priv = ag_chart_get_instance_private(chart);
|
||||||
AgDbChartSave *save_data = ag_db_chart_save_new(TRUE);
|
AgDbChartSave *save_data = ag_db_chart_save_new(TRUE);
|
||||||
GsweTimestamp *timestamp = gswe_moment_get_timestamp(GSWE_MOMENT(chart));
|
GsweTimestamp *timestamp = gswe_moment_get_timestamp(GSWE_MOMENT(chart));
|
||||||
GEnumClass *house_system_class;
|
|
||||||
GEnumValue *house_system_enum;
|
|
||||||
|
|
||||||
save_data->db_id = db_id;
|
save_data->db_id = db_id;
|
||||||
|
|
||||||
@ -2047,13 +2046,6 @@ ag_chart_get_db_save(AgChart *chart, gint db_id)
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
save_data->timezone = gswe_timestamp_get_gregorian_timezone(timestamp);
|
save_data->timezone = gswe_timestamp_get_gregorian_timezone(timestamp);
|
||||||
house_system_class = g_type_class_ref(GSWE_TYPE_HOUSE_SYSTEM);
|
|
||||||
house_system_enum = g_enum_get_value(
|
|
||||||
house_system_class,
|
|
||||||
gswe_moment_get_house_system(GSWE_MOMENT(chart))
|
|
||||||
);
|
|
||||||
save_data->house_system = g_strdup(house_system_enum->value_nick);
|
|
||||||
g_type_class_unref(house_system_class);
|
|
||||||
save_data->note = g_strdup(priv->note);
|
save_data->note = g_strdup(priv->note);
|
||||||
|
|
||||||
return save_data;
|
return save_data;
|
||||||
|
28
src/ag-db.c
28
src/ag-db.c
@ -61,7 +61,6 @@ enum {
|
|||||||
COLUMN_CHART_MINUTE,
|
COLUMN_CHART_MINUTE,
|
||||||
COLUMN_CHART_SECOND,
|
COLUMN_CHART_SECOND,
|
||||||
COLUMN_CHART_TIMEZONE,
|
COLUMN_CHART_TIMEZONE,
|
||||||
COLUMN_CHART_HOUSE_SYSTEM,
|
|
||||||
COLUMN_CHART_NOTE,
|
COLUMN_CHART_NOTE,
|
||||||
|
|
||||||
/* Leave this as the last element */
|
/* Leave this as the last element */
|
||||||
@ -88,7 +87,6 @@ static TableColumnDef chart_table_column[] = {
|
|||||||
{ COLUMN_CHART_MINUTE, "minute" },
|
{ COLUMN_CHART_MINUTE, "minute" },
|
||||||
{ COLUMN_CHART_SECOND, "second" },
|
{ COLUMN_CHART_SECOND, "second" },
|
||||||
{ COLUMN_CHART_TIMEZONE, "timezone" },
|
{ COLUMN_CHART_TIMEZONE, "timezone" },
|
||||||
{ COLUMN_CHART_HOUSE_SYSTEM, "house_system" },
|
|
||||||
{ COLUMN_CHART_NOTE, "note" },
|
{ COLUMN_CHART_NOTE, "note" },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -453,7 +451,6 @@ ag_db_check_chart_table(AgDb *db)
|
|||||||
"minute UNSIGNED INTEGER NOT NULL, " \
|
"minute UNSIGNED INTEGER NOT NULL, " \
|
||||||
"second UNSIGNED INTEGER NOT NULL, " \
|
"second UNSIGNED INTEGER NOT NULL, " \
|
||||||
"timezone DOUBLE NOT NULL, " \
|
"timezone DOUBLE NOT NULL, " \
|
||||||
"house_system TEXT NOT NULL, " \
|
|
||||||
"note TEXT" \
|
"note TEXT" \
|
||||||
")"
|
")"
|
||||||
);
|
);
|
||||||
@ -589,10 +586,6 @@ ag_db_chart_save_free(AgDbChartSave *save_data)
|
|||||||
g_free(save_data->city);
|
g_free(save_data->city);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (save_data->house_system) {
|
|
||||||
g_free(save_data->house_system);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (save_data->note) {
|
if (save_data->note) {
|
||||||
g_free(save_data->note);
|
g_free(save_data->note);
|
||||||
}
|
}
|
||||||
@ -655,7 +648,6 @@ ag_db_chart_save(AgDb *db, AgDbChartSave *save_data, GError **err)
|
|||||||
minute = G_VALUE_INIT,
|
minute = G_VALUE_INIT,
|
||||||
second = G_VALUE_INIT,
|
second = G_VALUE_INIT,
|
||||||
timezone = G_VALUE_INIT,
|
timezone = G_VALUE_INIT,
|
||||||
house_system = G_VALUE_INIT,
|
|
||||||
note = G_VALUE_INIT;
|
note = G_VALUE_INIT;
|
||||||
AgDbPrivate *priv = ag_db_get_instance_private(db);
|
AgDbPrivate *priv = ag_db_get_instance_private(db);
|
||||||
|
|
||||||
@ -706,9 +698,6 @@ ag_db_chart_save(AgDb *db, AgDbChartSave *save_data, GError **err)
|
|||||||
g_value_init(&timezone, G_TYPE_DOUBLE);
|
g_value_init(&timezone, G_TYPE_DOUBLE);
|
||||||
g_value_set_double(&timezone, save_data->timezone);
|
g_value_set_double(&timezone, save_data->timezone);
|
||||||
|
|
||||||
g_value_init(&house_system, G_TYPE_STRING);
|
|
||||||
g_value_set_string(&house_system, save_data->house_system);
|
|
||||||
|
|
||||||
g_value_init(¬e, G_TYPE_STRING);
|
g_value_init(¬e, G_TYPE_STRING);
|
||||||
g_value_set_string(¬e, save_data->note);
|
g_value_set_string(¬e, save_data->note);
|
||||||
|
|
||||||
@ -731,7 +720,6 @@ ag_db_chart_save(AgDb *db, AgDbChartSave *save_data, GError **err)
|
|||||||
"minute", &minute,
|
"minute", &minute,
|
||||||
"second", &second,
|
"second", &second,
|
||||||
"timezone", &timezone,
|
"timezone", &timezone,
|
||||||
"house_system", &house_system,
|
|
||||||
"note", ¬e,
|
"note", ¬e,
|
||||||
NULL
|
NULL
|
||||||
)) {
|
)) {
|
||||||
@ -795,7 +783,6 @@ ag_db_chart_save(AgDb *db, AgDbChartSave *save_data, GError **err)
|
|||||||
"minute", &minute,
|
"minute", &minute,
|
||||||
"second", &second,
|
"second", &second,
|
||||||
"timezone", &timezone,
|
"timezone", &timezone,
|
||||||
"house_system", &house_system,
|
|
||||||
"note", ¬e,
|
"note", ¬e,
|
||||||
NULL
|
NULL
|
||||||
)) {
|
)) {
|
||||||
@ -817,7 +804,6 @@ ag_db_chart_save(AgDb *db, AgDbChartSave *save_data, GError **err)
|
|||||||
}
|
}
|
||||||
|
|
||||||
g_value_unset(¬e);
|
g_value_unset(¬e);
|
||||||
g_value_unset(&house_system);
|
|
||||||
g_value_unset(&timezone);
|
g_value_unset(&timezone);
|
||||||
g_value_unset(&second);
|
g_value_unset(&second);
|
||||||
g_value_unset(&minute);
|
g_value_unset(&minute);
|
||||||
@ -1067,14 +1053,6 @@ ag_db_chart_get_data_by_id(AgDb *db, guint row_id, GError **err)
|
|||||||
);
|
);
|
||||||
save_data->timezone = g_value_get_double(value);
|
save_data->timezone = g_value_get_double(value);
|
||||||
|
|
||||||
value = gda_data_model_get_value_at(
|
|
||||||
result,
|
|
||||||
COLUMN_CHART_HOUSE_SYSTEM,
|
|
||||||
0,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
save_data->house_system = g_strdup(g_value_get_string(value));
|
|
||||||
|
|
||||||
value = gda_data_model_get_value_at(result, COLUMN_CHART_NOTE, 0, NULL);
|
value = gda_data_model_get_value_at(result, COLUMN_CHART_NOTE, 0, NULL);
|
||||||
|
|
||||||
if (GDA_VALUE_HOLDS_NULL(value)) {
|
if (GDA_VALUE_HOLDS_NULL(value)) {
|
||||||
@ -1225,12 +1203,6 @@ ag_db_chart_save_identical(const AgDbChartSave *a,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (string_collate(a->house_system, b->house_system) != 0) {
|
|
||||||
g_debug("identical: House systems differ");
|
|
||||||
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!chart_only && string_collate(a->note, b->note) != 0) {
|
if (!chart_only && string_collate(a->note, b->note) != 0) {
|
||||||
g_debug("identical: Notes differ");
|
g_debug("identical: Notes differ");
|
||||||
|
|
||||||
|
@ -64,7 +64,6 @@ typedef struct _AgDbChartSave {
|
|||||||
guint minute;
|
guint minute;
|
||||||
guint second;
|
guint second;
|
||||||
gdouble timezone;
|
gdouble timezone;
|
||||||
gchar *house_system;
|
|
||||||
gchar *note;
|
gchar *note;
|
||||||
gint refcount;
|
gint refcount;
|
||||||
} AgDbChartSave;
|
} AgDbChartSave;
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
* <http://www.gnu.org/licenses/>.
|
* <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
#include "ag-settings.h"
|
#include "ag-settings.h"
|
||||||
|
#include "astrognome.h"
|
||||||
|
|
||||||
#define SETTINGS_SCHEMA_ID_MAIN "eu.polonkai.gergely.Astrognome"
|
#define SETTINGS_SCHEMA_ID_MAIN "eu.polonkai.gergely.Astrognome"
|
||||||
#define SETTINGS_SCHEMA_ID_WINDOW "eu.polonkai.gergely.Astrognome.state.window"
|
#define SETTINGS_SCHEMA_ID_WINDOW "eu.polonkai.gergely.Astrognome.state.window"
|
||||||
@ -98,3 +99,20 @@ ag_settings_peek_window_settings(AgSettings *settings)
|
|||||||
|
|
||||||
return priv->settings_window;
|
return priv->settings_window;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GsweHouseSystem
|
||||||
|
ag_settings_get_house_system(AgSettings *settings)
|
||||||
|
{
|
||||||
|
gchar *house_system_nick;
|
||||||
|
GsweHouseSystem house_system;
|
||||||
|
AgSettingsPrivate *priv = ag_settings_get_instance_private(settings);
|
||||||
|
|
||||||
|
house_system_nick = g_settings_get_string(
|
||||||
|
priv->settings_main,
|
||||||
|
"default-house-system"
|
||||||
|
);
|
||||||
|
house_system = ag_house_system_nick_to_id(house_system_nick);
|
||||||
|
g_free(house_system_nick);
|
||||||
|
|
||||||
|
return house_system;
|
||||||
|
}
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
|
|
||||||
#include <gio/gio.h>
|
#include <gio/gio.h>
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
#include <swe-glib.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
@ -57,6 +58,8 @@ AgSettings *ag_settings_get(void);
|
|||||||
GSettings *ag_settings_peek_main_settings(AgSettings *settings);
|
GSettings *ag_settings_peek_main_settings(AgSettings *settings);
|
||||||
GSettings *ag_settings_peek_window_settings(AgSettings *settings);
|
GSettings *ag_settings_peek_window_settings(AgSettings *settings);
|
||||||
|
|
||||||
|
GsweHouseSystem ag_settings_get_house_system(AgSettings *settings);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __AG_SETTINGS_H__ */
|
#endif /* __AG_SETTINGS_H__ */
|
||||||
|
259
src/ag-window.c
259
src/ag-window.c
@ -85,6 +85,7 @@ struct _AgWindowPrivate {
|
|||||||
GList *style_sheets;
|
GList *style_sheets;
|
||||||
AgDisplayTheme *theme;
|
AgDisplayTheme *theme;
|
||||||
GtkListStore *display_theme_model;
|
GtkListStore *display_theme_model;
|
||||||
|
gulong chart_changed_handler;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cc_search {
|
struct cc_search {
|
||||||
@ -109,10 +110,20 @@ typedef struct {
|
|||||||
GList *items;
|
GList *items;
|
||||||
} LoadIdleData;
|
} LoadIdleData;
|
||||||
|
|
||||||
|
enum {
|
||||||
|
PROP_0,
|
||||||
|
PROP_CHART,
|
||||||
|
PROP_COUNT
|
||||||
|
};
|
||||||
|
|
||||||
G_DEFINE_QUARK(ag_window_error_quark, ag_window_error);
|
G_DEFINE_QUARK(ag_window_error_quark, ag_window_error);
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_PRIVATE(AgWindow, ag_window, GTK_TYPE_APPLICATION_WINDOW);
|
G_DEFINE_TYPE_WITH_PRIVATE(AgWindow, ag_window, GTK_TYPE_APPLICATION_WINDOW);
|
||||||
|
|
||||||
|
static GParamSpec *properties[PROP_COUNT];
|
||||||
|
|
||||||
|
#define GET_PRIV(o) AgWindowPrivate *priv = ag_window_get_instance_private((o))
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ag_window_gear_menu_action(GSimpleAction *action,
|
ag_window_gear_menu_action(GSimpleAction *action,
|
||||||
GVariant *parameter,
|
GVariant *parameter,
|
||||||
@ -309,7 +320,7 @@ ag_window_redraw_aspect_table(AgWindow *window)
|
|||||||
*planet2;
|
*planet2;
|
||||||
guint i,
|
guint i,
|
||||||
j;
|
j;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
planet_list = ag_chart_get_planets(priv->chart);
|
planet_list = ag_chart_get_planets(priv->chart);
|
||||||
|
|
||||||
@ -451,7 +462,7 @@ ag_window_set_element_point(AgWindow *window,
|
|||||||
guint points;
|
guint points;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
gchar *points_string;
|
gchar *points_string;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
points = gswe_moment_get_element_points(
|
points = gswe_moment_get_element_points(
|
||||||
GSWE_MOMENT(priv->chart),
|
GSWE_MOMENT(priv->chart),
|
||||||
@ -481,7 +492,7 @@ ag_window_set_quality_point(AgWindow *window,
|
|||||||
guint points;
|
guint points;
|
||||||
GtkWidget *label;
|
GtkWidget *label;
|
||||||
gchar *points_string;
|
gchar *points_string;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
points = gswe_moment_get_quality_points(
|
points = gswe_moment_get_quality_points(
|
||||||
GSWE_MOMENT(priv->chart),
|
GSWE_MOMENT(priv->chart),
|
||||||
@ -526,7 +537,7 @@ ag_window_redraw_chart(AgWindow *window)
|
|||||||
{
|
{
|
||||||
gsize length;
|
gsize length;
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
gchar *svg_content = ag_chart_create_svg(
|
gchar *svg_content = ag_chart_create_svg(
|
||||||
priv->chart,
|
priv->chart,
|
||||||
&length,
|
&length,
|
||||||
@ -561,13 +572,13 @@ ag_window_redraw_chart(AgWindow *window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
ag_window_set_house_system(GtkTreeModel *model,
|
ag_window_set_model_house_system(GtkTreeModel *model,
|
||||||
GtkTreePath *path,
|
GtkTreePath *path,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
AgWindow *window)
|
AgWindow *window)
|
||||||
{
|
{
|
||||||
GsweHouseSystem row_house_system;
|
GsweHouseSystem row_house_system;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
GsweHouseSystem house_system = gswe_moment_get_house_system(
|
GsweHouseSystem house_system = gswe_moment_get_house_system(
|
||||||
GSWE_MOMENT(priv->chart)
|
GSWE_MOMENT(priv->chart)
|
||||||
);
|
);
|
||||||
@ -593,7 +604,7 @@ ag_window_update_from_chart(AgWindow *window)
|
|||||||
{
|
{
|
||||||
const gchar *country,
|
const gchar *country,
|
||||||
*city;
|
*city;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
GsweTimestamp *timestamp = gswe_moment_get_timestamp(
|
GsweTimestamp *timestamp = gswe_moment_get_timestamp(
|
||||||
GSWE_MOMENT(priv->chart)
|
GSWE_MOMENT(priv->chart)
|
||||||
);
|
);
|
||||||
@ -672,7 +683,7 @@ ag_window_update_from_chart(AgWindow *window)
|
|||||||
|
|
||||||
gtk_tree_model_foreach(
|
gtk_tree_model_foreach(
|
||||||
GTK_TREE_MODEL(priv->house_system_model),
|
GTK_TREE_MODEL(priv->house_system_model),
|
||||||
(GtkTreeModelForeachFunc)ag_window_set_house_system,
|
(GtkTreeModelForeachFunc)ag_window_set_model_house_system,
|
||||||
window
|
window
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -700,6 +711,7 @@ ag_window_update_from_chart(AgWindow *window)
|
|||||||
static void
|
static void
|
||||||
ag_window_chart_changed(AgChart *chart, AgWindow *window)
|
ag_window_chart_changed(AgChart *chart, AgWindow *window)
|
||||||
{
|
{
|
||||||
|
g_debug("Chart changed!");
|
||||||
ag_window_redraw_chart(window);
|
ag_window_redraw_chart(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -708,7 +720,7 @@ ag_window_recalculate_chart(AgWindow *window, gboolean set_everything)
|
|||||||
{
|
{
|
||||||
AgDbChartSave *edit_data,
|
AgDbChartSave *edit_data,
|
||||||
*chart_data;
|
*chart_data;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
gboolean south,
|
gboolean south,
|
||||||
west;
|
west;
|
||||||
GtkTreeIter house_system_iter;
|
GtkTreeIter house_system_iter;
|
||||||
@ -718,6 +730,7 @@ ag_window_recalculate_chart(AgWindow *window, gboolean set_everything)
|
|||||||
GsweTimestamp *timestamp;
|
GsweTimestamp *timestamp;
|
||||||
GtkWidget *current;
|
GtkWidget *current;
|
||||||
gint db_id = (priv->saved_data) ? priv->saved_data->db_id : -1;
|
gint db_id = (priv->saved_data) ? priv->saved_data->db_id : -1;
|
||||||
|
AgSettings *settings;
|
||||||
|
|
||||||
south = gtk_toggle_button_get_active(
|
south = gtk_toggle_button_get_active(
|
||||||
GTK_TOGGLE_BUTTON(priv->south_lat)
|
GTK_TOGGLE_BUTTON(priv->south_lat)
|
||||||
@ -790,15 +803,6 @@ ag_window_recalculate_chart(AgWindow *window, gboolean set_everything)
|
|||||||
g_error("House system is not set! This is clearly a bug.");
|
g_error("House system is not set! This is clearly a bug.");
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_tree_model_get(
|
|
||||||
GTK_TREE_MODEL(priv->house_system_model),
|
|
||||||
&house_system_iter,
|
|
||||||
0, &house_system,
|
|
||||||
-1
|
|
||||||
);
|
|
||||||
edit_data->house_system = g_strdup(
|
|
||||||
ag_house_system_id_to_nick(house_system)
|
|
||||||
);
|
|
||||||
gtk_text_buffer_get_bounds(priv->note_buffer, &start_iter, &end_iter);
|
gtk_text_buffer_get_bounds(priv->note_buffer, &start_iter, &end_iter);
|
||||||
edit_data->note = gtk_text_buffer_get_text(
|
edit_data->note = gtk_text_buffer_get_text(
|
||||||
priv->note_buffer,
|
priv->note_buffer,
|
||||||
@ -824,24 +828,25 @@ ag_window_recalculate_chart(AgWindow *window, gboolean set_everything)
|
|||||||
|
|
||||||
g_debug("Recalculating chart data");
|
g_debug("Recalculating chart data");
|
||||||
|
|
||||||
|
settings = ag_settings_get();
|
||||||
|
house_system = ag_settings_get_house_system(settings);
|
||||||
|
g_object_unref(settings);
|
||||||
|
|
||||||
// TODO: Set timezone according to the city selected!
|
// TODO: Set timezone according to the city selected!
|
||||||
if (priv->chart == NULL) {
|
if (priv->chart == NULL) {
|
||||||
|
AgChart *chart;
|
||||||
|
|
||||||
timestamp = gswe_timestamp_new_from_gregorian_full(
|
timestamp = gswe_timestamp_new_from_gregorian_full(
|
||||||
edit_data->year, edit_data->month, edit_data->day,
|
edit_data->year, edit_data->month, edit_data->day,
|
||||||
edit_data->hour, edit_data->minute, edit_data->second, 0,
|
edit_data->hour, edit_data->minute, edit_data->second, 0,
|
||||||
edit_data->timezone
|
edit_data->timezone
|
||||||
);
|
);
|
||||||
priv->chart = ag_chart_new_full(
|
chart = ag_chart_new_full(
|
||||||
timestamp,
|
timestamp,
|
||||||
edit_data->longitude, edit_data->latitude, edit_data->altitude,
|
edit_data->longitude, edit_data->latitude, edit_data->altitude,
|
||||||
house_system
|
house_system
|
||||||
);
|
);
|
||||||
g_signal_connect(
|
ag_window_set_chart(window, chart);
|
||||||
priv->chart,
|
|
||||||
"changed",
|
|
||||||
G_CALLBACK(ag_window_chart_changed),
|
|
||||||
window
|
|
||||||
);
|
|
||||||
ag_window_redraw_chart(window);
|
ag_window_redraw_chart(window);
|
||||||
} else {
|
} else {
|
||||||
gswe_moment_set_house_system(GSWE_MOMENT(priv->chart), house_system);
|
gswe_moment_set_house_system(GSWE_MOMENT(priv->chart), house_system);
|
||||||
@ -872,7 +877,7 @@ ag_window_export_image(AgWindow *window, GError **err)
|
|||||||
GtkWidget *fs;
|
GtkWidget *fs;
|
||||||
gint response;
|
gint response;
|
||||||
GError *local_err = NULL;
|
GError *local_err = NULL;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
ag_window_recalculate_chart(window, TRUE);
|
ag_window_recalculate_chart(window, TRUE);
|
||||||
|
|
||||||
@ -1121,7 +1126,7 @@ ag_window_export_agc(AgWindow *window, GError **err)
|
|||||||
gchar *file_name;
|
gchar *file_name;
|
||||||
GtkWidget *fs;
|
GtkWidget *fs;
|
||||||
gint response;
|
gint response;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
ag_window_recalculate_chart(window, FALSE);
|
ag_window_recalculate_chart(window, FALSE);
|
||||||
|
|
||||||
@ -1207,7 +1212,7 @@ ag_window_export_agc_action(GSimpleAction *action,
|
|||||||
gboolean
|
gboolean
|
||||||
ag_window_can_close(AgWindow *window, gboolean display_dialog)
|
ag_window_can_close(AgWindow *window, gboolean display_dialog)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
gint db_id = (priv->saved_data)
|
gint db_id = (priv->saved_data)
|
||||||
? priv->saved_data->db_id
|
? priv->saved_data->db_id
|
||||||
: -1;
|
: -1;
|
||||||
@ -1284,7 +1289,7 @@ ag_window_save_action(GSimpleAction *action,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
AgWindow *window = AG_WINDOW(user_data);
|
AgWindow *window = AG_WINDOW(user_data);
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
AgDb *db = ag_db_get();
|
AgDb *db = ag_db_get();
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
gint old_id;
|
gint old_id;
|
||||||
@ -1334,7 +1339,7 @@ static void
|
|||||||
ag_window_clear_style_sheets(AgWindow *window)
|
ag_window_clear_style_sheets(AgWindow *window)
|
||||||
{
|
{
|
||||||
WebKitUserContentManager *manager;
|
WebKitUserContentManager *manager;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
g_debug("Clearing style sheets");
|
g_debug("Clearing style sheets");
|
||||||
|
|
||||||
@ -1355,7 +1360,7 @@ ag_window_add_style_sheet(AgWindow *window, const gchar *path)
|
|||||||
{
|
{
|
||||||
gchar *css_source;
|
gchar *css_source;
|
||||||
gboolean source_free = FALSE;
|
gboolean source_free = FALSE;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
if (strncmp("gres://", path, 7) == 0) {
|
if (strncmp("gres://", path, 7) == 0) {
|
||||||
gchar *res_path = g_strdup_printf(
|
gchar *res_path = g_strdup_printf(
|
||||||
@ -1409,7 +1414,7 @@ ag_window_update_style_sheets(AgWindow *window)
|
|||||||
{
|
{
|
||||||
GList *item;
|
GList *item;
|
||||||
WebKitUserContentManager *manager;
|
WebKitUserContentManager *manager;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
g_debug("Updating style sheets");
|
g_debug("Updating style sheets");
|
||||||
|
|
||||||
@ -1431,7 +1436,7 @@ ag_window_set_theme(AgWindow *window, AgDisplayTheme *theme)
|
|||||||
{
|
{
|
||||||
gchar *css,
|
gchar *css,
|
||||||
*css_final;
|
*css_final;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
g_debug("Setting theme to %s", (theme) ? theme->name : "no theme");
|
g_debug("Setting theme to %s", (theme) ? theme->name : "no theme");
|
||||||
ag_window_clear_style_sheets(window);
|
ag_window_clear_style_sheets(window);
|
||||||
@ -1462,7 +1467,7 @@ ag_window_tab_changed_cb(GtkStack *stack, GParamSpec *pspec, AgWindow *window)
|
|||||||
{
|
{
|
||||||
GtkWidget *active_tab;
|
GtkWidget *active_tab;
|
||||||
const gchar *active_tab_name = gtk_stack_get_visible_child_name(stack);
|
const gchar *active_tab_name = gtk_stack_get_visible_child_name(stack);
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
g_debug("Active tab changed: %s", active_tab_name);
|
g_debug("Active tab changed: %s", active_tab_name);
|
||||||
|
|
||||||
@ -1530,7 +1535,7 @@ ag_window_change_tab_action(GSimpleAction *action,
|
|||||||
{
|
{
|
||||||
AgWindow *window = AG_WINDOW(user_data);
|
AgWindow *window = AG_WINDOW(user_data);
|
||||||
const gchar *target_tab = g_variant_get_string(parameter, NULL);
|
const gchar *target_tab = g_variant_get_string(parameter, NULL);
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack), target_tab);
|
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack), target_tab);
|
||||||
g_action_change_state(G_ACTION(action), parameter);
|
g_action_change_state(G_ACTION(action), parameter);
|
||||||
@ -1543,7 +1548,7 @@ ag_window_set_default_house_system(GtkTreeModel *model,
|
|||||||
AgWindow *window)
|
AgWindow *window)
|
||||||
{
|
{
|
||||||
GsweHouseSystem row_house_system;
|
GsweHouseSystem row_house_system;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
AgSettings *settings = ag_settings_get();
|
AgSettings *settings = ag_settings_get();
|
||||||
GSettings *main_settings = ag_settings_peek_main_settings(settings);
|
GSettings *main_settings = ag_settings_peek_main_settings(settings);
|
||||||
GsweHouseSystem house_system = g_settings_get_enum(
|
GsweHouseSystem house_system = g_settings_get_enum(
|
||||||
@ -1576,7 +1581,7 @@ ag_window_set_default_display_theme(GtkTreeModel *model,
|
|||||||
AgWindow *window)
|
AgWindow *window)
|
||||||
{
|
{
|
||||||
gint row_display_theme;
|
gint row_display_theme;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
AgSettings *settings = ag_settings_get();
|
AgSettings *settings = ag_settings_get();
|
||||||
GSettings *main_settings = ag_settings_peek_main_settings(settings);
|
GSettings *main_settings = ag_settings_peek_main_settings(settings);
|
||||||
gint default_theme = g_settings_get_int(
|
gint default_theme = g_settings_get_int(
|
||||||
@ -1606,7 +1611,7 @@ ag_window_new_chart_action(GSimpleAction *action,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
AgWindow *window = AG_WINDOW(user_data);
|
AgWindow *window = AG_WINDOW(user_data);
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
/* Empty edit tab values */
|
/* Empty edit tab values */
|
||||||
gtk_entry_set_text(GTK_ENTRY(priv->name), "");
|
gtk_entry_set_text(GTK_ENTRY(priv->name), "");
|
||||||
@ -1653,7 +1658,7 @@ ag_window_back_action(GSimpleAction *action,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
AgWindow *window = AG_WINDOW(user_data);
|
AgWindow *window = AG_WINDOW(user_data);
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
g_debug("Back button pressed");
|
g_debug("Back button pressed");
|
||||||
|
|
||||||
@ -1684,7 +1689,7 @@ static void
|
|||||||
ag_window_set_selection_mode(AgWindow *window, gboolean state)
|
ag_window_set_selection_mode(AgWindow *window, gboolean state)
|
||||||
{
|
{
|
||||||
GtkStyleContext *style;
|
GtkStyleContext *style;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
style = gtk_widget_get_style_context(priv->header_bar);
|
style = gtk_widget_get_style_context(priv->header_bar);
|
||||||
|
|
||||||
@ -1765,7 +1770,7 @@ ag_window_delete_action(GSimpleAction *action,
|
|||||||
GList *selection,
|
GList *selection,
|
||||||
*item;
|
*item;
|
||||||
AgWindow *window = AG_WINDOW(user_data);
|
AgWindow *window = AG_WINDOW(user_data);
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
AgDb *db = ag_db_get();
|
AgDb *db = ag_db_get();
|
||||||
|
|
||||||
selection = ag_icon_view_get_selected_items(AG_ICON_VIEW(priv->chart_list));
|
selection = ag_icon_view_get_selected_items(AG_ICON_VIEW(priv->chart_list));
|
||||||
@ -1818,9 +1823,7 @@ ag_window_connection_action(GSimpleAction *action,
|
|||||||
GVariant *current_state;
|
GVariant *current_state;
|
||||||
const gchar *state;
|
const gchar *state;
|
||||||
gchar *js_code = NULL;
|
gchar *js_code = NULL;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(
|
GET_PRIV(AG_WINDOW(user_data));
|
||||||
AG_WINDOW(user_data)
|
|
||||||
);
|
|
||||||
static gchar *js = "aspects = document.getElementById('aspects');\n" \
|
static gchar *js = "aspects = document.getElementById('aspects');\n" \
|
||||||
"antiscia = document.getElementById('antiscia');\n" \
|
"antiscia = document.getElementById('antiscia');\n" \
|
||||||
"aspects.setAttribute('display', '%s');\n" \
|
"aspects.setAttribute('display', '%s');\n" \
|
||||||
@ -1877,7 +1880,7 @@ static GActionEntry win_entries[] = {
|
|||||||
static void
|
static void
|
||||||
ag_window_display_changed(GSettings *settings, gchar *key, AgWindow *window)
|
ag_window_display_changed(GSettings *settings, gchar *key, AgWindow *window)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
/* The planet symbols are redrawn only if aspect_table_populated is
|
/* The planet symbols are redrawn only if aspect_table_populated is
|
||||||
* set to FALSE */
|
* set to FALSE */
|
||||||
@ -1924,7 +1927,8 @@ ag_window_list_item_activated_cb(AgIconView *icon_view,
|
|||||||
const GtkTreePath *path,
|
const GtkTreePath *path,
|
||||||
AgWindow *window)
|
AgWindow *window)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
AgChart *chart;
|
||||||
|
GET_PRIV(window);
|
||||||
AgDb *db = ag_db_get();
|
AgDb *db = ag_db_get();
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
AgDbChartSave *save_data;
|
AgDbChartSave *save_data;
|
||||||
@ -1968,7 +1972,7 @@ ag_window_list_item_activated_cb(AgIconView *icon_view,
|
|||||||
g_clear_object(&(priv->chart));
|
g_clear_object(&(priv->chart));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((priv->chart = ag_chart_new_from_db_save(
|
if ((chart = ag_chart_new_from_db_save(
|
||||||
priv->saved_data,
|
priv->saved_data,
|
||||||
FALSE,
|
FALSE,
|
||||||
&err
|
&err
|
||||||
@ -1985,6 +1989,8 @@ ag_window_list_item_activated_cb(AgIconView *icon_view,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ag_window_set_chart(window, chart);
|
||||||
|
|
||||||
ag_window_update_from_chart(window);
|
ag_window_update_from_chart(window);
|
||||||
|
|
||||||
ag_window_change_tab(window, "chart");
|
ag_window_change_tab(window, "chart");
|
||||||
@ -1995,7 +2001,7 @@ ag_window_list_selection_changed_cb(AgIconView *view, AgWindow *window)
|
|||||||
{
|
{
|
||||||
GList *selection;
|
GList *selection;
|
||||||
guint count;
|
guint count;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
selection = ag_icon_view_get_selected_items(view);
|
selection = ag_icon_view_get_selected_items(view);
|
||||||
|
|
||||||
@ -2020,7 +2026,7 @@ ag_window_city_matches(GtkEntryCompletion *city_comp,
|
|||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
AgWindow *window)
|
AgWindow *window)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
gchar *ccode,
|
gchar *ccode,
|
||||||
*name,
|
*name,
|
||||||
*normalized_name,
|
*normalized_name,
|
||||||
@ -2077,7 +2083,7 @@ ag_window_init(AgWindow *window)
|
|||||||
GtkCellRenderer *house_system_renderer,
|
GtkCellRenderer *house_system_renderer,
|
||||||
*display_theme_renderer;
|
*display_theme_renderer;
|
||||||
WebKitUserContentManager *manager = webkit_user_content_manager_new();
|
WebKitUserContentManager *manager = webkit_user_content_manager_new();
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
gtk_widget_init_template(GTK_WIDGET(window));
|
gtk_widget_init_template(GTK_WIDGET(window));
|
||||||
|
|
||||||
@ -2188,7 +2194,7 @@ ag_window_init(AgWindow *window)
|
|||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
|
|
||||||
priv->chart = NULL;
|
ag_window_set_chart(window, NULL);
|
||||||
|
|
||||||
g_action_map_add_action_entries(
|
g_action_map_add_action_entries(
|
||||||
G_ACTION_MAP(window),
|
G_ACTION_MAP(window),
|
||||||
@ -2204,7 +2210,7 @@ ag_window_init(AgWindow *window)
|
|||||||
static void
|
static void
|
||||||
ag_window_dispose(GObject *gobject)
|
ag_window_dispose(GObject *gobject)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(AG_WINDOW(gobject));
|
GET_PRIV(AG_WINDOW(gobject));
|
||||||
|
|
||||||
g_clear_object(&priv->settings);
|
g_clear_object(&priv->settings);
|
||||||
|
|
||||||
@ -2215,7 +2221,7 @@ static void
|
|||||||
ag_window_name_changed_cb(GtkEntry *name_entry, AgWindow *window)
|
ag_window_name_changed_cb(GtkEntry *name_entry, AgWindow *window)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const gchar *name;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
name = gtk_entry_get_text(name_entry);
|
name = gtk_entry_get_text(name_entry);
|
||||||
|
|
||||||
@ -2262,7 +2268,7 @@ static void
|
|||||||
ag_window_country_changed_callback(GtkSearchEntry *country, AgWindow *window)
|
ag_window_country_changed_callback(GtkSearchEntry *country, AgWindow *window)
|
||||||
{
|
{
|
||||||
struct cc_search search;
|
struct cc_search search;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
search.target = gtk_entry_get_text(GTK_ENTRY(country));
|
search.target = gtk_entry_get_text(GTK_ENTRY(country));
|
||||||
search.ret_iter = NULL;
|
search.ret_iter = NULL;
|
||||||
@ -2316,7 +2322,7 @@ static void
|
|||||||
ag_window_city_changed_callback(GtkSearchEntry *city, AgWindow *window)
|
ag_window_city_changed_callback(GtkSearchEntry *city, AgWindow *window)
|
||||||
{
|
{
|
||||||
struct cc_search search;
|
struct cc_search search;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
search.target = gtk_entry_get_text(GTK_ENTRY(city));
|
search.target = gtk_entry_get_text(GTK_ENTRY(city));
|
||||||
search.ret_iter = NULL;
|
search.ret_iter = NULL;
|
||||||
@ -2404,14 +2410,36 @@ ag_window_city_changed_callback(GtkSearchEntry *city, AgWindow *window)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
|
ag_window_house_system_changed_cb(GtkComboBox *combo_box,
|
||||||
|
AgWindow *window)
|
||||||
|
{
|
||||||
|
GtkTreeIter iter;
|
||||||
|
GsweHouseSystem house_system;
|
||||||
|
GET_PRIV(window);
|
||||||
|
|
||||||
|
gtk_combo_box_get_active_iter(combo_box, &iter);
|
||||||
|
gtk_tree_model_get(
|
||||||
|
GTK_TREE_MODEL(priv->house_system_model), &iter,
|
||||||
|
0, &house_system,
|
||||||
|
-1
|
||||||
|
);
|
||||||
|
|
||||||
|
if (priv->chart) {
|
||||||
|
gswe_moment_set_house_system(GSWE_MOMENT(priv->chart), house_system);
|
||||||
|
}
|
||||||
|
|
||||||
|
g_debug("House system changed: %d", house_system);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
ag_window_display_theme_changed_cb(GtkComboBox *combo_box,
|
ag_window_display_theme_changed_cb(GtkComboBox *combo_box,
|
||||||
AgWindow *window)
|
AgWindow *window)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gint theme_id;
|
gint theme_id;
|
||||||
AgDisplayTheme *theme;
|
AgDisplayTheme *theme;
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
gtk_combo_box_get_active_iter(combo_box, &iter);
|
gtk_combo_box_get_active_iter(combo_box, &iter);
|
||||||
gtk_tree_model_get(
|
gtk_tree_model_get(
|
||||||
@ -2427,7 +2455,7 @@ ag_window_display_theme_changed_cb(GtkComboBox *combo_box,
|
|||||||
static void
|
static void
|
||||||
ag_window_destroy(GtkWidget *widget)
|
ag_window_destroy(GtkWidget *widget)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(AG_WINDOW(widget));
|
GET_PRIV(AG_WINDOW(widget));
|
||||||
|
|
||||||
// Destroy the signal handlers on priv->stack, as “tab” switching
|
// Destroy the signal handlers on priv->stack, as “tab” switching
|
||||||
// can cause trouble during destroy. However, this function might
|
// can cause trouble during destroy. However, this function might
|
||||||
@ -2446,6 +2474,48 @@ ag_window_selection_mode_cancel_cb(GtkButton *button, AgWindow *window)
|
|||||||
ag_window_set_selection_mode(window, FALSE);
|
ag_window_set_selection_mode(window, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ag_window_set_property(GObject *gobject,
|
||||||
|
guint prop_id,
|
||||||
|
const GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
AgWindow *window = AG_WINDOW(gobject);
|
||||||
|
|
||||||
|
switch (prop_id) {
|
||||||
|
case PROP_CHART:
|
||||||
|
ag_window_set_chart(window, (g_value_get_object(value)));
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ag_window_get_property(GObject *gobject,
|
||||||
|
guint prop_id,
|
||||||
|
GValue *value,
|
||||||
|
GParamSpec *pspec)
|
||||||
|
{
|
||||||
|
GET_PRIV(AG_WINDOW(gobject));
|
||||||
|
|
||||||
|
switch (prop_id) {
|
||||||
|
case PROP_CHART:
|
||||||
|
g_value_set_object(value, priv->chart);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, prop_id, pspec);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ag_window_class_init(AgWindowClass *klass)
|
ag_window_class_init(AgWindowClass *klass)
|
||||||
{
|
{
|
||||||
@ -2454,6 +2524,25 @@ ag_window_class_init(AgWindowClass *klass)
|
|||||||
|
|
||||||
widget_class->destroy = ag_window_destroy;
|
widget_class->destroy = ag_window_destroy;
|
||||||
gobject_class->dispose = ag_window_dispose;
|
gobject_class->dispose = ag_window_dispose;
|
||||||
|
gobject_class->set_property = ag_window_set_property;
|
||||||
|
gobject_class->get_property = ag_window_get_property;
|
||||||
|
|
||||||
|
properties[PROP_CHART] = g_param_spec_object(
|
||||||
|
"chart",
|
||||||
|
"Chart",
|
||||||
|
"The AgChart associated with this window",
|
||||||
|
AG_TYPE_CHART,
|
||||||
|
G_PARAM_STATIC_NICK
|
||||||
|
| G_PARAM_STATIC_NAME
|
||||||
|
| G_PARAM_STATIC_BLURB
|
||||||
|
| G_PARAM_READABLE
|
||||||
|
| G_PARAM_WRITABLE
|
||||||
|
);
|
||||||
|
g_object_class_install_property(
|
||||||
|
gobject_class,
|
||||||
|
PROP_CHART,
|
||||||
|
properties[PROP_CHART]
|
||||||
|
);
|
||||||
|
|
||||||
gtk_widget_class_set_template_from_resource(
|
gtk_widget_class_set_template_from_resource(
|
||||||
widget_class,
|
widget_class,
|
||||||
@ -2652,6 +2741,10 @@ ag_window_class_init(AgWindowClass *klass)
|
|||||||
widget_class,
|
widget_class,
|
||||||
ag_window_selection_mode_cancel_cb
|
ag_window_selection_mode_cancel_cb
|
||||||
);
|
);
|
||||||
|
gtk_widget_class_bind_template_callback(
|
||||||
|
widget_class,
|
||||||
|
ag_window_house_system_changed_cb
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -2660,7 +2753,7 @@ ag_window_configure_event_cb(GtkWidget *widget,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
AgWindow *window = AG_WINDOW(widget);
|
AgWindow *window = AG_WINDOW(widget);
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
ag_window_settings_save(
|
ag_window_settings_save(
|
||||||
GTK_WINDOW(window),
|
GTK_WINDOW(window),
|
||||||
@ -2673,8 +2766,8 @@ ag_window_configure_event_cb(GtkWidget *widget,
|
|||||||
GtkWidget *
|
GtkWidget *
|
||||||
ag_window_new(AgApp *app)
|
ag_window_new(AgApp *app)
|
||||||
{
|
{
|
||||||
AgWindow *window = g_object_new(AG_TYPE_WINDOW, NULL);
|
AgWindow *window = g_object_new(AG_TYPE_WINDOW, NULL);
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
// TODO: translate this error message!
|
// TODO: translate this error message!
|
||||||
webkit_web_view_load_html(
|
webkit_web_view_load_html(
|
||||||
@ -2712,13 +2805,12 @@ ag_window_new(AgApp *app)
|
|||||||
void
|
void
|
||||||
ag_window_set_chart(AgWindow *window, AgChart *chart)
|
ag_window_set_chart(AgWindow *window, AgChart *chart)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
if (priv->chart != NULL) {
|
if (priv->chart != NULL) {
|
||||||
g_signal_handlers_disconnect_by_func(
|
g_signal_handler_disconnect(
|
||||||
priv->chart,
|
priv->chart,
|
||||||
ag_window_chart_changed,
|
priv->chart_changed_handler
|
||||||
window
|
|
||||||
);
|
);
|
||||||
g_clear_object(&(priv->chart));
|
g_clear_object(&(priv->chart));
|
||||||
}
|
}
|
||||||
@ -2726,20 +2818,27 @@ ag_window_set_chart(AgWindow *window, AgChart *chart)
|
|||||||
ag_db_chart_save_unref(priv->saved_data);
|
ag_db_chart_save_unref(priv->saved_data);
|
||||||
|
|
||||||
priv->chart = chart;
|
priv->chart = chart;
|
||||||
g_signal_connect(
|
|
||||||
priv->chart,
|
if (chart) {
|
||||||
"changed",
|
priv->chart_changed_handler = g_signal_connect(
|
||||||
G_CALLBACK(ag_window_chart_changed),
|
priv->chart,
|
||||||
window
|
"changed",
|
||||||
);
|
G_CALLBACK(ag_window_chart_changed),
|
||||||
g_object_ref(chart);
|
window
|
||||||
priv->saved_data = ag_chart_get_db_save(chart, -1);
|
);
|
||||||
|
g_object_ref(chart);
|
||||||
|
priv->saved_data = ag_chart_get_db_save(chart, -1);
|
||||||
|
} else {
|
||||||
|
priv->saved_data = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
g_object_notify_by_pspec(G_OBJECT(window), properties[PROP_CHART]);
|
||||||
}
|
}
|
||||||
|
|
||||||
AgChart *
|
AgChart *
|
||||||
ag_window_get_chart(AgWindow *window)
|
ag_window_get_chart(AgWindow *window)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
return priv->chart;
|
return priv->chart;
|
||||||
}
|
}
|
||||||
@ -2799,7 +2898,7 @@ ag_window_settings_save(GtkWindow *window, GSettings *settings)
|
|||||||
void
|
void
|
||||||
ag_window_change_tab(AgWindow *window, const gchar *tab_name)
|
ag_window_change_tab(AgWindow *window, const gchar *tab_name)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack), tab_name);
|
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack), tab_name);
|
||||||
g_action_change_state(
|
g_action_change_state(
|
||||||
@ -2868,7 +2967,7 @@ ag_window_reload_chart_list(AgWindow *window)
|
|||||||
AgDb *db = ag_db_get();
|
AgDb *db = ag_db_get();
|
||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
GList *chart_list = ag_db_chart_get_list(db, &err);
|
GList *chart_list = ag_db_chart_get_list(db, &err);
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
ag_icon_view_remove_all(AG_ICON_VIEW(priv->chart_list));
|
ag_icon_view_remove_all(AG_ICON_VIEW(priv->chart_list));
|
||||||
|
|
||||||
@ -2904,7 +3003,7 @@ ag_window_reload_chart_list(AgWindow *window)
|
|||||||
gboolean
|
gboolean
|
||||||
ag_window_is_usable(AgWindow *window)
|
ag_window_is_usable(AgWindow *window)
|
||||||
{
|
{
|
||||||
AgWindowPrivate *priv = ag_window_get_instance_private(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
return (priv->current_tab == priv->tab_list);
|
return (priv->current_tab == priv->tab_list);
|
||||||
}
|
}
|
||||||
|
@ -366,7 +366,7 @@
|
|||||||
<object class="GtkLabel" id="name_label">
|
<object class="GtkLabel" id="name_label">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes" context="Chart edit, Name label">Name</property>
|
<property name="label" translatable="yes">Name</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
@ -382,385 +382,416 @@
|
|||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">1</property>
|
<property name="left_attach">1</property>
|
||||||
<property name="top_attach">0</property>
|
<property name="top_attach">0</property>
|
||||||
<property name="width">6</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="country_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Country label">Country</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSearchEntry" id="country">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="primary_icon_name">edit-find-symbolic</property>
|
|
||||||
<property name="primary_icon_activatable">False</property>
|
|
||||||
<property name="primary_icon_sensitive">False</property>
|
|
||||||
<signal name="search-changed" handler="ag_window_country_changed_callback" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="width">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="city_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, City label">City</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSearchEntry" id="city">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="primary_icon_name">edit-find-symbolic</property>
|
|
||||||
<property name="primary_icon_activatable">False</property>
|
|
||||||
<property name="primary_icon_sensitive">False</property>
|
|
||||||
<signal name="search-changed" handler="ag_window_city_changed_callback" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="width">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="latitude_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Latitude label">Latitude</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
<property name="width">2</property>
|
<property name="width">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkRadioButton" id="north_lat">
|
<object class="GtkFrame" id="location_frame">
|
||||||
<property name="label" translatable="yes" context="Chart edit, latitude North label">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="active">True</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkRadioButton" id="south_lat">
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, latitude South">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">north_lat</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="latitude">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">latitude_adjust</property>
|
|
||||||
<property name="digits">6</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">5</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="longitude_label">
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="label" translatable="yes" context="Chart edit, Longitude label">Longitude</property>
|
<property name="label_xalign">0</property>
|
||||||
</object>
|
<property name="shadow_type">none</property>
|
||||||
<packing>
|
<child type="label">
|
||||||
<property name="left_attach">2</property>
|
<object class="GtkLabel" id="location_frame_label">
|
||||||
<property name="top_attach">3</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkRadioButton" id="east_long">
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, longitude East">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="active">True</property>
|
|
||||||
<property name="draw_indicator">True</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">2</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkRadioButton" id="west_long">
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, longitude West">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">east_long</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">3</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="longitude">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">longitude_adjust</property>
|
|
||||||
<property name="digits">6</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">2</property>
|
|
||||||
<property name="top_attach">5</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="year_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Year label">Year</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">4</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="year">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">year_adjust</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">4</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="month_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Month label">Month</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">5</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="month">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">month_adjust</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">5</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="day_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Day label">Day</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">6</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="day">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">day_adjust</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">6</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="hour_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Hour label">Hour</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">4</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="hour">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">hour_adjust</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">4</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="minute_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Minute label">Minute</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">5</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="minute">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">minute_adjust</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">5</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="second_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Second label">Second</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">6</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="second">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">second_adjust</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">6</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="timezone_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Timezone label">Timezone</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">7</property>
|
|
||||||
<property name="top_attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkSpinButton" id="timezone">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="adjustment">timezone_adjust</property>
|
|
||||||
<property name="digits">1</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">7</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="house_system_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, House system label">House system</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">4</property>
|
|
||||||
<property name="top_attach">5</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkComboBox" id="house_system">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="model">house_system_model</property>
|
|
||||||
<property name="id_column">1</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">5</property>
|
|
||||||
<property name="top_attach">5</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="note_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes" context="Chart edit, Note label">Note</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">6</property>
|
|
||||||
<property name="width">7</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkScrolledWindow" id="note_scroll">
|
|
||||||
<property name="height_request">300</property>
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="shadow_type">in</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkTextView" id="note">
|
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="can_focus">True</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="buffer">note_buffer</property>
|
<property name="label" translatable="yes">Location</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="location_grid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="country_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Country</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSearchEntry" id="country">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="primary_icon_name">edit-find-symbolic</property>
|
||||||
|
<property name="primary_icon_activatable">False</property>
|
||||||
|
<property name="primary_icon_sensitive">False</property>
|
||||||
|
<signal name="search-changed" handler="ag_window_country_changed_callback" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="city_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">City</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSearchEntry" id="city">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="primary_icon_name">edit-find-symbolic</property>
|
||||||
|
<property name="primary_icon_activatable">False</property>
|
||||||
|
<property name="primary_icon_sensitive">False</property>
|
||||||
|
<signal name="search-changed" handler="ag_window_city_changed_callback" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="latitude_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Latitude</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkRadioButton" id="north_lat">
|
||||||
|
<property name="label" translatable="yes">North</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkRadioButton" id="south_lat">
|
||||||
|
<property name="label" translatable="yes">South</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
<property name="group">north_lat</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="latitude">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">latitude_adjust</property>
|
||||||
|
<property name="digits">6</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="longitude_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Longitude</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkRadioButton" id="east_long">
|
||||||
|
<property name="label" translatable="yes">East</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkRadioButton" id="west_long">
|
||||||
|
<property name="label" translatable="yes">West</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">False</property>
|
||||||
|
<property name="active">True</property>
|
||||||
|
<property name="draw_indicator">True</property>
|
||||||
|
<property name="group">east_long</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">3</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="longitude">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">longitude_adjust</property>
|
||||||
|
<property name="digits">6</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="left_attach">0</property>
|
<property name="left_attach">0</property>
|
||||||
<property name="top_attach">7</property>
|
<property name="top_attach">1</property>
|
||||||
<property name="width">7</property>
|
<property name="width">2</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child><!-- location_frame -->
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame" id="time_frame">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label_xalign">0</property>
|
||||||
|
<property name="shadow_type">none</property>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel" id="time_frame_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Date and time</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkGrid" id="time_grid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="row_homogeneous">True</property>
|
||||||
|
<property name="column_homogeneous">True</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="year_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Year</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="year">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">year_adjust</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="month_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Month</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="month">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">month_adjust</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="day_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Day</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="day">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">day_adjust</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="hour_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Hour</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="hour">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">hour_adjust</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">3</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="minute_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Minute</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="minute">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">minute_adjust</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">3</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="second_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Second</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="second">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">second_adjust</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">3</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="timezone_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Timezone</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="timezone">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="adjustment">timezone_adjust</property>
|
||||||
|
<property name="digits">1</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">3</property>
|
||||||
|
<property name="top_attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child><!-- time_grid -->
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child><!-- time_frame -->
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame" id="notes_frame">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label_xalign">0</property>
|
||||||
|
<property name="shadow_type">none</property>
|
||||||
|
<child type="label">
|
||||||
|
<object class="GtkLabel" id="notes_frame_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Notes</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkScrolledWindow" id="notes_scroll">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="shadow_type">in</property>
|
||||||
|
<property name="min_content_height">300</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkTextView" id="note">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="buffer">note_buffer</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="width">3</property>
|
||||||
|
</packing>
|
||||||
|
</child><!-- notes_frame -->
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="name">edit</property>
|
<property name="name">edit</property>
|
||||||
@ -797,6 +828,18 @@
|
|||||||
<property name="action_target">'antiscia'</property>
|
<property name="action_target">'antiscia'</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkComboBox" id="house_system">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="model">house_system_model</property>
|
||||||
|
<property name="id_column">1</property>
|
||||||
|
<signal name="changed" handler="ag_window_house_system_changed_cb" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="pack_type">start</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkComboBox" id="display_theme">
|
<object class="GtkComboBox" id="display_theme">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
Loading…
Reference in New Issue
Block a user