[PULL REQUEST] Delete multiple dives

Lubomir I. Ivanov neolit123 at gmail.com
Sun Sep 23 18:09:08 PDT 2012


On 23 September 2012 19:08, Dirk Hohndel <dirk at hohndel.org> wrote:
> It kind of does, but I wonder if it wouldn't be better to use the existing helper functions for things like this.
>
> Take a look at update_trip_timestamp() - it also shows you that you don't have to loop over the whole dive table as all you need to look at are the first and last child of the trip node in the tree model.
>

here is another alternative (last ?) attempt. update_trip_timestamp()
is used, however this one is in fact more code and probably slower
that the previous one in some cases.

you can only grab the first 1 & 2 and give the trip "when" update a go
with something better, perhaps.
i may be missing a very obvious way to do it, of course...

i had a bit of a "GTK moment", explained in the commit log of 3. in short:
- GTK's methods for selection manipulation are a bit problematic.
- update_trip_timestamp(), only works with an updated tree i.e. the
"first and last dive only" concept.

lubomir
--

The following changes since commit c4c636fb4ffa942f282d57556a579de311b96c43:

  Fix missing save of (almost empty) cylinder information (2012-09-21
21:01:42 -0700)

are available in the git repository at:

  git at github.com:neolit123/subsurface.git delmulti

for you to fetch changes up to 9036f3f80e32dc72280e6b9f6ff4560171210331:

  Update the trip's "when" flag after deleting a dive from it
(2012-09-24 03:41:18 +0300)

----------------------------------------------------------------
Lubomir I. Ivanov (3):
      Added different delete label when right clicking multiple drives
      Added the functionality to delete selected (multiple) dives
      Update the trip's "when" flag after deleting a dive from it

 divelist.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 84 insertions(+), 14 deletions(-)


More information about the subsurface mailing list