Move chart edit tab to a composite widget, AgChartEdit
This commit is contained in:
parent
96221abec6
commit
1de65cb9e0
@ -10,4 +10,5 @@ src/astrognome.c
|
|||||||
[type: gettext/glade]src/resources/ui/astrognome.ui
|
[type: gettext/glade]src/resources/ui/astrognome.ui
|
||||||
[type: gettext/glade]src/resources/ui/ag-window.ui
|
[type: gettext/glade]src/resources/ui/ag-window.ui
|
||||||
[type: gettext/glade]src/resources/ui/ag-preferences.ui
|
[type: gettext/glade]src/resources/ui/ag-preferences.ui
|
||||||
|
[type: gettext/glade]src/resources/ui/ag-chart-edit.ui
|
||||||
astrognome.appdata.xml.in
|
astrognome.appdata.xml.in
|
@ -34,6 +34,7 @@ astrognome_source_files = \
|
|||||||
ag-display-theme.c \
|
ag-display-theme.c \
|
||||||
ag-icon-view.c \
|
ag-icon-view.c \
|
||||||
ag-chart-renderer.c \
|
ag-chart-renderer.c \
|
||||||
|
ag-chart-edit.c \
|
||||||
astrognome.c \
|
astrognome.c \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
|
1060
src/ag-chart-edit.c
Normal file
1060
src/ag-chart-edit.c
Normal file
File diff suppressed because it is too large
Load Diff
84
src/ag-chart-edit.h
Normal file
84
src/ag-chart-edit.h
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
#ifndef __AG_CHART_EDIT_H__
|
||||||
|
#define __AG_CHART_EDIT_H__
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
#include "ag-db.h"
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define AG_TYPE_CHART_EDIT \
|
||||||
|
(ag_chart_edit_get_type())
|
||||||
|
#define AG_CHART_EDIT(obj) \
|
||||||
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
|
||||||
|
AG_TYPE_CHART_EDIT, \
|
||||||
|
AgChartEdit))
|
||||||
|
#define AG_CHART_EDIT_CLASS(klass) \
|
||||||
|
(G_TYPE_CHECK_CLASS_CAST ((klass), \
|
||||||
|
AG_TYPE_CHART_EDIT, \
|
||||||
|
AgChartEditClass))
|
||||||
|
#define IS_AG_CHART_EDIT(obj) \
|
||||||
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
|
||||||
|
AG_TYPE_CHART_EDIT))
|
||||||
|
#define IS_AG_CHART_EDIT_CLASS(klass) \
|
||||||
|
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
|
||||||
|
AG_TYPE_CHART_EDIT))
|
||||||
|
#define AG_CHART_EDIT_GET_CLASS(obj) \
|
||||||
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
|
||||||
|
AG_TYPE_CHART_EDIT, \
|
||||||
|
AgChartEditClass))
|
||||||
|
|
||||||
|
typedef struct _AgChartEdit AgChartEdit;
|
||||||
|
typedef struct _AgChartEditClass AgChartEditClass;
|
||||||
|
|
||||||
|
struct _AgChartEditClass
|
||||||
|
{
|
||||||
|
GtkGridClass parent_class;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _AgChartEdit
|
||||||
|
{
|
||||||
|
GtkGrid parent;
|
||||||
|
};
|
||||||
|
|
||||||
|
GType ag_chart_edit_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
void ag_chart_edit_set_name(AgChartEdit *chart_edit, const gchar *name);
|
||||||
|
|
||||||
|
const gchar *ag_chart_edit_get_name(AgChartEdit *chart_edit);
|
||||||
|
|
||||||
|
void ag_chart_edit_set_country(AgChartEdit *chart_edit, const gchar *country);
|
||||||
|
|
||||||
|
const gchar *ag_chart_edit_get_country(AgChartEdit *chart_edit);
|
||||||
|
|
||||||
|
void ag_chart_edit_set_city(AgChartEdit *chart_edit, const gchar *city);
|
||||||
|
|
||||||
|
const gchar *ag_chart_edit_get_city(AgChartEdit *chart_edit);
|
||||||
|
|
||||||
|
void ag_chart_edit_set_latitude(AgChartEdit *chart_edit, gdouble latitude);
|
||||||
|
|
||||||
|
gdouble ag_chart_edit_get_latitude(AgChartEdit *chart_edit);
|
||||||
|
|
||||||
|
void ag_chart_edit_set_longitude(AgChartEdit *chart_edit, gdouble longitude);
|
||||||
|
|
||||||
|
gdouble ag_chart_edit_get_longitude(AgChartEdit *chart_edit);
|
||||||
|
|
||||||
|
void ag_chart_edit_set_from_timestamp(AgChartEdit *chart_edit,
|
||||||
|
GsweTimestamp *timestamp);
|
||||||
|
|
||||||
|
GsweTimestamp *ag_chart_edit_get_to_timestamp(AgChartEdit *chart_edit,
|
||||||
|
GsweTimestamp *timestamp);
|
||||||
|
|
||||||
|
void ag_chart_edit_set_note(AgChartEdit *chart_edit, const gchar *note);
|
||||||
|
|
||||||
|
gchar *ag_chart_edit_get_note(AgChartEdit *chart_edit);
|
||||||
|
|
||||||
|
void ag_chart_edit_update(AgChartEdit *chart_edit);
|
||||||
|
|
||||||
|
AgDbChartSave *ag_chart_edit_get_chart_save(AgChartEdit *chart_edit);
|
||||||
|
|
||||||
|
void ag_chart_edit_clear(AgChartEdit *chart_edit);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __AG_CHART_EDIT_H__ */
|
576
src/ag-window.c
576
src/ag-window.c
@ -34,6 +34,7 @@
|
|||||||
#include "ag-db.h"
|
#include "ag-db.h"
|
||||||
#include "ag-display-theme.h"
|
#include "ag-display-theme.h"
|
||||||
#include "ag-icon-view.h"
|
#include "ag-icon-view.h"
|
||||||
|
#include "ag-chart-edit.h"
|
||||||
|
|
||||||
struct _AgWindowPrivate {
|
struct _AgWindowPrivate {
|
||||||
GtkWidget *header_bar;
|
GtkWidget *header_bar;
|
||||||
@ -41,22 +42,6 @@ struct _AgWindowPrivate {
|
|||||||
GtkWidget *new_back_stack;
|
GtkWidget *new_back_stack;
|
||||||
GtkWidget *selection_toolbar;
|
GtkWidget *selection_toolbar;
|
||||||
GtkWidget *stack;
|
GtkWidget *stack;
|
||||||
GtkWidget *name;
|
|
||||||
GtkWidget *country;
|
|
||||||
GtkWidget *city;
|
|
||||||
GtkWidget *north_lat;
|
|
||||||
GtkWidget *south_lat;
|
|
||||||
GtkWidget *latitude;
|
|
||||||
GtkWidget *east_long;
|
|
||||||
GtkWidget *west_long;
|
|
||||||
GtkWidget *longitude;
|
|
||||||
GtkWidget *year;
|
|
||||||
GtkWidget *month;
|
|
||||||
GtkWidget *day;
|
|
||||||
GtkWidget *hour;
|
|
||||||
GtkWidget *minute;
|
|
||||||
GtkWidget *second;
|
|
||||||
GtkWidget *timezone;
|
|
||||||
GtkWidget *house_system;
|
GtkWidget *house_system;
|
||||||
GtkWidget *display_theme;
|
GtkWidget *display_theme;
|
||||||
GtkWidget *toolbar_aspect;
|
GtkWidget *toolbar_aspect;
|
||||||
@ -69,29 +54,17 @@ struct _AgWindowPrivate {
|
|||||||
GtkWidget *aspect_table;
|
GtkWidget *aspect_table;
|
||||||
GtkWidget *chart_web_view;
|
GtkWidget *chart_web_view;
|
||||||
GtkWidget *points_eq;
|
GtkWidget *points_eq;
|
||||||
GtkAdjustment *year_adjust;
|
|
||||||
|
|
||||||
GtkWidget *chart_list;
|
GtkWidget *chart_list;
|
||||||
AgSettings *settings;
|
AgSettings *settings;
|
||||||
AgChart *chart;
|
AgChart *chart;
|
||||||
gboolean aspect_table_populated;
|
gboolean aspect_table_populated;
|
||||||
GtkTextBuffer *note_buffer;
|
|
||||||
GtkListStore *house_system_model;
|
GtkListStore *house_system_model;
|
||||||
AgDbChartSave *saved_data;
|
AgDbChartSave *saved_data;
|
||||||
GtkEntryCompletion *country_comp;
|
GList *style_sheets;
|
||||||
GtkEntryCompletion *city_comp;
|
AgDisplayTheme *theme;
|
||||||
gchar *selected_country;
|
GtkListStore *display_theme_model;
|
||||||
gchar *selected_city;
|
gulong chart_changed_handler;
|
||||||
GList *style_sheets;
|
|
||||||
AgDisplayTheme *theme;
|
|
||||||
GtkListStore *display_theme_model;
|
|
||||||
gulong chart_changed_handler;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct cc_search {
|
|
||||||
const gchar *target;
|
|
||||||
GtkTreeIter *ret_iter;
|
|
||||||
gchar *ret_code;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
@ -602,8 +575,6 @@ ag_window_set_model_house_system(GtkTreeModel *model,
|
|||||||
void
|
void
|
||||||
ag_window_update_from_chart(AgWindow *window)
|
ag_window_update_from_chart(AgWindow *window)
|
||||||
{
|
{
|
||||||
const gchar *country,
|
|
||||||
*city;
|
|
||||||
GET_PRIV(window);
|
GET_PRIV(window);
|
||||||
GsweTimestamp *timestamp = gswe_moment_get_timestamp(
|
GsweTimestamp *timestamp = gswe_moment_get_timestamp(
|
||||||
GSWE_MOMENT(priv->chart)
|
GSWE_MOMENT(priv->chart)
|
||||||
@ -612,74 +583,26 @@ ag_window_update_from_chart(AgWindow *window)
|
|||||||
GSWE_MOMENT(priv->chart)
|
GSWE_MOMENT(priv->chart)
|
||||||
);
|
);
|
||||||
|
|
||||||
if ((country = ag_chart_get_country(priv->chart)) != NULL) {
|
ag_chart_edit_set_country(
|
||||||
gtk_entry_set_text(
|
AG_CHART_EDIT(priv->tab_edit),
|
||||||
GTK_ENTRY(priv->country),
|
ag_chart_get_country(priv->chart)
|
||||||
ag_chart_get_country(priv->chart)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
gtk_entry_set_text(
|
|
||||||
GTK_ENTRY(priv->country),
|
|
||||||
""
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((city = ag_chart_get_city(priv->chart)) != NULL) {
|
|
||||||
gtk_entry_set_text(
|
|
||||||
GTK_ENTRY(priv->city),
|
|
||||||
ag_chart_get_city(priv->chart)
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
gtk_entry_set_text(
|
|
||||||
GTK_ENTRY(priv->city),
|
|
||||||
""
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_spin_button_set_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->year),
|
|
||||||
gswe_timestamp_get_gregorian_year(timestamp, NULL)
|
|
||||||
);
|
);
|
||||||
gtk_spin_button_set_value(
|
ag_chart_edit_set_city(
|
||||||
GTK_SPIN_BUTTON(priv->month),
|
AG_CHART_EDIT(priv->tab_edit),
|
||||||
gswe_timestamp_get_gregorian_month(timestamp, NULL)
|
ag_chart_get_city(priv->chart)
|
||||||
);
|
);
|
||||||
gtk_spin_button_set_value(
|
ag_chart_edit_set_from_timestamp(
|
||||||
GTK_SPIN_BUTTON(priv->day),
|
AG_CHART_EDIT(priv->tab_edit),
|
||||||
gswe_timestamp_get_gregorian_day(timestamp, NULL)
|
timestamp
|
||||||
);
|
);
|
||||||
gtk_spin_button_set_value(
|
ag_chart_edit_set_latitude(
|
||||||
GTK_SPIN_BUTTON(priv->hour),
|
AG_CHART_EDIT(priv->tab_edit),
|
||||||
gswe_timestamp_get_gregorian_hour(timestamp, NULL)
|
coordinates->latitude
|
||||||
);
|
);
|
||||||
gtk_spin_button_set_value(
|
ag_chart_edit_set_longitude(
|
||||||
GTK_SPIN_BUTTON(priv->minute),
|
AG_CHART_EDIT(priv->tab_edit),
|
||||||
gswe_timestamp_get_gregorian_minute(timestamp, NULL)
|
coordinates->longitude
|
||||||
);
|
);
|
||||||
gtk_spin_button_set_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->second),
|
|
||||||
gswe_timestamp_get_gregorian_second(timestamp, NULL));
|
|
||||||
gtk_spin_button_set_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->timezone),
|
|
||||||
gswe_timestamp_get_gregorian_timezone(timestamp)
|
|
||||||
);
|
|
||||||
gtk_spin_button_set_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->longitude),
|
|
||||||
fabs(coordinates->longitude)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (coordinates->longitude < 0.0) {
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->west_long), TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_spin_button_set_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->latitude),
|
|
||||||
fabs(coordinates->latitude)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (coordinates->latitude < 0.0) {
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->south_lat), TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_tree_model_foreach(
|
gtk_tree_model_foreach(
|
||||||
GTK_TREE_MODEL(priv->house_system_model),
|
GTK_TREE_MODEL(priv->house_system_model),
|
||||||
@ -687,16 +610,15 @@ ag_window_update_from_chart(AgWindow *window)
|
|||||||
window
|
window
|
||||||
);
|
);
|
||||||
|
|
||||||
gtk_entry_set_text(GTK_ENTRY(priv->name), ag_chart_get_name(priv->chart));
|
ag_chart_edit_set_name(
|
||||||
|
AG_CHART_EDIT(priv->tab_edit),
|
||||||
|
ag_chart_get_name(priv->chart)
|
||||||
|
);
|
||||||
|
|
||||||
if (ag_chart_get_note(priv->chart)) {
|
ag_chart_edit_set_note(
|
||||||
// TODO: maybe setting length to -1 here is not that good of an idea…
|
AG_CHART_EDIT(priv->tab_edit),
|
||||||
gtk_text_buffer_set_text(
|
ag_chart_get_note(priv->chart)
|
||||||
GTK_TEXT_BUFFER(priv->note_buffer),
|
);
|
||||||
ag_chart_get_note(priv->chart),
|
|
||||||
-1
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_header_bar_set_subtitle(
|
gtk_header_bar_set_subtitle(
|
||||||
GTK_HEADER_BAR(priv->header_bar),
|
GTK_HEADER_BAR(priv->header_bar),
|
||||||
@ -721,95 +643,16 @@ ag_window_recalculate_chart(AgWindow *window, gboolean set_everything)
|
|||||||
AgDbChartSave *edit_data,
|
AgDbChartSave *edit_data,
|
||||||
*chart_data;
|
*chart_data;
|
||||||
GET_PRIV(window);
|
GET_PRIV(window);
|
||||||
gboolean south,
|
|
||||||
west;
|
|
||||||
GtkTreeIter house_system_iter;
|
|
||||||
GsweHouseSystem house_system;
|
GsweHouseSystem house_system;
|
||||||
GtkTextIter start_iter,
|
|
||||||
end_iter;
|
|
||||||
GsweTimestamp *timestamp;
|
GsweTimestamp *timestamp;
|
||||||
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;
|
AgSettings *settings;
|
||||||
|
|
||||||
south = gtk_toggle_button_get_active(
|
ag_chart_edit_update(AG_CHART_EDIT(priv->tab_chart));
|
||||||
GTK_TOGGLE_BUTTON(priv->south_lat)
|
|
||||||
);
|
|
||||||
|
|
||||||
west = gtk_toggle_button_get_active(
|
|
||||||
GTK_TOGGLE_BUTTON(priv->west_long)
|
|
||||||
);
|
|
||||||
|
|
||||||
// If the current widget is a spin button, force it to update. This is
|
|
||||||
// required when the user enters a new value in a spin button, but doesn't
|
|
||||||
// leave the spin entry before switching to the chart tab with an accel.
|
|
||||||
current = gtk_window_get_focus(GTK_WINDOW(window));
|
|
||||||
|
|
||||||
if (GTK_IS_SPIN_BUTTON(current)) {
|
|
||||||
gtk_spin_button_update(GTK_SPIN_BUTTON(current));
|
|
||||||
}
|
|
||||||
|
|
||||||
edit_data = ag_db_chart_save_new(TRUE);
|
|
||||||
|
|
||||||
|
edit_data = ag_chart_edit_get_chart_save(AG_CHART_EDIT(priv->tab_edit));
|
||||||
edit_data->db_id = db_id;
|
edit_data->db_id = db_id;
|
||||||
|
|
||||||
edit_data->name = g_strdup(gtk_entry_get_text(GTK_ENTRY(priv->name)));
|
|
||||||
edit_data->country = g_strdup(gtk_entry_get_text(GTK_ENTRY(priv->country)));
|
|
||||||
edit_data->city = g_strdup(gtk_entry_get_text(GTK_ENTRY(priv->city)));
|
|
||||||
edit_data->longitude = gtk_spin_button_get_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->longitude)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (west) {
|
|
||||||
edit_data->longitude = - edit_data->longitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
edit_data->latitude = gtk_spin_button_get_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->latitude)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (south) {
|
|
||||||
edit_data->latitude = - edit_data->latitude;
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: This will cause problems with imported charts
|
|
||||||
edit_data->altitude = DEFAULT_ALTITUDE;
|
|
||||||
edit_data->year = gtk_spin_button_get_value_as_int(
|
|
||||||
GTK_SPIN_BUTTON(priv->year)
|
|
||||||
);
|
|
||||||
edit_data->month = gtk_spin_button_get_value_as_int(
|
|
||||||
GTK_SPIN_BUTTON(priv->month)
|
|
||||||
);
|
|
||||||
edit_data->day = gtk_spin_button_get_value_as_int(
|
|
||||||
GTK_SPIN_BUTTON(priv->day)
|
|
||||||
);
|
|
||||||
edit_data->hour = gtk_spin_button_get_value_as_int(
|
|
||||||
GTK_SPIN_BUTTON(priv->hour)
|
|
||||||
);
|
|
||||||
edit_data->minute = gtk_spin_button_get_value_as_int(
|
|
||||||
GTK_SPIN_BUTTON(priv->minute)
|
|
||||||
);
|
|
||||||
edit_data->second = gtk_spin_button_get_value_as_int(
|
|
||||||
GTK_SPIN_BUTTON(priv->second)
|
|
||||||
);
|
|
||||||
edit_data->timezone = gtk_spin_button_get_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->timezone)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!gtk_combo_box_get_active_iter(
|
|
||||||
GTK_COMBO_BOX(priv->house_system),
|
|
||||||
&house_system_iter
|
|
||||||
)) {
|
|
||||||
g_error("House system is not set! This is clearly a bug.");
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_text_buffer_get_bounds(priv->note_buffer, &start_iter, &end_iter);
|
|
||||||
edit_data->note = gtk_text_buffer_get_text(
|
|
||||||
priv->note_buffer,
|
|
||||||
&start_iter, &end_iter,
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
|
|
||||||
chart_data = (priv->chart)
|
chart_data = (priv->chart)
|
||||||
? ag_chart_get_db_save(priv->chart)
|
? ag_chart_get_db_save(priv->chart)
|
||||||
: NULL
|
: NULL
|
||||||
@ -1608,27 +1451,13 @@ ag_window_new_chart_action(GSimpleAction *action,
|
|||||||
AgWindow *window = AG_WINDOW(user_data);
|
AgWindow *window = AG_WINDOW(user_data);
|
||||||
GET_PRIV(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
/* Empty edit tab values */
|
ag_chart_edit_clear(AG_CHART_EDIT(priv->tab_edit));
|
||||||
gtk_entry_set_text(GTK_ENTRY(priv->name), "");
|
|
||||||
gtk_entry_set_text(GTK_ENTRY(priv->country), "");
|
|
||||||
gtk_entry_set_text(GTK_ENTRY(priv->city), "");
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->year), (gdouble)1);
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->month), (gdouble)1);
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->day), (gdouble)1);
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->hour), (gdouble)1);
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->minute), (gdouble)1);
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->second), (gdouble)1);
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->timezone), 0.0);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->north_lat), TRUE);
|
|
||||||
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(priv->east_long), TRUE);
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->longitude), 0.0);
|
|
||||||
gtk_spin_button_set_value(GTK_SPIN_BUTTON(priv->latitude), 0.0);
|
|
||||||
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_default_house_system,
|
(GtkTreeModelForeachFunc)ag_window_set_default_house_system,
|
||||||
window
|
window
|
||||||
);
|
);
|
||||||
gtk_text_buffer_set_text(GTK_TEXT_BUFFER(priv->note_buffer), "", 0);
|
|
||||||
|
|
||||||
if (priv->chart) {
|
if (priv->chart) {
|
||||||
ag_app_message_dialog(
|
ag_app_message_dialog(
|
||||||
@ -2015,49 +1844,6 @@ ag_window_list_selection_changed_cb(AgIconView *view, AgWindow *window)
|
|||||||
// Here it is possible to set button sensitivity later
|
// Here it is possible to set button sensitivity later
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
|
||||||
ag_window_city_matches(GtkEntryCompletion *city_comp,
|
|
||||||
const gchar *key,
|
|
||||||
GtkTreeIter *iter,
|
|
||||||
AgWindow *window)
|
|
||||||
{
|
|
||||||
GET_PRIV(window);
|
|
||||||
gchar *ccode,
|
|
||||||
*name,
|
|
||||||
*normalized_name,
|
|
||||||
*case_normalized_name;
|
|
||||||
gboolean ret = FALSE;
|
|
||||||
|
|
||||||
gtk_tree_model_get(
|
|
||||||
gtk_entry_completion_get_model(city_comp), iter,
|
|
||||||
AG_CITY_NAME, &name,
|
|
||||||
AG_CITY_COUNTRY, &ccode,
|
|
||||||
-1
|
|
||||||
);
|
|
||||||
|
|
||||||
if (
|
|
||||||
(priv->selected_country == NULL)
|
|
||||||
|| (strcmp(priv->selected_country, ccode) == 0)
|
|
||||||
) {
|
|
||||||
normalized_name = g_utf8_normalize(name, -1, G_NORMALIZE_ALL);
|
|
||||||
|
|
||||||
if (normalized_name) {
|
|
||||||
case_normalized_name = g_utf8_casefold(normalized_name, -1);
|
|
||||||
if (strncmp(key, case_normalized_name, strlen(key)) == 0) {
|
|
||||||
ret = TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free(case_normalized_name);
|
|
||||||
g_free(normalized_name);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
g_free(name);
|
|
||||||
g_free(ccode);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ag_window_chart_context_cb(WebKitWebView *web_view,
|
ag_window_chart_context_cb(WebKitWebView *web_view,
|
||||||
GtkWidget *default_menu,
|
GtkWidget *default_menu,
|
||||||
@ -2114,21 +1900,6 @@ ag_window_init(AgWindow *window)
|
|||||||
window
|
window
|
||||||
);
|
);
|
||||||
|
|
||||||
gtk_entry_completion_set_model(priv->country_comp, country_list);
|
|
||||||
gtk_entry_completion_set_text_column(priv->country_comp, AG_COUNTRY_NAME);
|
|
||||||
gtk_entry_set_completion(GTK_ENTRY(priv->country), priv->country_comp);
|
|
||||||
|
|
||||||
gtk_entry_completion_set_model(priv->city_comp, city_list);
|
|
||||||
gtk_entry_completion_set_text_column(priv->city_comp, AG_CITY_NAME);
|
|
||||||
gtk_entry_completion_set_minimum_key_length(priv->city_comp, 3);
|
|
||||||
gtk_entry_set_completion(GTK_ENTRY(priv->city), priv->city_comp);
|
|
||||||
gtk_entry_completion_set_match_func(
|
|
||||||
priv->city_comp,
|
|
||||||
(GtkEntryCompletionMatchFunc)ag_window_city_matches,
|
|
||||||
window,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
// Fill the house system model and set the combo box on the Edit tab to the
|
// Fill the house system model and set the combo box on the Edit tab to the
|
||||||
// default one
|
// default one
|
||||||
house_system_list = gswe_all_house_systems();
|
house_system_list = gswe_all_house_systems();
|
||||||
@ -2182,13 +1953,6 @@ ag_window_init(AgWindow *window)
|
|||||||
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack), "list");
|
gtk_stack_set_visible_child_name(GTK_STACK(priv->stack), "list");
|
||||||
priv->current_tab = priv->tab_list;
|
priv->current_tab = priv->tab_list;
|
||||||
|
|
||||||
g_object_set(
|
|
||||||
priv->year_adjust,
|
|
||||||
"lower", (gdouble)G_MININT,
|
|
||||||
"upper", (gdouble)G_MAXINT,
|
|
||||||
NULL
|
|
||||||
);
|
|
||||||
|
|
||||||
ag_window_set_chart(window, NULL);
|
ag_window_set_chart(window, NULL);
|
||||||
|
|
||||||
g_action_map_add_action_entries(
|
g_action_map_add_action_entries(
|
||||||
@ -2213,196 +1977,14 @@ ag_window_dispose(GObject *gobject)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ag_window_name_changed_cb(GtkEntry *name_entry, AgWindow *window)
|
ag_window_name_changed_cb(AgChartEdit *chart_edit, AgWindow *window)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
|
||||||
GET_PRIV(window);
|
GET_PRIV(window);
|
||||||
|
|
||||||
name = gtk_entry_get_text(name_entry);
|
gtk_header_bar_set_subtitle(
|
||||||
|
GTK_HEADER_BAR(priv->header_bar),
|
||||||
gtk_header_bar_set_subtitle(GTK_HEADER_BAR(priv->header_bar), name);
|
ag_chart_edit_get_name(AG_CHART_EDIT(priv->tab_edit))
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
ag_window_find_country(GtkTreeModel *model,
|
|
||||||
GtkTreePath *path,
|
|
||||||
GtkTreeIter *iter,
|
|
||||||
struct cc_search *search)
|
|
||||||
{
|
|
||||||
gchar *name,
|
|
||||||
*ccode;
|
|
||||||
gboolean found = FALSE;
|
|
||||||
|
|
||||||
gtk_tree_model_get(
|
|
||||||
model, iter,
|
|
||||||
AG_COUNTRY_NAME, &name,
|
|
||||||
AG_COUNTRY_CODE, &ccode,
|
|
||||||
-1
|
|
||||||
);
|
);
|
||||||
|
|
||||||
if (g_utf8_collate(search->target, name) == 0) {
|
|
||||||
found = TRUE;
|
|
||||||
search->ret_iter = gtk_tree_iter_copy(iter);
|
|
||||||
search->ret_code = ccode;
|
|
||||||
} else {
|
|
||||||
g_free(ccode);
|
|
||||||
}
|
|
||||||
|
|
||||||
return found;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* ag_window_country_changed_callback:
|
|
||||||
* @country: the #GtkSearchEntry for country search
|
|
||||||
* @window: the window in which the event happens
|
|
||||||
*
|
|
||||||
* This function is called whenever the text in the country search entry is
|
|
||||||
* changed.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
ag_window_country_changed_callback(GtkSearchEntry *country, AgWindow *window)
|
|
||||||
{
|
|
||||||
struct cc_search search;
|
|
||||||
GET_PRIV(window);
|
|
||||||
|
|
||||||
search.target = gtk_entry_get_text(GTK_ENTRY(country));
|
|
||||||
search.ret_iter = NULL;
|
|
||||||
|
|
||||||
gtk_tree_model_foreach(
|
|
||||||
country_list,
|
|
||||||
(GtkTreeModelForeachFunc)ag_window_find_country,
|
|
||||||
&search
|
|
||||||
);
|
|
||||||
|
|
||||||
g_free(priv->selected_country);
|
|
||||||
|
|
||||||
if (search.ret_iter != NULL) {
|
|
||||||
g_debug("Country (entry-changed): %s", search.ret_code);
|
|
||||||
gtk_tree_iter_free(search.ret_iter);
|
|
||||||
priv->selected_country = search.ret_code;
|
|
||||||
} else {
|
|
||||||
priv->selected_country = NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static gboolean
|
|
||||||
ag_window_find_city(GtkTreeModel *model,
|
|
||||||
GtkTreePath *path,
|
|
||||||
GtkTreeIter *iter,
|
|
||||||
struct cc_search *search)
|
|
||||||
{
|
|
||||||
gchar *name,
|
|
||||||
*ccode;
|
|
||||||
gboolean found = FALSE;
|
|
||||||
|
|
||||||
gtk_tree_model_get(
|
|
||||||
model, iter,
|
|
||||||
AG_CITY_NAME, &name,
|
|
||||||
AG_CITY_COUNTRY, &ccode,
|
|
||||||
-1
|
|
||||||
);
|
|
||||||
|
|
||||||
if (g_utf8_collate(search->target, name) == 0) {
|
|
||||||
found = TRUE;
|
|
||||||
search->ret_iter = gtk_tree_iter_copy(iter);
|
|
||||||
search->ret_code = ccode;
|
|
||||||
} else {
|
|
||||||
g_free(ccode);
|
|
||||||
}
|
|
||||||
|
|
||||||
return found;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
ag_window_city_changed_callback(GtkSearchEntry *city, AgWindow *window)
|
|
||||||
{
|
|
||||||
struct cc_search search;
|
|
||||||
GET_PRIV(window);
|
|
||||||
|
|
||||||
search.target = gtk_entry_get_text(GTK_ENTRY(city));
|
|
||||||
search.ret_iter = NULL;
|
|
||||||
|
|
||||||
gtk_tree_model_foreach(
|
|
||||||
city_list,
|
|
||||||
(GtkTreeModelForeachFunc)ag_window_find_city,
|
|
||||||
&search
|
|
||||||
);
|
|
||||||
|
|
||||||
g_free(priv->selected_city);
|
|
||||||
|
|
||||||
if (search.ret_iter != NULL) {
|
|
||||||
gdouble longitude,
|
|
||||||
latitude,
|
|
||||||
altitude;
|
|
||||||
gchar *name,
|
|
||||||
*ccode;
|
|
||||||
|
|
||||||
gtk_tree_model_get(
|
|
||||||
city_list, search.ret_iter,
|
|
||||||
AG_CITY_COUNTRY, &ccode,
|
|
||||||
AG_CITY_NAME, &name,
|
|
||||||
AG_CITY_LAT, &latitude,
|
|
||||||
AG_CITY_LONG, &longitude,
|
|
||||||
AG_CITY_ALT, &altitude,
|
|
||||||
-1
|
|
||||||
);
|
|
||||||
|
|
||||||
if (
|
|
||||||
(priv->selected_country != NULL)
|
|
||||||
&& (strcmp(priv->selected_country, ccode) != 0)
|
|
||||||
) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (latitude < 0.0) {
|
|
||||||
gtk_toggle_button_set_active(
|
|
||||||
GTK_TOGGLE_BUTTON(priv->south_lat),
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
gtk_spin_button_set_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->latitude),
|
|
||||||
-latitude
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
gtk_toggle_button_set_active(
|
|
||||||
GTK_TOGGLE_BUTTON(priv->north_lat),
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
gtk_spin_button_set_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->latitude),
|
|
||||||
latitude
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (longitude < 0.0) {
|
|
||||||
gtk_toggle_button_set_active(
|
|
||||||
GTK_TOGGLE_BUTTON(priv->west_long),
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
gtk_spin_button_set_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->longitude),
|
|
||||||
-longitude
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
gtk_toggle_button_set_active(
|
|
||||||
GTK_TOGGLE_BUTTON(priv->east_long),
|
|
||||||
TRUE
|
|
||||||
);
|
|
||||||
gtk_spin_button_set_value(
|
|
||||||
GTK_SPIN_BUTTON(priv->longitude),
|
|
||||||
longitude
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: implement setting altitude maybe? Is that really necessary?
|
|
||||||
|
|
||||||
g_debug("City (entry-changed): %s (%s); %.6f, %.6f, %.6f", name, search.ret_code, longitude, latitude, altitude);
|
|
||||||
g_free(name);
|
|
||||||
gtk_tree_iter_free(search.ret_iter);
|
|
||||||
priv->selected_city = search.ret_code;
|
|
||||||
} else {
|
|
||||||
priv->selected_city = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -2563,72 +2145,6 @@ ag_window_class_init(AgWindowClass *klass)
|
|||||||
AgWindow,
|
AgWindow,
|
||||||
tab_edit
|
tab_edit
|
||||||
);
|
);
|
||||||
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, name);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
country
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
country_comp
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, city);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
city_comp
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, year);
|
|
||||||
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, month);
|
|
||||||
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, day);
|
|
||||||
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, hour);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
minute
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
second
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
timezone
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
north_lat
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
south_lat
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
east_long
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
west_long
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
latitude
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
longitude
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
gtk_widget_class_bind_template_child_private(
|
||||||
widget_class,
|
widget_class,
|
||||||
AgWindow,
|
AgWindow,
|
||||||
@ -2649,17 +2165,7 @@ ag_window_class_init(AgWindowClass *klass)
|
|||||||
AgWindow,
|
AgWindow,
|
||||||
aspect_table
|
aspect_table
|
||||||
);
|
);
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
year_adjust
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, stack);
|
gtk_widget_class_bind_template_child_private(widget_class, AgWindow, stack);
|
||||||
gtk_widget_class_bind_template_child_private(
|
|
||||||
widget_class,
|
|
||||||
AgWindow,
|
|
||||||
note_buffer
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_child_private(
|
gtk_widget_class_bind_template_child_private(
|
||||||
widget_class,
|
widget_class,
|
||||||
AgWindow,
|
AgWindow,
|
||||||
@ -2708,14 +2214,6 @@ ag_window_class_init(AgWindowClass *klass)
|
|||||||
widget_class,
|
widget_class,
|
||||||
ag_window_name_changed_cb
|
ag_window_name_changed_cb
|
||||||
);
|
);
|
||||||
gtk_widget_class_bind_template_callback(
|
|
||||||
widget_class,
|
|
||||||
ag_window_country_changed_callback
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_callback(
|
|
||||||
widget_class,
|
|
||||||
ag_window_city_changed_callback
|
|
||||||
);
|
|
||||||
gtk_widget_class_bind_template_callback(
|
gtk_widget_class_bind_template_callback(
|
||||||
widget_class,
|
widget_class,
|
||||||
ag_window_display_theme_changed_cb
|
ag_window_display_theme_changed_cb
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
<file>ui/astrognome.ui</file>
|
<file>ui/astrognome.ui</file>
|
||||||
<file>ui/ag-window.ui</file>
|
<file>ui/ag-window.ui</file>
|
||||||
<file>ui/ag-preferences.ui</file>
|
<file>ui/ag-preferences.ui</file>
|
||||||
|
<file>ui/ag-chart-edit.ui</file>
|
||||||
<file>ui/chart-default.css</file>
|
<file>ui/chart-default.css</file>
|
||||||
<file>ui/chart-default.xsl</file>
|
<file>ui/chart-default.xsl</file>
|
||||||
|
|
||||||
|
495
src/resources/ui/ag-chart-edit.ui
Normal file
495
src/resources/ui/ag-chart-edit.ui
Normal file
@ -0,0 +1,495 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<interface>
|
||||||
|
<requires lib="gtk+" version="3.0"/>
|
||||||
|
<object class="GtkAdjustment" id="latitude_adjust">
|
||||||
|
<property name="upper">90</property>
|
||||||
|
<property name="step_increment">0.10000000000000001</property>
|
||||||
|
<property name="page_increment">5</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="longitude_adjust">
|
||||||
|
<property name="upper">180</property>
|
||||||
|
<property name="step_increment">0.10000000000000001</property>
|
||||||
|
<property name="page_increment">5</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="year_adjust">
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="month_adjust">
|
||||||
|
<property name="lower">1</property>
|
||||||
|
<property name="upper">12</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
<property name="value">1</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="day_adjust">
|
||||||
|
<property name="lower">1</property>
|
||||||
|
<property name="upper">31</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
<property name="value">1</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="hour_adjust">
|
||||||
|
<property name="upper">23</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="minute_adjust">
|
||||||
|
<property name="upper">59</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="second_adjust">
|
||||||
|
<property name="upper">61</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkAdjustment" id="timezone_adjust">
|
||||||
|
<property name="lower">-12</property>
|
||||||
|
<property name="upper">12</property>
|
||||||
|
<property name="step_increment">1</property>
|
||||||
|
<property name="page_increment">10</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkTextBuffer" id="note_buffer">
|
||||||
|
</object>
|
||||||
|
<object class="GtkEntryCompletion" id="country_comp">
|
||||||
|
<property name="inline_completion">True</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkEntryCompletion" id="city_comp">
|
||||||
|
<property name="inline_completion">True</property>
|
||||||
|
</object>
|
||||||
|
<template class="AgChartEdit" parent="GtkGrid">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="name_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">Name</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkEntry" id="name">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<signal name="changed" handler="ag_chart_edit_name_changed_cb" object="AgChartEdit" swapped="no"/>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame" id="location_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="location_frame_label">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</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_chart_edit_country_changed_cb" 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_chart_edit_city_changed_cb" 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>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">0</property>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</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 -->
|
||||||
|
</template>
|
||||||
|
</interface>
|
@ -57,55 +57,6 @@
|
|||||||
</item>
|
</item>
|
||||||
</section>
|
</section>
|
||||||
</menu>
|
</menu>
|
||||||
<object class="GtkAdjustment" id="latitude_adjust">
|
|
||||||
<property name="upper">90</property>
|
|
||||||
<property name="step_increment">0.10000000000000001</property>
|
|
||||||
<property name="page_increment">5</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="longitude_adjust">
|
|
||||||
<property name="upper">180</property>
|
|
||||||
<property name="step_increment">0.10000000000000001</property>
|
|
||||||
<property name="page_increment">5</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="year_adjust">
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">10</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="month_adjust">
|
|
||||||
<property name="lower">1</property>
|
|
||||||
<property name="upper">12</property>
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">10</property>
|
|
||||||
<property name="value">1</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="day_adjust">
|
|
||||||
<property name="lower">1</property>
|
|
||||||
<property name="upper">31</property>
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">10</property>
|
|
||||||
<property name="value">1</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="hour_adjust">
|
|
||||||
<property name="upper">23</property>
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">10</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="minute_adjust">
|
|
||||||
<property name="upper">59</property>
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">10</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="second_adjust">
|
|
||||||
<property name="upper">61</property>
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">10</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkAdjustment" id="timezone_adjust">
|
|
||||||
<property name="lower">-12</property>
|
|
||||||
<property name="upper">12</property>
|
|
||||||
<property name="step_increment">1</property>
|
|
||||||
<property name="page_increment">10</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkListStore" id="house_system_model">
|
<object class="GtkListStore" id="house_system_model">
|
||||||
<columns>
|
<columns>
|
||||||
<!-- column-name house-system-id -->
|
<!-- column-name house-system-id -->
|
||||||
@ -122,14 +73,6 @@
|
|||||||
<column type="gchararray"/>
|
<column type="gchararray"/>
|
||||||
</columns>
|
</columns>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkTextBuffer" id="note_buffer">
|
|
||||||
</object>
|
|
||||||
<object class="GtkEntryCompletion" id="country_comp">
|
|
||||||
<property name="inline_completion">True</property>
|
|
||||||
</object>
|
|
||||||
<object class="GtkEntryCompletion" id="city_comp">
|
|
||||||
<property name="inline_completion">True</property>
|
|
||||||
</object>
|
|
||||||
<template class="AgWindow" parent="GtkApplicationWindow">
|
<template class="AgWindow" parent="GtkApplicationWindow">
|
||||||
<property name="can_focus">False</property>
|
<property name="can_focus">False</property>
|
||||||
<property name="has_focus">False</property>
|
<property name="has_focus">False</property>
|
||||||
@ -359,439 +302,8 @@
|
|||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid" id="tab_edit">
|
<object class="AgChartEdit" id="tab_edit">
|
||||||
<property name="visible">True</property>
|
<signal name="name-changed" handler="ag_window_name_changed_cb" object="AgWindow" swapped="no"/>
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel" id="name_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</property>
|
|
||||||
<property name="label" translatable="yes">Name</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkEntry" id="name">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<signal name="changed" handler="ag_window_name_changed_cb" object="AgWindow" swapped="no"/>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="top_attach">0</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkFrame" id="location_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="location_frame_label">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">False</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>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">0</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</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>
|
||||||
|
Loading…
Reference in New Issue
Block a user