printf("%s()\n", __PRETTY_FUNCTION__);
confirm = hildon_note_new_confirmation(GTK_WINDOW(_window),
- _
- ("Reset all hardware keys to their original defaults?"));
+ _("Reset all hardware keys to their original defaults?"));
if (GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm))) {
gint i;
label = gtk_label_new(""),
0, 1, i, i + 1, GTK_FILL, 0, 2, 1);
gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
-#if 0
+#ifdef WITH_HILDON
gtk_label_set_markup(GTK_LABEL(label), CUSTOM_KEY_ICON[i]);
#endif
gtk_table_attach(GTK_TABLE(table),
GtkWidget *chk_gps_filter;
GtkWidget *num_angle;
- GtkWidget *num_hdop_ratio;
- GtkWidget *num_vdop_ratio;
+ GtkWidget *num_hdop;
+ GtkWidget *num_vdop;
GtkWidget *num_osm_dist;
BrowseInfo browse_info = { 0, 0 };
#ifdef WITH_HILDON
/* Enable the help button. */
ossohelp_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_SETTINGS, _osso);
-#endif
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
btn_buttons = gtk_button_new_with_label(_("Hardware Keys...")));
+#endif
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
btn_colors = gtk_button_new_with_label(_("Colors...")));
/* Note!. */
gtk_table_attach(GTK_TABLE(table),
- label =
- gtk_label_new(_
+ label = gtk_label_new(_
("Note: You can enter a device path\n"
"(e.g. \"/dev/rfcomm0\").")), 0, 2, 1,
2, GTK_FILL, 0, 2, 4);
gtk_table_attach(GTK_TABLE(table), label = gtk_label_new(_("Horizontal")),
0, 1, 1, 2, GTK_FILL, 0, 2, 4);
gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), num_hdop_ratio = hildon_controlbar_new(),
+ gtk_table_attach(GTK_TABLE(table), num_hdop = gtk_hscale_new_with_range(0, 200, 0.1),
1, 2, 1, 2, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- hildon_controlbar_set_range(HILDON_CONTROLBAR(num_hdop_ratio), 0, 200);
- force_min_visible_bars(HILDON_CONTROLBAR(num_hdop_ratio), 1);
gtk_table_attach(GTK_TABLE(table), label = gtk_label_new(_("Vertical")),
0, 1, 2, 3, GTK_FILL, 0, 2, 4);
gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), num_vdop_ratio = hildon_controlbar_new(),
+ gtk_table_attach(GTK_TABLE(table), num_vdop = gtk_hscale_new_with_range(0, 200, 0.1),
1, 2, 2, 3, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- hildon_controlbar_set_range(HILDON_CONTROLBAR(num_vdop_ratio), 0, 200);
- force_min_visible_bars(HILDON_CONTROLBAR(num_vdop_ratio), 1);
gtk_table_attach(GTK_TABLE(table), label = gtk_label_new(_("Angle")),
0, 1, 3, 4, GTK_FILL, 0, 2, 4);
gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), num_angle = hildon_controlbar_new(),
+ gtk_table_attach(GTK_TABLE(table), num_angle = gtk_hscale_new_with_range(0, 45, 0.5),
1, 2, 3, 4, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- hildon_controlbar_set_range(HILDON_CONTROLBAR(num_angle), 0, 45);
- force_min_visible_bars(HILDON_CONTROLBAR(num_angle), 1);
/* Distance to OSM data */
- gtk_table_attach(GTK_TABLE(table), label = gtk_label_new(_("OSM Data")),
+ gtk_table_attach(GTK_TABLE(table), label = gtk_label_new(_("Distance to OSM Data")),
0, 1, 4, 5, GTK_FILL, 0, 2, 4);
gtk_misc_set_alignment(GTK_MISC(label), 1.f, 0.5f);
- gtk_table_attach(GTK_TABLE(table), num_osm_dist = hildon_controlbar_new(),
+ gtk_table_attach(GTK_TABLE(table), num_osm_dist = gtk_hscale_new_with_range(0, 5000, 1),
1, 2, 4, 5, GTK_EXPAND | GTK_FILL, 0, 2, 4);
- hildon_controlbar_set_range(HILDON_CONTROLBAR(num_osm_dist), 0, 5000);
- force_min_visible_bars(HILDON_CONTROLBAR(num_osm_dist), 1);
/* Auto-Center page. */
gtk_notebook_append_page(GTK_NOTEBOOK(notebook),
gtk_combo_box_set_active(GTK_COMBO_BOX(cmb_speed_location), _speed_location);
gtk_combo_box_set_active(GTK_COMBO_BOX(cmb_info_font_size), _info_font_size);
- hildon_controlbar_set_value(HILDON_CONTROLBAR(num_hdop_ratio),(gint) _filter_hdop);
- hildon_controlbar_set_value(HILDON_CONTROLBAR(num_vdop_ratio),(gint) _filter_vdop);
- hildon_controlbar_set_value(HILDON_CONTROLBAR(num_angle),(gint) _filter_angle);
+ gtk_range_set_value(num_hdop, _filter_hdop);
+ gtk_range_set_value(num_vdop, _filter_vdop);
+ gtk_range_set_value(num_angle, _filter_angle);
+ gtk_range_set_value(num_osm_dist, _filter_osm);
gtk_widget_show_all(dialog);
_voice_pitch = hildon_controlbar_get_value(HILDON_CONTROLBAR(num_voice_pitch));
_enable_voice = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(chk_enable_voice));
- _filter_angle =(gfloat)hildon_controlbar_get_value(HILDON_CONTROLBAR(num_angle));
- _filter_hdop =(gfloat)hildon_controlbar_get_value(HILDON_CONTROLBAR(num_hdop_ratio));
- _filter_vdop =(gfloat)hildon_controlbar_get_value(HILDON_CONTROLBAR(num_vdop_ratio));
+ _filter_angle = gtk_range_get_value(GTK_RANGE(num_angle));
+ _filter_hdop = gtk_range_get_value(GTK_RANGE(num_hdop));
+ _filter_vdop = gtk_range_get_value(GTK_RANGE(num_vdop));
+ _filter_osm = gtk_range_get_value(GTK_RANGE(num_osm_dist));
_gps_filter = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(chk_gps_filter));
if (_db) {
break;
}
- gtk_widget_destroy(dialog); /* Destroying causes a crash (!?!?!??!) huh?*/
+#ifndef WITH_HILDON
+ /* Destroying causes a crash (!?!?!??!) huh? in hildon only, plain gtk is ok so...*/
+ gtk_widget_destroy(dialog);
+#endif
vprintf("%s(): return %d\n", __PRETTY_FUNCTION__, rcvr_changed);
return rcvr_changed;