mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Show statistics of selected dives
If at least 2 dives are selected, show statistics of these dives on Overall Stats. Otherwise, show the statistics of all dives. Temperature is also added to the shown statistics. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Minor change to avoid adding statistics.h (moved the global variable and external function declaration to display-gtk.h). Another minor change to the text displayed for the "Stats" notebook page. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2d88353b59
commit
9933ccd7cf
4 changed files with 117 additions and 36 deletions
|
|
@ -73,6 +73,7 @@ static void selection_cb(GtkTreeSelection *selection, GtkTreeModel *model)
|
|||
return;
|
||||
case 1:
|
||||
/* just pick that dive as selected */
|
||||
amount_selected = 1;
|
||||
path = g_list_nth_data(selected_dives, 0);
|
||||
if (gtk_tree_model_get_iter(model, &iter, path)) {
|
||||
gtk_tree_model_get_value(model, &iter, DIVE_INDEX, &value);
|
||||
|
|
@ -86,6 +87,9 @@ static void selection_cb(GtkTreeSelection *selection, GtkTreeModel *model)
|
|||
* is the most intuitive solution.
|
||||
* I do however want to keep around which dives have
|
||||
* been selected */
|
||||
amount_selected = g_list_length(selected_dives);
|
||||
process_selected_dives(selected_dives, model);
|
||||
repaint_dive();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue