Commit graph

3500 commits

Author SHA1 Message Date
Sergey Starosek
b57b36e662 Fix dialog titles
Use proper names instead of "Dialog"

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 08:07:26 -08:00
Sergey Starosek
5096e03418 Fix translation filter for subsurface4 branch
This fixes translations pulling from Transifex.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-29 08:07:02 -08:00
Lubomir I. Ivanov
af97020634 subsurface-configure.pri: exclude -Wno-maybe-uninitialized on win32
On native Windows the suggested compiler for Qt4.8 is mingw-gcc-4.4.0,
which does not has the -Wno-maybe-uninitialized flag (yet).

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 15:29:18 -08:00
Lubomir I. Ivanov
d0f807f0ed subsurface.nsi.in: set icons for the executable shortcuts
The executable shortcuts were lacking icons. This should
do the trick, by using the packaged subsurface.ico.

Perhaps it would be better if we hardcode the icon into
the executable as a resource.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 15:29:13 -08:00
Tomaz Canabrava
f8c2efe1ce Fixes ToolTip Item showing out of boundaries tooltips
This patch fixes ToolTip Item showing out of boundaries
Tooltips when in resizing animation.

Fixes #294

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 15:29:01 -08:00
Tomaz Canabrava
3264255a7a Make it possible to hide some columns on the Cylinders Equipment pane.
This patch makes it possible to hide some columns on the Cylinders
Equipment pane. The 'remove' and 'type' are impossible to hide,
since they are the most important ones for a non-tech diver.

Fixes #281

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 15:28:15 -08:00
Tomaz Canabrava
c1102a38f3 More gradient on the partial pressure graph.
This patch adds a bit more of gradient on the lines for the partal
pressure graph grid, it also moves a tiny bit to the side the
even numbers so it's easyer to read when they are too near each other.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 15:27:18 -08:00
Linus Torvalds
4d0d5f8c07 Quiet down valgrind warnings
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 12:15:24 -08:00
Linus Torvalds
38179f49d4 Fix editing of negative temperatures
We tried to clean up the temperature string (to remove degree characters
and unit names etc) a bit too aggressively, and removed the sign
character too..

Fixes #306

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 12:11:29 -08:00
Dirk Hohndel
a172bbef58 Next step towards translations
This updates all the ts files and the tx configuration.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-28 10:30:18 -08:00
Dirk Hohndel
8a3bbf52d8 Add call for contributions to ReleaseNotes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 21:27:01 -08:00
Dirk Hohndel
b8eabeb3e7 Update README and ReleaseNotes.txt for the second Beta
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 18:38:57 -08:00
Thiago Macieira
d2de5afd02 Include qt.conf in the Windows installer
Otherwise, Qt won't find its plugins.

No plugins -> no JPEG decoding -> very ugly maps (an understatement)

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:55:54 -08:00
Thiago Macieira
1080e5ca35 Fix plugin deployment on Windows
And increase our list of plugins to be deployed to include the GIF and
SVG image plugins, the SVG icon engine and the CJK text codecs.

The install rules now iterate over the plugin list and deploy the
plugins in the right path in the staging area. The plugins must also
be scanned for dependencies (Fedora's qjpeg4.dll depends on
libjpeg-62.dll, which neds to be copied to the staging area).

Finally, fix qt.conf needed to be fixed.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:55:24 -08:00
Thiago Macieira
4b4e59a7e8 Use wildcards in the NSIS installer rules for Qt DLLs
That way, the NSIS rules also work for creating an installer for debug
builds. Which you'd do by running:
  make -f Makefile.Debug installer

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:55:05 -08:00
Thiago Macieira
9befbe4109 Search for different versions of libzip DLL
My system has libzip-1.dll, but Dirk's is probably newer and has
libzip-2.dll

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:54:32 -08:00
Thiago Macieira
34c77db506 Don't try to deploy libintl DLL on Windows
We don't use it for translations anymore.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:54:28 -08:00
Thiago Macieira
08f4f42e1e Tell NSIS to search for the DLLs in packaging/windows
The "make install" step will copy all we depend on DLLs there.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:54:24 -08:00
Thiago Macieira
586437df89 Fix "make install" on Windows with srcdir != builddir
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-27 17:51:38 -08:00
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