|
From: <md...@us...> - 2013-01-19 21:16:15
|
Revision: 5341
http://navit.svn.sourceforge.net/navit/?rev=5341&view=rev
Author: mdankov
Date: 2013-01-19 21:16:08 +0000 (Sat, 19 Jan 2013)
Log Message:
-----------
Fix:gui_internal:Do not crash in POI filter if Navigation map is enabled.
Modified Paths:
--------------
trunk/navit/navit/gui/internal/gui_internal_poi.c
Modified: trunk/navit/navit/gui/internal/gui_internal_poi.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-01-19 18:56:41 UTC (rev 5340)
+++ trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-01-19 21:16:08 UTC (rev 5341)
@@ -386,7 +386,6 @@
}
long_name=removecase(s);
g_free(s);
- item_attr_rewind(item);
match=0;
for(i=0;i<3 && !match;i++) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2013-02-20 21:17:55
|
Revision: 5388
http://navit.svn.sourceforge.net/navit/?rev=5388&view=rev
Author: mdankov
Date: 2013-02-20 21:17:49 +0000 (Wed, 20 Feb 2013)
Log Message:
-----------
Fix:gui_internal:Fix regression of svn5341, include item labels in filtered POI list.
Modified Paths:
--------------
trunk/navit/navit/gui/internal/gui_internal_poi.c
Modified: trunk/navit/navit/gui/internal/gui_internal_poi.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-02-20 21:09:13 UTC (rev 5387)
+++ trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-02-20 21:17:49 UTC (rev 5388)
@@ -595,7 +595,7 @@
struct item_data *data;
struct attr attr;
char *label;
-
+ item_attr_rewind(item);
if (item->type==type_house_number) {
label=gui_internal_compose_item_address_string(item);
} else if (item_attr_get(item, attr_label, &attr)) {
@@ -674,7 +674,7 @@
gui_internal_widget_append(row,wi);
row->datai=data->dist;
gui_internal_widget_prepend(wtable,row);
- free(data->label);
+ g_free(data->label);
}
fh_deleteheap(fh);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <xen...@us...> - 2013-06-01 05:48:27
|
Revision: 5523
http://navit.svn.sourceforge.net/navit/?rev=5523&view=rev
Author: xenos1984
Date: 2013-06-01 05:48:15 +0000 (Sat, 01 Jun 2013)
Log Message:
-----------
Fix:gui/internal:Load POI icon from icon_src field for custom POIs.
Modified Paths:
--------------
trunk/navit/navit/gui/internal/gui_internal_poi.c
Modified: trunk/navit/navit/gui/internal/gui_internal_poi.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-05-31 20:09:28 UTC (rev 5522)
+++ trunk/navit/navit/gui/internal/gui_internal_poi.c 2013-06-01 05:48:15 UTC (rev 5523)
@@ -84,9 +84,10 @@
*/
static struct graphics_image *
-gui_internal_poi_icon(struct gui_priv *this, enum item_type type)
+gui_internal_poi_icon(struct gui_priv *this, struct item *item)
{
struct attr layout;
+ struct attr icon_src;
GList *layer;
navit_get_attr(this->nav, attr_layout, &layout, NULL);
layer=layout.u.layout->layers;
@@ -95,15 +96,32 @@
while(itemgra) {
GList *types=((struct itemgra *)itemgra->data)->type;
while(types) {
- if((long)types->data==type) {
+ if((long)types->data==item->type) {
GList *element=((struct itemgra *)itemgra->data)->elements;
while(element) {
struct element * el=element->data;
if(el->type==element_icon) {
+ char *src;
+ char *icon;
struct graphics_image *img;
- char *icon=g_strdup(el->u.icon.src);
+ if(item_is_custom_poi(*item)) {
+ struct map_rect *mr=map_rect_new(item->map, NULL);
+ item=map_rect_get_item_byid(mr, item->id_hi, item->id_lo);
+ if(item_attr_get(item, attr_icon_src, &icon_src)) {
+ src=el->u.icon.src;
+ if(!src || !src[0])
+ src="%s";
+ icon=g_strdup_printf(src,icon_src.u.str);
+ }
+ else {
+ icon=g_strdup(el->u.icon.src);
+ }
+ }
+ else {
+ icon=g_strdup(el->u.icon.src);
+ }
char *dot=g_strrstr(icon,".");
- dbg(2,"%s %s\n", item_to_name(type),icon);
+ dbg(2,"%s %s\n", item_to_name(item->type),icon);
if(dot)
*dot=0;
img=image_new_xs(this,icon);
@@ -310,7 +328,7 @@
type=item_to_name(item->type);
- icon=gui_internal_poi_icon(this,item->type);
+ icon=gui_internal_poi_icon(this,item);
if(!icon) {
icon=image_new_xs(this,"gui_inactive");
text=g_strdup_printf("%s%s%s%s %s", distbuf, dirbuf, routedistbuf, type, name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <md...@us...> - 2014-08-09 11:47:02
|
Revision: 5852
http://sourceforge.net/p/navit/code/5852
Author: mdankov
Date: 2014-08-09 11:46:58 +0000 (Sat, 09 Aug 2014)
Log Message:
-----------
Fix:gui/internal:Do not flood initial POI list with house number objects.
Modified Paths:
--------------
trunk/navit/navit/gui/internal/gui_internal_poi.c
Modified: trunk/navit/navit/gui/internal/gui_internal_poi.c
===================================================================
--- trunk/navit/navit/gui/internal/gui_internal_poi.c 2014-08-08 23:12:02 UTC (rev 5851)
+++ trunk/navit/navit/gui/internal/gui_internal_poi.c 2014-08-09 11:46:58 UTC (rev 5852)
@@ -405,6 +405,8 @@
types+=2;
}
}
+ if(type == type_house_number && !param->filter)
+ return 0;
if (param->filter) {
char *long_name, *s;
GList *f;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|