return TRUE;
}
+void gps_details_dialog(void)
+{
+GtkWidget *dialog;
+
+dialog = gtk_dialog_new_with_buttons(_("GPS Details"),
+ GTK_WINDOW(_window),
+ GTK_DIALOG_MODAL, GTK_STOCK_OK,
+ GTK_RESPONSE_ACCEPT, NULL);
+
+gtk_window_set_default_size(GTK_WINDOW(dialog), 600, 300);
+
+gtk_widget_show_all(dialog);
+_satdetails_on = TRUE;
+gps_display_details();
+while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) {
+ _satdetails_on = FALSE;
+ break;
+}
+gtk_widget_destroy(dialog);
+
+}
+
void gps_details(void)
{
- GtkWidget *dialog;
- GtkWidget *table;
- GtkWidget *label;
- GtkWidget *notebook;
- printf("%s()\n", __PRETTY_FUNCTION__);
+GtkWidget *dialog;
+GtkWidget *table;
+GtkWidget *label;
+GtkWidget *notebook;
+printf("%s()\n", __PRETTY_FUNCTION__);
- dialog = gtk_dialog_new_with_buttons(_("GPS Details"),
- GTK_WINDOW(_window),
- GTK_DIALOG_MODAL, GTK_STOCK_OK,
- GTK_RESPONSE_ACCEPT, NULL);
-
- gtk_window_set_default_size(GTK_WINDOW(dialog), 600, 300);
-
- gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
- notebook = gtk_notebook_new(), TRUE, TRUE, 0);
-
- /* textual info */
- gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
- table = gtk_table_new(4, 6, FALSE),
- label = gtk_label_new(_("GPS Information")));
-
- _sat_details_panel = gtk_drawing_area_new();
- gtk_widget_set_size_request(_sat_details_panel, 300, 300);
- /* sat details info */
- gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
- _sat_details_panel,
- label =
- gtk_label_new(_("Satellites details")));
- g_signal_connect(G_OBJECT(_sat_details_panel), "expose_event",
- G_CALLBACK(sat_details_panel_expose), NULL);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Latitude")),
- 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_lat = gtk_label_new(" --- "),
- 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_lat), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Longitude")),
- 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_lon = gtk_label_new(" --- "),
- 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_lon), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Speed")),
- 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_spd = gtk_label_new(" --- "),
- 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_spd), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Altitude")),
- 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_alt = gtk_label_new(" --- "),
- 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_alt), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Heading")),
- 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_hea = gtk_label_new(" --- "),
- 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_hea), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Local time")),
- 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_tim = gtk_label_new(" --:--:-- "),
- 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_tim), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Sat in view")),
- 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_vie = gtk_label_new("0"),
- 3, 4, 0, 1, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_vie), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Sat in use")),
- 2, 3, 1, 2, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_use = gtk_label_new("0"),
- 3, 4, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_use), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Fix")),
- 2, 3, 2, 3, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_fix = gtk_label_new(_("nofix")),
- 3, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_fix), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Fix Quality")),
- 2, 3, 3, 4, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_fqu = gtk_label_new(_("none")),
- 3, 4, 3, 4, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_fqu), 0.f, 0.5f);
-
- gtk_table_attach(GTK_TABLE(table),
- label = gtk_label_new(_("Max speed")),
- 2, 3, 5, 6, GTK_EXPAND | GTK_FILL, 0, 20, 4);
- gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table),
- _sdi_msp = gtk_label_new(" --- "),
- 3, 4, 5, 6, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- gtk_misc_set_alignment(GTK_MISC(_sdi_msp), 0.f, 0.5f);
-
- gtk_widget_show_all(dialog);
- _satdetails_on = TRUE;
- gps_display_details();
- while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) {
- _satdetails_on = FALSE;
- break;
- }
- gtk_widget_destroy(dialog);
+dialog = gtk_dialog_new_with_buttons(_("GPS Details"),
+ GTK_WINDOW(_window),
+ GTK_DIALOG_MODAL, GTK_STOCK_OK,
+ GTK_RESPONSE_ACCEPT, NULL);
+
+gtk_window_set_default_size(GTK_WINDOW(dialog), 600, 300);
+gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+ notebook = gtk_notebook_new(), TRUE, TRUE, 0);
+
+/* textual info */
+gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
+ table = gtk_table_new(4, 6, FALSE),
+ label = gtk_label_new(_("GPS Information")));
+
+_sat_details_panel = gtk_drawing_area_new();
+gtk_widget_set_size_request(_sat_details_panel, 300, 300);
+/* sat details info */
+gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
+ _sat_details_panel,
+ label = gtk_label_new(_("Satellites details")));
+g_signal_connect(G_OBJECT(_sat_details_panel), "expose_event",
+ G_CALLBACK(sat_details_panel_expose), NULL);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Latitude")),
+ 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_lat = gtk_label_new(" --- "),
+ 1, 2, 0, 1, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_lat), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Longitude")),
+ 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_lon = gtk_label_new(" --- "),
+ 1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_lon), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Speed")),
+ 0, 1, 2, 3, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_spd = gtk_label_new(" --- "),
+ 1, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_spd), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Altitude")),
+ 0, 1, 3, 4, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_alt = gtk_label_new(" --- "),
+ 1, 2, 3, 4, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_alt), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Heading")),
+ 0, 1, 4, 5, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_hea = gtk_label_new(" --- "),
+ 1, 2, 4, 5, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_hea), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Local time")),
+ 0, 1, 5, 6, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_tim = gtk_label_new(" --:--:-- "),
+ 1, 2, 5, 6, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_tim), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Sat in view")),
+ 2, 3, 0, 1, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_vie = gtk_label_new("0"),
+ 3, 4, 0, 1, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_vie), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Sat in use")),
+ 2, 3, 1, 2, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_use = gtk_label_new("0"),
+ 3, 4, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_use), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Fix")),
+ 2, 3, 2, 3, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_fix = gtk_label_new(_("nofix")),
+ 3, 4, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_fix), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Fix Quality")),
+ 2, 3, 3, 4, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_fqu = gtk_label_new(_("none")),
+ 3, 4, 3, 4, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_fqu), 0.f, 0.5f);
+
+gtk_table_attach(GTK_TABLE(table),
+ label = gtk_label_new(_("Max speed")),
+ 2, 3, 5, 6, GTK_EXPAND | GTK_FILL, 0, 20, 4);
+gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
+gtk_table_attach(GTK_TABLE(table),
+ _sdi_msp = gtk_label_new(" --- "),
+ 3, 4, 5, 6, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_misc_set_alignment(GTK_MISC(_sdi_msp), 0.f, 0.5f);
+
+gtk_widget_show_all(dialog);
+_satdetails_on = TRUE;
+gps_display_details();
+while (GTK_RESPONSE_ACCEPT == gtk_dialog_run(GTK_DIALOG(dialog))) {
+ _satdetails_on = FALSE;
+ break;
+}
+gtk_widget_destroy(dialog);
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
+vprintf("%s(): return\n", __PRETTY_FUNCTION__);
}