Opened 10 years ago

Closed 8 years ago

#1113 closed enhancement/feature request (fixed)

I made a patch to search POI's in Gtk. Please commit it

Reported by: Owned by: cp15
Priority: major Milestone: version 0.5.0
Component: gui/gtk Version: git master
Severity: normal Keywords: gtk, poi, search


Hi I made a path to give support to search POI's in GTK
You can put the distance and select the category
If some poi is found and you select it, you can see the map, set destination and visit before your destination.
I hope you like it and commit it soon
See you

Attachments (1)

gtk_gui_poi.diff (23.8 KB) - added by 10 years ago.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by

comment:1 Changed 10 years ago by

Hi I attach again the gtk_gui_poi.diff, due to there was a conflict with later svn changes.
The patch works now with release 5463

comment:2 Changed 10 years ago by

  • Owner turulomio deleted

comment:3 Changed 10 years ago by usul

  • Keywords gtk poi search added
  • Owner set to cp15

Thanks for your commit :)

Please wait for feedback on the final code review.

comment:4 Changed 9 years ago by sleske

  • Severity set to normal

I'll have a look at the patch. Sorry this took so long. I'll post an update in the next days.

comment:5 Changed 8 years ago by sleske

The patch looks fine, except for a few details. I fixed some cosmetic issues (comments, variable names, some UI strings). I'll probably commit everything shortly.

One question about the code in the patch:

In gui_gtk_poi.c, function model_poi there is this code:

 //Searches if vehicle has coord_geo to show distance from vehicle.
 //If vehicle hasn't coord_geo show distance from center of screen
 navit_get_attr(search->nav,attr_vehicle, &vehicle_attr,NULL);

 vehicle_get_attr(v,attr_position_coord_geo, &attr, NULL);
 if (attr.u.coord_geo->lng==0.0f && attr.u.coord_geo->lat==0.0f){
                _("Distance from center screen (Km)"));
                _("Distance from vehicle cursor (Km)"));

The comment seems to indicate that we want to show distance from the vehicle position if a position is available. However, in the code the vehicle position is not actually used (except for the printf) - the if and else branches do practically the same thing.

How is that supposed to work? Should I just delete it?

comment:6 Changed 8 years ago by sleske

  • Resolution set to fixed
  • Status changed from new to closed

The patch has been committed as rev. 5859. I also committed some additional fixes and small additions in the following commits.

For now I have deleted the code indicated in the previous comment (the vehicle position check), as it did not seem useful. If we can use it later, we can always get it back.

Thanks for the patch, and sorry it took so long.

Note: See TracTickets for help on using tickets.