{
printf("%s()\n", __PRETTY_FUNCTION__);
- poi_dialog(ACTION_ADD_POI,
- x2unit(_cmenu_position_x), y2unit(_cmenu_position_y));
+ poi_dialog(ACTION_ADD_POI, x2unit(_cmenu_position_x), y2unit(_cmenu_position_y));
+
+ vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
+ return TRUE;
+}
+
+gboolean cb_add_poi(GtkAction * action)
+{
+ printf("%s()\n", __PRETTY_FUNCTION__);
+
+ poi_dialog(ACTION_ADD_POI, _gps.lat, _gps.lon);
vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
WayPoint *way;
printf("%s()\n", __PRETTY_FUNCTION__);
- if ((way = find_nearest_waypoint(x2unit(_cmenu_position_x),
- y2unit(_cmenu_position_y))))
- poi_dialog(ACTION_ADD_POI, way->point->unitx,
- way->point->unity);
+ if ((way = find_nearest_waypoint(x2unit(_cmenu_position_x), y2unit(_cmenu_position_y))))
+ poi_dialog(ACTION_ADD_POI, way->point->unitx, way->point->unity);
vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
PoiInfo poi;
printf("%s()\n", __PRETTY_FUNCTION__);
- if (select_poi
- (x2unit(_cmenu_position_x), y2unit(_cmenu_position_y), &poi)) {
+ if (select_poi(x2unit(_cmenu_position_x), y2unit(_cmenu_position_y), &poi)) {
guint unitx, unity;
latlon2unit(poi.lat, poi.lon, unitx, unity);
cmenu_distance_to(unitx, unity);
PoiInfo poi;
printf("%s()\n", __PRETTY_FUNCTION__);
- if (select_poi
- (x2unit(_cmenu_position_x), y2unit(_cmenu_position_y), &poi)) {
+ if (select_poi(x2unit(_cmenu_position_x), y2unit(_cmenu_position_y), &poi)) {
guint unitx, unity;
latlon2unit(poi.lat, poi.lon, unitx, unity);
cmenu_add_route(unitx, unity);
PoiInfo poi;
printf("%s()\n", __PRETTY_FUNCTION__);
- if (select_poi
- (x2unit(_cmenu_position_x), y2unit(_cmenu_position_y), &poi)) {
+ if (select_poi(x2unit(_cmenu_position_x), y2unit(_cmenu_position_y), &poi)) {
guint unitx, unity;
latlon2unit(poi.lat, poi.lon, unitx, unity);
cmenu_route_add_way(unitx, unity);
{
printf("%s()\n", __PRETTY_FUNCTION__);
- poi_dialog(ACTION_EDIT_POI,
- x2unit(_cmenu_position_x), y2unit(_cmenu_position_y));
+ poi_dialog(ACTION_EDIT_POI, x2unit(_cmenu_position_x), y2unit(_cmenu_position_y));
vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
{
GtkWidget *item;
-#if 0
-item = gtk_tool_button_new_from_stock (GTK_STOCK_REFRESH);
+item = gtk_tool_button_new_from_stock (GTK_STOCK_HOME);
+gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
+/* g_signal_connect (item, "clicked", G_CALLBACK (cb_jump_to_home), NULL); */
+
+item = gtk_tool_button_new_from_stock (GTK_STOCK_JUMP_TO);
+gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
+g_signal_connect (item, "clicked", G_CALLBACK (menu_cb_goto_gps), NULL);
+
+item = gtk_tool_button_new_from_stock (GTK_STOCK_GO_FORWARD);
+gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
+g_signal_connect (item, "clicked", G_CALLBACK (menu_cb_goto_nextway), NULL);
+
+item = gtk_separator_tool_item_new();
+gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
+
+item = gtk_tool_button_new_from_stock (GTK_STOCK_ADD);
+gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
+g_signal_connect (item, "clicked", G_CALLBACK (cb_add_poi), NULL);
+
+item = gtk_separator_tool_item_new();
gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
-g_signal_connect (item, "clicked", G_CALLBACK (gtk_main_quit), NULL);
-#endif
item = gtk_tool_button_new_from_stock (GTK_STOCK_ZOOM_IN);
gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);