#include "settings.h"
#include "db.h"
#include "bluetooth-scan.h"
-#include "hildon-wrappers.h"
-#include "help.h"
#include "osm-db.h"
#include "settings-gui.h"
+#include "config-gconf.h"
+#include "hildon-wrappers.h"
+#include "help.h"
#include "dialogs.h"
typedef struct _KeysDialogInfo KeysDialogInfo;
GpsIOSourceType type;
guint dport;
-if (gtk_combo_box_get_active_iter(gdi->cmb_gps_type, &gdi->iter)==FALSE)
+if (gtk_combo_box_get_active_iter(GTK_COMBO_BOX(gdi->cmb_gps_type), &gdi->iter)==FALSE)
return TRUE;
gtk_tree_model_get(GTK_TREE_MODEL(gdi->store), &gdi->iter, 0, &type, 2, &scan, 3, &address, 4, &port, 5, &dport, -1);
gtk_widget_hideshow(gdi->btn_scan, scan);
gtk_widget_hideshow(gdi->txt_rcvr_mac, address);
gtk_widget_hideshow(gdi->spn_rcvr_port, port);
-if (port && dport!=0 && (guint)gtk_spin_button_get_value(gdi->spn_rcvr_port)==0)
- gtk_spin_button_set_value(gdi->spn_rcvr_port, (guint)dport);
+if (port && dport!=0 && (guint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(gdi->spn_rcvr_port))==0)
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(gdi->spn_rcvr_port), (guint)dport);
return TRUE;
}
g_signal_connect(G_OBJECT(gdi.cmb_gps_type), "changed", G_CALLBACK(gps_type_changed_cb), &gdi);
gtk_entry_set_text(GTK_ENTRY(gdi.txt_rcvr_mac), gps->io.address ? gps->io.address : "");
-gtk_spin_button_set_value(gdi.spn_rcvr_port, gps->io.port);
+gtk_spin_button_set_value(GTK_SPIN_BUTTON(gdi.spn_rcvr_port), gps->io.port);
gtk_window_set_default_size(GTK_WINDOW(dialog), 500, -1);
gtk_widget_show_all(dialog);
/* User specified a new rcvr mac. */
g_free(gps->io.address);
gps->io.address=g_strdup(gtk_entry_get_text(GTK_ENTRY(gdi.txt_rcvr_mac)));
- gps->io.port=(guint)gtk_spin_button_get_value(gdi.spn_rcvr_port);
+ gps->io.port=(guint)gtk_spin_button_get_value(GTK_SPIN_BUTTON(gdi.spn_rcvr_port));
rcvr_changed=TRUE;
}
force_min_visible_bars(HILDON_CONTROLBAR(num_sens), 1);
gtk_entry_set_text(GTK_ENTRY(txt_mapper_db), _mapper_db ? _mapper_db : "");
+hildon_controlbar_set_value(HILDON_CONTROLBAR(num_sens), _map_location_sens);
browse_info.dialog=dialog;
browse_info.txt=txt_mapper_db;
_mapper_db=NULL;
}
+ _map_location_sens=hildon_controlbar_get_value(HILDON_CONTROLBAR(num_sens));
config_save();
}
gtk_widget_destroy(dialog);
GtkWidget *notebook;
GtkWidget *table;
GtkWidget *hbox;
+GtkWidget *vbox;
GtkWidget *hbox2;
GtkWidget *label;
GtkWidget *num_center_ratio;
GtkWidget *chk_speed_on;
GtkWidget *num_speed;
GtkWidget *cmb_info_font_size;
+
+GtkWidget *announce_destination;
+GtkWidget *announce_overspeed;
+GtkWidget *announce_waypoints;
guint i;
dialog=gtk_dialog_new_with_buttons(_("Settings"), GTK_WINDOW(_window), GTK_DIALOG_MODAL,
hildon_controlbar_set_range(HILDON_CONTROLBAR(num_announce_notice), 1, 20);
force_min_visible_bars(HILDON_CONTROLBAR(num_announce_notice), 1);
-gtk_table_attach(GTK_TABLE(table), announce_speed=gtk_check_button_new_with_label(_("Enable speed announcements")), 0, 2, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
+gtk_table_attach(GTK_TABLE(table), vbox=gtk_vbox_new(FALSE, 4), 0, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 6);
+gtk_box_pack_start(GTK_BOX(vbox), announce_waypoints=gtk_check_button_new_with_label(_("Enable waypoint announcements")), TRUE, TRUE, 4);
+gtk_box_pack_start(GTK_BOX(vbox), announce_destination=gtk_check_button_new_with_label(_("Enable destination announcements")), TRUE, TRUE, 4);
+gtk_box_pack_start(GTK_BOX(vbox), announce_overspeed=gtk_check_button_new_with_label(_("Enable overspeed announcements")), TRUE, TRUE, 4);
/* Voice page */
gtk_notebook_append_page(GTK_NOTEBOOK(notebook), table=gtk_table_new(2, 3, FALSE), label=gtk_label_new(_("Voice")));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(chk_enable_voice), _enable_voice);
/* Voice Speed and Pitch. */
-gtk_table_attach(GTK_TABLE(table), hbox=gtk_hbox_new(FALSE, 12), 0, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 6);
+gtk_table_attach(GTK_TABLE(table), hbox=gtk_hbox_new(FALSE, 4), 0, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 6);
gtk_box_pack_start(GTK_BOX(hbox), hbox2=gtk_hbox_new(FALSE, 4), TRUE, TRUE, 4);
gtk_box_pack_start(GTK_BOX(hbox2), lbl_voice_speed=gtk_label_new(_("Speed (words/minute)")), TRUE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(hbox2), num_voice_speed=hildon_number_editor_new(80, 370), TRUE, TRUE, 0);