]> err.no Git - mapper/commitdiff
Code formating fixes.
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 28 Jun 2007 12:41:25 +0000 (15:41 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 28 Jun 2007 12:41:25 +0000 (15:41 +0300)
Select POI icon and color.

src/poi.c

index 5ed882eec8784a9f7f3c498d239eaa37569450c5..95b87f17dce5b21de7ec5d52850479b66d4be823 100644 (file)
--- a/src/poi.c
+++ b/src/poi.c
@@ -148,7 +148,7 @@ poi_db_prepare(sqlite3 *db)
 
        /* select nearest pois */
        sqlite3_prepare(db,
-                       "select p.lat, p.lon, p.label, c.label"
+                       "select p.lat, p.lon, p.label, c.label, c.icon, c.color"
                        " from poi p, category c "
                        " where c.enabled = 1 and p.cat_id = c.cat_id "
                        " and p.lat between $LAT-0.15 and $LAT+0.15 "
@@ -167,16 +167,13 @@ poi_db_prepare(sqlite3 *db)
                        "cat_id = ? where poi_id = ?",
                        -1, &_stmt_update_poi, NULL);
        /* delete from poi */
-       sqlite3_prepare(db,
-                       " delete from poi where poi_id = ?",
+       sqlite3_prepare(db, "delete from poi where poi_id = ?",
                        -1, &_stmt_delete_poi, NULL);
        /* delete from poi by cat_id */
-       sqlite3_prepare(db,
-                       "delete from poi where cat_id = ?",
+       sqlite3_prepare(db, "delete from poi where cat_id = ?",
                        -1, &_stmt_delete_poi_by_catid, NULL);
        /* get next poilabel */
-       sqlite3_prepare(db,
-                       "select ifnull(max(poi_id) + 1,1) from poi",
+       sqlite3_prepare(db, "select ifnull(max(poi_id) + 1,1) from poi",
                        -1, &_stmt_nextlabel_poi, NULL);
 
        /* select from category */
@@ -194,8 +191,7 @@ poi_db_prepare(sqlite3 *db)
                        " enabled = ? where poi_id = ?",
                        -1, &_stmt_update_cat, NULL);
        /* delete from category */
-       sqlite3_prepare(db,
-                       "delete from category where cat_id = ?",
+       sqlite3_prepare(db,"delete from category where cat_id = ?",
                        -1, &_stmt_delete_cat, NULL);
        /* enable category */
        sqlite3_prepare(db,
@@ -203,7 +199,7 @@ poi_db_prepare(sqlite3 *db)
                        " where cat_id = ?", -1, &_stmt_toggle_cat, NULL);
        /* select all category */
        sqlite3_prepare(db,
-                       "select c.cat_id, c.label, c.desc, c.enabled,"
+                       "select c.cat_id, c.label, c.desc, c.enabled, c.icon, c.color,"
                        " count(p.poi_id)"
                        " from category c"
                        " left outer join poi p on c.cat_id = p.cat_id"