Commit graph

3855 commits

Author SHA1 Message Date
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
Sergey Starosek
09a8a85bab Open external links in default browser
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 07:31:29 -08:00
Sergey Starosek
fe713d37f4 User manual spelling fixes
Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-05 07:31:07 -08:00
Tomaz Canabrava
441838def0 Different Icon for a Bookmark Event.
This patch adds a different icon for a Bookmark Event, and it
also cleaned a lot of code. :)

See #300

[Dirk Hohndel: made the two icons slightly bigger]

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 19:41:29 -08:00
Tomaz Canabrava
d3a56c137b Fixes positioning of the legend in View and Print modes.
This patch makes a better assumption of the location for the
legend in both View and Print modes. It also fixes a few oddities
that we used to have ( like hardcoded spacing ).

We are taking the scene().sceneRect() now into consideration to
better place it on canvas.

Fixes: #322

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 19:31:10 -08:00
Dirk Hohndel
20d924a16e Compile fix
Otherwise errno is undefined (at least for me on Linux).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 16:29:55 -08:00
Dirk Hohndel
421dceba1e Merge branch 'improve-subsurfaceweb' of git://github.com/thiagomacieira/subsurface 2013-12-04 16:21:44 -08:00
Anton Lundin
28b8d177c3 Cleanup some uninitialized variables
I can't really see any point in passing a local loop variable around,
and copying a uninitialized pointer. Better use local variables there
and let the compiler optimize them away if it feels for doing that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 15:57:53 -08:00
Anton Lundin
a0df62d913 Add some limits to the GF's
Sets the limit for GF's in the preferences panel to 1<=x<=150 and color
it read if gf > 100. Remove the % in the diveplanner view that was
rejected for the preferences view.
The 150 maximum is needed because QSpinBox defaults to maximum 99.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 15:49:55 -08:00
Lubomir I. Ivanov
662e642ac9 Webservices: fix QString argument for zip_open()
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Thiago Macieira <thiago@macieira.org>
2013-12-04 15:39:35 -08:00
Dirk Hohndel
b5d3476b0b Allow comma separated CSV files
The separator selector in the CSV import dialog was unused. This passes
the value into the xslt and adds ',' as possible value.

I'm sure this could be done much better (pass the actual character instead
of the index), but I couldn't get that to work and this does seem to do
the trick.

Also added a test dive to test this feature.

Fixes #321

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 15:27:09 -08:00
Dirk Hohndel
5fc50b2aab Improve labeling for partial pressure graphs
This backs off a little on what was added in commit c1102a38f3 ("More
gradient on the partial pressure graph.") - the numbers simply got too
busy. I also slightly changed the positioning of the numbers to be a
little more "natural looking".

Fixes #323

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 13:27:34 -08:00
Tomaz Canabrava
66716b5297 Make Gnome3 be bearable
The layout of Subsurface on Gnome 3 had a few flaws, since Qt and Gtk
are not really compatible. This implements a CSS that makes the use
of Gnome 3 more pleasant to the eyes.

Fixes #318

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 12:41:07 -08:00
Willem Ferguson
07c63c511b subsurface user manual update
References to literature on gradient factors changed (see dive profile
section, also preferences section)

Section on preference settings added.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 12:22:06 -08:00
Lubomir I. Ivanov
d7a19b318e Divelist: fix a crash when updating the preferences
Hitting apply in the preferences dialog causes a QList assert.
This led to DiveListView::reloadHeaderActions(), where
we have an out of range access.

Patch makes the column count match the header action count.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04 10:43:54 -08:00
Lubomir I. Ivanov
fc06a69c43 PrintDialog: reset the progress bar each time the dialog opens
This requires us to expose the progressBar as a private
class member.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 15:52:21 +02:00
Lubomir I. Ivanov
e4f35fb51a Print: fix some forward declarations
In the PrintLayout constructor we receive a pointer
of PrintDialog, but the type is incomplete, as we only
forward declare it in the class header. If we decide
to eventually call a method from PrintDialog we also
need to include printdialog.h in printlayout.cpp.

The patch also fixes a similar issue in printdialog.h.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 15:47:33 +02:00
Lubomir I. Ivanov
95e00b0acd PrintLayout: emit progress from printTable()
printTable() now emits a 'signalProgress'
to the PrintDialog's progress bar, but it has 3 stages (loops):
- pupulate a model
- process all rows
- render the table in pages

This requires that we also separate the progress in 3 stages
of 33%.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 15:35:07 +02:00
Lubomir I. Ivanov
ac7126b84a PrintLayout: emit progress from printProfileDives()
printProfileDives() now emits a 'signalProgress' each
time a dive is done processing.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 15:16:20 +02:00
Lubomir I. Ivanov
08cf1be212 PrintLayout: add estimateTotalDives()
estimateTotalDives() is used to calculate the total dives
to be printed, it requires a 'struct dive' pointer
and a couple of 'int' pointers for the iterator 'i' and
'total' return.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 15:13:40 +02:00
Lubomir I. Ivanov
ecf483db46 PrintDialog: add a 'Close' button
The dialog was missing a 'Close' button so we add it.
Also change the mnemonic of the 'Preview' button, as it
was the same as the one for print 'Print'.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 14:14:04 +02:00
Lubomir I. Ivanov
c89d83611b PrintDialog: make the dialog slightly larger
I don't recall why but this dialog ended with a fixed size
(setFixedSize()), so it has to be re-adjusted each time a change
is made in there. We resize it to compensate for the addition
of the progress bar.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 13:55:30 +02:00
Lubomir I. Ivanov
d90cca5c4e PrintDialog: add separate Preview/Print buttons
We rename our old 'Print' button to 'Preview' (as it did just that),
and add a new one called 'Print' which does the direct printing,
by creating a QPrintDialog instance. Both buttons are located
on top of the dialog for now in a QHBoxLayout.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 13:51:34 +02:00
Lubomir I. Ivanov
576c3f559f PrintDialog: change a comment
The entire dialog is 'temporary' and should be replaced,
so we slightly modify the comment about the PrintOptions widget.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-12-04 13:46:08 +02:00