]> git.tdb.fi Git - ext/subsurface.git/blobdiff - divelist.c
Round the maximum depth on dive list
[ext/subsurface.git] / divelist.c
index 3976382aa93f58e510bd159ca2de7e3bb0d74d10..d311aee17a0de144dadbadc6eddfba90b261f16c 100644 (file)
@@ -160,8 +160,9 @@ static void depth_data_func(GtkTreeViewColumn *col,
                frac = depth % 10;
                if (integer < 20)
                        break;
+               if (frac >= 5)
+                       integer++;
                frac = -1;
-               /* Rounding? */
                break;
        case FEET:
                integer = mm_to_feet(depth) + 0.5;
@@ -593,7 +594,7 @@ GtkWidget *dive_list_create(void)
        dive_list.nr = divelist_column(&dive_list, DIVE_NR, "#", NULL, PANGO_ALIGN_RIGHT, TRUE);
        gtk_tree_view_column_set_sort_column_id(dive_list.nr, -1);
        dive_list.date = divelist_column(&dive_list, DIVE_DATE, "Date", date_data_func, PANGO_ALIGN_LEFT, TRUE);
-       dive_list.stars = divelist_column(&dive_list, DIVE_RATING, "Rating", star_data_func, PANGO_ALIGN_LEFT, TRUE);
+       dive_list.stars = divelist_column(&dive_list, DIVE_RATING, UTF8_BLACKSTAR, star_data_func, PANGO_ALIGN_LEFT, TRUE);
        dive_list.depth = divelist_column(&dive_list, DIVE_DEPTH, "ft", depth_data_func, PANGO_ALIGN_RIGHT, TRUE);
        dive_list.duration = divelist_column(&dive_list, DIVE_DURATION, "min", duration_data_func, PANGO_ALIGN_RIGHT, TRUE);
        dive_list.temperature = divelist_column(&dive_list, DIVE_TEMPERATURE, UTF8_DEGREE "F", temperature_data_func, PANGO_ALIGN_RIGHT, visible_cols.temperature);