Commit graph

3828 commits

Author SHA1 Message Date
Sergey Starosek
482214703b Language chooser improvements
Show language instead of country, sort the list.
Show country in brackets to avoid ambiguity for locales like
de_DE and de_CH.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 08:09:05 -08:00
Anton Lundin
4c3f51291e Show CC-sp in bar, and not mbar
Fixes #257

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 08:09:05 -08:00
Anton Lundin
755ea74492 Add support to edit a planned dive
Left to do is to remove all the auto-added deco-points, aka the ones
that had entered==FALSE before we created a dive from the plan.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 08:09:05 -08:00
Anton Lundin
bb979260b0 Fix gas for start dp
It previously always started with o2 in air, now we start with 0 as its
the same default as in the cylinders too, which fixes a uninitialized
index there too.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 08:09:05 -08:00
Anton Lundin
90634b3814 Propagate gas and setpoint from previous point
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 08:09:05 -08:00
Anton Lundin
70a9c280f4 Bugfix first deco stop finder
The previous code checked against the current depth to find the next
deco stop, not the ceiling we actually should head for.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 08:02:48 -08:00
Anton Lundin
4696354f4b Adapt depth-scale to current way points
If the scale is too big or too small, adapt the scale automatically.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 08:02:34 -08:00
Anton Lundin
f9b7c5dfe9 Make units in cells consistant in CylindersModel
Now they all have units in the cells.

Fixes #259

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 07:39:12 -08:00
Martin Gysel
c1a9e7c996 amount_selected should never be decremented if already 0
this is probably more a workaround than a proper fix to a problem which
I think only happens if started with no dive loaded and then create one.
in that case, deselect_dive is called after saving the dive but probalby
before it was added to the dive list properly resulting in an underflow
of amount_selected.

Signed-off-by: Martin Gysel <me@bearsh.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 07:28:18 -08:00
Martin Gysel
d9ca999a17 redraw profile (actually clean it) if no dive is selected
otherwise the previous selected dive is still visible in the profile
view. clicking on edit crashs subsurface: null pointer dereference in
editCurrentDive as it uses 'current_dive' which is null.

Signed-off-by: Martin Gysel <me@bearsh.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 07:27:46 -08:00
Martin Gysel
26dab9b5ce correctly install translations after a clean checkout
Signed-off-by: Martin Gysel <me@bearsh.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 07:27:32 -08:00
Sergey Starosek
bf88efae08 Fix profile legend strings
Use proper case and subscripts for gas names on profile legend.

Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 07:25:19 -08:00
Werner Macho
939aafa73f Fixing a few typos in Documentation
Signed-off-by: Werner Macho <werner.macho@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 07:23:45 -08:00
Dirk Hohndel
f6ece43cff Renumber dialog should default to start at 1
Also make it somewhat larger and less crowded.

Fixes #338

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-07 06:49:52 -08:00
Dirk Hohndel
3528f5ff35 Get ready for the release of 3.9.2
Small updates to README, ReleaseNotes.txt and a bump in the version number
in the Makefile (forgot the in 3.9.1 - thankfully this is automatic for
git based builds).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 22:57:39 -08:00
Thiago Macieira
53f38a2410 Set the menuRole property on certain menu entry QActions
Telling Qt that the "Preferences" menu entry is
QAction::PreferencesRole will make it be moved to the System menu on
Mac, for example.

Fixes #327

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 21:46:37 -08:00
Dirk Hohndel
9cb9dba7b6 Fix the Windwos installer
Install the Documentation and include it in the installer.
Try and get all the directories and files removed in the uninstaller.
Where the heck does 'oldshare' come from?

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 21:46:15 -08:00
Dirk Hohndel
4f4b83ccbf Correctly parse translated GPS coordinates
Minor oversight in commit 917b47b79c ("Parse localized GPS string") - we
accepted the translated hemisphere indicators in the regular expression,
but then didn't use them later when comparing with the result of applying
the regular expression.

Fixes #331

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 20:37:47 -08:00
Dirk Hohndel
379fa5f652 Really save airtemp and watertemp in the dive
I thought I had this fixed, but a silly thinko broke my fix.
Only abort the saving if both air AND water temperature are already
covered by the divecomputer(s) in a dive. If at least one of them is
different, then create a divetemperature tag and fill in that value at the
dive level.

Fixes #313

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 20:13:12 -08:00
Dirk Hohndel
df464fcef1 Stub out a mark dive invalid function
Not sure I'll be able to finish this for 4.0

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 17:40:59 -08:00
Dirk Hohndel
93b5c0cd14 Finish download from divelogs.de
This is far from perfect.
Avoid a weird warning when total = -1 is passed into the progress bar.
Enable the Accept button once the download completes.
Merge the downloaded dives into the existing dive list on Apply.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 17:13:03 -08:00
Dirk Hohndel
3a0f138023 Whitespace cleanup
That one slipped by me...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 17:09:08 -08:00
Tomaz Canabrava
61d5aac2e8 Do not change the current Directory
Qt has a really strange API for directories. when you create a QDir
and set's the currentDir on *that* QDir you created, it's for the
whole application and not just for that variable. Then when the
variable is out of scope, the directory doesn't change back - ugh.

The solution is not to call setCurrentDir on the newly created QDir (which
was quite good since it's also a code cleanup. )

[Dirk Hohndel: modified to undo the far less elegant fix I had made in an
               earlier commit]

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 13:21:24 -08:00
Dirk Hohndel
b04666922b Latest translations
As usual, only (some of) the changes to the German translations were
authored by me.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 13:13:29 -08:00
Dirk Hohndel
2629e768bd Latest source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 13:11:44 -08:00
Dirk Hohndel
e015effb47 Don't change working directory when looking for tranlations
And only replace 'bin' if there is a bin in the path...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 12:03:12 -08:00
Tomaz Canabrava
9b7b477d7c Added 'English' and 'Use System Default' options.
These complete the ability to select languages from the preferences panel.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 11:58:29 -08:00
Tomaz Canabrava
7436178fe0 Added a filter option to the Language Chooser
This patch adds a filter option to the Language Chooser.
if you choose filter, only the filtered options will appear.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 11:56:00 -08:00
Dirk Hohndel
32264cf393 Explain invalid dive option in preferences
Just trying to fill in minor gaps.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 11:53:01 -08:00
Dirk Hohndel
157827c71b Capitalize Subsurface in the documentation
This is a small detail but we should try to be consistent there.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 11:50:35 -08:00
Willem Ferguson
710fba9aa6 Add images missing from previous commit
This was Dirk's mistake when applying the patch.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 11:44:14 -08:00
Willem Ferguson
75e8b1eeff Usermanual update.
1) Several layout changes including banner.
2) Stylistic revision of part of textr.
3) Addition of text to dive computer upload section.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 10:59:55 -08:00
Tomaz Canabrava
f20e07dcf1 Code Cleanup
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 09:54:36 -08:00
Tomaz Canabrava
8a116ba510 Settings for Display preferences didn't really set the preferences.
The code that should set the preferences was actually retrieving it,
this will correctly set it.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 09:54:19 -08:00
Tomaz Canabrava
4e263bae98 Added a language preference to the Settings.
When the user first opens the application the default language is
selected; this can be changed to a hardcoded one by going to system
preferences and choosing the one you want.

Restart required.

Fixes #136

[Dirk Hohndel: whitespace fixes, removed qDebug() call, rephrased the
               message displayed prompting the user to restart.]
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 09:49:05 -08:00
Lubomir I. Ivanov
bfe5ccda1c Print: add a safe-guard if table print rows are too big
We do not support rows larger than a single page as the
PrintLayout algorithm will enter an infinite loop,
therefore we put a limit of 15 lines for the location text.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 09:35:09 -08:00
Dirk Hohndel
8f58faf431 Fix crash in table print crash
sizeof(array) is the total size in bytes, not the number of elements...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 09:30:39 -08:00
Lubomir I. Ivanov
5506fa4b38 Print: fix issues when printing a lot of dives in table print
This patch improves the algorithm when estimating where
to put the new page header in the table and how we move
larger dive rows on a new page. It now performs a couple of
'passes', where the first one processes the table and the
second one is used to compensate for the lost space.

Fixes #326

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 09:23:02 -08:00
Salvador Cuñat
c7a4bb185c Companion app and downloading GPS coordinates from web service
A first try on documenting the companion app and explanation on how to use
it combined with Subsurface.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 09:22:13 -08:00
Sergey Starosek
07e1e416cf Add icon and title for User Manual window
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-06 07:31:08 -08:00
Dirk Hohndel
dfa66cce31 Latest translation updates
As alsway, I am not the author of these translations, just the committer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:42:54 -08:00
Dirk Hohndel
76275bb16c Add more languages
Not all of these are completed, but I want to include as many as possible
in the last beta.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:41:39 -08:00
Thiago Macieira
51c519f624 Include the translations in the Windows installer
Fixes #324

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:09:24 -08:00
Thiago Macieira
69826a6c2f Install Qt and Subsurface translations for Windows
Dirk had done most of the work already. I just needed to add some
trickery to install the system translations in case cross-mingw32
didn't provide it.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:09:24 -08:00
Thiago Macieira
dbab619489 Install Subsurface translation files on Linux
This was the easiest: all the file names are already in a variable and
we don't need to install the Qt translations since we're using a system
Qt.

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:09:24 -08:00
Thiago Macieira
51f66a2d15 Fix typo introduced accidentally: marbledir has no h
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:09:24 -08:00
Thiago Macieira
7881fb7edc Avoid copying the icons, xslt and other dirs into themselves.
The install rule that qmake generates was of the form:
  -$(INSTALL_DIR) icons packaging/windows/icons

The first time you run make install, packaging/windows/icons doesn't
exist, so /usr/bin/install understands it as the name to be given to the
dir being installed. However, when you run make install a second time,
/usr/bin/install understands it as the target directory, so it copies
icons into the packaging/windows/icons dir.

We need to teach qmake not to add the dir name. Inspecting the source
code reveals:
    if(fi.isDir() && project->isActiveConfig("copy_dir_files")) {
        if(!dst_file.endsWith(Option::dir_sep))
            dst_file += Option::dir_sep;
        dst_file += fi.fileName();
    }

This option is enabled by default on all the win32-* targets.

So if we remove the "copy_dir_files" config, it won't append the source
name. The qmake manual says this about that option: "Enables the install
rule to also copy directories, not just files.", which doesn't help us
much. Probably just stale documentation.

Fixes #325

Signed-off-by: Thiago Macieira <thiago@macieira.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 20:09:24 -08:00
Willem Ferguson
fb169db292 Updates to user manual
1) Inserted section on Information Box on dive profile
2) Iserted short section on import from Mares Dive Organiser
3) Corrections to spelling and style not included in previous commits.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 14:11:17 -08:00
Lubomir I. Ivanov
26d2cc0fef MainWindow: fix setTitle() calls
setTitle() works with an enum that can be fed different values,
and other we may have eventually. For example not only "app title",
or "app title: filename", but others, like dates, certain app status
and so on.

Patch fixes an issue where deleting a single dive in the divelist
resets the title to "Subsurface" only. clearUpEmpty() should only
call setTitle(MWTF_DEFAULT) if no file is currently open.

It also adds a safe-guard to revert back to MWTF_DEFAULT if
no file is open but setTitle is called with MWTF_FILENAME.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 08:04:55 -08:00
Lubomir I. Ivanov
94f85bbef9 Print: fix truncated table in "Table print" mode
The whole procedure here is quite confusing.
Once we have our model populated, we need to estimate where
to put page headers (each page has one) and to do that we
store a list of indexes, where a page would begin (pageIndexes).

But since a row can end up being chopped at the end of a page
we move it to a new page and this particular part was lacking
compensation for the moved row's height, when storing the *last*
pageIndex.

For N number of pages we are losing N - 1 dives, or such that
were previously transferred on a new page.

See #326

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 08:04:48 -08:00