Commit graph

3481 commits

Author SHA1 Message Date
Dirk Hohndel
ca819b2a09 Updated instructions for cross building Windows binaries under Linux
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:49:23 -08:00
Dirk Hohndel
d2af6054a3 Make a note about the plugin location issue on Mac
In order to be able to create deployable DMGs this is necessary

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 16:37:06 -08:00
Anton Lundin
9b5c7c2bbe Only return gas volumes for gases used
We check in get_gaslist is_gas_used, so if were going to be consistent
about what we return from get_gaslist and in get_gas_used, only return
gas volumes that we actually consumed during the dive.

The problem now this fixes can be seen in dives/test10.xml

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 14:15:12 -08:00
Anton Lundin
57fb878b41 Show/save weights up to and including last valid
Previous show and save code would have aborted at the first invalid
weight system. This makes sure we save and show all weight systems up
until and including the last valid.

If we had:
integrated: 1kg
belt: 2kg
ankle: 3kg

And changed belt to 0 kg, we would have only saved integrated 1kg, and
nothing about the belt or the ankle weights. This will save all of them,
and show all of them.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 14:13:47 -08:00
Anton Lundin
ab4115791b Show cylinders up to and including the last valid
Previous code aborted at the first invalid cylinder. This instead finds
the last valid and prints all the ones up until that one.

Fixes #295

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 14:13:02 -08:00
Thiago Macieira
27bfc587cf Update the Mac instructions to include an install_name_tool step
This changes the Mach-O library ID to match the install path. The
library ID is copied by the linker when Subsurface is linked against
Marble and can be seen with otool -L. That's also what macdeployqt
uses to find the dependencies: if the file matching the name in otool
-L exists, macdeployqt will deploy the library and update the search
paths.

Conclusion: after this patch, the "make mac-deploy" command will also
deploy Marble correctly.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 14:12:25 -08:00
Dirk Hohndel
f434417971 Improvements to INSTALL instructions
Some words about cross building Marble and a hint about Debug vs. Release
builds

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 14:11:47 -08:00
Dirk Hohndel
579c566bbe Rephrase tooltip
This seems to better explain what the button does.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 10:06:30 -08:00
Dirk Hohndel
c64e9ea28d Add PNG versions of our SVG icons
This is just a temporary workaround while we figure out why the Windows
build doesn't load SVGs correctly. To avoid messing with the build system
I simply switch to using PNG everywhere.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 10:00:51 -08:00
Dirk Hohndel
cc91cad890 Make sure we keep our notion of what's selected in sync with the UI
When editing a dive, a group of dives or a trip we need to make sure that
we don't lose track of which dives and trips were selected. Otherwise we
might act on dives that DON'T appear selected in the UI but that we think
are still selected.

Fixes #304

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 08:39:47 -08:00
Anton Lundin
3fd39a7a87 Remove some constants and use helpers instead
We have allot of helpers, use them instead of local variants.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 08:30:12 -08:00
Tomaz Canabrava
c94101dd4f Changing the preferences should update the Add Dive interface
Since all internal units are in mm we needed to only update what's shown
on the interface.

Fixes #299

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 12:28:16 -08:00
Tomaz Canabrava
97fd22b1be Fixes the positioning of the ToolBar
This is a workaround, I plan to remove that toolbar from inside
of the Profile for the next version, but since it's there for now,
let's keep it.

This patch hides the toolbar when the zoomLevel != 0, since the
profile is unclickable while zoomed...

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 11:25:50 -08:00
Tomaz Canabrava
e175b1d1ab Remember Trip Selection.
This patch remembers the trip selection across the Dive Tree Model.
It's a tiny bit big because we used to have a variable 'selected
trips' that's now calculed dynamically - this is more future proof.

This is a start of Un-cluttering the view ( for 4.1 I hope to reduce the
code in this class to nearly a half. )

Fixes #303

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 11:25:50 -08:00
Tomaz Canabrava
e91a1fc26c Fix ToolTip disappeared when resizing the ProfileWindow
When resizing the ProfileWindow and the tooltip was out of
boundaries, it was really out of boundaries and there was
no way to get it back ( besides re-expanding the window. )
this patch moves the tooltip to (0,0) and don't save that
position, so when the window is re-expanded, it will move to
the correct location again

Fixes #237

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 11:25:50 -08:00
Vinicius Machado
45f716f857 Re-enable adding a location to selected dive via double-click on the map
The fix for 'double click on the map shouldn't zoom' had broken the
selection of the current location for the selected dive, this patch
fixes that.

See #291

Signed-off-by: Vinicius Machado <vsmachado@gmail.com>
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-26 11:25:16 -08:00
Anton Lundin
7e36b4a253 Tidy up csv to xml xslt
Use if around the attribute, instead if a choose inside. Its less
horrible on the eyes.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-25 14:47:09 -08:00
Anton Lundin
5e04aaa756 Add the missed csv-field stopdepth
I managed to mess up and grab parts of my unfinished otu field code and
squash it into the wrong patch. Here is the code for stopdepth, and now
the code sets the in_deco flag to.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-25 14:46:53 -08:00
Dirk Hohndel
eec732548b Switch tab title to Trip Notes when handling a trip
And switch back to Dive Notes when back to looking at a dive. This makes
things more consistent...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-25 11:05:09 -08:00
Anton Lundin
d0fbfc7a9c Create a drop down to choose default cylinder
This also renames the ui element to match.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-24 15:07:25 -08:00
Anton Lundin
a25d351b64 Bugfix crash in trip statistics for non trip dives
This fixes a crash when you have non-trip dives in your logbook.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-24 07:02:56 -08:00
Miika Turkia
ce525bd285 Adding trip based statistics
This adds trip based statistics to the Yearly Statistics
view.

Signed-off-by: Miika Turkia <miika.turkia@nixu.fi>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23 22:07:18 -08:00
Pablo Wolter
66cdb3689a INSTALL instructions correction
This fixes the INSTALL instructions. The line to install home-brew is missing the “install” at the end and a small typo in the marble compilation instructions.

Saludos,

Pablo.

From 152395059af546273f38721e5c8ae1d19e2d73c3 Mon Sep 17 00:00:00 2001
From: Pablo Wolter <pwolter@gmail.com>
Date: Sat, 23 Nov 2013 16:10:02 -0800
Subject: [PATCH] Small correction to the installation instructions. Added
 "install" to the end of the ruby command to install homebrew and a typo in
 the compilation instructions for marble.

Signed-off-by: Pablo Wolter <pwolter@Pablos-MacBook-Pro.local>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23 22:02:14 -08:00
Dirk Hohndel
904c20feef Use the default cylinder if defined
With this every cylinder downloaded from a divecomputer that doesn't
provide cylinder data, and every cylinder manually added anywhere will
default to the default cylinder that is set in the preferences.

For people who most of the time dive with the same equipment (always on
dive boats with AL80, or almost always diving their personal HP119) this
should be a nice improvement.

If you don't like this behavior, simply leave the default cylinder setting
in the preferences empty.

This commit also fixes the incorrect s->value call (should be
s->setValue). I wonder what this did to the default filename before...

Fixes #145

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23 22:01:11 -08:00
Dirk Hohndel
8e5c222e98 Create a text entry for default cylinder in preferences
We don't do anything with this just yet.
And frankly, a drop down of the cylinders that we know of would be even
better. But hey, it's a start.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23 22:01:11 -08:00
Dirk Hohndel
03a0678b00 Use a default tank when populating tank data after download
This is super-simplistic and also is kinda wrong. It forces all tanks that
haven't been specified by the DC (so far only Atomics Aquatics Cobalt and
UEMIS Zurich (which doesn't even use libdivecomputer) to be AL80. Just as
we used AL80 as default for manually adding tanks.

Obviously this needs to become an option where the user can pick.

See #145

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-23 22:00:39 -08:00
Taiane Ramos
450fd9c7bd Save button on menu calls InfoWidget save
When editing a dive and clicking save button on menu bar, it saved
dive information but didn't mark dive as not being edited anymore.
For closing file, user should always click on the save button on
the bottom of the page and then saving it.
Now when clicking save button on menu bar, it will call the
accept_changes before saving to disk.

Signed-off-by: exhora <exhora.tat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 21:39:20 -08:00
Dirk Hohndel
a6b35141e4 Don't parse 32bit hex values with strtol
On a 32bit machine this will truncate values with MSB set to 0x7fffffff

Fixes #164

(thanks to Linus for pointing me in the right direction)

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 13:31:52 -08:00
Dirk Hohndel
781266bf18 Work around QPlainTextEdit / QPainter bug on Mac
Actually, it's not so much "work around", it's just "disable our eye candy" for
tags on Mac. This is quite frustrating. When we do anything that has the
QPainter touch the widget from our GroupedLineEdit::paintEvent() path then the
QPlainTextEdit::paintEvent() doesn't render the text of the tags.

Fixes #298

Sort of.
But I guess tag text without eye candy is better than eye candy without tag text.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 09:44:28 -08:00
Tomaz Canabrava
a3ddb16d88 Hide everything 'floatable' by default on the globe.
Later we spacifically enable the scale, but Dirk asked me to
use the bare minimum of marble.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:40:56 -08:00
Tomaz Canabrava
abc81fbd01 Disables zooming by double click and context menu on marble.
Marble is a weird piece of Qt software, it seems that it wasn't
thought of being a library when first written. Most of its features
are not achieved by subclassing && overriding one of Qt default methods,
instead we need to eventFilter for almost everything ( which is a pain,
and a bit error prone - see our combo box delegate *puke*. )

This one's ready,  only one thing though - if we want to implement
our own context menu, we will need to use the eventFilter, and not
the contextMenuEvent.

Fixes #291

[Dirk Hohndel: this does not disable the context menu for me...]

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:40:32 -08:00
Tomaz Canabrava
6fd0087a27 Show user-hidden widget when choosing Show All
A user could have hiddden and lost any of the four panels
on the interface. Now when he chooses 'show all', if a
part of the interface is hidden, it will be shown again.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:35:10 -08:00
Tomaz Canabrava
7ed2fde778 Small code cleanup on the CylindersModel
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:35:03 -08:00
Tomaz Canabrava
cdac737925 Better positioning of the text on Weightsystems table.
Same as the cylinder, but for weightsystem.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:34:45 -08:00
Tomaz Canabrava
bc461d091c Added a bunch of tooltips where I thought it was sane.
I think we should actually fill the app with tooltips and
whatsthis hints. justsain ;p

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:34:24 -08:00
Tomaz Canabrava
cee021ddd3 Better positioning of the text on the table cells.
Better positioning of the text on the table cells. On KDE systems the
text got too near the line that divided the cells, this way the text is
placed on the middle of the cell.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:33:49 -08:00
Tomaz Canabrava
0f85243cf3 Fixes the correct sizes of the tables when first open.
This patch fixes the correct sizes of the tables when first opened. It was
defaulting to 'resizeToContents', but most of the cases when first opened
we got no content, and this was bad. Now I'm defaulting to 30 when on the
'REMOVE' column and 80 on other columns.

Fixes #189

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-22 07:32:53 -08:00
Anton Lundin
891892cde4 Cleanup and bugfix gaschange event printing
When a gaschange to air happened, the code did
name += name=+ tr("air") which probably was due to the block being just
confusing with all the ?:
Unrolls to proper if statements, and fixes the bug.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:34 -08:00
Anton Lundin
26656310ab Add optional support for stopdepth import from csv
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:28 -08:00
Anton Lundin
5eccd73a30 Add optional support for cns import from csv files
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:21 -08:00
Anton Lundin
8dde12fa35 Add optional support for po2 import from csv files
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:16 -08:00
Anton Lundin
907a22f37e Simplify params numbering in parse_csv_file
When we add more fields, we don't need to renumber the whole thing.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:10 -08:00
Anton Lundin
8e60f3bb44 Give room for more options in csv dialog
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:54:00 -08:00
Anton Lundin
cf06f78892 Make temperature optional in csv import
This adds a checkbox to be able to import csv files without temperature.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:53:54 -08:00
Anton Lundin
1a0adea0cc Rework csvimportdialog to make room for features
This rewires things a bit to make room for new features coming.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:53:49 -08:00
Dirk Hohndel
d4563e54a9 Try to get Windwos to find the plugins
This way the application path (i.e., install directory) will be searched
for plugin DLLs.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:51:41 -08:00
Dirk Hohndel
60a5d1d070 Fix a couple of warnings
Removing unused variables.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 15:50:56 -08:00
Patrick Valsecchi
fe2eabf375 Added a configuration option to have gf_low apply at max depth instead of at deepest ceiling.
Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 08:11:40 -08:00
Patrick Valsecchi
4c4a7a6d96 Refactoring of the configuration handling.
Before, when clicking the OK button on the preferences GUI, we were
updating in-memory preferences from the GUI, saving them to the
configuration file from the GUI, reloading from the file to the
in-memory preferences. Then, to add to the ducplication, when the
application was exiting, some fields were saved again.
Basically the first step and the last step were useless appart from
the fact the the other steps where missing a few fields here and there.

This patch removes the first step and fixes the missing fields.

Signed-off-by: Patrick Valsecchi <patrick@thus.ch>
ACKed-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 08:11:40 -08:00
Henrik Brautaset Aronsen
e0b376622c Fix typo
All hail the groub!

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-21 08:11:40 -08:00