diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2012-09-13 11:43:20 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2012-09-13 11:45:21 -0700 |
commit | 63c36e5e11ffe1d7d701e58063ac848e8ee9e813 (patch) | |
tree | 394bd6112feb1b640776a5d0faeac6880287d2b1 /divelist.c | |
parent | 52e35b3aa838ea1198aec9a97c36cf3d167071a2 (diff) | |
download | subsurface-63c36e5e11ffe1d7d701e58063ac848e8ee9e813.tar.gz |
Mark divelist changed when modifying trips
This is just fixing an embarrassing oversight. Now we should prompt the
user about saving the file whenever something changes.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'divelist.c')
-rw-r--r-- | divelist.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/divelist.c b/divelist.c index 2364f5094..aedcdf03e 100644 --- a/divelist.c +++ b/divelist.c @@ -1432,6 +1432,7 @@ static void merge_dive_into_trip_above_cb(GtkWidget *menuitem, GtkTreePath *path if (!dive->selected || !prev_dive->selected) break; } + mark_divelist_changed(TRUE); } static void turn_dive_into_trip(GtkTreePath *path) @@ -1532,6 +1533,7 @@ static void insert_trip_before_cb(GtkWidget *menuitem, GtkTreePath *path) merge_dive_into_trip_above_cb(menuitem, next_path); } } + mark_divelist_changed(TRUE); } static void remove_from_trip(GtkTreePath *path) @@ -1630,6 +1632,7 @@ static void remove_from_trip_cb(GtkWidget *menuitem, GtkTreePath *path) /* just remove the dive the mouse pointer is on */ remove_from_trip(path); } + mark_divelist_changed(TRUE); } void remove_trip(GtkTreePath *trippath, gboolean force_no_trip) @@ -1678,6 +1681,7 @@ void remove_trip(GtkTreePath *trippath, gboolean force_no_trip) void remove_trip_cb(GtkWidget *menuitem, GtkTreePath *trippath) { remove_trip(trippath, TRUE); + mark_divelist_changed(TRUE); } void merge_trips_cb(GtkWidget *menuitem, GtkTreePath *trippath) @@ -1708,6 +1712,7 @@ void merge_trips_cb(GtkWidget *menuitem, GtkTreePath *trippath) free(DIVE_TRIP(trip)); delete_trip(trip); gtk_tree_store_remove(STORE(dive_list), &thistripiter); + mark_divelist_changed(TRUE); } /* this gets called with path pointing to a dive, either in the top level @@ -1755,6 +1760,7 @@ static void delete_dive_cb(GtkWidget *menuitem, GtkTreePath *path) gtk_tree_selection_select_path(selection, path); } } + mark_divelist_changed(TRUE); } static void popup_divelist_menu(GtkTreeView *tree_view, GtkTreeModel *model, int button, GdkEventButton *event) |