pull-request: trip management, next try

Dirk Hohndel dirk at hohndel.org
Mon Sep 3 10:35:23 PDT 2012


Henrik Brautaset Aronsen <subsurface at henrik.synth.no> writes:

> At 02.09.12 21:16, Dirk Hohndel wrote:
>> I don't think so. I think trip haters should have the ability to turn
>> the auto generation of trips off.
>
> I don't hate trips.  I just want to be in control of them. Especially: I 
> want to be able to group my dive trips into groups, and keep the other 
> dives outside any groups (at the top level), at the same time.  That 
> doesn't seem to be possible now.
>
>
> At 03.09.12 07:00, Dirk Hohndel wrote:
>> here's the next attempt. This adds the menu item that Linus asked for
>> and it fixes the crash that Miika found.
>
> If I import the test dives ("Autogroup" off), ("Automatic grouping" on), 
> the dives are grouped. When I enable "Autogroup", the groups disappear.  
> If I disable it again, the groups reappear.  Shouldn't it be the other 
> way around?
>
> Also, Subsurface crashed when I removed a topmost dive from a group:
>
> Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
> 0   org.hohndel.subsurface            0x000000010735887e 
> move_dive_between_trips + 430 (divelist.c:1297)
> 1   org.hohndel.subsurface            0x0000000107358fe6 
> insert_trip_before + 1078 (divelist.c:1378)
> 2   org.hohndel.subsurface            0x00000001073591bb 
> remove_from_trip_cb + 219 (divelist.c:1416)
> 3   libgobject-2.0.0.dylib            0x0000000107fa3104 
> g_closure_invoke + 308

So this is fixed as well. Two different issues. For one thing, as I
noted, the test dives were just wrong (date but no time in the trip
entries).
We also had a code path where we would dereference child nodes on a tree
node that doesn't have children.

Here's yet again the latest pull request...

/D

The following changes since commit 6a210e573d947d61172da0363cbd7832e5459323:

  Add support for printing only the selected dives (2012-08-30 09:30:59 -0700)

are available in the git repository at:

  git://git.hohndel.org/subsurface.git trip3

for you to fetch changes up to 2a1d7a510c60ad26e456b40e4f34caeb145339e3:

  Correct the trip related test dives (2012-09-03 10:31:25 -0700)

----------------------------------------------------------------
Dirk Hohndel (10):
      Store time_t as long value
      Clean up macros and auxiliary functions
      Allow modification and edits of trips
      Use truth values with gboolean
      Fix a crash when changing sort column
      Add autogen menu command
      Fix copy_tree_node to no longer overwrite dive duration
      Correctly initialize the toggle state of the autogroup menu entry
      Fix crash when removing the first dive of a trip
      Correct the trip related test dives

 dive.h           |  42 ++++--
 divelist.c       | 570 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------
 divelist.h       |   1 +
 dives/test21.xml |   2 +-
 dives/test22.xml |   2 +-
 dives/test23.xml |   9 +-
 gtk-gui.c        |  18 ++-
 info.c           |  62 ++++++++-
 parse-xml.c      |   8 +-
 save-xml.c       |   4 +-
 10 files changed, 627 insertions(+), 91 deletions(-)


More information about the subsurface mailing list