summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--Documentation/50-pot/subsurface-manual.pot363
-rw-r--r--Documentation/FAQ.wordpress11
-rw-r--r--Documentation/fr/po/subsurface-manual.fr.po539
-rw-r--r--Documentation/images/icons/atomiclogo.jpgbin0 -> 6155 bytes
-rw-r--r--Documentation/user-manual.txt85
-rw-r--r--Documentation/user-manual_es.txt177
-rw-r--r--Documentation/user-manual_fr.html.git344
-rw-r--r--Documentation/user-manual_fr.txt318
-rw-r--r--Documentation/user-manual_ru.html.git363
-rw-r--r--Documentation/user-manual_ru.txt1
-rw-r--r--dive.c24
-rw-r--r--dive.h58
-rw-r--r--divelist.c9
-rw-r--r--dives/test50.xml28
-rw-r--r--divesite.c122
-rw-r--r--divesite.h61
-rw-r--r--git-access.c274
-rw-r--r--liquivision.c17
-rw-r--r--load-git.c120
-rw-r--r--main.cpp1
-rw-r--r--membuffer.c59
-rw-r--r--membuffer.h8
-rw-r--r--parse-xml.c258
-rw-r--r--pref.h2
-rw-r--r--qt-gui.cpp1
-rw-r--r--qt-ui/about.cpp4
-rw-r--r--qt-ui/completionmodels.cpp14
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp2
-rw-r--r--qt-ui/divecomponentselection.ui57
-rw-r--r--qt-ui/divecomputermanagementdialog.cpp1
-rw-r--r--qt-ui/divelistview.cpp17
-rw-r--r--qt-ui/divelogimportdialog.cpp1
-rw-r--r--qt-ui/diveplanner.cpp7
-rw-r--r--qt-ui/diveplanner.h14
-rw-r--r--qt-ui/downloadfromdivecomputer.cpp4
-rw-r--r--qt-ui/filtermodels.cpp7
-rw-r--r--qt-ui/globe.cpp57
-rw-r--r--qt-ui/globe.h2
-rw-r--r--qt-ui/locationInformation.ui75
-rw-r--r--qt-ui/maintab.cpp108
-rw-r--r--qt-ui/maintab.h9
-rw-r--r--qt-ui/maintab.ui365
-rw-r--r--qt-ui/mainwindow.cpp387
-rw-r--r--qt-ui/mainwindow.h31
-rw-r--r--qt-ui/mainwindow.ui221
-rw-r--r--qt-ui/modeldelegates.cpp5
-rw-r--r--qt-ui/models.cpp7
-rw-r--r--qt-ui/plannerDetails.ui89
-rw-r--r--qt-ui/plannerSettings.ui2
-rw-r--r--qt-ui/preferences.cpp2
-rw-r--r--qt-ui/printlayout.cpp5
-rw-r--r--qt-ui/profile/divecartesianaxis.cpp2
-rw-r--r--qt-ui/profile/diveprofileitem.cpp46
-rw-r--r--qt-ui/profile/divetextitem.cpp1
-rw-r--r--qt-ui/profile/profilewidget2.cpp6
-rw-r--r--qt-ui/profile/ruleritem.cpp2
-rw-r--r--qt-ui/simplewidgets.cpp115
-rw-r--r--qt-ui/simplewidgets.h25
-rw-r--r--qt-ui/socialnetworks.cpp2
-rw-r--r--qt-ui/subsurfacewebservices.cpp55
-rw-r--r--qt-ui/tagwidget.cpp1
-rw-r--r--qt-ui/undocommands.cpp64
-rw-r--r--qt-ui/undocommands.h28
-rw-r--r--qt-ui/updatemanager.cpp10
-rw-r--r--qt-ui/usersurvey.cpp20
-rw-r--r--qthelper.cpp67
-rw-r--r--qthelper.h2
-rw-r--r--save-git.c112
-rw-r--r--save-html.c9
-rw-r--r--save-xml.c75
-rw-r--r--scripts/write-version49
-rw-r--r--subsurface-gen-version.pri55
-rw-r--r--subsurface.pro19
-rw-r--r--subsurfacestartup.c4
-rw-r--r--subsurfacesysinfo.cpp447
-rw-r--r--subsurfacesysinfo.h20
-rw-r--r--theme/dive_export.html7
-rw-r--r--theme/list_lib.js52
-rw-r--r--uemis-downloader.c7
-rw-r--r--uemis.c23
-rw-r--r--uemis.h2
-rw-r--r--version.c16
-rw-r--r--version.h16
-rw-r--r--worldmap-save.c10
-rw-r--r--xslt/uddf-export.xslt130
86 files changed, 3851 insertions, 2385 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4a260e729..16b8b9f52 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -103,6 +103,7 @@ SET(SUBSURFACE_CORE_LIB_SRCS
divelist.c
equipment.c
file.c
+ git-access.c
libdivecomputer.c
liquivision.c
load-git.c
diff --git a/Documentation/50-pot/subsurface-manual.pot b/Documentation/50-pot/subsurface-manual.pot
index 5f4a46ca6..bb4cab640 100644
--- a/Documentation/50-pot/subsurface-manual.pot
+++ b/Documentation/50-pot/subsurface-manual.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: subsurface-manual VERSION\n"
"Report-Msgid-Bugs-To: subsurface@subsurface-divelog.org\n"
-"POT-Creation-Date: 2015-02-06 09:16+0100\n"
+"POT-Creation-Date: 2015-02-15 14:23+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -205,9 +205,9 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:108
msgid ""
-"The *Dive Info* to the top left, giving more detailed information on the "
-"dive selected in the *Dive List*, including some statistics for the selected "
-"dive or for all highlighted dive(s)."
+"The *Info* to the top left, giving more detailed information on the dive "
+"selected in the *Dive List*, including some statistics for the selected dive "
+"or for all highlighted dive(s)."
msgstr ""
#. type: Plain text
@@ -233,7 +233,7 @@ msgid ""
"information and profile of the _selected dive_ are shown in the respective "
"panels. On the other hand, if one highlights more than one dive the last "
"highlighted dive is the _selected dive_, but summary data of all "
-"_highlighted dives_ are shown in the *Stats* tab of the *Dive Info* panel "
+"_highlighted dives_ are shown in the *Stats* tab of the *Info* panel "
"(maximum, minimum and average depths, durations, water temperatures and SAC; "
"total time and number of dives selected)."
msgstr ""
@@ -274,7 +274,7 @@ msgstr ""
#: ./user-manual.txt:141
#, no-wrap
msgid ""
-"*Info*: Show only the Dive Notes about the last selected dive and statistics "
+"*Info*: Show only the Notes about the last selected dive and statistics "
"for\n"
"all highlighted dives.\n"
msgstr ""
@@ -430,11 +430,11 @@ msgid ""
"guide, and some remarks about the dive. _Subsurface_ can store much more "
"information than this for each dive. In order to add a dive to a dive log, "
"select _Log -> Add Dive_ from the Main Menu. The program then shows three "
-"panels to enter information for a dive: two tabs in the *Dive Info* panel "
-"(*Dive Notes* and *Equipment*), as well as the *Dive Profile* panel that "
-"displays a graphical profile of each dive. These panels are respectively "
-"marked [red]#A#, [red]#B# and [red]#C# in the figure below. Each of these "
-"tabs will now be explained for data entry."
+"panels to enter information for a dive: two tabs in the *Info* panel "
+"(*Notes* and *Equipment*), as well as the *Dive Profile* panel that displays "
+"a graphical profile of each dive. These panels are respectively marked "
+"[red]#A#, [red]#B# and [red]#C# in the figure below. Each of these tabs will "
+"now be explained for data entry."
msgstr ""
#. type: Target for macro image
@@ -446,10 +446,10 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:215
msgid ""
-"When one edits a field in Dive notes or Equipment panels, _Subsurface_ "
-"enters *Editing Mode*, indicated by the message in the blue box at the top "
-"of the _Dive Notes_ panel (see the image below). This message is displayed "
-"in all the panels under Dive notes and Equipment when in *Editing Mode*."
+"When one edits a field in Notes or Equipment panels, _Subsurface_ enters "
+"*Editing Mode*, indicated by the message in the blue box at the top of the "
+"_Notes_ panel (see the image below). This message is displayed in all the "
+"panels under Notes and Equipment when in *Editing Mode*."
msgstr ""
#. type: Target for macro image
@@ -473,7 +473,7 @@ msgstr ""
#. type: Title ====
#: ./user-manual.txt:224 ./user-manual.txt:700
#, no-wrap
-msgid "Dive Notes"
+msgid "Notes"
msgstr ""
#. type: Plain text
@@ -481,8 +481,8 @@ msgstr ""
msgid ""
"This panel contains the date, time and place information for a particular "
"dive, environmental conditions, co-divers and buddies, as well as some "
-"descriptive information. If one clicks on the *Dive Notes* tab, the "
-"following fields are visible:"
+"descriptive information. If one clicks on the *Notes* tab, the following "
+"fields are visible:"
msgstr ""
#. type: Target for macro image
@@ -683,7 +683,7 @@ msgid ""
"The *Save* and *Cancel* buttons are used to save all the information for "
"tabs in the info panel and in the dive profile panel, so there's no need to "
"use them until ALL other information has been added. Here is an example of a "
-"completed Dive Notes panel:"
+"completed Notes panel:"
msgstr ""
#. type: Target for macro image
@@ -938,13 +938,13 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:473
msgid ""
-"The information entered in the *Dive Notes* tab, the *Equipment* tab as well "
-"as the *Dive Profile* can now be saved in the user's logbook by using the "
-"two buttons on the top right hand of the Dive Notes tab. If the _Save_ "
-"button is clicked, the dive data are saved in the current logbook. If the "
-"_Cancel_ button is clicked, the newly entered dive data are discarded. When "
-"exiting _Subsurface_, the user will be prompted once more to save the "
-"logbook with the new dive(s)."
+"The information entered in the *Notes* tab, the *Equipment* tab as well as "
+"the *Dive Profile* can now be saved in the user's logbook by using the two "
+"buttons on the top right hand of the Notes tab. If the _Save_ button is "
+"clicked, the dive data are saved in the current logbook. If the _Cancel_ "
+"button is clicked, the newly entered dive data are discarded. When exiting "
+"_Subsurface_, the user will be prompted once more to save the logbook with "
+"the new dive(s)."
msgstr ""
#. type: Title ===
@@ -1057,7 +1057,7 @@ msgid ""
"on most dive computers and also saves battery power of the dive computer (at "
"least for those not charging while connected via USB). If, for some reason, "
"the user wishes to import ALL dives from the dive computer, even though some "
-"may already be in the logbook, then check the check box labelled _Force "
+"may already be in the logbook, then check the check box labeled _Force "
"download of all dives_."
msgstr ""
@@ -1324,8 +1324,8 @@ msgstr ""
msgid ""
"With the uploaded dives in the *Dive List*, the information from the dive "
"computer is not complete and more details must be added in order to have a "
-"fuller record of the dives. To do this, the *Dive Notes* and the *Equipment* "
-"tabs on the top left hand of the _Subsurface_ window should be used."
+"fuller record of the dives. To do this, the *Notes* and the *Equipment* tabs "
+"on the top left hand of the _Subsurface_ window should be used."
msgstr ""
#. type: Plain text
@@ -1337,8 +1337,8 @@ msgid ""
"record. In a few cases, (e.g. APD rebreathers) one also has to provide the "
"date and time of the dive. If the contents of this tab is changed or edited "
"in any way, the message in a blue box at the top of the panel indicates that "
-"the dive is being edited. If one clicks on the *Dive Notes* tab, the "
-"following fields are visible:"
+"the dive is being edited. If one clicks on the *Notes* tab, the following "
+"fields are visible:"
msgstr ""
#. type: Target for macro image
@@ -1611,17 +1611,17 @@ msgstr ""
msgid ""
"_METHOD 1_: After uploading dives from a dive computer, the dive profiles of "
"the uploaded dives are shown in the *Dive profile* tab, as well as a few "
-"items of information in the *Dive Notes* tab (e.g. water temperature) and in "
-"the *Equipment* tab (e.g. gas pressures and gas composition). However the "
-"other fields remain empty. It may be useful to simultaneously edit some of "
-"the fields in the *Dive Notes* and *Equipment* tabs. For instance, it is "
-"possible that a diver performed several dives during a single day, using "
-"identical equipment while diving at the same dive site or with the same dive "
-"master and/or buddy or tags. Instead of completing the information for each "
-"of these dives separately, one can select all the dives for that day in the "
-"*Dive List* and insert the same information in the *Dive Notes* and "
-"*Equipment* fields that need identical information. This is achieved by "
-"editing the dive notes or the equipment for any one of the selected dives."
+"items of information in the *Notes* tab (e.g. water temperature) and in the "
+"*Equipment* tab (e.g. gas pressures and gas composition). However the other "
+"fields remain empty. It may be useful to simultaneously edit some of the "
+"fields in the *Notes* and *Equipment* tabs. For instance, it is possible "
+"that a diver performed several dives during a single day, using identical "
+"equipment while diving at the same dive site or with the same dive master "
+"and/or buddy or tags. Instead of completing the information for each of "
+"these dives separately, one can select all the dives for that day in the "
+"*Dive List* and insert the same information in the *Notes* and *Equipment* "
+"fields that need identical information. This is achieved by editing the dive "
+"notes or the equipment for any one of the selected dives."
msgstr ""
#. type: Plain text
@@ -1643,15 +1643,15 @@ msgstr ""
#: ./user-manual.txt:933
msgid ""
"_METHOD 2_:There is a different way of achieving the same goal. Select a "
-"dive with all the appropriate information typed into the *Dive Notes* and "
+"dive with all the appropriate information typed into the *Notes* and "
"*Equipment* tabs. Then, from the main menu, select _Log -> Copy dive "
"components_. A box is presented with a selection of check boxes for most of "
-"the fields in the *Dive Notes* and *Equipment* tabs. Select the fields to "
-"be copied from the currently selected dive, then select _OK_. Now, in the "
-"*Dive List*, select the dives into which this information is to be "
-"pasted. Then, from the main menu, select _Log -> Paste dive components_. "
-"All the selected dives now contain the data initially selected in the "
-"original source dive log."
+"the fields in the *Notes* and *Equipment* tabs. Select the fields to be "
+"copied from the currently selected dive, then select _OK_. Now, in the *Dive "
+"List*, select the dives into which this information is to be pasted. Then, "
+"from the main menu, select _Log -> Paste dive components_. All the selected "
+"dives now contain the data initially selected in the original source dive "
+"log."
msgstr ""
#. type: Title ====
@@ -1713,13 +1713,13 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:967
msgid ""
-"The information entered in the *Dive Notes* tab and the *Equipment* tab can "
-"be saved by using the two buttons on the top right hand of the *Dive Notes* "
-"tab. If the _Save_ button is clicked, the dive data are saved. If the "
-"_Cancel_ button is clicked, then the newly entered dive data are deleted, "
-"although the dive profile obtained from the dive computer will be "
-"retained. When the user exits _Subsurface_ there is a final prompt to "
-"confirm that the new data should be saved."
+"The information entered in the *Notes* tab and the *Equipment* tab can be "
+"saved by using the two buttons on the top right hand of the *Notes* tab. If "
+"the _Save_ button is clicked, the dive data are saved. If the _Cancel_ "
+"button is clicked, then the newly entered dive data are deleted, although "
+"the dive profile obtained from the dive computer will be retained. When the "
+"user exits _Subsurface_ there is a final prompt to confirm that the new data "
+"should be saved."
msgstr ""
#. type: Title ===
@@ -2048,12 +2048,12 @@ msgid ""
"row of cells immediately above these contains the names understood by "
"_Subsurface_. The white area below the dropdown lists contains all the field "
"names that _Subsurface_ recognises. These names are in blue balloons and can "
-"be moved using a drag-and-frop action. For instance, _Subsurface_ expects "
+"be moved using a drag-and-drop action. For instance, _Subsurface_ expects "
"the column heading for Dive number (\" # \") to be \"Dive # \". If the "
"column heading that _Subsurface_ expects is not in the blue cells, then drag "
"the appropriate column heading from the upper area and drop it in the "
"appropriate blue cell at the top of the table. To indicate the correct "
-"column for \"Dive #\", drag the ballooned item labelled \"Dive # \" and drop "
+"column for \"Dive #\", drag the ballooned item labeled \"Dive # \" and drop "
"it in the blue cell immediately above the white cell containing \" # "
"\". This is depicted in the image below."
msgstr ""
@@ -2084,8 +2084,8 @@ msgstr ""
#: ./user-manual.txt:1179
msgid ""
"_CSV_ is an abbreviation for a data file format: _Comma-Separated "
-"Variables_. It is a file format allowing someone to view or edit the "
-"information using a text editor such as Notebook (Windows), gedit (Linux) or "
+"Values_. It is a file format allowing someone to view or edit the "
+"information using a text editor such as Notepad (Windows), gedit (Linux) or "
"TextWrangler (OS/X). The two main advantages of the _CSV_ format is that the "
"data are easily editable as text without any proprietary software and "
"ensuring all information is human-readable, not being obscured by any custom "
@@ -2920,7 +2920,7 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:1592
-msgid "the _Photos_ tab of the *Dive Notes* panel."
+msgid "the _Photos_ tab of the *Notes* panel."
msgstr ""
#. type: Plain text
@@ -2977,9 +2977,9 @@ msgstr ""
#: ./user-manual.txt:1623
msgid ""
"Photographs associated with a dive are shown as thumbnails in the _Photos_ "
-"tab of the _Dive Notes_ panel. Photos taken in rapid succession during a "
-"dive (therefore sometimes with large overlap on the dive profile) can easily "
-"be accessed in the _Photos_ tab. This tab serves as a tool for individually "
+"tab of the _Notes_ panel. Photos taken in rapid succession during a dive "
+"(therefore sometimes with large overlap on the dive profile) can easily be "
+"accessed in the _Photos_ tab. This tab serves as a tool for individually "
"accessing the photos of a dive, while the stubs on the dive profile give an "
"indication of when during a dive a photo was taken. By single-clicking on a "
"thumbnail in the _Photos_ panel, a photo is selected. By double-clicking a "
@@ -3043,8 +3043,8 @@ msgstr ""
msgid ""
"*Describe the cylinders used during the dive* This is performed in the "
"*Equipment tab* of\n"
-"the *Dive Info* panel, as xref:cylinder_definitions[described above]. Enter "
-"the cylinders one by one,\n"
+"the *Info* panel, as xref:cylinder_definitions[described above]. Enter the "
+"cylinders one by one,\n"
"specifying the characteristics of the cylinder and the gas composition "
"within each cylinder.\n"
msgstr ""
@@ -3074,7 +3074,7 @@ msgid ""
"right-clicking, follow the context menu to \"Add gas change\" and select the "
"appropriate cylinder from\n"
"those defined during the first step, above (see image below). If the\n"
-"*tank bar* button in the ttolbar has been activated, the cylinder switches "
+"*tank bar* button in the toolbar has been activated, the cylinder switches "
"are also indicated in the\n"
"tank bar.\n"
msgstr ""
@@ -3140,7 +3140,7 @@ msgid ""
"*Within _Subsurface_ describe the cylinders used during the dive*. The diver "
"needs to provide the\n"
"specifications of the different cylinders, using the *Equipment* tab of the "
-"*Dive Info Panel* (see\n"
+"*Info Panel* (see\n"
"image below where two 12 litre cylinder were used).\n"
msgstr ""
@@ -3166,7 +3166,7 @@ msgid ""
"image below). After all\n"
"the cylinder change events have been recorded on the dive profile, the "
"correct cylinder pressures\n"
-"for both cylinders are shown on the dive profile, as inthe image below.\n"
+"for both cylinders are shown on the dive profile, as in the image below.\n"
msgstr ""
#. type: Target for macro image
@@ -3178,7 +3178,7 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:1703
msgid ""
-"This section gives an example of the versatility of _Subsurface_ as a give "
+"This section gives an example of the versatility of _Subsurface_ as a dive "
"logging tool."
msgstr ""
@@ -3219,7 +3219,7 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:1722
-msgid "Select pSCR in the _Dive Mode_ dropdown list on the *Dive Info* panel."
+msgid "Select pSCR in the _Dive Mode_ dropdown list on the *Info* panel."
msgstr ""
#. type: Plain text
@@ -3235,7 +3235,7 @@ msgstr ""
#: ./user-manual.txt:1731
msgid ""
"If a pSCR _Dive Mode_ has been selected, the dive ceiling for pSCR dives is "
-"adjusted for the oxygen drop accross the mouthpiece which often requires "
+"adjusted for the oxygen drop across the mouthpiece which often requires "
"longer decompression periods. Below is a dive profile of a pSCR dive using "
"EAN36 on the back cylinder and oxygen for decompression. Note that this dive "
"lasted over two hours."
@@ -3453,7 +3453,7 @@ msgid ""
"two cylinders are shown as green lines overlapping the depth profile. In "
"addition, start and end pressures for both oxygen and diluent cylinders are "
"shown in the _Equipment Tab_. Below is a dive profile for a CCR dive, "
-"including an overaly of setpoint and oxygen sensor data, as well as the "
+"including an overlay of setpoint and oxygen sensor data, as well as the "
"cylinder pressure data. In this case there is good agreement from the "
"readings of the two oxygen sensors."
msgstr ""
@@ -3489,17 +3489,17 @@ msgstr ""
#. type: Title ===
#: ./user-manual.txt:1848
#, no-wrap
-msgid "The *Dive Info* tab (for individual dives)"
+msgid "The *Info* tab (for individual dives)"
msgstr ""
#. type: Plain text
#: ./user-manual.txt:1855
msgid ""
-"The Dive Info tab gives some summary information about a particular dive "
-"that has been selected in the *Dive List*. Useful information here includes "
-"the surface interval before the dive, the maximum and mean depths of the "
-"dive, the gas volume consumed, the surface air consumption (SAC) and the "
-"number of oxygen toxicity units (OTU) incurred."
+"The Info tab gives some summary information about a particular dive that has "
+"been selected in the *Dive List*. Useful information here includes the "
+"surface interval before the dive, the maximum and mean depths of the dive, "
+"the gas volume consumed, the surface air consumption (SAC) and the number of "
+"oxygen toxicity units (OTU) incurred."
msgstr ""
#. type: Plain text
@@ -4084,11 +4084,11 @@ msgid ""
"breathing gas. The EAD is the depth of a hypothetical air dive that has the "
"same partial pressure of nitrogen as the current depth of the nitrox dive at "
"hand. A nitrox dive leads to the same decompression obligation as an air "
-"dive to the depth equalling the EAD. The END is the depth of a hypothetical "
+"dive to the depth equaling the EAD. The END is the depth of a hypothetical "
"air dive that has the same sum of partial pressures of the narcotic gases "
"nitrogen and oxygen as the current trimix dive. A trimix diver can expect "
-"the same narcotic effect as a diver breathing air diving at a depth "
-"equalling the END."
+"the same narcotic effect as a diver breathing air diving at a depth equaling "
+"the END."
msgstr ""
#. type: Plain text
@@ -4362,14 +4362,14 @@ msgstr ""
msgid ""
"Normally, in the dive list, minimal information is included in the trip "
"title. More information about a trip can be added by selecting its trip "
-"title from the *Dive List*. This shows a *Trip Notes* tab in the *Dive "
-"Notes* panel. Here users can add or edit information about the date/time, "
-"the trip location and any other general comments about the trip as a whole "
-"(e.g. the dive company that was dived with, the general weather and surface "
-"conditions during the trip, etc.). After entering this information, users "
-"should select *Save* from the buttons at the top right of the *Trip Notes* "
-"tab. The trip title in the *Dive List* panel should now reflect some of the "
-"edited information."
+"title from the *Dive List*. This shows a *Trip Notes* tab in the *Notes* "
+"panel. Here users can add or edit information about the date/time, the trip "
+"location and any other general comments about the trip as a whole (e.g. the "
+"dive company that was dived with, the general weather and surface conditions "
+"during the trip, etc.). After entering this information, users should "
+"select *Save* from the buttons at the top right of the *Trip Notes* tab. The "
+"trip title in the *Dive List* panel should now reflect some of the edited "
+"information."
msgstr ""
#. type: Title ====
@@ -4526,9 +4526,9 @@ msgid ""
"panel. Users can merge these dives onto a single dive by selecting the "
"appropriate dives, right-clicking them to bring up the context menu and then "
"selecting *Merge selected dives*. It may be necessary to edit the dive "
-"information in the *Dive Notes* panel to reflect events or conditions that "
-"apply to the merged dive. The figure below shows the depth profile of two "
-"such dives that were merged:"
+"information in the *Notes* panel to reflect events or conditions that apply "
+"to the merged dive. The figure below shows the depth profile of two such "
+"dives that were merged:"
msgstr ""
#. type: Target for macro image
@@ -4651,10 +4651,10 @@ msgstr ""
#: ./user-manual.txt:2465
msgid ""
"Having established a login to _Facebook_, transfer of a dive profile to "
-"one's _Facebook_ timeline is easy. A _Facebook_ icon appears in the *Dive "
-"Notes* panel of _Subsurface_ (See image *A* below). Ensure that the dive "
-"that you want to transfer to the timeline is depicted in the _Subsurface_ "
-"*Dive Profile* panel. Select the _Facebook_ icon, and a dialogue is shown, "
+"one's _Facebook_ timeline is easy. A _Facebook_ icon appears in the *Notes* "
+"panel of _Subsurface_ (See image *A* below). Ensure that the dive that you "
+"want to transfer to the timeline is depicted in the _Subsurface_ *Dive "
+"Profile* panel. Select the _Facebook_ icon, and a dialogue is shown, "
"determining the amount of additional information transferred with the dive "
"profile (see image *B*, below). In order to transfer a dive profile to "
"_Facebook_, the name of a _Facebook_ album needs to be provided. The "
@@ -4744,7 +4744,7 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:2501
msgid ""
-"_DiveShare_ is also a dive log repostory on the Internet focusing on the "
+"_DiveShare_ is also a dive log repository on the Internet focusing on the "
"recreational dives. In order to upload dives one has to provide a used ID, "
"so registration with _http://scubadiveshare.com_ is required."
msgstr ""
@@ -5219,7 +5219,7 @@ msgstr ""
msgid ""
" ** *Default cylinder*: Here users can specify the default cylinder listed "
"in\n"
-" the *Equipment* tab of the *Dive Notes* panel.\n"
+" the *Equipment* tab of the *Notes* panel.\n"
msgstr ""
#. type: Plain text
@@ -5658,7 +5658,7 @@ msgid ""
"sections (see image below). The *setup* parameters for a dive are entered "
"into the several sections on the left hand side of the screen. The setup is "
"divided into several sections: Available Gases, Rates, Planning, Gas Options "
-"and Dive Notes."
+"and Notes."
msgstr ""
#. type: Plain text
@@ -5720,16 +5720,15 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:2924
msgid ""
-"In the table labelled _Available Gases_, add the information of the "
-"cylinders to be used as well as the gas composition within that "
-"cylinder. This is done in a similar way as for <<S_CylinderData,providing "
-"cylinder data for dive logs>>. Choose the cylinder type by double clicking "
-"the cylinder type and using the dropdown list, then specify the work "
-"pressure of this cylinder. By leaving the oxygen concentration (O2%) filed "
-"empty, the cylinder is assumed to contain air. Otherwise enter the oxygen "
-"and/or helium concentration in the boxes provided in this dialogue. Add "
-"additional cylinders by using the \"+\" icon to the top righthand of the "
-"dialogue."
+"In the table labeled _Available Gases_, add the information of the cylinders "
+"to be used as well as the gas composition within that cylinder. This is done "
+"in a similar way as for <<S_CylinderData,providing cylinder data for dive "
+"logs>>. Choose the cylinder type by double clicking the cylinder type and "
+"using the dropdown list, then specify the work pressure of this cylinder. By "
+"leaving the oxygen concentration (O2%) filed empty, the cylinder is assumed "
+"to contain air. Otherwise enter the oxygen and/or helium concentration in "
+"the boxes provided in this dialogue. Add additional cylinders by using the "
+"\"+\" icon to the top righthand of the dialogue."
msgstr ""
#. type: Plain text
@@ -5883,7 +5882,7 @@ msgid ""
"features of the dive have been completed, e.g. the bottom time segment and "
"deep stops (if these are implemented). Leave the remaining waypoints on the "
"ascent to _Subsurface_. In most cases _Subsurface_ computes additional way "
-"points in order to fulfil decompression requirements for that dive. A "
+"points in order to fulfill decompression requirements for that dive. A "
"waypoint can be moved by selecting that waypoint and by using the arrow "
"keys. The waypoints listed in the _Dive Planner Points_ dialogue can be "
"edited by hand in order to obtain a precise presentation of the dive "
@@ -5949,7 +5948,7 @@ msgstr ""
msgid ""
"On the bottom right of the dive planner, under _Dive Plan Details_, the "
"exact details of the dive plan are provided. These details may be modified "
-"by checking any of the options under the _Dive Notes_ section of the dive "
+"by checking any of the options under the _Notes_ section of the dive "
"planner, immediately to the left of the _Dive Plan Details_. If a _Verbatim "
"diveplan_ is requested, a detailed sentence-level explanation of the dive "
"plan is given. If any of the management specifications have been exceeded "
@@ -6050,7 +6049,7 @@ msgid ""
"ratio (default 10:1) as well as the metabolism rate. The calculation also "
"takes the oxygen drop\n"
"accross the mouthpiece of the rebreather into account. If the\n"
-"pO~2~ drops below what is considered a save value, a warning apears in the "
+"pO~2~ drops below what is considered a save value, a warning appears in the "
"_Dive plan\n"
"details_. A typical pSCR configuration is with a single cylinder and one or "
"more bail-out\n"
@@ -6062,7 +6061,7 @@ msgid ""
"is comparable\n"
"to that of the CCR dive above, but note the longer ascent duration due to "
"the lower oxygen\n"
-"in the loop due to the oxygen drop accross the mouthpiece of the pSCR "
+"in the loop due to the oxygen drop across the mouthpiece of the pSCR "
"equipment.\n"
msgstr ""
@@ -6153,8 +6152,8 @@ msgstr ""
msgid ""
"Dive plans have many characteristics in common with dive logs (dive profile, "
"dive notes, etc). After a dive plan has been saved, the dive details and "
-"gas calculations are saved in the *Dive Notes* tab. While a dive plan is "
-"being designed, it can be printed using the _Print_ button in the dive "
+"gas calculations are saved in the *Notes* tab. While a dive plan is being "
+"designed, it can be printed using the _Print_ button in the dive "
"planner. This prints the dive details and gas calculations in the _Dive Plan "
"Details_ panel of the dive planner. However, after the plan has been saved, "
"it is represented in a way very similar to a dive log and the gas "
@@ -6367,7 +6366,7 @@ msgid "<<S_ViewPanels,_Profile_>> - View only the *Dive Profile* panel."
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3187
+#: ./user-manual.txt:3115
msgid "<<S_ViewPanels,_Info_>> - View only the *Dive Notes* panel."
msgstr ""
@@ -7132,8 +7131,8 @@ msgstr ""
#. type: Plain text
#: ./user-manual.txt:3549
msgid ""
-"In the dropdown list on the middle right labeled '_Pre-configured "
-"imports_\", select _APD Log Viewer_."
+"In the dropdown list on the top left labeled '_Pre-configured imports_\", "
+"select _APD Log Viewer_."
msgstr ""
#. type: Plain text
@@ -7386,30 +7385,36 @@ msgstr ""
msgid "Exporting from Atomic Logbook"
msgstr ""
+#. type: Named 'icon' AttributeList argument for style 'icon'
+#: ./user-manual.txt:3632
+#, no-wrap
+msgid "images/icons/atomiclogo.jpg"
+msgstr ""
+
#. type: Plain text
-#: ./user-manual.txt:3638
+#: ./user-manual.txt:3566
msgid ""
"Atomic Logbook is a Windows software by Atomic Aquatics. It allows "
"downloading of dive information from Cobalt and Cobalt 2 dive computers. "
-"The divelog is kept in a SQlite database at "
+"The divelog is kept in a SQLite database at "
"C:\\ProgramData\\AtomicsAquatics\\Cobalt-Logbook\\Cobalt.db. This file can "
"be directly imported to Subsurface."
msgstr ""
#. type: Title ===
-#: ./user-manual.txt:3640
+#: ./user-manual.txt:3568
#, no-wrap
msgid "Exporting from Mares Dive Organiser V2.1"
msgstr ""
#. type: Named 'icon' AttributeList argument for style 'icon'
-#: ./user-manual.txt:3643
+#: ./user-manual.txt:3571
#, no-wrap
msgid "images/icons/mareslogo.jpg"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3651
+#: ./user-manual.txt:3579
msgid ""
"Mares Dive Organiser is a Windows application. The dive log is kept as a "
"Microsoft SQL Compact Edition database with a '.sdf' filename extension. The "
@@ -7420,7 +7425,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3656
+#: ./user-manual.txt:3584
msgid ""
"Within Dive Organiser, select _Database -> Backup_ from the main menu and "
"back up the database to the desk top. This creates a zipped file "
@@ -7428,36 +7433,36 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3659
+#: ./user-manual.txt:3587
msgid ""
"Rename the file to DiveOrganiserxxxxx.zip. Inside the zipped directory is a "
"file _DiveOrganiser.sdf_."
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3660
+#: ./user-manual.txt:3588
msgid "Extract the _.sdf_ file from the zipped folder to your Desktop."
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3661
+#: ./user-manual.txt:3589
msgid "The password for accessing the .zip file is _mares_."
msgstr ""
#. type: Title ===
-#: ./user-manual.txt:3663
+#: ./user-manual.txt:3591
#, no-wrap
msgid "Exporting from *DivingLog 5.0*"
msgstr ""
#. type: Named 'icon' AttributeList argument for style 'icon'
-#: ./user-manual.txt:3665
+#: ./user-manual.txt:3593
#, no-wrap
msgid "images/icons/divingloglogo.jpg"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3674
+#: ./user-manual.txt:3602
msgid ""
"Unfortunately DivingLog XML files give us no indication on the preferences "
"set on one's system. So in order for _Subsurface_ to be able to successfully "
@@ -7468,28 +7473,28 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3676
+#: ./user-manual.txt:3604
msgid "In DivingLog open the 'File -> Export -> XML' menu"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3677
+#: ./user-manual.txt:3605
msgid "Select the dives to export"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3678
+#: ./user-manual.txt:3606
msgid "Click on the export button and select the filename"
msgstr ""
#. type: Title ==
-#: ./user-manual.txt:3680
+#: ./user-manual.txt:3608
#, no-wrap
msgid "APPENDIX D: Exporting a spreadsheet to CSV format"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3689
+#: ./user-manual.txt:3617
msgid ""
"Many divers keep a diving log in some form of a digital file, commonly a "
"spreadsheet with various fields of information. These logs can be easily "
@@ -7502,7 +7507,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3695
+#: ./user-manual.txt:3623
msgid ""
"The first step is to organize the diving data in the spreadsheet, so that "
"the first row contains the names (or titles) of each column and the "
@@ -7513,40 +7518,40 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3697
+#: ./user-manual.txt:3625
msgid "Date: use one of the following formats: yyyy-mm-dd, dd.mm.yyyy, mm/dd/yyyy"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3698
+#: ./user-manual.txt:3626
msgid "Duration: the format should be minutes:seconds."
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3699
+#: ./user-manual.txt:3627
msgid ""
-"Unit system: only one unit system shold be used (i.e., no mixture between "
+"Unit system: only one unit system should be used (i.e., no mixture between "
"imperial and metric units)"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3700
+#: ./user-manual.txt:3628
msgid "Tags and buddies: values should be separated using a comma."
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3701
+#: ./user-manual.txt:3629
msgid "GPS position: users must use decimal degrees, e.g. 30.22496 30.821798"
msgstr ""
#. type: Title ===
-#: ./user-manual.txt:3702
+#: ./user-manual.txt:3630
#, no-wrap
msgid "_LibreOffice Calc_ and _OpenOffice Calc_"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3706
+#: ./user-manual.txt:3634
msgid ""
"These are open source spreadsheet applications forming parts of larger open "
"source office suite applications. The user interaction with _LibreOffice_ "
@@ -7557,13 +7562,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
-#: ./user-manual.txt:3707
+#: ./user-manual.txt:3635
#, no-wrap
msgid "images/LOffice_spreadsheetdata.jpg"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3710
+#: ./user-manual.txt:3638
msgid ""
"To export the data as a .CSV file from within LibreOffice click _File -> "
"Save As_. On the dialogue that comes up, select the _Text CSV (.csv)_ as the "
@@ -7571,13 +7576,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
-#: ./user-manual.txt:3711
+#: ./user-manual.txt:3639
#, no-wrap
msgid "images/LOffice_save_as_options.jpg"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3714
+#: ./user-manual.txt:3642
msgid ""
"After selecting _Save_, select the appropriate field delimiter (choose _Tab_ "
"to prevent conflicts with the comma when using this as a decimal point), "
@@ -7585,13 +7590,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
-#: ./user-manual.txt:3715
+#: ./user-manual.txt:3643
#, no-wrap
msgid "images/LOffice_field_options.jpg"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3718
+#: ./user-manual.txt:3646
msgid ""
"One can double check the .CSV file by opening it with a text editor, and "
"then import the dive data as explained on the section "
@@ -7599,13 +7604,13 @@ msgid ""
msgstr ""
#. type: Title ===
-#: ./user-manual.txt:3719
+#: ./user-manual.txt:3647
#, no-wrap
msgid "Microsoft _Excel_"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3725
+#: ./user-manual.txt:3653
msgid ""
"The field delimiter (called \"_list separator_\" in Microsoft manuals) is "
"not accessible from within _Excel_ and needs to be set through the "
@@ -7616,19 +7621,19 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3727
+#: ./user-manual.txt:3655
msgid ""
"In Microsoft Windows, click the *Start* button, and then select _Control "
"Panel_ from the list on the right-hand side."
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3728
+#: ./user-manual.txt:3656
msgid "Open the _Regional and Language Options_ dialog box."
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3731
+#: ./user-manual.txt:3659
msgid ""
"Do one of the following: ** In Windows 7, click the _Formats_ tab, and then "
"click _Customize this format_. ** In Windows XP, click the _Regional "
@@ -7636,48 +7641,48 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3732
+#: ./user-manual.txt:3660
msgid ""
"Type a new separator in the _List separator_ box. To use a TAB-delimited "
"file, type the word TAB in the box."
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3733
+#: ./user-manual.txt:3661
msgid "Click _OK_ twice."
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3735
+#: ./user-manual.txt:3663
msgid "Below is an image of the _Control Panel_:"
msgstr ""
#. type: Target for macro image
-#: ./user-manual.txt:3736
+#: ./user-manual.txt:3664
#, no-wrap
msgid "images/Win_SaveCSV2.jpg"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3739
+#: ./user-manual.txt:3667
msgid "To export the dive log in CSV format:"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3741
+#: ./user-manual.txt:3669
msgid ""
"With the dive log opened in _Excel_, select the round Windows button at the "
"top left, then _Save As_."
msgstr ""
#. type: Target for macro image
-#: ./user-manual.txt:3742
+#: ./user-manual.txt:3670
#, no-wrap
msgid "images/Win_SaveCSV1.jpg"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3745
+#: ./user-manual.txt:3673
msgid ""
"Click on the left-hand part of the _Save as_ option, NOT on the arrow on the "
"right-hand. This brings up a dialogue for saving the spreadsheet in an "
@@ -7687,13 +7692,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
-#: ./user-manual.txt:3746
+#: ./user-manual.txt:3674
#, no-wrap
msgid "images/Win_SaveCSV3.jpg"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3749
+#: ./user-manual.txt:3677
msgid ""
"Select the _Save_ button. The CSV-formatted file is saved into the folder "
"that was selected. One can double check the .CSV file by opening it with a "
@@ -7702,19 +7707,19 @@ msgid ""
msgstr ""
#. type: Title ==
-#: ./user-manual.txt:3750
+#: ./user-manual.txt:3678
#, no-wrap
msgid "APPENDIX E: FAQs."
msgstr ""
#. type: Title ===
-#: ./user-manual.txt:3752
+#: ./user-manual.txt:3680
#, no-wrap
msgid "Subsurface appears to miscalculate gas consumption and SAC"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3756
+#: ./user-manual.txt:3684
msgid ""
"'Question': I dived with a 12.2 l tank, starting with 220 bar and ending "
"with 100 bar, and I calculate a different SAC compared what _Subsurface_ "
@@ -7722,7 +7727,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3762
+#: ./user-manual.txt:3690
msgid ""
"'Answer': Not really. What happens is that _Subsurface_ actually calculates "
"gas consumption differently - and better - than you expect. In particular, "
@@ -7732,7 +7737,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3768
+#: ./user-manual.txt:3696
msgid ""
"and that's true for an ideal gas, and it's what you get taught in dive "
"theory. But an \"ideal gas\" doesn't actually exist, and real gases "
@@ -7742,12 +7747,12 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3770
+#: ./user-manual.txt:3698
msgid "+consumption = (amount_of_air_at_beginning - amount_of_air_at_end)+"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3776
+#: ./user-manual.txt:3704
msgid ""
"where the amount of air is *not* just \"tank size times pressure in bar\". "
"It's a combination of: \"take compressibility into account\" (which is a "
@@ -7758,12 +7763,12 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3778
+#: ./user-manual.txt:3706
msgid "+12.2*((220-100)/1.013)+"
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3783
+#: ./user-manual.txt:3711
msgid ""
"which is about 1445, not 1464. So there was 19 l too much in your simple "
"calculation that ignored the difference between 1 bar and one ATM. The "
@@ -7773,7 +7778,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3789
+#: ./user-manual.txt:3717
msgid ""
"So be happy: your SAC really is better than your calculations indicated. Or "
"be sad: your cylinder contains less air than you thought it did. And as "
@@ -7784,7 +7789,7 @@ msgid ""
msgstr ""
#. type: Title ===
-#: ./user-manual.txt:3790
+#: ./user-manual.txt:3718
#, no-wrap
msgid ""
"Some dive profiles have time discrepancies with the recorded samples from my "
@@ -7792,7 +7797,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3794
+#: ./user-manual.txt:3722
msgid ""
"_Subsurface_ ends up ignoring surface time for many things (average depth, "
"divetime, SAC, etc). 'Question': Why do dive durations in my dive computer "
@@ -7800,7 +7805,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: ./user-manual.txt:3802
+#: ./user-manual.txt:3730
msgid ""
"'Answer': For example, if you end up doing a weight check (deep enough to "
"trigger the \"dive started\") but then come back up and wait five minutes "
diff --git a/Documentation/FAQ.wordpress b/Documentation/FAQ.wordpress
index 1d7082eae..0cd64ae15 100644
--- a/Documentation/FAQ.wordpress
+++ b/Documentation/FAQ.wordpress
@@ -100,4 +100,15 @@ Many common programs are already supported and we are always happy to try to add
We support a large number of dive computers already and are always happy to add support for more. Please contact us via the user forums so we can try to help. Some vendors have actively helped us in our work and adding support for new models from those vendors is usually easy. Other vendors are more neutral, some are actively hostile. Without help from the vendor it can be rather challenging to reverse engineer the transfer protocol and the dive encoding, but with sufficient help from you it is often possible to do so.
+A good starting point is often to send us a libdivecomputer log and dump (you can pick those in the dive computer download dialog) when connecting to the dive computer using a similar existing model (if possible).
+
+[/expand]
+[expand title="Is there a virus in the Subsurface installer?"]
+
+If you get a warning message or if Subsurface is blocked by your anti virus software, that is almost certainly a false positive. Subsurface is not built on a Windows machine, it is cross built from source on Linux on a well maintained and clean server.
+
+Most/all Windows AV software packages support an "add exception" feature, which skips an executable from being scanned. Try adding Subsurface to the list of non-harmful software. If the Subsurface installer download is detected as malware, please temporary disable your AV software until Subsurface is installed
+
+In either case, please inform your AV software vendor of a "false positive" as we assure your that Subsurface is not malware
+
[/expand]
diff --git a/Documentation/fr/po/subsurface-manual.fr.po b/Documentation/fr/po/subsurface-manual.fr.po
index 18f4a6d06..a906bb427 100644
--- a/Documentation/fr/po/subsurface-manual.fr.po
+++ b/Documentation/fr/po/subsurface-manual.fr.po
@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: subsurface@subsurface-divelog.org\n"
-"POT-Creation-Date: 2015-02-06 09:16+0100\n"
-"PO-Revision-Date: 2015-02-06 14:30+0100\n"
+"POT-Creation-Date: 2015-02-15 14:23+0100\n"
+"PO-Revision-Date: 2015-02-15 14:25+0100\n"
"Last-Translator: Guillaume GARDET <guillaume.gardet@opensuse.org>\n"
"Language-Team: French <opensuse-fr@opensuse.org>\n"
"Language: fr\n"
@@ -275,14 +275,14 @@ msgstr ""
#. type: Plain text
#: user-manual.txt:108
msgid ""
-"The *Dive Info* to the top left, giving more detailed information on the "
-"dive selected in the *Dive List*, including some statistics for the selected "
-"dive or for all highlighted dive(s)."
+"The *Info* to the top left, giving more detailed information on the dive "
+"selected in the *Dive List*, including some statistics for the selected dive "
+"or for all highlighted dive(s)."
msgstr ""
-"Les *informations de plongée* en haut à gauche, fournissent des informations "
-"détaillées sur la plongée sélectionnée dans la *liste des plongées*, dont "
-"des statistiques pour la plongée sélectionnée ou pour toutes les plongées "
-"mises en surbrillance."
+"Les *informations* en haut à gauche, fournissent des informations détaillées "
+"sur la plongée sélectionnée dans la *liste des plongées*, dont des "
+"statistiques pour la plongée sélectionnée ou pour toutes les plongées mises "
+"en surbrillance."
#. type: Plain text
#: user-manual.txt:111
@@ -313,7 +313,7 @@ msgid ""
"information and profile of the _selected dive_ are shown in the respective "
"panels. On the other hand, if one highlights more than one dive the last "
"highlighted dive is the _selected dive_, but summary data of all "
-"_highlighted dives_ are shown in the *Stats* tab of the *Dive Info* panel "
+"_highlighted dives_ are shown in the *Stats* tab of the *Info* panel "
"(maximum, minimum and average depths, durations, water temperatures and SAC; "
"total time and number of dives selected)."
msgstr ""
@@ -323,9 +323,9 @@ msgstr ""
"plus d'une plongée est mise en surbrillance seule la dernière mise en "
"surbrillance est la _plongée sélectionnée_, mais les données de _toutes les "
"plongées mises en surbrillances_ sont affichées dans l'onglet *Stats* du "
-"panneau *informations de plongée* (profondeur maximale, minimale et moyenne, "
-"les durées, les températures de l'eau et le SAC (air consommé); temps total "
-"et nombre de plongées sélectionnées)."
+"panneau *informations* (profondeur maximale, minimale et moyenne, les "
+"durées, les températures de l'eau et le SAC (air consommé); temps total et "
+"nombre de plongées sélectionnées)."
#. type: Target for macro image
#: user-manual.txt:127
@@ -366,7 +366,7 @@ msgstr "*Profil* : affiche uniquement le profile de plongée de la plongée sél
#: user-manual.txt:141
#, no-wrap
msgid ""
-"*Info*: Show only the Dive Notes about the last selected dive and statistics for\n"
+"*Info*: Show only the Notes about the last selected dive and statistics for\n"
"all highlighted dives.\n"
msgstr ""
"*Info* : affiche uniquement les notes de plongées de la dernière plongée sélectionnée et les statistiques pour\n"
@@ -541,11 +541,11 @@ msgid ""
"guide, and some remarks about the dive. _Subsurface_ can store much more "
"information than this for each dive. In order to add a dive to a dive log, "
"select _Log -> Add Dive_ from the Main Menu. The program then shows three "
-"panels to enter information for a dive: two tabs in the *Dive Info* panel "
-"(*Dive Notes* and *Equipment*), as well as the *Dive Profile* panel that "
-"displays a graphical profile of each dive. These panels are respectively "
-"marked [red]#A#, [red]#B# and [red]#C# in the figure below. Each of these "
-"tabs will now be explained for data entry."
+"panels to enter information for a dive: two tabs in the *Info* panel "
+"(*Notes* and *Equipment*), as well as the *Dive Profile* panel that displays "
+"a graphical profile of each dive. These panels are respectively marked "
+"[red]#A#, [red]#B# and [red]#C# in the figure below. Each of these tabs will "
+"now be explained for data entry."
msgstr ""
#. type: Target for macro image
@@ -557,10 +557,10 @@ msgstr "images/AddDive1_f20.jpg"
#. type: Plain text
#: user-manual.txt:215
msgid ""
-"When one edits a field in Dive notes or Equipment panels, _Subsurface_ "
-"enters *Editing Mode*, indicated by the message in the blue box at the top "
-"of the _Dive Notes_ panel (see the image below). This message is displayed "
-"in all the panels under Dive notes and Equipment when in *Editing Mode*."
+"When one edits a field in Notes or Equipment panels, _Subsurface_ enters "
+"*Editing Mode*, indicated by the message in the blue box at the top of the "
+"_Notes_ panel (see the image below). This message is displayed in all the "
+"panels under Notes and Equipment when in *Editing Mode*."
msgstr ""
#. type: Target for macro image
@@ -584,16 +584,16 @@ msgstr ""
#. type: Title ====
#: user-manual.txt:224 user-manual.txt:700
#, no-wrap
-msgid "Dive Notes"
-msgstr "Notes de plongée"
+msgid "Notes"
+msgstr "Notes"
#. type: Plain text
#: user-manual.txt:230
msgid ""
"This panel contains the date, time and place information for a particular "
"dive, environmental conditions, co-divers and buddies, as well as some "
-"descriptive information. If one clicks on the *Dive Notes* tab, the "
-"following fields are visible:"
+"descriptive information. If one clicks on the *Notes* tab, the following "
+"fields are visible:"
msgstr ""
#. type: Target for macro image
@@ -781,7 +781,7 @@ msgid ""
"The *Save* and *Cancel* buttons are used to save all the information for "
"tabs in the info panel and in the dive profile panel, so there's no need to "
"use them until ALL other information has been added. Here is an example of a "
-"completed Dive Notes panel:"
+"completed Notes panel:"
msgstr ""
#. type: Target for macro image
@@ -1031,13 +1031,13 @@ msgstr ""
#. type: Plain text
#: user-manual.txt:473
msgid ""
-"The information entered in the *Dive Notes* tab, the *Equipment* tab as well "
-"as the *Dive Profile* can now be saved in the user's logbook by using the "
-"two buttons on the top right hand of the Dive Notes tab. If the _Save_ "
-"button is clicked, the dive data are saved in the current logbook. If the "
-"_Cancel_ button is clicked, the newly entered dive data are discarded. When "
-"exiting _Subsurface_, the user will be prompted once more to save the "
-"logbook with the new dive(s)."
+"The information entered in the *Notes* tab, the *Equipment* tab as well as "
+"the *Dive Profile* can now be saved in the user's logbook by using the two "
+"buttons on the top right hand of the Notes tab. If the _Save_ button is "
+"clicked, the dive data are saved in the current logbook. If the _Cancel_ "
+"button is clicked, the newly entered dive data are discarded. When exiting "
+"_Subsurface_, the user will be prompted once more to save the logbook with "
+"the new dive(s)."
msgstr ""
#. type: Title ===
@@ -1150,7 +1150,7 @@ msgid ""
"on most dive computers and also saves battery power of the dive computer (at "
"least for those not charging while connected via USB). If, for some reason, "
"the user wishes to import ALL dives from the dive computer, even though some "
-"may already be in the logbook, then check the check box labelled _Force "
+"may already be in the logbook, then check the check box labeled _Force "
"download of all dives_."
msgstr ""
@@ -1416,8 +1416,8 @@ msgstr ""
msgid ""
"With the uploaded dives in the *Dive List*, the information from the dive "
"computer is not complete and more details must be added in order to have a "
-"fuller record of the dives. To do this, the *Dive Notes* and the *Equipment* "
-"tabs on the top left hand of the _Subsurface_ window should be used."
+"fuller record of the dives. To do this, the *Notes* and the *Equipment* tabs "
+"on the top left hand of the _Subsurface_ window should be used."
msgstr ""
#. type: Plain text
@@ -1429,8 +1429,8 @@ msgid ""
"In a few cases, (e.g. APD rebreathers) one also has to provide the date and "
"time of the dive. If the contents of this tab is changed or edited in any "
"way, the message in a blue box at the top of the panel indicates that the "
-"dive is being edited. If one clicks on the *Dive Notes* tab, the following "
-"fields are visible:"
+"dive is being edited. If one clicks on the *Notes* tab, the following fields "
+"are visible:"
msgstr ""
#. type: Target for macro image
@@ -1686,17 +1686,17 @@ msgstr ""
msgid ""
"_METHOD 1_: After uploading dives from a dive computer, the dive profiles of "
"the uploaded dives are shown in the *Dive profile* tab, as well as a few "
-"items of information in the *Dive Notes* tab (e.g. water temperature) and in "
-"the *Equipment* tab (e.g. gas pressures and gas composition). However the "
-"other fields remain empty. It may be useful to simultaneously edit some of "
-"the fields in the *Dive Notes* and *Equipment* tabs. For instance, it is "
-"possible that a diver performed several dives during a single day, using "
-"identical equipment while diving at the same dive site or with the same dive "
-"master and/or buddy or tags. Instead of completing the information for each "
-"of these dives separately, one can select all the dives for that day in the "
-"*Dive List* and insert the same information in the *Dive Notes* and "
-"*Equipment* fields that need identical information. This is achieved by "
-"editing the dive notes or the equipment for any one of the selected dives."
+"items of information in the *Notes* tab (e.g. water temperature) and in the "
+"*Equipment* tab (e.g. gas pressures and gas composition). However the other "
+"fields remain empty. It may be useful to simultaneously edit some of the "
+"fields in the *Notes* and *Equipment* tabs. For instance, it is possible "
+"that a diver performed several dives during a single day, using identical "
+"equipment while diving at the same dive site or with the same dive master "
+"and/or buddy or tags. Instead of completing the information for each of "
+"these dives separately, one can select all the dives for that day in the "
+"*Dive List* and insert the same information in the *Notes* and *Equipment* "
+"fields that need identical information. This is achieved by editing the dive "
+"notes or the equipment for any one of the selected dives."
msgstr ""
#. type: Plain text
@@ -1718,15 +1718,15 @@ msgstr ""
#: user-manual.txt:933
msgid ""
"_METHOD 2_:There is a different way of achieving the same goal. Select a "
-"dive with all the appropriate information typed into the *Dive Notes* and "
+"dive with all the appropriate information typed into the *Notes* and "
"*Equipment* tabs. Then, from the main menu, select _Log -> Copy dive "
"components_. A box is presented with a selection of check boxes for most of "
-"the fields in the *Dive Notes* and *Equipment* tabs. Select the fields to "
-"be copied from the currently selected dive, then select _OK_. Now, in the "
-"*Dive List*, select the dives into which this information is to be pasted. "
-"Then, from the main menu, select _Log -> Paste dive components_. All the "
-"selected dives now contain the data initially selected in the original "
-"source dive log."
+"the fields in the *Notes* and *Equipment* tabs. Select the fields to be "
+"copied from the currently selected dive, then select _OK_. Now, in the *Dive "
+"List*, select the dives into which this information is to be pasted. Then, "
+"from the main menu, select _Log -> Paste dive components_. All the selected "
+"dives now contain the data initially selected in the original source dive "
+"log."
msgstr ""
#. type: Title ====
@@ -1787,13 +1787,13 @@ msgstr ""
#. type: Plain text
#: user-manual.txt:967
msgid ""
-"The information entered in the *Dive Notes* tab and the *Equipment* tab can "
-"be saved by using the two buttons on the top right hand of the *Dive Notes* "
-"tab. If the _Save_ button is clicked, the dive data are saved. If the "
-"_Cancel_ button is clicked, then the newly entered dive data are deleted, "
-"although the dive profile obtained from the dive computer will be retained. "
-"When the user exits _Subsurface_ there is a final prompt to confirm that the "
-"new data should be saved."
+"The information entered in the *Notes* tab and the *Equipment* tab can be "
+"saved by using the two buttons on the top right hand of the *Notes* tab. If "
+"the _Save_ button is clicked, the dive data are saved. If the _Cancel_ "
+"button is clicked, then the newly entered dive data are deleted, although "
+"the dive profile obtained from the dive computer will be retained. When the "
+"user exits _Subsurface_ there is a final prompt to confirm that the new data "
+"should be saved."
msgstr ""
#. type: Title ===
@@ -2121,12 +2121,12 @@ msgid ""
"row of cells immediately above these contains the names understood by "
"_Subsurface_. The white area below the dropdown lists contains all the field "
"names that _Subsurface_ recognises. These names are in blue balloons and can "
-"be moved using a drag-and-frop action. For instance, _Subsurface_ expects "
+"be moved using a drag-and-drop action. For instance, _Subsurface_ expects "
"the column heading for Dive number (\" # \") to be \"Dive # \". If the "
"column heading that _Subsurface_ expects is not in the blue cells, then drag "
"the appropriate column heading from the upper area and drop it in the "
"appropriate blue cell at the top of the table. To indicate the correct "
-"column for \"Dive #\", drag the ballooned item labelled \"Dive # \" and drop "
+"column for \"Dive #\", drag the ballooned item labeled \"Dive # \" and drop "
"it in the blue cell immediately above the white cell containing \" # \". "
"This is depicted in the image below."
msgstr ""
@@ -2156,18 +2156,18 @@ msgstr ""
#. type: delimited block *
#: user-manual.txt:1179
msgid ""
-"_CSV_ is an abbreviation for a data file format: _Comma-Separated "
-"Variables_. It is a file format allowing someone to view or edit the "
-"information using a text editor such as Notebook (Windows), gedit (Linux) or "
-"TextWrangler (OS/X). The two main advantages of the _CSV_ format is that the "
-"data are easily editable as text without any proprietary software and "
-"ensuring all information is human-readable, not being obscured by any custom "
-"or proprietary attributes that proprietary software insert into files. "
-"Because of its simplicity the _CSV_ format is used as an interchange format "
-"between many software packages, e.g. between spreadsheet, statistical, "
-"graphics, database and diving software. Within _Subsurface_, _CSV_ files can "
-"also be used to import information from other sources such as spreadsheet-"
-"based dive logs and even from some dive computers."
+"_CSV_ is an abbreviation for a data file format: _Comma-Separated Values_. "
+"It is a file format allowing someone to view or edit the information using a "
+"text editor such as Notepad (Windows), gedit (Linux) or TextWrangler (OS/X). "
+"The two main advantages of the _CSV_ format is that the data are easily "
+"editable as text without any proprietary software and ensuring all "
+"information is human-readable, not being obscured by any custom or "
+"proprietary attributes that proprietary software insert into files. Because "
+"of its simplicity the _CSV_ format is used as an interchange format between "
+"many software packages, e.g. between spreadsheet, statistical, graphics, "
+"database and diving software. Within _Subsurface_, _CSV_ files can also be "
+"used to import information from other sources such as spreadsheet-based dive "
+"logs and even from some dive computers."
msgstr ""
#. type: delimited block *
@@ -2964,7 +2964,7 @@ msgid "After the images have been loaded, they appear in two places:"
msgstr ""
#. type: Plain text
-#: user-manual.txt:1592
+#: user-manual.txt:1588
msgid "the _Photos_ tab of the *Dive Notes* panel."
msgstr ""
@@ -3022,9 +3022,9 @@ msgstr ""
#: user-manual.txt:1623
msgid ""
"Photographs associated with a dive are shown as thumbnails in the _Photos_ "
-"tab of the _Dive Notes_ panel. Photos taken in rapid succession during a "
-"dive (therefore sometimes with large overlap on the dive profile) can easily "
-"be accessed in the _Photos_ tab. This tab serves as a tool for individually "
+"tab of the _Notes_ panel. Photos taken in rapid succession during a dive "
+"(therefore sometimes with large overlap on the dive profile) can easily be "
+"accessed in the _Photos_ tab. This tab serves as a tool for individually "
"accessing the photos of a dive, while the stubs on the dive profile give an "
"indication of when during a dive a photo was taken. By single-clicking on a "
"thumbnail in the _Photos_ panel, a photo is selected. By double-clicking a "
@@ -3086,71 +3086,7 @@ msgstr ""
#: user-manual.txt:1651
#, no-wrap
msgid ""
-"*Describe the cylinders used during the dive* This is performed in the *Equipment tab* of\n"
-"the *Dive Info* panel, as xref:cylinder_definitions[described above]. Enter the cylinders one by one,\n"
-"specifying the characteristics of the cylinder and the gas composition within each cylinder.\n"
-msgstr ""
-
-#. type: Plain text
-#: user-manual.txt:1656
-#, no-wrap
-msgid ""
-"*Record the times at which switches from one cylinder to another was done:* This is information\n"
-"provided by some dive computers (provided the diver indicated these changes to the dive computer\n"
-"by pressing specific buttons). If the dive computer does not provide the information, the diver has to\n"
-"record these changes using a different method, e.g. writing it on a slate.\n"
-msgstr ""
-
-#. type: Plain text
-#: user-manual.txt:1664
-#, no-wrap
-msgid ""
-"*Record the cylinder changes on the dive profile*: If the latter option\n"
-"was followed, the diver needs to indicate the gas change event by right-clicking at the appropriate point\n"
-"in time on the *Dive Profile* panel and indicating the cylinder to which the change was made. After\n"
-"right-clicking, follow the context menu to \"Add gas change\" and select the appropriate cylinder from\n"
-"those defined during the first step, above (see image below). If the\n"
-"*tank bar* button in the ttolbar has been activated, the cylinder switches are also indicated in the\n"
-"tank bar.\n"
-msgstr ""
-
-#. type: Plain text
-#: user-manual.txt:1668
-msgid ""
-"Having performed these tasks, _Subsurface_ indicates the appropriate use of "
-"cylinders in the dive profile. Below is a multi-cylinder dive, starting off "
-"with EAN28, then changing cylinders to EAN50 after 26 minutes to perform "
-"decompression."
-msgstr ""
-
-#. type: Target for macro image
-#: user-manual.txt:1669
-#, no-wrap
-msgid "images/multicylinder_dive.jpg"
-msgstr "images/multicylinder_dive.jpg"
-
-#. type: Title ====
-#: user-manual.txt:1671
-#, no-wrap
-msgid "Sidemount dives"
-msgstr ""
-
-#. type: Plain text
-#: user-manual.txt:1677
-msgid ""
-"Sidemount diving is just another form of multicylinder diving, often with "
-"both or all cylinders having the same gas mixture. Although it is a popular "
-"configuration for cave divers, sidemount diving can be performed by "
-"recreational divers who have completed the appropriate training. Sidemount "
-"dive logging involves, exactly as with multicylinder dives, above, three "
-"steps:"
-msgstr ""
-
-#. type: Plain text
-#: user-manual.txt:1686
-#, no-wrap
-msgid ""
-"*During the dive, record cylinder switch events*. Since sidemount diving normally involves two\n"
+"*During the dive, recording cylinder switch events*. Since sidemount diving normally involves two\n"
"cylinders with air or with the same gas mixture, _Subsurface_ distinguishes among these different\n"
"cylinders. In contrast, most dive computers that allow gas switching only distinguish among different\n"
"_gases_ used, not among different _cylinders_ used. This means that when sidemount dives are downloaded\n"
@@ -3165,7 +3101,7 @@ msgstr ""
#, no-wrap
msgid ""
"*Within _Subsurface_ describe the cylinders used during the dive*. The diver needs to provide the\n"
-"specifications of the different cylinders, using the *Equipment* tab of the *Dive Info Panel* (see\n"
+"specifications of the different cylinders, using the *Equipment* tab of the *Info Panel* (see\n"
"image below where two 12 litre cylinder were used).\n"
msgstr ""
@@ -3182,7 +3118,7 @@ msgid ""
"profile with a cylinder symbol. If the *Tank Bar* is activated using the toolbar to the left of the\n"
"profile, then the cylinder change is also indicated on the Tank Bar (see image below). After all\n"
"the cylinder change events have been recorded on the dive profile, the correct cylinder pressures\n"
-"for both cylinders are shown on the dive profile, as inthe image below.\n"
+"for both cylinders are shown on the dive profile, as in the image below.\n"
msgstr ""
#. type: Target for macro image
@@ -3194,77 +3130,12 @@ msgstr "images/sidemount1.jpg"
#. type: Plain text
#: user-manual.txt:1703
msgid ""
-"This section gives an example of the versatility of _Subsurface_ as a give "
+"This section gives an example of the versatility of _Subsurface_ as a dive "
"logging tool."
msgstr ""
#. type: Title ====
-#: user-manual.txt:1706
-#, no-wrap
-msgid "Semi-closed circuit rebreather (SCR) dives"
-msgstr ""
-
-#. type: Named 'icon' AttributeList argument for style 'icon'
-#: user-manual.txt:1708
-#, no-wrap
-msgid "images/halcyon_RB80.jpg"
-msgstr "images/halcyon_RB80.jpg"
-
-#. type: Plain text
-#: user-manual.txt:1718
-msgid ""
-"Passive semi-closed rebreathers (pSCR) comprise a technical advance in "
-"diving equipment that recirculates the breathing gas that a diver breathes, "
-"while removing carbon dioxide from the exhaled gas. While a small amount "
-"(typically a tenth) of the exhaled breathing gas is released into the water, "
-"a small amount of fresh gas is released from the back gas cylinder "
-"(typically containing nitrox). A diver, using a single cylinder of "
-"breathing gas can therefore dive for much longer periods than using a "
-"recreational open-circuit configuration. With pSCR equipment, a very small "
-"amount of breathing gas is released every time the breather inhales. With "
-"active SCR (aSCR) equipment, in contrast, a small amount of breathing gas is "
-"released continuously from the back cylinder."
-msgstr ""
-
-#. type: Plain text
-#: user-manual.txt:1720
-msgid ""
-"To log pSCR dives, no special procedures are required, just the normal steps "
-"outlined above:"
-msgstr ""
-
-#. type: Plain text
-#: user-manual.txt:1722
-msgid "Select pSCR in the _Dive Mode_ dropdown list on the *Dive Info* panel."
-msgstr ""
-
-#. type: Plain text
-#: user-manual.txt:1726
-msgid ""
-"pSCR diving often involves gas changes, requiring an additional cylinder. "
-"Define all the appropriate cylinders as described above and indicate the "
-"cylinder/gas changes as described above in the section on xref:"
-"S_MulticylinderDives[multicylinder dives]."
-msgstr ""
-
-#. type: Plain text
-#: user-manual.txt:1731
-msgid ""
-"If a pSCR _Dive Mode_ has been selected, the dive ceiling for pSCR dives is "
-"adjusted for the oxygen drop accross the mouthpiece which often requires "
-"longer decompression periods. Below is a dive profile of a pSCR dive using "
-"EAN36 on the back cylinder and oxygen for decompression. Note that this dive "
-"lasted over two hours."
-msgstr ""
-
-#. type: Target for macro image
-#: user-manual.txt:1732
-#, no-wrap
-msgid "images/pSCR_profile.jpg"
-msgstr "images/pSCR_profile.jpg"
-
-#. type: Title ====
-#: user-manual.txt:1737
+#: user-manual.txt:1667
#, no-wrap
msgid "Closed circuit rebreather (CCR) dives"
msgstr ""
@@ -3468,7 +3339,7 @@ msgid ""
"two cylinders are shown as green lines overlapping the depth profile. In "
"addition, start and end pressures for both oxygen and diluent cylinders are "
"shown in the _Equipment Tab_. Below is a dive profile for a CCR dive, "
-"including an overaly of setpoint and oxygen sensor data, as well as the "
+"including an overlay of setpoint and oxygen sensor data, as well as the "
"cylinder pressure data. In this case there is good agreement from the "
"readings of the two oxygen sensors."
msgstr ""
@@ -3504,17 +3375,17 @@ msgstr ""
#. type: Title ===
#: user-manual.txt:1848
#, no-wrap
-msgid "The *Dive Info* tab (for individual dives)"
+msgid "The *Info* tab (for individual dives)"
msgstr ""
#. type: Plain text
#: user-manual.txt:1855
msgid ""
-"The Dive Info tab gives some summary information about a particular dive "
-"that has been selected in the *Dive List*. Useful information here includes "
-"the surface interval before the dive, the maximum and mean depths of the "
-"dive, the gas volume consumed, the surface air consumption (SAC) and the "
-"number of oxygen toxicity units (OTU) incurred."
+"The Info tab gives some summary information about a particular dive that has "
+"been selected in the *Dive List*. Useful information here includes the "
+"surface interval before the dive, the maximum and mean depths of the dive, "
+"the gas volume consumed, the surface air consumption (SAC) and the number of "
+"oxygen toxicity units (OTU) incurred."
msgstr ""
#. type: Plain text
@@ -4097,10 +3968,10 @@ msgid ""
"The EAD is the depth of a hypothetical air dive that has the same partial "
"pressure of nitrogen as the current depth of the nitrox dive at hand. A "
"nitrox dive leads to the same decompression obligation as an air dive to the "
-"depth equalling the EAD. The END is the depth of a hypothetical air dive "
-"that has the same sum of partial pressures of the narcotic gases nitrogen "
-"and oxygen as the current trimix dive. A trimix diver can expect the same "
-"narcotic effect as a diver breathing air diving at a depth equalling the END."
+"depth equaling the EAD. The END is the depth of a hypothetical air dive that "
+"has the same sum of partial pressures of the narcotic gases nitrogen and "
+"oxygen as the current trimix dive. A trimix diver can expect the same "
+"narcotic effect as a diver breathing air diving at a depth equaling the END."
msgstr ""
#. type: Plain text
@@ -4373,14 +4244,14 @@ msgstr ""
msgid ""
"Normally, in the dive list, minimal information is included in the trip "
"title. More information about a trip can be added by selecting its trip "
-"title from the *Dive List*. This shows a *Trip Notes* tab in the *Dive "
-"Notes* panel. Here users can add or edit information about the date/time, "
-"the trip location and any other general comments about the trip as a whole "
-"(e.g. the dive company that was dived with, the general weather and surface "
-"conditions during the trip, etc.). After entering this information, users "
-"should select *Save* from the buttons at the top right of the *Trip Notes* "
-"tab. The trip title in the *Dive List* panel should now reflect some of the "
-"edited information."
+"title from the *Dive List*. This shows a *Trip Notes* tab in the *Notes* "
+"panel. Here users can add or edit information about the date/time, the trip "
+"location and any other general comments about the trip as a whole (e.g. the "
+"dive company that was dived with, the general weather and surface conditions "
+"during the trip, etc.). After entering this information, users should "
+"select *Save* from the buttons at the top right of the *Trip Notes* tab. The "
+"trip title in the *Dive List* panel should now reflect some of the edited "
+"information."
msgstr ""
#. type: Title ====
@@ -4537,9 +4408,9 @@ msgid ""
"Users can merge these dives onto a single dive by selecting the appropriate "
"dives, right-clicking them to bring up the context menu and then selecting "
"*Merge selected dives*. It may be necessary to edit the dive information in "
-"the *Dive Notes* panel to reflect events or conditions that apply to the "
-"merged dive. The figure below shows the depth profile of two such dives that "
-"were merged:"
+"the *Notes* panel to reflect events or conditions that apply to the merged "
+"dive. The figure below shows the depth profile of two such dives that were "
+"merged:"
msgstr ""
#. type: Target for macro image
@@ -4673,10 +4544,10 @@ msgstr "images/facebook1_f20.jpg"
#: user-manual.txt:2465
msgid ""
"Having established a login to _Facebook_, transfer of a dive profile to "
-"one's _Facebook_ timeline is easy. A _Facebook_ icon appears in the *Dive "
-"Notes* panel of _Subsurface_ (See image *A* below). Ensure that the dive "
-"that you want to transfer to the timeline is depicted in the _Subsurface_ "
-"*Dive Profile* panel. Select the _Facebook_ icon, and a dialogue is shown, "
+"one's _Facebook_ timeline is easy. A _Facebook_ icon appears in the *Notes* "
+"panel of _Subsurface_ (See image *A* below). Ensure that the dive that you "
+"want to transfer to the timeline is depicted in the _Subsurface_ *Dive "
+"Profile* panel. Select the _Facebook_ icon, and a dialogue is shown, "
"determining the amount of additional information transferred with the dive "
"profile (see image *B*, below). In order to transfer a dive profile to "
"_Facebook_, the name of a _Facebook_ album needs to be provided. The "
@@ -4767,7 +4638,7 @@ msgstr ""
#. type: Plain text
#: user-manual.txt:2501
msgid ""
-"_DiveShare_ is also a dive log repostory on the Internet focusing on the "
+"_DiveShare_ is also a dive log repository on the Internet focusing on the "
"recreational dives. In order to upload dives one has to provide a used ID, "
"so registration with _http://scubadiveshare.com_ is required."
msgstr ""
@@ -5251,7 +5122,7 @@ msgstr ""
#, no-wrap
msgid ""
" ** *Default cylinder*: Here users can specify the default cylinder listed in\n"
-" the *Equipment* tab of the *Dive Notes* panel.\n"
+" the *Equipment* tab of the *Notes* panel.\n"
msgstr ""
#. type: Plain text
@@ -5637,7 +5508,7 @@ msgid ""
"sections (see image below). The *setup* parameters for a dive are entered "
"into the several sections on the left hand side of the screen. The setup is "
"divided into several sections: Available Gases, Rates, Planning, Gas Options "
-"and Dive Notes."
+"and Notes."
msgstr ""
#. type: Plain text
@@ -5699,15 +5570,15 @@ msgstr ""
#. type: Plain text
#: user-manual.txt:2924
msgid ""
-"In the table labelled _Available Gases_, add the information of the "
-"cylinders to be used as well as the gas composition within that cylinder. "
-"This is done in a similar way as for <<S_CylinderData,providing cylinder "
-"data for dive logs>>. Choose the cylinder type by double clicking the "
-"cylinder type and using the dropdown list, then specify the work pressure of "
-"this cylinder. By leaving the oxygen concentration (O2%) filed empty, the "
-"cylinder is assumed to contain air. Otherwise enter the oxygen and/or helium "
-"concentration in the boxes provided in this dialogue. Add additional "
-"cylinders by using the \"+\" icon to the top righthand of the dialogue."
+"In the table labeled _Available Gases_, add the information of the cylinders "
+"to be used as well as the gas composition within that cylinder. This is done "
+"in a similar way as for <<S_CylinderData,providing cylinder data for dive "
+"logs>>. Choose the cylinder type by double clicking the cylinder type and "
+"using the dropdown list, then specify the work pressure of this cylinder. By "
+"leaving the oxygen concentration (O2%) filed empty, the cylinder is assumed "
+"to contain air. Otherwise enter the oxygen and/or helium concentration in "
+"the boxes provided in this dialogue. Add additional cylinders by using the "
+"\"+\" icon to the top righthand of the dialogue."
msgstr ""
#. type: Plain text
@@ -5846,7 +5717,7 @@ msgid ""
"features of the dive have been completed, e.g. the bottom time segment and "
"deep stops (if these are implemented). Leave the remaining waypoints on the "
"ascent to _Subsurface_. In most cases _Subsurface_ computes additional way "
-"points in order to fulfil decompression requirements for that dive. A "
+"points in order to fulfill decompression requirements for that dive. A "
"waypoint can be moved by selecting that waypoint and by using the arrow "
"keys. The waypoints listed in the _Dive Planner Points_ dialogue can be "
"edited by hand in order to obtain a precise presentation of the dive plan. "
@@ -5911,7 +5782,7 @@ msgstr ""
msgid ""
"On the bottom right of the dive planner, under _Dive Plan Details_, the "
"exact details of the dive plan are provided. These details may be modified "
-"by checking any of the options under the _Dive Notes_ section of the dive "
+"by checking any of the options under the _Notes_ section of the dive "
"planner, immediately to the left of the _Dive Plan Details_. If a _Verbatim "
"diveplan_ is requested, a detailed sentence-level explanation of the dive "
"plan is given. If any of the management specifications have been exceeded "
@@ -5999,13 +5870,13 @@ msgid ""
"from the main menu, where the gas consumption calculation takes into account the pSCR dump\n"
"ratio (default 10:1) as well as the metabolism rate. The calculation also takes the oxygen drop\n"
"accross the mouthpiece of the rebreather into account. If the\n"
-"pO~2~ drops below what is considered a save value, a warning apears in the _Dive plan\n"
+"pO~2~ drops below what is considered a save value, a warning appears in the _Dive plan\n"
"details_. A typical pSCR configuration is with a single cylinder and one or more bail-out\n"
"cylinders. Therefore the setup of the _Available gases_ and the _Dive planner points_ tables\n"
"are very similar to that of a CCR dive plan, described above. However, no oxygen setpoints\n"
"are specified for pSCR dives. Below is a dive plan for a pSCR dive. The dive is comparable\n"
"to that of the CCR dive above, but note the longer ascent duration due to the lower oxygen\n"
-"in the loop due to the oxygen drop accross the mouthpiece of the pSCR equipment.\n"
+"in the loop due to the oxygen drop across the mouthpiece of the pSCR equipment.\n"
msgstr ""
#. type: Target for macro image
@@ -6095,15 +5966,15 @@ msgstr ""
msgid ""
"Dive plans have many characteristics in common with dive logs (dive profile, "
"dive notes, etc). After a dive plan has been saved, the dive details and "
-"gas calculations are saved in the *Dive Notes* tab. While a dive plan is "
-"being designed, it can be printed using the _Print_ button in the dive "
-"planner. This prints the dive details and gas calculations in the _Dive Plan "
-"Details_ panel of the dive planner. However, after the plan has been saved, "
-"it is represented in a way very similar to a dive log and the gas "
-"calculations cannot be accessed in the same way as during the planning "
-"process. The only way to print the dive plan is to use the _File -> Print_ "
-"facility on the main menu in the same way as for dive logs or by copy and "
-"paste to a word processor."
+"gas calculations are saved in the *Notes* tab. While a dive plan is being "
+"designed, it can be printed using the _Print_ button in the dive planner. "
+"This prints the dive details and gas calculations in the _Dive Plan Details_ "
+"panel of the dive planner. However, after the plan has been saved, it is "
+"represented in a way very similar to a dive log and the gas calculations "
+"cannot be accessed in the same way as during the planning process. The only "
+"way to print the dive plan is to use the _File -> Print_ facility on the "
+"main menu in the same way as for dive logs or by copy and paste to a word "
+"processor."
msgstr ""
#. type: Title ==
@@ -6363,7 +6234,7 @@ msgstr ""
"plongée*."
#. type: Plain text
-#: user-manual.txt:3187
+#: user-manual.txt:3115
msgid "<<S_ViewPanels,_Info_>> - View only the *Dive Notes* panel."
msgstr ""
"<<S_ViewPanels,_Info_>> - Affiche uniquement le panneau des *notes de "
@@ -7199,8 +7070,8 @@ msgstr ""
#. type: Plain text
#: user-manual.txt:3549
msgid ""
-"In the dropdown list on the middle right labeled '_Pre-configured imports_"
-"\", select _APD Log Viewer_."
+"In the dropdown list on the top left labeled '_Pre-configured imports_\", "
+"select _APD Log Viewer_."
msgstr ""
#. type: Plain text
@@ -7455,30 +7326,36 @@ msgstr ""
msgid "Exporting from Atomic Logbook"
msgstr ""
+#. type: Named 'icon' AttributeList argument for style 'icon'
+#: user-manual.txt:3632
+#, no-wrap
+msgid "images/icons/atomiclogo.jpg"
+msgstr "images/icons/atomiclogo.jpg"
+
#. type: Plain text
-#: user-manual.txt:3638
+#: user-manual.txt:3566
msgid ""
"Atomic Logbook is a Windows software by Atomic Aquatics. It allows "
"downloading of dive information from Cobalt and Cobalt 2 dive computers. "
-"The divelog is kept in a SQlite database at C:\\ProgramData\\AtomicsAquatics"
+"The divelog is kept in a SQLite database at C:\\ProgramData\\AtomicsAquatics"
"\\Cobalt-Logbook\\Cobalt.db. This file can be directly imported to "
"Subsurface."
msgstr ""
#. type: Title ===
-#: user-manual.txt:3640
+#: user-manual.txt:3568
#, no-wrap
msgid "Exporting from Mares Dive Organiser V2.1"
msgstr ""
#. type: Named 'icon' AttributeList argument for style 'icon'
-#: user-manual.txt:3643
+#: user-manual.txt:3571
#, no-wrap
msgid "images/icons/mareslogo.jpg"
msgstr "images/icons/mareslogo.jpg"
#. type: Plain text
-#: user-manual.txt:3651
+#: user-manual.txt:3579
msgid ""
"Mares Dive Organiser is a Windows application. The dive log is kept as a "
"Microsoft SQL Compact Edition database with a '.sdf' filename extension. The "
@@ -7489,7 +7366,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3656
+#: user-manual.txt:3584
msgid ""
"Within Dive Organiser, select _Database -> Backup_ from the main menu and "
"back up the database to the desk top. This creates a zipped file "
@@ -7497,36 +7374,36 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3659
+#: user-manual.txt:3587
msgid ""
"Rename the file to DiveOrganiserxxxxx.zip. Inside the zipped directory is a "
"file _DiveOrganiser.sdf_."
msgstr ""
#. type: Plain text
-#: user-manual.txt:3660
+#: user-manual.txt:3588
msgid "Extract the _.sdf_ file from the zipped folder to your Desktop."
msgstr ""
#. type: Plain text
-#: user-manual.txt:3661
+#: user-manual.txt:3589
msgid "The password for accessing the .zip file is _mares_."
msgstr ""
#. type: Title ===
-#: user-manual.txt:3663
+#: user-manual.txt:3591
#, no-wrap
msgid "Exporting from *DivingLog 5.0*"
msgstr ""
#. type: Named 'icon' AttributeList argument for style 'icon'
-#: user-manual.txt:3665
+#: user-manual.txt:3593
#, no-wrap
msgid "images/icons/divingloglogo.jpg"
msgstr "images/icons/divingloglogo.jpg"
#. type: Plain text
-#: user-manual.txt:3674
+#: user-manual.txt:3602
msgid ""
"Unfortunately DivingLog XML files give us no indication on the preferences "
"set on one's system. So in order for _Subsurface_ to be able to successfully "
@@ -7537,28 +7414,28 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3676
+#: user-manual.txt:3604
msgid "In DivingLog open the 'File -> Export -> XML' menu"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3677
+#: user-manual.txt:3605
msgid "Select the dives to export"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3678
+#: user-manual.txt:3606
msgid "Click on the export button and select the filename"
msgstr ""
#. type: Title ==
-#: user-manual.txt:3680
+#: user-manual.txt:3608
#, no-wrap
msgid "APPENDIX D: Exporting a spreadsheet to CSV format"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3689
+#: user-manual.txt:3617
msgid ""
"Many divers keep a diving log in some form of a digital file, commonly a "
"spreadsheet with various fields of information. These logs can be easily "
@@ -7571,7 +7448,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3695
+#: user-manual.txt:3623
msgid ""
"The first step is to organize the diving data in the spreadsheet, so that "
"the first row contains the names (or titles) of each column and the "
@@ -7582,41 +7459,41 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3697
+#: user-manual.txt:3625
msgid ""
"Date: use one of the following formats: yyyy-mm-dd, dd.mm.yyyy, mm/dd/yyyy"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3698
+#: user-manual.txt:3626
msgid "Duration: the format should be minutes:seconds."
msgstr ""
#. type: Plain text
-#: user-manual.txt:3699
+#: user-manual.txt:3627
msgid ""
-"Unit system: only one unit system shold be used (i.e., no mixture between "
+"Unit system: only one unit system should be used (i.e., no mixture between "
"imperial and metric units)"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3700
+#: user-manual.txt:3628
msgid "Tags and buddies: values should be separated using a comma."
msgstr ""
#. type: Plain text
-#: user-manual.txt:3701
+#: user-manual.txt:3629
msgid "GPS position: users must use decimal degrees, e.g. 30.22496 30.821798"
msgstr ""
#. type: Title ===
-#: user-manual.txt:3702
+#: user-manual.txt:3630
#, no-wrap
msgid "_LibreOffice Calc_ and _OpenOffice Calc_"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3706
+#: user-manual.txt:3634
msgid ""
"These are open source spreadsheet applications forming parts of larger open "
"source office suite applications. The user interaction with _LibreOffice_ "
@@ -7627,13 +7504,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
-#: user-manual.txt:3707
+#: user-manual.txt:3635
#, no-wrap
msgid "images/LOffice_spreadsheetdata.jpg"
msgstr "images/LOffice_spreadsheetdata.jpg"
#. type: Plain text
-#: user-manual.txt:3710
+#: user-manual.txt:3638
msgid ""
"To export the data as a .CSV file from within LibreOffice click _File -> "
"Save As_. On the dialogue that comes up, select the _Text CSV (.csv)_ as the "
@@ -7641,13 +7518,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
-#: user-manual.txt:3711
+#: user-manual.txt:3639
#, no-wrap
msgid "images/LOffice_save_as_options.jpg"
msgstr "images/LOffice_save_as_options.jpg"
#. type: Plain text
-#: user-manual.txt:3714
+#: user-manual.txt:3642
msgid ""
"After selecting _Save_, select the appropriate field delimiter (choose _Tab_ "
"to prevent conflicts with the comma when using this as a decimal point), "
@@ -7655,13 +7532,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
-#: user-manual.txt:3715
+#: user-manual.txt:3643
#, no-wrap
msgid "images/LOffice_field_options.jpg"
msgstr "images/LOffice_field_options.jpg"
#. type: Plain text
-#: user-manual.txt:3718
+#: user-manual.txt:3646
msgid ""
"One can double check the .CSV file by opening it with a text editor, and "
"then import the dive data as explained on the section xref:"
@@ -7669,13 +7546,13 @@ msgid ""
msgstr ""
#. type: Title ===
-#: user-manual.txt:3719
+#: user-manual.txt:3647
#, no-wrap
msgid "Microsoft _Excel_"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3725
+#: user-manual.txt:3653
msgid ""
"The field delimiter (called \"_list separator_\" in Microsoft manuals) is "
"not accessible from within _Excel_ and needs to be set through the "
@@ -7686,19 +7563,19 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3727
+#: user-manual.txt:3655
msgid ""
"In Microsoft Windows, click the *Start* button, and then select _Control "
"Panel_ from the list on the right-hand side."
msgstr ""
#. type: Plain text
-#: user-manual.txt:3728
+#: user-manual.txt:3656
msgid "Open the _Regional and Language Options_ dialog box."
msgstr ""
#. type: Plain text
-#: user-manual.txt:3731
+#: user-manual.txt:3659
msgid ""
"Do one of the following: ** In Windows 7, click the _Formats_ tab, and then "
"click _Customize this format_. ** In Windows XP, click the _Regional "
@@ -7706,48 +7583,48 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3732
+#: user-manual.txt:3660
msgid ""
"Type a new separator in the _List separator_ box. To use a TAB-delimited "
"file, type the word TAB in the box."
msgstr ""
#. type: Plain text
-#: user-manual.txt:3733
+#: user-manual.txt:3661
msgid "Click _OK_ twice."
msgstr ""
#. type: Plain text
-#: user-manual.txt:3735
+#: user-manual.txt:3663
msgid "Below is an image of the _Control Panel_:"
msgstr ""
#. type: Target for macro image
-#: user-manual.txt:3736
+#: user-manual.txt:3664
#, no-wrap
msgid "images/Win_SaveCSV2.jpg"
msgstr "images/Win_SaveCSV2.jpg"
#. type: Plain text
-#: user-manual.txt:3739
+#: user-manual.txt:3667
msgid "To export the dive log in CSV format:"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3741
+#: user-manual.txt:3669
msgid ""
"With the dive log opened in _Excel_, select the round Windows button at the "
"top left, then _Save As_."
msgstr ""
#. type: Target for macro image
-#: user-manual.txt:3742
+#: user-manual.txt:3670
#, no-wrap
msgid "images/Win_SaveCSV1.jpg"
msgstr "images/Win_SaveCSV1.jpg"
#. type: Plain text
-#: user-manual.txt:3745
+#: user-manual.txt:3673
msgid ""
"Click on the left-hand part of the _Save as_ option, NOT on the arrow on the "
"right-hand. This brings up a dialogue for saving the spreadsheet in an "
@@ -7757,13 +7634,13 @@ msgid ""
msgstr ""
#. type: Target for macro image
-#: user-manual.txt:3746
+#: user-manual.txt:3674
#, no-wrap
msgid "images/Win_SaveCSV3.jpg"
msgstr "images/Win_SaveCSV3.jpg"
#. type: Plain text
-#: user-manual.txt:3749
+#: user-manual.txt:3677
msgid ""
"Select the _Save_ button. The CSV-formatted file is saved into the folder "
"that was selected. One can double check the .CSV file by opening it with a "
@@ -7772,19 +7649,19 @@ msgid ""
msgstr ""
#. type: Title ==
-#: user-manual.txt:3750
+#: user-manual.txt:3678
#, no-wrap
msgid "APPENDIX E: FAQs."
msgstr ""
#. type: Title ===
-#: user-manual.txt:3752
+#: user-manual.txt:3680
#, no-wrap
msgid "Subsurface appears to miscalculate gas consumption and SAC"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3756
+#: user-manual.txt:3684
msgid ""
"'Question': I dived with a 12.2 l tank, starting with 220 bar and ending "
"with 100 bar, and I calculate a different SAC compared what _Subsurface_ "
@@ -7792,7 +7669,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3762
+#: user-manual.txt:3690
msgid ""
"'Answer': Not really. What happens is that _Subsurface_ actually calculates "
"gas consumption differently - and better - than you expect. In particular, "
@@ -7802,7 +7679,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3768
+#: user-manual.txt:3696
msgid ""
"and that's true for an ideal gas, and it's what you get taught in dive "
"theory. But an \"ideal gas\" doesn't actually exist, and real gases "
@@ -7812,12 +7689,12 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3770
+#: user-manual.txt:3698
msgid "+consumption = (amount_of_air_at_beginning - amount_of_air_at_end)+"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3776
+#: user-manual.txt:3704
msgid ""
"where the amount of air is *not* just \"tank size times pressure in bar\". "
"It's a combination of: \"take compressibility into account\" (which is a "
@@ -7828,12 +7705,12 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3778
+#: user-manual.txt:3706
msgid "+12.2*((220-100)/1.013)+"
msgstr ""
#. type: Plain text
-#: user-manual.txt:3783
+#: user-manual.txt:3711
msgid ""
"which is about 1445, not 1464. So there was 19 l too much in your simple "
"calculation that ignored the difference between 1 bar and one ATM. The "
@@ -7843,7 +7720,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3789
+#: user-manual.txt:3717
msgid ""
"So be happy: your SAC really is better than your calculations indicated. Or "
"be sad: your cylinder contains less air than you thought it did. And as "
@@ -7854,13 +7731,13 @@ msgid ""
msgstr ""
#. type: Title ===
-#: user-manual.txt:3790
+#: user-manual.txt:3718
#, no-wrap
msgid "Some dive profiles have time discrepancies with the recorded samples from my dive computer..."
msgstr ""
#. type: Plain text
-#: user-manual.txt:3794
+#: user-manual.txt:3722
msgid ""
"_Subsurface_ ends up ignoring surface time for many things (average depth, "
"divetime, SAC, etc). 'Question': Why do dive durations in my dive computer "
@@ -7868,7 +7745,7 @@ msgid ""
msgstr ""
#. type: Plain text
-#: user-manual.txt:3802
+#: user-manual.txt:3730
msgid ""
"'Answer': For example, if you end up doing a weight check (deep enough to "
"trigger the \"dive started\") but then come back up and wait five minutes "
diff --git a/Documentation/images/icons/atomiclogo.jpg b/Documentation/images/icons/atomiclogo.jpg
new file mode 100644
index 000000000..2d24b290c
--- /dev/null
+++ b/Documentation/images/icons/atomiclogo.jpg
Binary files differ
diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt
index 78e56cab2..5bbb6ee13 100644
--- a/Documentation/user-manual.txt
+++ b/Documentation/user-manual.txt
@@ -102,7 +102,7 @@ between dives. The *Dive List* is an important tool for manipulating a dive log.
map
and centred on the site of the last dive selected in the *Dive List*.
-3. The *Dive Info* to the top left, giving more detailed information on the
+3. The *Info* to the top left, giving more detailed information on the
dive selected in the *Dive List*, including some statistics for the selected dive or for all
highlighted dive(s).
@@ -119,7 +119,7 @@ and profile of
the _selected dive_ are shown in the respective panels. On the other hand, if
one highlights more than one dive the last highlighted dive is the _selected
dive_, but summary data of all _highlighted dives_ are shown in the *Stats* tab
-of the *Dive Info* panel (maximum, minimum and average depths, durations, water
+of the *Info* panel (maximum, minimum and average depths, durations, water
temperatures and SAC; total time and number of dives selected).
[[S_ViewPanels]]
@@ -136,7 +136,7 @@ display:
*Profile*: Show only the Dive Profile of the selected dive.
-*Info*: Show only the Dive Notes about the last selected dive and statistics for
+*Info*: Show only the Notes about the last selected dive and statistics for
all highlighted dives.
*Globe*: Show only the world map, centred on the last selected dive.
@@ -201,7 +201,7 @@ depth, the names of your dive buddy and of the dive master or dive guide, and
some remarks about the dive. _Subsurface_ can store much more information
than this for each dive. In order to add a dive to a dive log, select _Log
-> Add Dive_ from the Main Menu. The program then shows three panels to enter
-information for a dive: two tabs in the *Dive Info* panel (*Dive Notes* and
+information for a dive: two tabs in the *Info* panel (*Notes* and
*Equipment*), as well as the *Dive Profile* panel that displays a graphical profile
of each dive. These panels are respectively marked [red]#A#, [red]#B# and
[red]#C#
@@ -209,9 +209,9 @@ in the figure below. Each of these tabs will now be explained for data entry.
image::images/AddDive1_f20.jpg["FIGURE: Add dive",align="center"]
-When one edits a field in Dive notes or Equipment panels, _Subsurface_ enters *Editing Mode*,
-indicated by the message in the blue box at the top of the _Dive Notes_ panel (see the image below). This message is
-displayed in all the panels under Dive notes and Equipment when in *Editing Mode*.
+When one edits a field in Notes or Equipment panels, _Subsurface_ enters *Editing Mode*,
+indicated by the message in the blue box at the top of the _Notes_ panel (see the image below). This message is
+displayed in all the panels under Notes and Equipment when in *Editing Mode*.
image::images/BlueEditBar_f20.jpg["Blue edit bar",align="center"]
@@ -221,14 +221,14 @@ before saving the information. By selecting the _Save_ button, a local copy of t
for this specific dive is saved in memory. When one closes Subsurface, the program will
ask again, this time whether the complete dive log should be saved on disk or not.
-==== Dive Notes
+==== Notes
This panel contains the date, time and place information for a particular dive,
environmental conditions, co-divers and buddies, as well as some descriptive
-information. If one clicks on the *Dive Notes* tab, the following
+information. If one clicks on the *Notes* tab, the following
fields are visible:
-image::images/AddDive2_f20.jpg["FIGURE: The Dive Notes tab",align="center"]
+image::images/AddDive2_f20.jpg["FIGURE: The Notes tab",align="center"]
The *Time* field reflects the date and the time of the dive. By clicking
the date, a calendar is displayed from which
@@ -323,9 +323,9 @@ shown for the user to choose from.
The *Save* and *Cancel* buttons are used to save all the information for tabs in
the info panel and in the dive profile panel, so there's no need to use them
until ALL other information has been added. Here is an example of a completed
-Dive Notes panel:
+Notes panel:
-image::images/CompletedDiveInfo_f20.jpg["FIGURE: A completed Dive Notes tab",align="center"]
+image::images/CompletedDiveInfo_f20.jpg["FIGURE: A completed Notes tab",align="center"]
==== Equipment
@@ -461,10 +461,10 @@ image::images/DiveProfile4_f20.jpg["FIGURE: Completed dive profile",align="cente
==== Saving the hand-entered dive information
-The information entered in the *Dive Notes* tab, the *Equipment* tab as well as
+The information entered in the *Notes* tab, the *Equipment* tab as well as
the *Dive Profile* can now be saved in the user's logbook by using the two
buttons
-on the top right hand of the Dive Notes tab. If the _Save_ button is clicked,
+on the top right hand of the Notes tab. If the _Save_ button is clicked,
the dive data
are saved in the current logbook. If the _Cancel_ button is clicked, the newly
entered
@@ -694,10 +694,10 @@ allowing easy identification of devices.
With the uploaded dives in the *Dive List*, the information from the dive
computer is not complete and more details must be added in order to have
a fuller record of the dives. To do this,
-the *Dive Notes* and the *Equipment* tabs on the top left hand of the
+the *Notes* and the *Equipment* tabs on the top left hand of the
_Subsurface_ window should be used.
-==== Dive Notes
+==== Notes
The date and time of the dive, gas mixture and (often) water temperature are usually
shown as obtained from the dive computer, but the user needs to add
@@ -705,10 +705,10 @@ additional information by hand in order to have a more complete dive record. In
(e.g. APD rebreathers) one also has to provide the date and time of the dive.
If the contents of this tab is changed or edited in any way, the message in a blue box at
the top of the panel indicates that the dive is being edited. If one
-clicks on the *Dive Notes* tab, the following fields are
+clicks on the *Notes* tab, the following fields are
visible:
-image::images/AddDive3_f20.jpg["FIGURE: The Dive Notes tab",align="center"]
+image::images/AddDive3_f20.jpg["FIGURE: The Notes tab",align="center"]
The *Time* field reflects the date and time of the dive. By clicking
the date, a calendar is displayed from which
@@ -807,9 +807,9 @@ typed
The *Save* and *Cancel* buttons are used to save all the information for tabs
in the info panel and in the dive profile panel, so there's no need to use them
until ALL other information has been added. Here is an example of a completed
-Dive Notes panel:
+Notes panel:
-image::images/CompletedDiveInfo_f20.jpg["FIGURE: A completed Dive Notes tab",align="center"]
+image::images/CompletedDiveInfo_f20.jpg["FIGURE: A completed Notes tab",align="center"]
==== Equipment
@@ -901,14 +901,14 @@ image::images/WeightsDataEntry3_f20.jpg["FIGURE: A completed weights information
_METHOD 1_: After uploading dives from
a dive computer, the dive profiles of the uploaded dives are shown in the *Dive profile* tab, as well
as a few items of information
-in the *Dive Notes* tab (e.g. water temperature) and in the *Equipment* tab (e.g. gas pressures
+in the *Notes* tab (e.g. water temperature) and in the *Equipment* tab (e.g. gas pressures
and gas composition). However the other fields remain empty.
It may be useful to simultaneously edit some of the
-fields in the *Dive Notes* and *Equipment* tabs. For instance, it is possible
+fields in the *Notes* and *Equipment* tabs. For instance, it is possible
that a diver performed several dives during a single day, using identical equipment while diving at the same
dive site or with the same dive master and/or buddy or tags. Instead of completing the information for each
of these dives separately, one can select all the dives for that day in the *Dive List* and
-insert the same information in the *Dive Notes* and *Equipment* fields that need
+insert the same information in the *Notes* and *Equipment* fields that need
identical information. This is achieved by editing the dive notes or the equipment for any one
of the selected dives.
@@ -924,8 +924,8 @@ up the completion of the dive log after several similar dives.
[[S_CopyComponents]]
_METHOD 2_:There is a different way of achieving the same goal. Select a dive with all the appropriate information
-typed into the *Dive Notes* and *Equipment* tabs. Then, from the main menu, select _Log -> Copy dive components_.
-A box is presented with a selection of check boxes for most of the fields in the *Dive Notes* and *Equipment* tabs.
+typed into the *Notes* and *Equipment* tabs. Then, from the main menu, select _Log -> Copy dive components_.
+A box is presented with a selection of check boxes for most of the fields in the *Notes* and *Equipment* tabs.
Select the fields to be copied from the currently selected dive, then select _OK_. Now, in the *Dive List*,
select the dives
into which this information is to be pasted. Then, from the main menu, select _Log -> Paste dive components_.
@@ -954,10 +954,10 @@ image::images/Bookmarks.jpg["FIGURE: Bookmark dialog",align="center"]
==== Saving the updated dive information
-The information entered in the *Dive Notes* tab and the *Equipment* tab can be
+The information entered in the *Notes* tab and the *Equipment* tab can be
saved by
using the
-two buttons on the top right hand of the *Dive Notes* tab. If the _Save_ button
+two buttons on the top right hand of the *Notes* tab. If the _Save_ button
is clicked,
the dive data are saved. If the _Cancel_ button is clicked, then the newly
entered dive data are
@@ -1588,7 +1588,7 @@ image::images/icons/ShowPhotos_f20.png["FIGURE:Show photos toolbar button",align
After the images have been loaded, they appear in two places:
- - the _Photos_ tab of the *Dive Notes* panel.
+ - the _Photos_ tab of the *Notes* panel.
- as tiny icons (stubs) on the dive profile at the appropriate positions reflecting the time
each photograph was taken. See below:
@@ -1611,7 +1611,7 @@ image::images/LoadImage6_f20.jpg["FIGURE: Full-screen photo on dive profile",ali
==== The _Photos_ tab
-Photographs associated with a dive are shown as thumbnails in the _Photos_ tab of the _Dive Notes_
+Photographs associated with a dive are shown as thumbnails in the _Photos_ tab of the _Notes_
panel. Photos taken in rapid succession during a dive (therefore sometimes with large
overlap on the dive profile) can easily be accessed in the _Photos_ tab. This tab serves as
a tool for individually accessing the photos of a dive, while the stubs on the dive profile
@@ -1646,7 +1646,7 @@ multicylinder dives are often used by technical divers who dive deep or long. As
as _Subsurface_ is concerned, there are only two types of information that need to be provided:
- *Describe the cylinders used during the dive* This is performed in the *Equipment tab* of
- the *Dive Info* panel, as xref:cylinder_definitions[described above]. Enter the cylinders one by one,
+ the *Info* panel, as xref:cylinder_definitions[described above]. Enter the cylinders one by one,
specifying the characteristics of the cylinder and the gas composition within each cylinder.
- *Record the times at which switches from one cylinder to another was done:* This is information
@@ -1684,7 +1684,7 @@ dive logging involves, exactly as with multicylinder dives, above, three steps:
has this facility) marking each cylinder switch with a bookmark that can be retrieved later. Returning
from a dive with the information about cylinder changes is the only tricky part of logging sidemount dives.
- *Within _Subsurface_ describe the cylinders used during the dive*. The diver needs to provide the
- specifications of the different cylinders, using the *Equipment* tab of the *Dive Info Panel* (see
+ specifications of the different cylinders, using the *Equipment* tab of the *Info Panel* (see
image below where two 12 litre cylinder were used).
- *Indicate cylinder change events on the _Subsurface_ dive profile*. Once the dive log has been imported
from a dive computer into _Subsurface_, the cylinder switch events need to be indicated on the dive profile.
@@ -1718,7 +1718,7 @@ breathing gas is released continuously from the back cylinder.
To log pSCR dives, no special procedures are required, just the normal steps outlined above:
-- Select pSCR in the _Dive Mode_ dropdown list on the *Dive Info* panel.
+- Select pSCR in the _Dive Mode_ dropdown list on the *Info* panel.
- pSCR diving often involves gas changes, requiring an additional cylinder.
Define all the appropriate cylinders as described above
@@ -1845,9 +1845,9 @@ Poseidon MkVI and APD equipment can be found in xref:S_PoseidonMkVI[Appendix B].
== Obtaining more information about dives entered into the logbook
-=== The *Dive Info* tab (for individual dives)
+=== The *Info* tab (for individual dives)
-The Dive Info tab gives some summary information about a particular dive that
+The Info tab gives some summary information about a particular dive that
has been selected in the *Dive List*. Useful information here includes the
surface interval before the dive, the maximum and mean depths of the dive, the
gas volume consumed, the surface air consumption (SAC) and the number of oxygen
@@ -2301,7 +2301,7 @@ now shows only the titles for the trips.
Normally, in the dive list, minimal information is included in the trip title.
More information about a trip can be added by selecting its trip title from
-the *Dive List*. This shows a *Trip Notes* tab in the *Dive Notes* panel. Here
+the *Dive List*. This shows a *Trip Notes* tab in the *Notes* panel. Here
users can add or edit information about the date/time, the trip location and any
other general comments about the trip as a whole (e.g. the dive company that was
dived with, the general weather and surface conditions during the trip, etc.).
@@ -2388,7 +2388,7 @@ for a few minutes, resulting in two or more dives being recorded by the dive
computer and appearing as different dives in the *Dive List* panel. Users can
merge these dives onto a single dive by selecting the appropriate dives,
right-clicking them to bring up the context menu and then selecting *Merge selected
-dives*. It may be necessary to edit the dive information in the *Dive Notes*
+dives*. It may be necessary to edit the dive information in the *Notes*
panel to reflect events or conditions that apply to the merged dive. The figure
below shows the depth profile of two such dives that were merged:
@@ -2452,7 +2452,7 @@ _Facebook_ connection.
image::images/facebook1_f20.jpg["Figure: Facebook login",align="center"]
Having established a login to _Facebook_, transfer of a dive profile to one's _Facebook_ timeline is easy.
-A _Facebook_ icon appears in the *Dive Notes* panel of _Subsurface_ (See image *A* below). Ensure that the dive
+A _Facebook_ icon appears in the *Notes* panel of _Subsurface_ (See image *A* below). Ensure that the dive
that you want to transfer to the timeline is depicted in the _Subsurface_ *Dive Profile* panel. Select the
_Facebook_ icon, and a dialogue is shown, determining the amount of additional information transferred
with the dive profile (see image *B*, below). In order to transfer a dive profile to _Facebook_, the name of a
@@ -2716,7 +2716,7 @@ image::images/Pref1_f20.jpg["FIGURE: Preferences defaults page",align="center"]
the dive list.
** *Default cylinder*: Here users can specify the default cylinder listed in
- the *Equipment* tab of the *Dive Notes* panel.
+ the *Equipment* tab of the *Notes* panel.
** *Animations*: Some actions in showing the dive profile are performed using
animations. For instance, the axis values for depth and time change from dive to
@@ -2888,7 +2888,7 @@ user interface. It is explicitly used under the following conditions:
Like the _Subsurface_ dive log, the planner screen is divided into several sections (see image below). The *setup*
parameters for a dive are entered into the several sections on the left hand side of the screen.
-The setup is divided into several sections: Available Gases, Rates, Planning, Gas Options and Dive Notes.
+The setup is divided into several sections: Available Gases, Rates, Planning, Gas Options and Notes.
At the top right hand is a green *design panel* upon which the profile of the dive can be
manipulated directly by dragging and clicking as explained below. This feature makes the
@@ -3028,7 +3028,7 @@ in the *Dive List* panel of _Subsurface_.
On the bottom right of the dive planner, under _Dive Plan Details_, the exact details
of the dive plan are provided. These details may be modified by checking any of the
-options under the _Dive Notes_ section of the dive planner, immediately to the left
+options under the _Notes_ section of the dive planner, immediately to the left
of the _Dive Plan Details_. If a _Verbatim diveplan_
is requested, a detailed sentence-level explanation of the dive plan is given. If any
of the management specifications have been exceeded during the planning, a warning
@@ -3124,7 +3124,7 @@ inclusion in a text file or word processing document.
Dive plans have many characteristics in common with dive logs (dive profile, dive notes, etc).
After a dive plan has been saved, the dive details and gas calculations are saved in
-the *Dive Notes* tab. While a dive plan is being designed, it can be printed using
+the *Notes* tab. While a dive plan is being designed, it can be printed using
the _Print_ button in the dive planner. This prints the dive details and gas calculations
in the _Dive Plan Details_ panel of the dive planner. However, after the plan has been saved, it is
represented in a way very similar to a dive log and the gas calculations cannot be
@@ -3183,7 +3183,7 @@ dealing with the appropriate operations.
simmultaneously.
- <<S_ViewPanels,_Dive List_>> - View only the *Dive List* panel.
- <<S_ViewPanels,_Profile_>> - View only the *Dive Profile* panel.
-- <<S_ViewPanels,_Info_>> - View only the *Dive Notes* panel.
+- <<S_ViewPanels,_Info_>> - View only the *Notes* panel.
- <<S_ViewPanels,_Globe_>> - View only the *World Map* panel.
- _Yearly Statistics_ - Display summary statistics about dives during this and past
years.
@@ -3629,6 +3629,7 @@ Making a backup copy of the Suunto DM4/DM5 database:
=== Exporting from Atomic Logbook
[[Atomic_Export]]
+[icon="images/icons/atomiclogo.jpg"]
[NOTE]
Atomic Logbook is a Windows software by Atomic Aquatics. It allows
downloading of dive information from Cobalt and Cobalt 2 dive computers.
diff --git a/Documentation/user-manual_es.txt b/Documentation/user-manual_es.txt
index 41a5a1152..98d0cfbaf 100644
--- a/Documentation/user-manual_es.txt
+++ b/Documentation/user-manual_es.txt
@@ -107,7 +107,7 @@ inmersiones.
mapamundi y aparece centrado en el punto de la última inmersión seleccionada de
la *Lista de Inmersiones*.
-3. La *Información de la inmersión* arriba a la izquierda, presentando
+3. La *Información* arriba a la izquierda, presentando
información más detallada de la inmersión seleccionada en la *Lista de
inmersiones*, incluyendo algunas estadísticas de la inmersión seleccionada o de
todas las inmersiones resaltadas.
@@ -124,8 +124,8 @@ Si se selecciona una inmersión en la *Lista de inmersiones*, se muestra su
ubicación, información detallada y su perfil en sus paneles respectivos. Por
otra parte, si uno selecciona más de un buceo, el último resaltado actuará como
_inmersión seleccionada_, pero los datos resumidos de las _inmersiones
-resaltadas_ se mostrarán en la pestaña *Estadísticas* del panel *Información de
-la inmersión* (máximas, mínimas y medias de profundidades, duraciones,
+resaltadas_ se mostrarán en la pestaña *Estadísticas* del panel *Información*
+(máximas, mínimas y medias de profundidades, duraciones,
temperaturas del agua, consumos de gases; el tiempo total y el número de
inmersiones seleccionadas).
@@ -209,18 +209,18 @@ buceo o el dive master o el guía, y algunas anotaciones acerca de la inmersión
_Subsurface_ puede conservar mucha más información por cada inmersión. Para
añadir una inmersión a un registro de buceo, selecciona _Registro → Añadir
Inmersión_ en el menú principal. El programa muestra entonces tres paneles para
-introducir información: Dos pestañas en el panel *Información de la Inmersión*
-(*Notas de la inmersión* y *Equipo*), así como el panel perfil que muestra un
+introducir información: Dos pestañas en el panel *Información*
+(*Notas* y *Equipo*), así como el panel perfil que muestra un
perfil gráfico de cada buceo. Estos paneles estan marcados respectivamente como
[red]#A#, [red]#B# y [red]#C# en la figura de abajo. Ahora veremos cada una de
las pestañas usadas para introducir la información.
image::images/AddDive1_f20.jpg["FIGURA: Añadir inmersión",align="center"]
-Al editar un campo de los paneles _Notas de la Inmersión_ o _Equipo_, _Subsurface_
+Al editar un campo de los paneles _Notas_ o _Equipo_, _Subsurface_
entra en el modo de edición. Esto se indica con el mensaje en un recuadro azul
-en la parte de arriba del panel _Notas de la Inmersión_. Este mensaje se
-muestra en todos los paneles dependientes de _Notas de la Inmersión_ mientras
+en la parte de arriba del panel _Notas_. Este mensaje se
+muestra en todos los paneles dependientes de _Notas_ mientras
se esté en modo de edición.
image::images/BlueEditBar_f20.jpg["Blue edit bar",align="center"]
@@ -233,14 +233,14 @@ en memoria una copia local de la información. Al salir de _Subsurface_, el
programa preguntará de nuevo, esta vez si se guarda el diario completo en el
disco o no.
-==== Notas de la inmersión
+==== Notas
Este panel contiene la información de fecha, hora y lugar de un buceo concreto,
condiciones ambientales, compañeros así como alguna información descriptiva. Si
-pulsas en la pestaña *Notas de la inmersión*, los siguientes campos aparecen
+pulsas en la pestaña *Notas*, los siguientes campos aparecen
visibles:
-image::images/AddDive2_f20.jpg["FIGURA: La pestaña Notas de la inmersión",align="center"]
+image::images/AddDive2_f20.jpg["FIGURA: La pestaña Notas",align="center"]
El campo *Hora* refleja la fecha y la hora de la inmersión. Clicando la fecha se
muestra un calendario desde el que seleccionar la fecha correcta. Pulsa ESC para
@@ -333,9 +333,9 @@ introducirse aquí.
Los botones *Guardar* y *Cancelar* se utilizan para guardar toda la información
de los campos del panel de información y del panel de perfil, por lo que no hay
necesidad de usarlos hasta que se ha añadido TODA la información. Aquí hay un
-ejemplo de panel de Notas de la Inmersión completo:
+ejemplo de panel de Notas completo:
-image::images/CompletedDiveInfo_f20.jpg["FIGURA: Una pestaña de Notas de la Inmersión completada",align="center"]
+image::images/CompletedDiveInfo_f20.jpg["FIGURA: Una pestaña de Notas completada",align="center"]
==== Equipo
@@ -468,10 +468,10 @@ image::images/DiveProfile4_f20.jpg["FIGURE: Perfil de inmersión completado",ali
==== Guardar la información introducida a mano
-La información introducida en las pestañas *Notas de la inmersión*, Equipo y
+La información introducida en las pestañas *Notas*, Equipo y
*Perfil de la inmersión* puede guardarse en el registro de inmersiones del
-usuario utilizando los dos botones arriba a la derecha de la pestaña "Notas de
-la Inmersión". Si se pulsa _Guardar_, los datos del buceo se guardan en el
+usuario utilizando los dos botones arriba a la derecha de la pestaña "Notas".
+Si se pulsa _Guardar_, los datos del buceo se guardan en el
registro actual. Si se pulsa _Cancelar_ los datos recién introducidos serán
descartados. Al salir de _Subsurface_ al usuario se le pedirá que guarde el
registro con la nueva(s) inmersión(es).
@@ -682,10 +682,10 @@ lugar del modelo, permitiendo una identificación de dispositivos más fácil.
Con los buceos descargados en la *Lista de inmersiones*, la información del
ordenador no está completa y es necesario añadir más detalles para tener un
registro más detallado de las inmersiones. Para ello se usan las pestañas
-*Notas de la Inmersión* y *Equipo* arriba a la izquierda de la ventana de
+*Notas* y *Equipo* arriba a la izquierda de la ventana de
_Subsurface_.
-==== Notas de la inmersión
+==== Notas
La fecha y hora del buceo, la mezcla de gases y, a menudo, la temperatura del
agua se muestran al haberse obtenido del ordenador de buceo, pero el usuario
@@ -693,10 +693,10 @@ necesita añadir a mano alguna información para tener un registro más completo
la inmersión. En algunos casos (p.e. rebreathers APD) también se ha de facilitar
la fecha y la hora. Si se cambia o edita de alguna manera el contenido de esta
pestaña, el mensaje de la barra azul arriba del panel indicará que se está
-editando el buceo. Si se pulsa en la pestaña *Notas de la inmersión*, se
+editando el buceo. Si se pulsa en la pestaña *Notas*, se
visualizan los siguientes campos:
-image::images/AddDive3_f20.jpg["FIGURA: La pestaña Notas de la inmersión",align="center"]
+image::images/AddDive3_f20.jpg["FIGURA: La pestaña Notas",align="center"]
El campo *Hora* refleja la fecha y la hora de la inmersión. Clicando la fecha se
muestra un calendario desde el que seleccionar la fecha correcta. Pulsa ESC para
@@ -783,9 +783,9 @@ y *profunda* para que elija entre ellas.
Los botones *Guardar* y *Cancelar* se utilizan para guardar toda la información
de los campos del panel de información y del panel de perfil, por lo que no hay
necesidad de usarlos hasta que se ha añadido TODA la información. Aquí hay un
-ejemplo de panel de Notas de la Inmersión completo:
+ejemplo de panel de Notas completo:
-image::images/CompletedDiveInfo_f20.jpg["FIGURA:Una pestaña completa de Notas de la Inmersión",align="center"]
+image::images/CompletedDiveInfo_f20.jpg["FIGURA:Una pestaña completa de Notas",align="center"]
==== Equipo
@@ -870,7 +870,7 @@ image::images/WeightsDataEntry3_f20.jpg["FIGURA: Tabla con información de lastr
_METODO 1_: Tras descargar inmersiones de un ordenador de buceo, los perfiles
de los buceos descargados se mostrarán en el panel "Perfil de la inmersión",
-así como algunas otras informaciones en las pestañas "Notas de la Inmersión" y
+así como algunas otras informaciones en las pestañas "Notas" y
"Equipo". Sin embargo, otros campos permanecerán vacíos.
Puede resultar útil editar simultáneamente algunos de los campos de las "Notas
@@ -879,7 +879,7 @@ efectuara varias inmersiones en un solo día utilizando el mismo equipo, o en el
mismo punto de buceo o con el mismo guía o compañero. En lugar de completar la
información de las inmersiones una por una, se pueden seleccionar todos los
buceos deseados en la "Lista de Inmersiones" e insertar la información común en
-las "Notas de Inmersión" y "Equipo".
+las "Notas" y "Equipo".
La edición simultánea solo funciona con campos que no contienen aún ninguna
información. Esto significa que si, para una inmersión en concreto, uno de los
@@ -896,10 +896,10 @@ varios buceos similares.
[[S_CopyComponents]]
_METODO 2_: Hay una forma diferente de hacer lo mismo. Seleccionamos un buceo
-que contenga toda la información apropiada en las pestañas *Notas de la
-Inmersión* y *Equipo*. Entonces, desde el menú principal, seleccionamos
+que contenga toda la información apropiada en las pestañas *Notas* y *Equipo*.
+Entonces, desde el menú principal, seleccionamos
_Registro -> Copiar componentes_. Aparecerá una ventana con casillas
-seleccionables para la mayoría de campos de las pestañas *Notas de la inmersión*
+seleccionables para la mayoría de campos de las pestañas *Notas*
y *Equipo*. Selecciona los campos a copiar desde la inmersión seleccionada,
luego pulsa _Aceptar_. Ahora selecciona en la *Lista de Inmersiones* los buceos
a los que pegar esta información. Desde el menú principal, selecciona _Registro
@@ -930,9 +930,8 @@ image::images/Bookmarks.jpg["FIGURA: Diálogo de marcadores",align="center"]
==== Guardar la información de buceo actualizada
-La información introducida en las pestañas Notas de la inmersión y Equipo puede
-guardarse utilizando los dos botones de arriba a la derecha de la pestaña *Notas
-de la Inmersión*. Si se pulsa _Guardar_ los datos del buceo se guardan. Si se
+La información introducida en las pestañas Notas y Equipo puede
+guardarse utilizando los dos botones de arriba a la derecha de la pestaña *Notas*. Si se pulsa _Guardar_ los datos del buceo se guardan. Si se
pulsa _Cancelar_ los datos de buceo recién introducidos se borran, aunque el
perfil y los datos descargados del ordenador quedarán retenidos. Cuando el
usuario salga de _Subsurface_ hay una pregunta final para confirmar si los
@@ -1577,7 +1576,7 @@ perfil de la inmersión. Si está en un rango de 30 minutos, sí se muestra.
Después que las imágenes han sido cargadas aparecen en dos lugares:
- - La pestaña _Fotos_ del panel _Notas de la inmersión_.
+ - La pestaña _Fotos_ del panel _Notas_.
- Como pequeños iconos (chinchetas) sobre el perfil de inmersión, en posiciones
que relejan la hora en que se tomó cada fotografía. Ver a continuación:
@@ -1645,7 +1644,7 @@ profundo y durante mucho tiempo. En lo que corresponde a _Subsurface_, solo hay
dos clases de información que necesitan proporcionarse:
- *Describir las botellas usadas durante el buceo*. Esto se hace en la pestaña
- *Equipo* del panel *Información de la inmersión* tal como xref:cylinder_definitions[se describe anteriormente].
+ *Equipo* del panel *Información* tal como xref:cylinder_definitions[se describe anteriormente].
se introducen las botellas una a una, especificando las características de la
botella y la composición del gas de cada una de ellas.
@@ -1679,7 +1678,7 @@ configuración popular entre los espeleo buceadores, el buceo en lateral se
puede efectuar por buceadores recreativos que hayan completado el entrenamiento
adecuado. Registrar inmersiones en sidemount se hace en tres pasos:
-- *Durante el buceo, se registran los eventos de cambio de botella". Ya que bucear
+- *Durante el buceo, registrar los eventos de cambio de botella". Ya que bucear
en lateral supone, normalmente, usar 2 botellas con aire o con la misma mezcla,
_Subsurface_ distingue entre estas botellas. En comparación, la mayoría de
ordenadores de buceo que contemplan cambios de gas solo distinguen entre
@@ -1713,42 +1712,6 @@ image::images/sidemount1.jpg["FIGURE: Sidemount profile",align="center"]
Esta sección es un ejemplo de la versatilidad de _Subsurface_ como herramienta
de registro de inmersiones.
-[[S_sSCR_dives]]
-==== Inmersiones con rebreather de circuito semi cerrado (SCR)
-
-[icon="images/halcyon_RB80.jpg"]
-[NOTE]
-Los rebreathers semi cerrados pasivos (pSCR) suponen un avance técnico en el
-equipo de buceo que recircula el gas que el buzo respira, y elimina el dióxido
-de carbono del gas exhalado. Al tiempo que una pequeña cantidad del gas exhalado
-(habitualmente una décima parte) se libera en el agua, una pequeña cantidad de
-gas de la botella se introduce en el circuito (habitualmente nitrox). Un buzo
-usando una sola botella de gas puede, pues, bucear durante periodos de tiempo
-mucho mayores que utilizando una configuración recreativa de circuito abierto.
-Con los pSCR una cantidad muy pequeña de gas se libera cada vez que el buzo
-inhala. Con los equipos SCR activos (aSCR), en cambio, una pequeña cantidad del
-gas respirado se libera continuamente.
-
-Para registrar inmersiones con pSCR, no se requieren procedimientos especiales,
-solo los pasos normales descritos con anterioridad:
-
-- Seleccionar el modo pSCR en el desplegable _Modo de inmersión_ en el panel
- *Información de la inmersión*.
-
-- El buceo con pSCR, a menudo, requiere cambios de gas, necesitando una botella
- adicional. Hay, pues, que describir todas las botellas como se indicó con
- anterioridad e indicar los cambios de botella/gas como se explicó en la
- sección xref:S_MulticylinderDives[Inmersiones multi botella].
-
-Si se ha seleccionado pSCR en el _Modo de inmersión_, el techo de buceo para
-inmersiones pSCR se ajusta para la caída de oxígeno a través de la boquilla
-que, a menudo, requiere mayores períodos de descompresión. A continuación un
-perfil de inmersión de un buceo con pSCR usando EAN36 como gas de fondo y
-oxígeno para la descompresión. Fíjate que la inmersión duró unas dos horas.
-
-image::images/pSCR_profile.jpg["FIGURA: Perfil pSCR",align="center"]
-
-
[[S_CCR_dives]]
==== Inmersiones con rebreather de circuito cerrado (CCR)
@@ -1927,8 +1890,8 @@ recomendadas. Esta información se proporciona utilizando diferentes colores:
El perfil también incluye lecturas de profundidad para los picos y valles del
gráfico. De esta forma, se debe poder visualizar la profundidad del punto más
-hondo y otros picos. La profundidad media se muestra como una línea gris que
-indica la profundidad media en cada momento de la inmersión.
+hondo y otros picos. La profundidad media se muestra como una línea roja
+horizontal.
[icon="images/icons/scale.jpg"]
[NOTE]
@@ -2469,59 +2432,7 @@ en las que aparezcan las etiquetas "cueva" _O_ "barco", solas o conjuntamente.
[[S_ExportLog]]
== Exportar el registro de inmersiones o parte del mismo
-Hay dos posibilidades de exportar información de buceo desde _Subsurface_:
-
-- Exportar información de buceo a _Facebook_
-
-- xref:S_Export_other[Exportar información de buceo a otros destinos o formatos]
-
-[[S_facebook]]
-=== Exportar información de buceo a _Facebook_
-
-La exportación de inmersiones a _Facebook_ se maneja de forma diferente a otros
-tipos de exportación. Esto es debido a que exportar a _Facebook_ requiere una
-conexión a esta red social y necesita un usuario de _Facebook_ y su password.
-Si, desde el menú principal, seleccionamos _Archivo -> Preferencias ->
-Facebook_, se nos presentará una pantalla de acceso (ver imagen *A* de la
-izquierda a continuación). Introducimos nuestro usuario y password de
-_Facebook_. Una vez que nos hemos conectado a _Facebook_, se nos presenta el
-panel de la imagen *B* a continuación. Este panel tiene un botón que habrá que
-seleccionar para cerrar la conexión a _Facebook_.
-
-image::images/facebook1_f20.jpg["Figure: Acceso a Facebook",align="center"]
-
-Tras haber establecido una conexión con _Facebook_, transferir un perfil de
-inmersión a nuestro perfil de _Facebook_ es sencillo. Un icono de _Facebook_
-aparece en el panel *Notas de la inmersión* de _Subsurface_ (ver imagen *A* a
-continuación). Asegúrate de que la inmersión que quieres transferir al historial
-es la que se muestra en el panel *Perfil de la inmersión*. Selecciona el icono
-de _Facebook_ y se mostrará un icono que determinará la cantidad de información
-transferida junto al perfil (ver imagen *B*, a continuación). Se necesita
-proporcionar el nombre de un álbum de _Facebook_ para poder enviar el perfil de
-inmersión. Las casillas seleccionables de la izquierda nos permiten seleccionar
-la información que vamos a enviar. Esta información se muestra en la ventana de
-texto de la derecha (ver imagen *B* a continuación). El mensaje que se va a
-enviar se puede editar directamente en esta ventana de texto. Tras haber elegido
-la información y verificado lo que se va a subir, se selecciona el botón _OK_
-lo que inicia la transferencia a _Facebook_. Unos momentos después aparecerá
-un mensaje indicando una transferencia correcta.
-
-El álbum creado y el post al historial se marcarán como privados. Para que
-los amigos puedan ver el post habrá que cambiar los permisos desde un acceso
-normal a _Facebook_ desde un navegador o desde la app de _Facebook_. Aunque
-esto suponga un paso de más, los desarrolladores entienden que esta es la mejor
-solución para evitar subidas no deseadas en el historial público.
-
-image::images/facebook2_f20.jpg["Figure: Facebook login",align="center"]
-
-Si se considera necesario, cierra la conexión a _Facebook_, bien cerrando
-_Subsurface_ o bien seleccionando _Archivo -> Preferencias -> Facebook_ desde
-el menú principal, clicando el botón correspondiente en el panel _Facebook_.
-
-[[S_Export_other]]
-=== Exportar información de buceo a otros destinos o formatos
-Para exportar a otros destinos,
-se llega a la función de exportación seleccionando _Archivo -> Exportar_ lo que
+Se llega a la función de exportación seleccionando _Archivo -> Exportar_ lo que
despliega el diálogo de exportación. Este diálogo siempre ofrece dos opciones:
guardar TODAS las inmersiones, o guardar solo las inmersiones seleccionadas en
el panel *Lista de Inmersiones* de _Subsurface_. Marca la casilla seleccionable
@@ -2834,9 +2745,8 @@ Este panel permite dos tipos de selecciones:
aunque siguen estando guardadas.
** _Mostrar la profundidad media_: Activar esta casilla hace que _Subsurface_
- trace una línea gris a través del perfil, indicando la profundidad media del
- buceo en cada momento de la inmersión. Normalmente es una línea con forma de
- "u" que indicará la profundidad media mayor justo antes de iniciar el ascenso.
+ trace una línea roja a través del perfil, indicando la profundidad media del
+ buceo.
* *Varios*:
@@ -2916,19 +2826,6 @@ el servidor proxy utiliza autenticación también han de indicarse el usuario y
password para que _Subsurface_ pueda pasar automáticamente a través del proxy
para acceder a internet.
-=== Acceso a Facebook
-Este panel nos permite acceder a una cuenta de _Facebook_ para poder enviar
-información desde _Subsurface_.
-
-image::images/Pref6_f20.jpg["FIGURE: Facebook login panel",align="center"]
-
-Si se proporciona un usuario y una clave validos, se crea una conexión a
-_Facebook_. La conexión se cierra cuando al cerrar _Subsurface_. La casilla
-seleccionable "No cerrar sesión con Subsurface" de la pantalla de acceso no
-tiene ningún efecto, en estos momentos.
-Ver la sección xref:S_facebook[Exportar perfiles de inmersión a Facebook]
-para más información.
-
[[S_DivePlanner]]
== El Planificador de _Subsurface_
La planificación de inmersiones es una característica avanzada de _Subsurface_
diff --git a/Documentation/user-manual_fr.html.git b/Documentation/user-manual_fr.html.git
index 315642988..f1411e0cf 100644
--- a/Documentation/user-manual_fr.html.git
+++ b/Documentation/user-manual_fr.html.git
@@ -524,10 +524,10 @@ important pour manipuler un journal (carnet) de plongée.</p></div>
<div class="paragraph"><p>La <strong>carte de plongée</strong> en bas à droite, affiche les sites de plongées de
l&#8217;utilisateur, sur une carte mondiale et centrée sur le site de la dernière
plongée sélectionnée dans la <strong>liste des plongées</strong>.</p></div>
-<div class="paragraph"><p>Les <strong>informations de plongée</strong> en haut à gauche, fournissent des informations
-détaillées sur la plongée sélectionnée dans la <strong>liste des plongées</strong>, dont
-des statistiques pour la plongée sélectionnée ou pour toutes les plongées
-mises en surbrillance.</p></div>
+<div class="paragraph"><p>Les <strong>informations</strong> en haut à gauche, fournissent des informations détaillées
+sur la plongée sélectionnée dans la <strong>liste des plongées</strong>, dont des
+statistiques pour la plongée sélectionnée ou pour toutes les plongées mises
+en surbrillance.</p></div>
<div class="paragraph"><p>Le <strong>profil de plongée</strong> en haut à droite, affiche un profil de plongée
graphique de la plongée sélectionnée dans la <strong>liste des plongées</strong>.</p></div>
<div class="paragraph"><p>Les séparateurs entre ces panneaux peuvent être déplacés pour modifier la
@@ -540,9 +540,9 @@ sélectionnée</em> sont affichées dans les panneaux respectifs. D&#8217;autre
plus d&#8217;une plongée est mise en surbrillance seule la dernière mise en
surbrillance est la <em>plongée sélectionnée</em>, mais les données de <em>toutes les
plongées mises en surbrillances</em> sont affichées dans l&#8217;onglet <strong>Stats</strong> du
-panneau <strong>informations de plongée</strong> (profondeur maximale, minimale et moyenne,
-les durées, les températures de l&#8217;eau et le SAC (air consommé); temps total
-et nombre de plongées sélectionnées).</p></div>
+panneau <strong>informations</strong> (profondeur maximale, minimale et moyenne, les
+durées, les températures de l&#8217;eau et le SAC (air consommé); temps total et
+nombre de plongées sélectionnées).</p></div>
<div class="imageblock" id="S_ViewPanels" style="text-align:center;">
<div class="content">
<img src="images/main_window_f20.jpg" alt="The Main Window" />
@@ -639,20 +639,20 @@ duration, depth, the names of your dive buddy and of the dive master or dive
guide, and some remarks about the dive. <em>Subsurface</em> can store much more
information than this for each dive. In order to add a dive to a dive log,
select <em>Log &#8594; Add Dive</em> from the Main Menu. The program then shows three
-panels to enter information for a dive: two tabs in the <strong>Dive Info</strong> panel
-(<strong>Dive Notes</strong> and <strong>Equipment</strong>), as well as the <strong>Dive Profile</strong> panel that
-displays a graphical profile of each dive. These panels are respectively
-marked <span class="red">A</span>, <span class="red">B</span> and <span class="red">C</span> in the figure below. Each of these
-tabs will now be explained for data entry.</p></div>
+panels to enter information for a dive: two tabs in the <strong>Info</strong> panel
+(<strong>Notes</strong> and <strong>Equipment</strong>), as well as the <strong>Dive Profile</strong> panel that displays
+a graphical profile of each dive. These panels are respectively marked
+<span class="red">A</span>, <span class="red">B</span> and <span class="red">C</span> in the figure below. Each of these tabs will
+now be explained for data entry.</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
<img src="images/AddDive1_f20.jpg" alt="FIGURE: Add dive" />
</div>
</div>
-<div class="paragraph"><p>When one edits a field in Dive notes or Equipment panels, <em>Subsurface</em>
-enters <strong>Editing Mode</strong>, indicated by the message in the blue box at the top
-of the <em>Dive Notes</em> panel (see the image below). This message is displayed
-in all the panels under Dive notes and Equipment when in <strong>Editing Mode</strong>.</p></div>
+<div class="paragraph"><p>When one edits a field in Notes or Equipment panels, <em>Subsurface</em> enters
+<strong>Editing Mode</strong>, indicated by the message in the blue box at the top of the
+<em>Notes</em> panel (see the image below). This message is displayed in all the
+panels under Notes and Equipment when in <strong>Editing Mode</strong>.</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
<img src="images/BlueEditBar_f20.jpg" alt="Blue edit bar" />
@@ -666,14 +666,14 @@ specific dive is saved in memory. When one closes Subsurface, the program
will ask again, this time whether the complete dive log should be saved on
disk or not.</p></div>
<div class="sect3">
-<h4 id="_notes_de_plongée">5.1.1. Notes de plongée</h4>
+<h4 id="_notes">5.1.1. Notes</h4>
<div class="paragraph"><p>This panel contains the date, time and place information for a particular
dive, environmental conditions, co-divers and buddies, as well as some
-descriptive information. If one clicks on the <strong>Dive Notes</strong> tab, the
-following fields are visible:</p></div>
+descriptive information. If one clicks on the <strong>Notes</strong> tab, the following
+fields are visible:</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
-<img src="images/AddDive2_f20.jpg" alt="FIGURE: The Dive Notes tab" />
+<img src="images/AddDive2_f20.jpg" alt="FIGURE: The Notes tab" />
</div>
</div>
<div class="paragraph"><p>The <strong>Time</strong> field reflects the date and the time of the dive. By clicking the
@@ -765,10 +765,10 @@ shown for the user to choose from.</p></div>
<div class="paragraph"><p>The <strong>Save</strong> and <strong>Cancel</strong> buttons are used to save all the information for
tabs in the info panel and in the dive profile panel, so there&#8217;s no need to
use them until ALL other information has been added. Here is an example of a
-completed Dive Notes panel:</p></div>
+completed Notes panel:</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
-<img src="images/CompletedDiveInfo_f20.jpg" alt="FIGURE: A completed Dive Notes tab" />
+<img src="images/CompletedDiveInfo_f20.jpg" alt="FIGURE: A completed Notes tab" />
</div>
</div>
</div>
@@ -914,13 +914,13 @@ EAN50.</p></div>
</div>
<div class="sect3">
<h4 id="_saving_the_hand_entered_dive_information">5.1.4. Saving the hand-entered dive information</h4>
-<div class="paragraph"><p>The information entered in the <strong>Dive Notes</strong> tab, the <strong>Equipment</strong> tab as well
-as the <strong>Dive Profile</strong> can now be saved in the user&#8217;s logbook by using the
-two buttons on the top right hand of the Dive Notes tab. If the <em>Save</em>
-button is clicked, the dive data are saved in the current logbook. If the
-<em>Cancel</em> button is clicked, the newly entered dive data are discarded. When
-exiting <em>Subsurface</em>, the user will be prompted once more to save the
-logbook with the new dive(s).</p></div>
+<div class="paragraph"><p>The information entered in the <strong>Notes</strong> tab, the <strong>Equipment</strong> tab as well as
+the <strong>Dive Profile</strong> can now be saved in the user&#8217;s logbook by using the two
+buttons on the top right hand of the Notes tab. If the <em>Save</em> button is
+clicked, the dive data are saved in the current logbook. If the <em>Cancel</em>
+button is clicked, the newly entered dive data are discarded. When exiting
+<em>Subsurface</em>, the user will be prompted once more to save the logbook with
+the new dive(s).</p></div>
</div>
</div>
<div class="sect2">
@@ -995,7 +995,7 @@ that have not been uploaded before. This makes the download process faster
on most dive computers and also saves battery power of the dive computer (at
least for those not charging while connected via USB). If, for some reason,
the user wishes to import ALL dives from the dive computer, even though some
-may already be in the logbook, then check the check box labelled <em>Force
+may already be in the logbook, then check the check box labeled <em>Force
download of all dives</em>.</p></div>
<div class="ulist"><ul>
<li>
@@ -1194,22 +1194,22 @@ device instead of the model name, allowing easy identification of devices.</p></
<h4 id="S_EditDiveInfo">5.2.3. Updating the dive information imported from the dive computer.</h4>
<div class="paragraph"><p>With the uploaded dives in the <strong>Dive List</strong>, the information from the dive
computer is not complete and more details must be added in order to have a
-fuller record of the dives. To do this, the <strong>Dive Notes</strong> and the <strong>Equipment</strong>
-tabs on the top left hand of the <em>Subsurface</em> window should be used.</p></div>
+fuller record of the dives. To do this, the <strong>Notes</strong> and the <strong>Equipment</strong> tabs
+on the top left hand of the <em>Subsurface</em> window should be used.</p></div>
</div>
<div class="sect3">
-<h4 id="_notes_de_plongée_2">5.2.4. Notes de plongée</h4>
+<h4 id="_notes_2">5.2.4. Notes</h4>
<div class="paragraph"><p>The date and time of the dive, gas mixture and (often) water temperature are
usually shown as obtained from the dive computer, but the user needs to add
additional information by hand in order to have a more complete dive
record. In a few cases, (e.g. APD rebreathers) one also has to provide the
date and time of the dive. If the contents of this tab is changed or edited
in any way, the message in a blue box at the top of the panel indicates that
-the dive is being edited. If one clicks on the <strong>Dive Notes</strong> tab, the
-following fields are visible:</p></div>
+the dive is being edited. If one clicks on the <strong>Notes</strong> tab, the following
+fields are visible:</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
-<img src="images/AddDive3_f20.jpg" alt="FIGURE: The Dive Notes tab" />
+<img src="images/AddDive3_f20.jpg" alt="FIGURE: The Notes tab" />
</div>
</div>
<div class="paragraph"><p>The <strong>Time</strong> field reflects the date and time of the dive. By clicking the
@@ -1305,10 +1305,10 @@ typed
<div class="paragraph"><p>The <strong>Save</strong> and <strong>Cancel</strong> buttons are used to save all the information for
tabs in the info panel and in the dive profile panel, so there&#8217;s no need to
use them until ALL other information has been added. Here is an example of a
-completed Dive Notes panel:</p></div>
+completed Notes panel:</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
-<img src="images/CompletedDiveInfo_f20.jpg" alt="FIGURE: A completed Dive Notes tab" />
+<img src="images/CompletedDiveInfo_f20.jpg" alt="FIGURE: A completed Notes tab" />
</div>
</div>
</div>
@@ -1406,17 +1406,17 @@ weights: integrated as well as a weight belt:</p></div>
<h4 id="_editing_several_selected_dives_simultaneously">5.2.6. Editing several selected dives simultaneously</h4>
<div class="paragraph"><p><em>METHOD 1</em>: After uploading dives from a dive computer, the dive profiles of
the uploaded dives are shown in the <strong>Dive profile</strong> tab, as well as a few
-items of information in the <strong>Dive Notes</strong> tab (e.g. water temperature) and in
-the <strong>Equipment</strong> tab (e.g. gas pressures and gas composition). However the
-other fields remain empty. It may be useful to simultaneously edit some of
-the fields in the <strong>Dive Notes</strong> and <strong>Equipment</strong> tabs. For instance, it is
-possible that a diver performed several dives during a single day, using
-identical equipment while diving at the same dive site or with the same dive
-master and/or buddy or tags. Instead of completing the information for each
-of these dives separately, one can select all the dives for that day in the
-<strong>Dive List</strong> and insert the same information in the <strong>Dive Notes</strong> and
-<strong>Equipment</strong> fields that need identical information. This is achieved by
-editing the dive notes or the equipment for any one of the selected dives.</p></div>
+items of information in the <strong>Notes</strong> tab (e.g. water temperature) and in the
+<strong>Equipment</strong> tab (e.g. gas pressures and gas composition). However the other
+fields remain empty. It may be useful to simultaneously edit some of the
+fields in the <strong>Notes</strong> and <strong>Equipment</strong> tabs. For instance, it is possible
+that a diver performed several dives during a single day, using identical
+equipment while diving at the same dive site or with the same dive master
+and/or buddy or tags. Instead of completing the information for each of
+these dives separately, one can select all the dives for that day in the
+<strong>Dive List</strong> and insert the same information in the <strong>Notes</strong> and <strong>Equipment</strong>
+fields that need identical information. This is achieved by editing the dive
+notes or the equipment for any one of the selected dives.</p></div>
<div class="paragraph"><p>The simultaneous editing only works with fields that do not already contain
information. This means that, if some fields have been edited for a
particular dive among the selected dives, these are not changed while
@@ -1428,15 +1428,15 @@ the edited dive is changed, even though several dives have been selected in
the <strong>Dive List</strong>. This greatly speeds up the completion of the dive log after
several similar dives.</p></div>
<div class="paragraph" id="S_CopyComponents"><p><em>METHOD 2</em>:There is a different way of achieving the same goal. Select a
-dive with all the appropriate information typed into the <strong>Dive Notes</strong> and
+dive with all the appropriate information typed into the <strong>Notes</strong> and
<strong>Equipment</strong> tabs. Then, from the main menu, select <em>Log &#8594; Copy dive
components</em>. A box is presented with a selection of check boxes for most of
-the fields in the <strong>Dive Notes</strong> and <strong>Equipment</strong> tabs. Select the fields to
-be copied from the currently selected dive, then select <em>OK</em>. Now, in the
-<strong>Dive List</strong>, select the dives into which this information is to be
-pasted. Then, from the main menu, select <em>Log &#8594; Paste dive components</em>.
-All the selected dives now contain the data initially selected in the
-original source dive log.</p></div>
+the fields in the <strong>Notes</strong> and <strong>Equipment</strong> tabs. Select the fields to be
+copied from the currently selected dive, then select <em>OK</em>. Now, in the <strong>Dive
+List</strong>, select the dives into which this information is to be pasted. Then,
+from the main menu, select <em>Log &#8594; Paste dive components</em>. All the selected
+dives now contain the data initially selected in the original source dive
+log.</p></div>
</div>
<div class="sect3">
<h4 id="_adding_bookmarks_to_a_dive">5.2.7. Adding Bookmarks to a dive</h4>
@@ -1479,13 +1479,13 @@ If one hovers using the mouse over the red bookmark, the appropriate text is
</div>
<div class="sect3">
<h4 id="_saving_the_updated_dive_information">5.2.8. Saving the updated dive information</h4>
-<div class="paragraph"><p>The information entered in the <strong>Dive Notes</strong> tab and the <strong>Equipment</strong> tab can
-be saved by using the two buttons on the top right hand of the <strong>Dive Notes</strong>
-tab. If the <em>Save</em> button is clicked, the dive data are saved. If the
-<em>Cancel</em> button is clicked, then the newly entered dive data are deleted,
-although the dive profile obtained from the dive computer will be
-retained. When the user exits <em>Subsurface</em> there is a final prompt to
-confirm that the new data should be saved.</p></div>
+<div class="paragraph"><p>The information entered in the <strong>Notes</strong> tab and the <strong>Equipment</strong> tab can be
+saved by using the two buttons on the top right hand of the <strong>Notes</strong> tab. If
+the <em>Save</em> button is clicked, the dive data are saved. If the <em>Cancel</em>
+button is clicked, then the newly entered dive data are deleted, although
+the dive profile obtained from the dive computer will be retained. When the
+user exits <em>Subsurface</em> there is a final prompt to confirm that the new data
+should be saved.</p></div>
</div>
</div>
<div class="sect2">
@@ -1720,12 +1720,12 @@ table contains the column headings found in the <em>CSV</em> data file. The blue
row of cells immediately above these contains the names understood by
<em>Subsurface</em>. The white area below the dropdown lists contains all the field
names that <em>Subsurface</em> recognises. These names are in blue balloons and can
-be moved using a drag-and-frop action. For instance, <em>Subsurface</em> expects
+be moved using a drag-and-drop action. For instance, <em>Subsurface</em> expects
the column heading for Dive number (" # ") to be "Dive # ". If the column
heading that <em>Subsurface</em> expects is not in the blue cells, then drag the
appropriate column heading from the upper area and drop it in the
appropriate blue cell at the top of the table. To indicate the correct
-column for "Dive #", drag the ballooned item labelled "Dive # " and drop it
+column for "Dive #", drag the ballooned item labeled "Dive # " and drop it
in the blue cell immediately above the white cell containing " # ". This is
depicted in the image below.</p></div>
<div class="imageblock" style="text-align:center;">
@@ -1747,8 +1747,8 @@ in the <strong>Dive List</strong> panel.</p></div>
<img src="images/icons/important.png" alt="Important" />
</td>
<td class="content"><em>CSV</em> is an abbreviation for a data file format: <em>Comma-Separated
-Variables</em>. It is a file format allowing someone to view or edit the
-information using a text editor such as Notebook (Windows), gedit (Linux) or
+Values</em>. It is a file format allowing someone to view or edit the
+information using a text editor such as Notepad (Windows), gedit (Linux) or
TextWrangler (OS/X). The two main advantages of the <em>CSV</em> format is that the
data are easily editable as text without any proprietary software and
ensuring all information is human-readable, not being obscured by any custom
@@ -2310,7 +2310,7 @@ button in the tool bar to the left of the dive profile:</p></div>
<div class="ulist"><ul>
<li>
<p>
-the <em>Photos</em> tab of the <strong>Dive Notes</strong> panel.
+the <em>Photos</em> tab of the <strong>Notes</strong> panel.
</p>
</li>
<li>
@@ -2348,9 +2348,9 @@ the <em>Photos</em> tab (see text below).</p></div>
<div class="sect3">
<h4 id="_the_em_photos_em_tab">5.5.3. The <em>Photos</em> tab</h4>
<div class="paragraph"><p>Photographs associated with a dive are shown as thumbnails in the <em>Photos</em>
-tab of the <em>Dive Notes</em> panel. Photos taken in rapid succession during a
-dive (therefore sometimes with large overlap on the dive profile) can easily
-be accessed in the <em>Photos</em> tab. This tab serves as a tool for individually
+tab of the <em>Notes</em> panel. Photos taken in rapid succession during a dive
+(therefore sometimes with large overlap on the dive profile) can easily be
+accessed in the <em>Photos</em> tab. This tab serves as a tool for individually
accessing the photos of a dive, while the stubs on the dive profile give an
indication of when during a dive a photo was taken. By single-clicking on a
thumbnail in the <em>Photos</em> panel, a photo is selected. By double-clicking a
@@ -2390,53 +2390,7 @@ there are only two types of information that need to be provided:</p></div>
<div class="ulist"><ul>
<li>
<p>
-<strong>Describe the cylinders used during the dive</strong> This is performed in the <strong>Equipment tab</strong> of
- the <strong>Dive Info</strong> panel, as <a href="#cylinder_definitions">described above</a>. Enter the cylinders one by one,
- specifying the characteristics of the cylinder and the gas composition within each cylinder.
-</p>
-</li>
-<li>
-<p>
-<strong>Record the times at which switches from one cylinder to another was done:</strong> This is information
- provided by some dive computers (provided the diver indicated these changes to the dive computer
- by pressing specific buttons). If the dive computer does not provide the information, the diver has to
- record these changes using a different method, e.g. writing it on a slate.
-</p>
-</li>
-<li>
-<p>
-<strong>Record the cylinder changes on the dive profile</strong>: If the latter option
- was followed, the diver needs to indicate the gas change event by right-clicking at the appropriate point
- in time on the <strong>Dive Profile</strong> panel and indicating the cylinder to which the change was made. After
- right-clicking, follow the context menu to "Add gas change" and select the appropriate cylinder from
- those defined during the first step, above (see image below). If the
- <strong>tank bar</strong> button in the ttolbar has been activated, the cylinder switches are also indicated in the
- tank bar.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>Having performed these tasks, <em>Subsurface</em> indicates the appropriate use of
-cylinders in the dive profile. Below is a multi-cylinder dive, starting off
-with EAN28, then changing cylinders to EAN50 after 26 minutes to perform
-decompression.</p></div>
-<div class="imageblock" style="text-align:center;">
-<div class="content">
-<img src="images/multicylinder_dive.jpg" alt="FIGURE: Multicylinder profile" />
-</div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="_sidemount_dives">5.6.2. Sidemount dives</h4>
-<div class="paragraph"><p>Sidemount diving is just another form of multicylinder diving, often with
-both or all cylinders having the same gas mixture. Although it is a popular
-configuration for cave divers, sidemount diving can be performed by
-recreational divers who have completed the appropriate training. Sidemount
-dive logging involves, exactly as with multicylinder dives, above, three
-steps:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-<strong>During the dive, record cylinder switch events</strong>. Since sidemount diving normally involves two
+<strong>During the dive, recording cylinder switch events</strong>. Since sidemount diving normally involves two
cylinders with air or with the same gas mixture, <em>Subsurface</em> distinguishes among these different
cylinders. In contrast, most dive computers that allow gas switching only distinguish among different
<em>gases</em> used, not among different <em>cylinders</em> used. This means that when sidemount dives are downloaded
@@ -2449,7 +2403,7 @@ steps:</p></div>
<li>
<p>
<strong>Within <em>Subsurface</em> describe the cylinders used during the dive</strong>. The diver needs to provide the
- specifications of the different cylinders, using the <strong>Equipment</strong> tab of the <strong>Dive Info Panel</strong> (see
+ specifications of the different cylinders, using the <strong>Equipment</strong> tab of the <strong>Info Panel</strong> (see
image below where two 12 litre cylinder were used).
</p>
</li>
@@ -2464,7 +2418,7 @@ steps:</p></div>
profile with a cylinder symbol. If the <strong>Tank Bar</strong> is activated using the toolbar to the left of the
profile, then the cylinder change is also indicated on the Tank Bar (see image below). After all
the cylinder change events have been recorded on the dive profile, the correct cylinder pressures
- for both cylinders are shown on the dive profile, as inthe image below.
+ for both cylinders are shown on the dive profile, as in the image below.
</p>
</li>
</ul></div>
@@ -2473,59 +2427,11 @@ steps:</p></div>
<img src="images/sidemount1.jpg" alt="FIGURE: Sidemount profile" />
</div>
</div>
-<div class="paragraph"><p>This section gives an example of the versatility of <em>Subsurface</em> as a give
+<div class="paragraph"><p>This section gives an example of the versatility of <em>Subsurface</em> as a dive
logging tool.</p></div>
</div>
<div class="sect3">
-<h4 id="S_sSCR_dives">5.6.3. Semi-closed circuit rebreather (SCR) dives</h4>
-<div class="admonitionblock">
-<table><tr>
-<td class="icon">
-<img src="images/halcyon_RB80.jpg" alt="Note" />
-</td>
-<td class="content">Passive semi-closed rebreathers (pSCR) comprise a technical advance in
-diving equipment that recirculates the breathing gas that a diver breathes,
-while removing carbon dioxide from the exhaled gas. While a small amount
-(typically a tenth) of the exhaled breathing gas is released into the water,
-a small amount of fresh gas is released from the back gas cylinder
-(typically containing nitrox). A diver, using a single cylinder of
-breathing gas can therefore dive for much longer periods than using a
-recreational open-circuit configuration. With pSCR equipment, a very small
-amount of breathing gas is released every time the breather inhales. With
-active SCR (aSCR) equipment, in contrast, a small amount of breathing gas is
-released continuously from the back cylinder.</td>
-</tr></table>
-</div>
-<div class="paragraph"><p>To log pSCR dives, no special procedures are required, just the normal steps
-outlined above:</p></div>
-<div class="ulist"><ul>
-<li>
-<p>
-Select pSCR in the <em>Dive Mode</em> dropdown list on the <strong>Dive Info</strong> panel.
-</p>
-</li>
-<li>
-<p>
-pSCR diving often involves gas changes, requiring an additional cylinder.
- Define all the appropriate cylinders as described above and indicate the
- cylinder/gas changes as described above in the section on
- <a href="#S_MulticylinderDives">multicylinder dives</a>.
-</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>If a pSCR <em>Dive Mode</em> has been selected, the dive ceiling for pSCR dives is
-adjusted for the oxygen drop accross the mouthpiece which often requires
-longer decompression periods. Below is a dive profile of a pSCR dive using
-EAN36 on the back cylinder and oxygen for decompression. Note that this dive
-lasted over two hours.</p></div>
-<div class="imageblock" style="text-align:center;">
-<div class="content">
-<img src="images/pSCR_profile.jpg" alt="FIGURE: pSCR profile" />
-</div>
-</div>
-</div>
-<div class="sect3">
-<h4 id="S_CCR_dives">5.6.4. Closed circuit rebreather (CCR) dives</h4>
+<h4 id="S_CCR_dives">5.6.2. Closed circuit rebreather (CCR) dives</h4>
<div class="admonitionblock">
<table><tr>
<td class="icon">
@@ -2658,7 +2564,7 @@ the pressures of the oxygen and diluent cylinders. The pressures of these
two cylinders are shown as green lines overlapping the depth profile. In
addition, start and end pressures for both oxygen and diluent cylinders are
shown in the <em>Equipment Tab</em>. Below is a dive profile for a CCR dive,
-including an overaly of setpoint and oxygen sensor data, as well as the
+including an overlay of setpoint and oxygen sensor data, as well as the
cylinder pressure data. In this case there is good agreement from the
readings of the two oxygen sensors.</p></div>
<div class="imageblock" style="text-align:center;">
@@ -2681,12 +2587,12 @@ B</a>.</p></div>
<h2 id="_obtaining_more_information_about_dives_entered_into_the_logbook">6. Obtaining more information about dives entered into the logbook</h2>
<div class="sectionbody">
<div class="sect2">
-<h3 id="_the_strong_dive_info_strong_tab_for_individual_dives">6.1. The <strong>Dive Info</strong> tab (for individual dives)</h3>
-<div class="paragraph"><p>The Dive Info tab gives some summary information about a particular dive
-that has been selected in the <strong>Dive List</strong>. Useful information here includes
-the surface interval before the dive, the maximum and mean depths of the
-dive, the gas volume consumed, the surface air consumption (SAC) and the
-number of oxygen toxicity units (OTU) incurred.</p></div>
+<h3 id="_the_strong_info_strong_tab_for_individual_dives">6.1. The <strong>Info</strong> tab (for individual dives)</h3>
+<div class="paragraph"><p>The Info tab gives some summary information about a particular dive that has
+been selected in the <strong>Dive List</strong>. Useful information here includes the
+surface interval before the dive, the maximum and mean depths of the dive,
+the gas volume consumed, the surface air consumption (SAC) and the number of
+oxygen toxicity units (OTU) incurred.</p></div>
<div class="admonitionblock">
<table><tr>
<td class="icon">
@@ -3131,11 +3037,11 @@ other than air. Their values are dependent on the composition of the
breathing gas. The EAD is the depth of a hypothetical air dive that has the
same partial pressure of nitrogen as the current depth of the nitrox dive at
hand. A nitrox dive leads to the same decompression obligation as an air
-dive to the depth equalling the EAD. The END is the depth of a hypothetical
+dive to the depth equaling the EAD. The END is the depth of a hypothetical
air dive that has the same sum of partial pressures of the narcotic gases
nitrogen and oxygen as the current trimix dive. A trimix diver can expect
-the same narcotic effect as a diver breathing air diving at a depth
-equalling the END.</td>
+the same narcotic effect as a diver breathing air diving at a depth equaling
+the END.</td>
</tr></table>
</div>
<div class="paragraph"><p>Figure (<strong>B</strong>) above shows an information box with a nearly complete set of
@@ -3324,14 +3230,14 @@ List</strong> panel now shows only the titles for the trips.</p></div>
<h4 id="_editing_the_title_and_associated_information_for_a_particular_trip">7.3.1. Editing the title and associated information for a particular trip</h4>
<div class="paragraph"><p>Normally, in the dive list, minimal information is included in the trip
title. More information about a trip can be added by selecting its trip
-title from the <strong>Dive List</strong>. This shows a <strong>Trip Notes</strong> tab in the <strong>Dive
-Notes</strong> panel. Here users can add or edit information about the date/time,
-the trip location and any other general comments about the trip as a whole
-(e.g. the dive company that was dived with, the general weather and surface
-conditions during the trip, etc.). After entering this information, users
-should select <strong>Save</strong> from the buttons at the top right of the <strong>Trip Notes</strong>
-tab. The trip title in the <strong>Dive List</strong> panel should now reflect some of the
-edited information.</p></div>
+title from the <strong>Dive List</strong>. This shows a <strong>Trip Notes</strong> tab in the <strong>Notes</strong>
+panel. Here users can add or edit information about the date/time, the trip
+location and any other general comments about the trip as a whole (e.g. the
+dive company that was dived with, the general weather and surface conditions
+during the trip, etc.). After entering this information, users should
+select <strong>Save</strong> from the buttons at the top right of the <strong>Trip Notes</strong> tab. The
+trip title in the <strong>Dive List</strong> panel should now reflect some of the edited
+information.</p></div>
</div>
<div class="sect3">
<h4 id="_viewing_the_dives_during_a_particular_trip">7.3.2. Viewing the dives during a particular trip</h4>
@@ -3412,9 +3318,9 @@ the dive computer and appearing as different dives in the <strong>Dive List</str
panel. Users can merge these dives onto a single dive by selecting the
appropriate dives, right-clicking them to bring up the context menu and then
selecting <strong>Merge selected dives</strong>. It may be necessary to edit the dive
-information in the <strong>Dive Notes</strong> panel to reflect events or conditions that
-apply to the merged dive. The figure below shows the depth profile of two
-such dives that were merged:</p></div>
+information in the <strong>Notes</strong> panel to reflect events or conditions that apply
+to the merged dive. The figure below shows the depth profile of two such
+dives that were merged:</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
<img src="images/MergedDive.png" alt="Example: Merged dive" />
@@ -3496,10 +3402,10 @@ connexion <em>Facebook</em>.</p></div>
</div>
</div>
<div class="paragraph"><p>Having established a login to <em>Facebook</em>, transfer of a dive profile to
-one&#8217;s <em>Facebook</em> timeline is easy. A <em>Facebook</em> icon appears in the <strong>Dive
-Notes</strong> panel of <em>Subsurface</em> (See image <strong>A</strong> below). Ensure that the dive
-that you want to transfer to the timeline is depicted in the <em>Subsurface</em>
-<strong>Dive Profile</strong> panel. Select the <em>Facebook</em> icon, and a dialogue is shown,
+one&#8217;s <em>Facebook</em> timeline is easy. A <em>Facebook</em> icon appears in the <strong>Notes</strong>
+panel of <em>Subsurface</em> (See image <strong>A</strong> below). Ensure that the dive that you
+want to transfer to the timeline is depicted in the <em>Subsurface</em> <strong>Dive
+Profile</strong> panel. Select the <em>Facebook</em> icon, and a dialogue is shown,
determining the amount of additional information transferred with the dive
profile (see image <strong>B</strong>, below). In order to transfer a dive profile to
<em>Facebook</em>, the name of a <em>Facebook</em> album needs to be provided. The
@@ -3561,7 +3467,7 @@ Universal Dive Data Format (<em>UDDF</em>). Refer to <em>http://uddf.org</em> fo
</li>
<li>
<p>
-<em>DiveShare</em> is also a dive log repostory on the Internet focusing on the
+<em>DiveShare</em> is also a dive log repository on the Internet focusing on the
recreational dives. In order to upload dives one has to provide a used ID,
so registration with <em>http://scubadiveshare.com</em> is required.
</p>
@@ -3898,7 +3804,7 @@ leave the settings panel by selecting <strong>OK</strong>.</p></div>
<li>
<p>
<strong>Default cylinder</strong>: Here users can specify the default cylinder listed in
- the <strong>Equipment</strong> tab of the <strong>Dive Notes</strong> panel.
+ the <strong>Equipment</strong> tab of the <strong>Notes</strong> panel.
</p>
</li>
<li>
@@ -4178,7 +4084,7 @@ A user who is not absolutely sure about any of the above requirements should
sections (see image below). The <strong>setup</strong> parameters for a dive are entered
into the several sections on the left hand side of the screen. The setup is
divided into several sections: Available Gases, Rates, Planning, Gas Options
-and Dive Notes.</p></div>
+and Notes.</p></div>
<div class="paragraph"><p>At the top right hand is a green <strong>design panel</strong> upon which the profile of
the dive can be manipulated directly by dragging and clicking as explained
below. This feature makes the <em>Subsurface</em> dive planner unique in ease of
@@ -4230,15 +4136,14 @@ In the top left-hand area of the planning screen, ensure that the constant
</li>
<li>
<p>
-In the table labelled <em>Available Gases</em>, add the information of the
- cylinders to be used as well as the gas composition within that
- cylinder. This is done in a similar way as for <a href="#S_CylinderData">providing cylinder data for dive logs</a>. Choose the cylinder type by double clicking
- the cylinder type and using the dropdown list, then specify the work
- pressure of this cylinder. By leaving the oxygen concentration (O2%) filed
- empty, the cylinder is assumed to contain air. Otherwise enter the oxygen
- and/or helium concentration in the boxes provided in this dialogue. Add
- additional cylinders by using the "+" icon to the top righthand of the
- dialogue.
+In the table labeled <em>Available Gases</em>, add the information of the cylinders
+ to be used as well as the gas composition within that cylinder. This is done
+ in a similar way as for <a href="#S_CylinderData">providing cylinder data for dive logs</a>. Choose the cylinder type by double clicking the cylinder type and
+ using the dropdown list, then specify the work pressure of this cylinder. By
+ leaving the oxygen concentration (O2%) filed empty, the cylinder is assumed
+ to contain air. Otherwise enter the oxygen and/or helium concentration in
+ the boxes provided in this dialogue. Add additional cylinders by using the
+ "+" icon to the top righthand of the dialogue.
</p>
</li>
<li>
@@ -4326,7 +4231,7 @@ specified in the <em>Available Gases</em> table. Add new waypoints until the ma
features of the dive have been completed, e.g. the bottom time segment and
deep stops (if these are implemented). Leave the remaining waypoints on the
ascent to <em>Subsurface</em>. In most cases <em>Subsurface</em> computes additional way
-points in order to fulfil decompression requirements for that dive. A
+points in order to fulfill decompression requirements for that dive. A
waypoint can be moved by selecting that waypoint and by using the arrow
keys. The waypoints listed in the <em>Dive Planner Points</em> dialogue can be
edited by hand in order to obtain a precise presentation of the dive
@@ -4360,7 +4265,7 @@ appear in the <strong>Dive List</strong> panel of <em>Subsurface</em>.</p></div>
<div class="paragraph"><p><strong>The dive plan details</strong></p></div>
<div class="paragraph"><p>On the bottom right of the dive planner, under <em>Dive Plan Details</em>, the
exact details of the dive plan are provided. These details may be modified
-by checking any of the options under the <em>Dive Notes</em> section of the dive
+by checking any of the options under the <em>Notes</em> section of the dive
planner, immediately to the left of the <em>Dive Plan Details</em>. If a <em>Verbatim
diveplan</em> is requested, a detailed sentence-level explanation of the dive
plan is given. If any of the management specifications have been exceeded
@@ -4403,13 +4308,13 @@ The parameters of the pSCR diver can be set by selecting <em>File &#8594; Pre
from the main menu, where the gas consumption calculation takes into account the pSCR dump
ratio (default 10:1) as well as the metabolism rate. The calculation also takes the oxygen drop
accross the mouthpiece of the rebreather into account. If the
-pO<sub>2</sub> drops below what is considered a save value, a warning apears in the <em>Dive plan
+pO<sub>2</sub> drops below what is considered a save value, a warning appears in the <em>Dive plan
details</em>. A typical pSCR configuration is with a single cylinder and one or more bail-out
cylinders. Therefore the setup of the <em>Available gases</em> and the <em>Dive planner points</em> tables
are very similar to that of a CCR dive plan, described above. However, no oxygen setpoints
are specified for pSCR dives. Below is a dive plan for a pSCR dive. The dive is comparable
to that of the CCR dive above, but note the longer ascent duration due to the lower oxygen
-in the loop due to the oxygen drop accross the mouthpiece of the pSCR equipment.</p></div>
+in the loop due to the oxygen drop across the mouthpiece of the pSCR equipment.</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
<img src="images/Planner_pSCR1_f20.jpg" alt="FIGURE: Planning a pSCR dive: setup" />
@@ -4454,8 +4359,8 @@ Plan Details</em> for wet notes. Alternatively one can cut and paste the <em>Div
Plan Details</em> for inclusion in a text file or word processing document.</p></div>
<div class="paragraph"><p>Dive plans have many characteristics in common with dive logs (dive profile,
dive notes, etc). After a dive plan has been saved, the dive details and
-gas calculations are saved in the <strong>Dive Notes</strong> tab. While a dive plan is
-being designed, it can be printed using the <em>Print</em> button in the dive
+gas calculations are saved in the <strong>Notes</strong> tab. While a dive plan is being
+designed, it can be printed using the <em>Print</em> button in the dive
planner. This prints the dive details and gas calculations in the <em>Dive Plan
Details</em> panel of the dive planner. However, after the plan has been saved,
it is represented in a way very similar to a dive log and the gas
@@ -4649,8 +4554,7 @@ des sections de ce manuel traitant des opérations relatives.</p></div>
</li>
<li>
<p>
-<a href="#S_ViewPanels"><em>Info</em></a> - Affiche uniquement le panneau des <strong>notes de
- plongée</strong>.
+<a href="#S_ViewPanels"><em>Info</em></a> - Affiche uniquement le panneau des <strong>notes</strong>.
</p>
</li>
<li>
@@ -5179,7 +5083,7 @@ On the list of file names select the .CSV file that has been created
</li>
<li>
<p>
-In the dropdown list on the middle right labeled '<em>Pre-configured imports</em>",
+In the dropdown list on the top left labeled '<em>Pre-configured imports</em>",
select <em>APD Log Viewer</em>.
</p>
</li>
@@ -5393,11 +5297,11 @@ The dives are now exported to the file DM4.bak (or DM5.bak)
<div class="admonitionblock" id="Atomic_Export">
<table><tr>
<td class="icon">
-<img src="./images/icons/note.png" alt="Note" />
+<img src="images/icons/atomiclogo.jpg" alt="Note" />
</td>
<td class="content">Atomic Logbook is a Windows software by Atomic Aquatics. It allows
downloading of dive information from Cobalt and Cobalt 2 dive computers.
-The divelog is kept in a SQlite database at
+The divelog is kept in a SQLite database at
C:\ProgramData\AtomicsAquatics\Cobalt-Logbook\Cobalt.db. This file can be
directly imported to Subsurface.</td>
</tr></table>
@@ -5509,7 +5413,7 @@ Duration: the format should be minutes:seconds.
</li>
<li>
<p>
-Unit system: only one unit system shold be used (i.e., no mixture between
+Unit system: only one unit system should be used (i.e., no mixture between
imperial and metric units)
</p>
</li>
@@ -5686,7 +5590,7 @@ diveâ€.</p></div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2015-02-17 08:49:01 PST
+Last updated 2015-02-04 07:41:58 PST
</div>
</div>
</body>
diff --git a/Documentation/user-manual_fr.txt b/Documentation/user-manual_fr.txt
index 8c90f2c27..9674adc72 100644
--- a/Documentation/user-manual_fr.txt
+++ b/Documentation/user-manual_fr.txt
@@ -108,10 +108,10 @@ La *carte de plongée* en bas à droite, affiche les sites de plongées de
l'utilisateur, sur une carte mondiale et centrée sur le site de la dernière
plongée sélectionnée dans la *liste des plongées*.
-Les *informations de plongée* en haut à gauche, fournissent des informations
-détaillées sur la plongée sélectionnée dans la *liste des plongées*, dont
-des statistiques pour la plongée sélectionnée ou pour toutes les plongées
-mises en surbrillance.
+Les *informations* en haut à gauche, fournissent des informations détaillées
+sur la plongée sélectionnée dans la *liste des plongées*, dont des
+statistiques pour la plongée sélectionnée ou pour toutes les plongées mises
+en surbrillance.
Le *profil de plongée* en haut à droite, affiche un profil de plongée
graphique de la plongée sélectionnée dans la *liste des plongées*.
@@ -127,9 +127,9 @@ sélectionnée_ sont affichées dans les panneaux respectifs. D'autre part, si
plus d'une plongée est mise en surbrillance seule la dernière mise en
surbrillance est la _plongée sélectionnée_, mais les données de _toutes les
plongées mises en surbrillances_ sont affichées dans l'onglet *Stats* du
-panneau *informations de plongée* (profondeur maximale, minimale et moyenne,
-les durées, les températures de l'eau et le SAC (air consommé); temps total
-et nombre de plongées sélectionnées).
+panneau *informations* (profondeur maximale, minimale et moyenne, les
+durées, les températures de l'eau et le SAC (air consommé); temps total et
+nombre de plongées sélectionnées).
[[S_ViewPanels]]
@@ -217,18 +217,18 @@ duration, depth, the names of your dive buddy and of the dive master or dive
guide, and some remarks about the dive. _Subsurface_ can store much more
information than this for each dive. In order to add a dive to a dive log,
select _Log -> Add Dive_ from the Main Menu. The program then shows three
-panels to enter information for a dive: two tabs in the *Dive Info* panel
-(*Dive Notes* and *Equipment*), as well as the *Dive Profile* panel that
-displays a graphical profile of each dive. These panels are respectively
-marked [red]#A#, [red]#B# and [red]#C# in the figure below. Each of these
-tabs will now be explained for data entry.
+panels to enter information for a dive: two tabs in the *Info* panel
+(*Notes* and *Equipment*), as well as the *Dive Profile* panel that displays
+a graphical profile of each dive. These panels are respectively marked
+[red]#A#, [red]#B# and [red]#C# in the figure below. Each of these tabs will
+now be explained for data entry.
image::images/AddDive1_f20.jpg["FIGURE: Add dive", align="center"]
-When one edits a field in Dive notes or Equipment panels, _Subsurface_
-enters *Editing Mode*, indicated by the message in the blue box at the top
-of the _Dive Notes_ panel (see the image below). This message is displayed
-in all the panels under Dive notes and Equipment when in *Editing Mode*.
+When one edits a field in Notes or Equipment panels, _Subsurface_ enters
+*Editing Mode*, indicated by the message in the blue box at the top of the
+_Notes_ panel (see the image below). This message is displayed in all the
+panels under Notes and Equipment when in *Editing Mode*.
image::images/BlueEditBar_f20.jpg["Blue edit bar", align="center"]
@@ -240,14 +240,14 @@ specific dive is saved in memory. When one closes Subsurface, the program
will ask again, this time whether the complete dive log should be saved on
disk or not.
-==== Notes de plongée
+==== Notes
This panel contains the date, time and place information for a particular
dive, environmental conditions, co-divers and buddies, as well as some
-descriptive information. If one clicks on the *Dive Notes* tab, the
-following fields are visible:
+descriptive information. If one clicks on the *Notes* tab, the following
+fields are visible:
-image::images/AddDive2_f20.jpg["FIGURE: The Dive Notes tab", align="center"]
+image::images/AddDive2_f20.jpg["FIGURE: The Notes tab", align="center"]
The *Time* field reflects the date and the time of the dive. By clicking the
date, a calendar is displayed from which one can choose the correct
@@ -340,9 +340,9 @@ shown for the user to choose from.
The *Save* and *Cancel* buttons are used to save all the information for
tabs in the info panel and in the dive profile panel, so there's no need to
use them until ALL other information has been added. Here is an example of a
-completed Dive Notes panel:
+completed Notes panel:
-image::images/CompletedDiveInfo_f20.jpg["FIGURE: A completed Dive Notes tab", align="center"]
+image::images/CompletedDiveInfo_f20.jpg["FIGURE: A completed Notes tab", align="center"]
==== Equipment
@@ -471,13 +471,13 @@ image::images/DiveProfile4_f20.jpg["FIGURE: Completed dive profile", align="cent
==== Saving the hand-entered dive information
-The information entered in the *Dive Notes* tab, the *Equipment* tab as well
-as the *Dive Profile* can now be saved in the user's logbook by using the
-two buttons on the top right hand of the Dive Notes tab. If the _Save_
-button is clicked, the dive data are saved in the current logbook. If the
-_Cancel_ button is clicked, the newly entered dive data are discarded. When
-exiting _Subsurface_, the user will be prompted once more to save the
-logbook with the new dive(s).
+The information entered in the *Notes* tab, the *Equipment* tab as well as
+the *Dive Profile* can now be saved in the user's logbook by using the two
+buttons on the top right hand of the Notes tab. If the _Save_ button is
+clicked, the dive data are saved in the current logbook. If the _Cancel_
+button is clicked, the newly entered dive data are discarded. When exiting
+_Subsurface_, the user will be prompted once more to save the logbook with
+the new dive(s).
[[S_ImportDiveComputer]]
=== Importing new dive information from a Dive Computer
@@ -538,7 +538,7 @@ that have not been uploaded before. This makes the download process faster
on most dive computers and also saves battery power of the dive computer (at
least for those not charging while connected via USB). If, for some reason,
the user wishes to import ALL dives from the dive computer, even though some
-may already be in the logbook, then check the check box labelled _Force
+may already be in the logbook, then check the check box labeled _Force
download of all dives_.
- The dialogue has two drop-down lists, *Vendor* and *Dive Computer*. On the
@@ -690,10 +690,10 @@ device instead of the model name, allowing easy identification of devices.
With the uploaded dives in the *Dive List*, the information from the dive
computer is not complete and more details must be added in order to have a
-fuller record of the dives. To do this, the *Dive Notes* and the *Equipment*
-tabs on the top left hand of the _Subsurface_ window should be used.
+fuller record of the dives. To do this, the *Notes* and the *Equipment* tabs
+on the top left hand of the _Subsurface_ window should be used.
-==== Notes de plongée
+==== Notes
The date and time of the dive, gas mixture and (often) water temperature are
usually shown as obtained from the dive computer, but the user needs to add
@@ -701,10 +701,10 @@ additional information by hand in order to have a more complete dive
record. In a few cases, (e.g. APD rebreathers) one also has to provide the
date and time of the dive. If the contents of this tab is changed or edited
in any way, the message in a blue box at the top of the panel indicates that
-the dive is being edited. If one clicks on the *Dive Notes* tab, the
-following fields are visible:
+the dive is being edited. If one clicks on the *Notes* tab, the following
+fields are visible:
-image::images/AddDive3_f20.jpg["FIGURE: The Dive Notes tab", align="center"]
+image::images/AddDive3_f20.jpg["FIGURE: The Notes tab", align="center"]
The *Time* field reflects the date and time of the dive. By clicking the
date, a calendar is displayed from which one can choose the correct
@@ -800,9 +800,9 @@ typed
The *Save* and *Cancel* buttons are used to save all the information for
tabs in the info panel and in the dive profile panel, so there's no need to
use them until ALL other information has been added. Here is an example of a
-completed Dive Notes panel:
+completed Notes panel:
-image::images/CompletedDiveInfo_f20.jpg["FIGURE: A completed Dive Notes tab", align="center"]
+image::images/CompletedDiveInfo_f20.jpg["FIGURE: A completed Notes tab", align="center"]
==== Equipment
@@ -888,17 +888,17 @@ image::images/WeightsDataEntry3_f20.jpg["FIGURE: A completed weights information
_METHOD 1_: After uploading dives from a dive computer, the dive profiles of
the uploaded dives are shown in the *Dive profile* tab, as well as a few
-items of information in the *Dive Notes* tab (e.g. water temperature) and in
-the *Equipment* tab (e.g. gas pressures and gas composition). However the
-other fields remain empty. It may be useful to simultaneously edit some of
-the fields in the *Dive Notes* and *Equipment* tabs. For instance, it is
-possible that a diver performed several dives during a single day, using
-identical equipment while diving at the same dive site or with the same dive
-master and/or buddy or tags. Instead of completing the information for each
-of these dives separately, one can select all the dives for that day in the
-*Dive List* and insert the same information in the *Dive Notes* and
-*Equipment* fields that need identical information. This is achieved by
-editing the dive notes or the equipment for any one of the selected dives.
+items of information in the *Notes* tab (e.g. water temperature) and in the
+*Equipment* tab (e.g. gas pressures and gas composition). However the other
+fields remain empty. It may be useful to simultaneously edit some of the
+fields in the *Notes* and *Equipment* tabs. For instance, it is possible
+that a diver performed several dives during a single day, using identical
+equipment while diving at the same dive site or with the same dive master
+and/or buddy or tags. Instead of completing the information for each of
+these dives separately, one can select all the dives for that day in the
+*Dive List* and insert the same information in the *Notes* and *Equipment*
+fields that need identical information. This is achieved by editing the dive
+notes or the equipment for any one of the selected dives.
The simultaneous editing only works with fields that do not already contain
information. This means that, if some fields have been edited for a
@@ -913,15 +913,15 @@ several similar dives.
[[S_CopyComponents]]
_METHOD 2_:There is a different way of achieving the same goal. Select a
-dive with all the appropriate information typed into the *Dive Notes* and
+dive with all the appropriate information typed into the *Notes* and
*Equipment* tabs. Then, from the main menu, select _Log -> Copy dive
components_. A box is presented with a selection of check boxes for most of
-the fields in the *Dive Notes* and *Equipment* tabs. Select the fields to
-be copied from the currently selected dive, then select _OK_. Now, in the
-*Dive List*, select the dives into which this information is to be
-pasted. Then, from the main menu, select _Log -> Paste dive components_.
-All the selected dives now contain the data initially selected in the
-original source dive log.
+the fields in the *Notes* and *Equipment* tabs. Select the fields to be
+copied from the currently selected dive, then select _OK_. Now, in the *Dive
+List*, select the dives into which this information is to be pasted. Then,
+from the main menu, select _Log -> Paste dive components_. All the selected
+dives now contain the data initially selected in the original source dive
+log.
==== Adding Bookmarks to a dive
@@ -948,13 +948,13 @@ image::images/Bookmarks.jpg["FIGURE: Bookmark dialog", align="center"]
==== Saving the updated dive information
-The information entered in the *Dive Notes* tab and the *Equipment* tab can
-be saved by using the two buttons on the top right hand of the *Dive Notes*
-tab. If the _Save_ button is clicked, the dive data are saved. If the
-_Cancel_ button is clicked, then the newly entered dive data are deleted,
-although the dive profile obtained from the dive computer will be
-retained. When the user exits _Subsurface_ there is a final prompt to
-confirm that the new data should be saved.
+The information entered in the *Notes* tab and the *Equipment* tab can be
+saved by using the two buttons on the top right hand of the *Notes* tab. If
+the _Save_ button is clicked, the dive data are saved. If the _Cancel_
+button is clicked, then the newly entered dive data are deleted, although
+the dive profile obtained from the dive computer will be retained. When the
+user exits _Subsurface_ there is a final prompt to confirm that the new data
+should be saved.
=== Importing dive information from other digital data sources or other data formats
@@ -1135,12 +1135,12 @@ table contains the column headings found in the _CSV_ data file. The blue
row of cells immediately above these contains the names understood by
_Subsurface_. The white area below the dropdown lists contains all the field
names that _Subsurface_ recognises. These names are in blue balloons and can
-be moved using a drag-and-frop action. For instance, _Subsurface_ expects
+be moved using a drag-and-drop action. For instance, _Subsurface_ expects
the column heading for Dive number (" # ") to be "Dive # ". If the column
heading that _Subsurface_ expects is not in the blue cells, then drag the
appropriate column heading from the upper area and drop it in the
appropriate blue cell at the top of the table. To indicate the correct
-column for "Dive #", drag the ballooned item labelled "Dive # " and drop it
+column for "Dive #", drag the ballooned item labeled "Dive # " and drop it
in the blue cell immediately above the white cell containing " # ". This is
depicted in the image below.
@@ -1159,8 +1159,8 @@ in the *Dive List* panel.
[IMPORTANT]
_CSV_ is an abbreviation for a data file format: _Comma-Separated
-Variables_. It is a file format allowing someone to view or edit the
-information using a text editor such as Notebook (Windows), gedit (Linux) or
+Values_. It is a file format allowing someone to view or edit the
+information using a text editor such as Notepad (Windows), gedit (Linux) or
TextWrangler (OS/X). The two main advantages of the _CSV_ format is that the
data are easily editable as text without any proprietary software and
ensuring all information is human-readable, not being obscured by any custom
@@ -1601,7 +1601,7 @@ image::images/icons/ShowPhotos_f20.png["FIGURE:Show photos toolbar button", alig
After the images have been loaded, they appear in two places:
- - the _Photos_ tab of the *Dive Notes* panel.
+ - the _Photos_ tab of the *Notes* panel.
- as tiny icons (stubs) on the dive profile at the appropriate positions
reflecting the time each photograph was taken. See below:
@@ -1625,9 +1625,9 @@ image::images/LoadImage6_f20.jpg["FIGURE: Full-screen photo on dive profile", al
==== The _Photos_ tab
Photographs associated with a dive are shown as thumbnails in the _Photos_
-tab of the _Dive Notes_ panel. Photos taken in rapid succession during a
-dive (therefore sometimes with large overlap on the dive profile) can easily
-be accessed in the _Photos_ tab. This tab serves as a tool for individually
+tab of the _Notes_ panel. Photos taken in rapid succession during a dive
+(therefore sometimes with large overlap on the dive profile) can easily be
+accessed in the _Photos_ tab. This tab serves as a tool for individually
accessing the photos of a dive, while the stubs on the dive profile give an
indication of when during a dive a photo was taken. By single-clicking on a
thumbnail in the _Photos_ panel, a photo is selected. By double-clicking a
@@ -1666,40 +1666,7 @@ needs of the dive. For this reason multicylinder dives are often used by
technical divers who dive deep or long. As far as _Subsurface_ is concerned,
there are only two types of information that need to be provided:
-- *Describe the cylinders used during the dive* This is performed in the *Equipment tab* of
- the *Dive Info* panel, as xref:cylinder_definitions[described above]. Enter the cylinders one by one,
- specifying the characteristics of the cylinder and the gas composition within each cylinder.
-
-- *Record the times at which switches from one cylinder to another was done:* This is information
- provided by some dive computers (provided the diver indicated these changes to the dive computer
- by pressing specific buttons). If the dive computer does not provide the information, the diver has to
- record these changes using a different method, e.g. writing it on a slate.
-
-- *Record the cylinder changes on the dive profile*: If the latter option
- was followed, the diver needs to indicate the gas change event by right-clicking at the appropriate point
- in time on the *Dive Profile* panel and indicating the cylinder to which the change was made. After
- right-clicking, follow the context menu to "Add gas change" and select the appropriate cylinder from
- those defined during the first step, above (see image below). If the
- *tank bar* button in the ttolbar has been activated, the cylinder switches are also indicated in the
- tank bar.
-
-Having performed these tasks, _Subsurface_ indicates the appropriate use of
-cylinders in the dive profile. Below is a multi-cylinder dive, starting off
-with EAN28, then changing cylinders to EAN50 after 26 minutes to perform
-decompression.
-
-image::images/multicylinder_dive.jpg["FIGURE: Multicylinder profile", align="center"]
-
-==== Sidemount dives
-
-Sidemount diving is just another form of multicylinder diving, often with
-both or all cylinders having the same gas mixture. Although it is a popular
-configuration for cave divers, sidemount diving can be performed by
-recreational divers who have completed the appropriate training. Sidemount
-dive logging involves, exactly as with multicylinder dives, above, three
-steps:
-
-- *During the dive, record cylinder switch events*. Since sidemount diving normally involves two
+- *During the dive, recording cylinder switch events*. Since sidemount diving normally involves two
cylinders with air or with the same gas mixture, _Subsurface_ distinguishes among these different
cylinders. In contrast, most dive computers that allow gas switching only distinguish among different
_gases_ used, not among different _cylinders_ used. This means that when sidemount dives are downloaded
@@ -1708,7 +1675,7 @@ steps:
has this facility) marking each cylinder switch with a bookmark that can be retrieved later. Returning
from a dive with the information about cylinder changes is the only tricky part of logging sidemount dives.
- *Within _Subsurface_ describe the cylinders used during the dive*. The diver needs to provide the
- specifications of the different cylinders, using the *Equipment* tab of the *Dive Info Panel* (see
+ specifications of the different cylinders, using the *Equipment* tab of the *Info Panel* (see
image below where two 12 litre cylinder were used).
- *Indicate cylinder change events on the _Subsurface_ dive profile*. Once the dive log has been imported
from a dive computer into _Subsurface_, the cylinder switch events need to be indicated on the dive profile.
@@ -1719,51 +1686,13 @@ steps:
profile with a cylinder symbol. If the *Tank Bar* is activated using the toolbar to the left of the
profile, then the cylinder change is also indicated on the Tank Bar (see image below). After all
the cylinder change events have been recorded on the dive profile, the correct cylinder pressures
- for both cylinders are shown on the dive profile, as inthe image below.
+ for both cylinders are shown on the dive profile, as in the image below.
image::images/sidemount1.jpg["FIGURE: Sidemount profile", align="center"]
-This section gives an example of the versatility of _Subsurface_ as a give
+This section gives an example of the versatility of _Subsurface_ as a dive
logging tool.
-
-[[S_sSCR_dives]]
-==== Semi-closed circuit rebreather (SCR) dives
-
-[icon="images/halcyon_RB80.jpg"]
-[NOTE]
-Passive semi-closed rebreathers (pSCR) comprise a technical advance in
-diving equipment that recirculates the breathing gas that a diver breathes,
-while removing carbon dioxide from the exhaled gas. While a small amount
-(typically a tenth) of the exhaled breathing gas is released into the water,
-a small amount of fresh gas is released from the back gas cylinder
-(typically containing nitrox). A diver, using a single cylinder of
-breathing gas can therefore dive for much longer periods than using a
-recreational open-circuit configuration. With pSCR equipment, a very small
-amount of breathing gas is released every time the breather inhales. With
-active SCR (aSCR) equipment, in contrast, a small amount of breathing gas is
-released continuously from the back cylinder.
-
-To log pSCR dives, no special procedures are required, just the normal steps
-outlined above:
-
-- Select pSCR in the _Dive Mode_ dropdown list on the *Dive Info* panel.
-
-- pSCR diving often involves gas changes, requiring an additional cylinder.
- Define all the appropriate cylinders as described above and indicate the
- cylinder/gas changes as described above in the section on
- xref:S_MulticylinderDives[multicylinder dives].
-
-If a pSCR _Dive Mode_ has been selected, the dive ceiling for pSCR dives is
-adjusted for the oxygen drop accross the mouthpiece which often requires
-longer decompression periods. Below is a dive profile of a pSCR dive using
-EAN36 on the back cylinder and oxygen for decompression. Note that this dive
-lasted over two hours.
-
-image::images/pSCR_profile.jpg["FIGURE: pSCR profile", align="center"]
-
-
-
[[S_CCR_dives]]
==== Closed circuit rebreather (CCR) dives
@@ -1870,7 +1799,7 @@ the pressures of the oxygen and diluent cylinders. The pressures of these
two cylinders are shown as green lines overlapping the depth profile. In
addition, start and end pressures for both oxygen and diluent cylinders are
shown in the _Equipment Tab_. Below is a dive profile for a CCR dive,
-including an overaly of setpoint and oxygen sensor data, as well as the
+including an overlay of setpoint and oxygen sensor data, as well as the
cylinder pressure data. In this case there is good agreement from the
readings of the two oxygen sensors.
@@ -1886,13 +1815,13 @@ B].
== Obtaining more information about dives entered into the logbook
-=== The *Dive Info* tab (for individual dives)
+=== The *Info* tab (for individual dives)
-The Dive Info tab gives some summary information about a particular dive
-that has been selected in the *Dive List*. Useful information here includes
-the surface interval before the dive, the maximum and mean depths of the
-dive, the gas volume consumed, the surface air consumption (SAC) and the
-number of oxygen toxicity units (OTU) incurred.
+The Info tab gives some summary information about a particular dive that has
+been selected in the *Dive List*. Useful information here includes the
+surface interval before the dive, the maximum and mean depths of the dive,
+the gas volume consumed, the surface air consumption (SAC) and the number of
+oxygen toxicity units (OTU) incurred.
[icon="images/icons/info.jpg"]
[NOTE]
@@ -2220,11 +2149,11 @@ other than air. Their values are dependent on the composition of the
breathing gas. The EAD is the depth of a hypothetical air dive that has the
same partial pressure of nitrogen as the current depth of the nitrox dive at
hand. A nitrox dive leads to the same decompression obligation as an air
-dive to the depth equalling the EAD. The END is the depth of a hypothetical
+dive to the depth equaling the EAD. The END is the depth of a hypothetical
air dive that has the same sum of partial pressures of the narcotic gases
nitrogen and oxygen as the current trimix dive. A trimix diver can expect
-the same narcotic effect as a diver breathing air diving at a depth
-equalling the END.
+the same narcotic effect as a diver breathing air diving at a depth equaling
+the END.
Figure (*B*) above shows an information box with a nearly complete set of
data.
@@ -2372,14 +2301,14 @@ List* panel now shows only the titles for the trips.
Normally, in the dive list, minimal information is included in the trip
title. More information about a trip can be added by selecting its trip
-title from the *Dive List*. This shows a *Trip Notes* tab in the *Dive
-Notes* panel. Here users can add or edit information about the date/time,
-the trip location and any other general comments about the trip as a whole
-(e.g. the dive company that was dived with, the general weather and surface
-conditions during the trip, etc.). After entering this information, users
-should select *Save* from the buttons at the top right of the *Trip Notes*
-tab. The trip title in the *Dive List* panel should now reflect some of the
-edited information.
+title from the *Dive List*. This shows a *Trip Notes* tab in the *Notes*
+panel. Here users can add or edit information about the date/time, the trip
+location and any other general comments about the trip as a whole (e.g. the
+dive company that was dived with, the general weather and surface conditions
+during the trip, etc.). After entering this information, users should
+select *Save* from the buttons at the top right of the *Trip Notes* tab. The
+trip title in the *Dive List* panel should now reflect some of the edited
+information.
==== Viewing the dives during a particular trip
@@ -2456,9 +2385,9 @@ the dive computer and appearing as different dives in the *Dive List*
panel. Users can merge these dives onto a single dive by selecting the
appropriate dives, right-clicking them to bring up the context menu and then
selecting *Merge selected dives*. It may be necessary to edit the dive
-information in the *Dive Notes* panel to reflect events or conditions that
-apply to the merged dive. The figure below shows the depth profile of two
-such dives that were merged:
+information in the *Notes* panel to reflect events or conditions that apply
+to the merged dive. The figure below shows the depth profile of two such
+dives that were merged:
image::images/MergedDive.png["Example: Merged dive", align="center"]
@@ -2527,10 +2456,10 @@ connexion _Facebook_.
image::images/facebook1_f20.jpg["Figure: Facebook login", align="center"]
Having established a login to _Facebook_, transfer of a dive profile to
-one's _Facebook_ timeline is easy. A _Facebook_ icon appears in the *Dive
-Notes* panel of _Subsurface_ (See image *A* below). Ensure that the dive
-that you want to transfer to the timeline is depicted in the _Subsurface_
-*Dive Profile* panel. Select the _Facebook_ icon, and a dialogue is shown,
+one's _Facebook_ timeline is easy. A _Facebook_ icon appears in the *Notes*
+panel of _Subsurface_ (See image *A* below). Ensure that the dive that you
+want to transfer to the timeline is depicted in the _Subsurface_ *Dive
+Profile* panel. Select the _Facebook_ icon, and a dialogue is shown,
determining the amount of additional information transferred with the dive
profile (see image *B*, below). In order to transfer a dive profile to
_Facebook_, the name of a _Facebook_ album needs to be provided. The
@@ -2578,7 +2507,7 @@ A dive log or part of it can be saved in three formats:
_Divelogs.de_. Log into _http://en.divelogs.de_ and subscribe to this
service in order to upload dive log data from _Subsurface_.
-* _DiveShare_ is also a dive log repostory on the Internet focusing on the
+* _DiveShare_ is also a dive log repository on the Internet focusing on the
recreational dives. In order to upload dives one has to provide a used ID,
so registration with _http://scubadiveshare.com_ is required.
@@ -2806,7 +2735,7 @@ image::images/Pref1_f20.jpg["FIGURE: Preferences defaults page", align="center"]
the dive list.
** *Default cylinder*: Here users can specify the default cylinder listed in
- the *Equipment* tab of the *Dive Notes* panel.
+ the *Equipment* tab of the *Notes* panel.
** *Animations*: Some actions in showing the dive profile are performed using
animations. For instance, the axis values for depth and time change from dive to
@@ -2983,7 +2912,7 @@ Like the _Subsurface_ dive log, the planner screen is divided into several
sections (see image below). The *setup* parameters for a dive are entered
into the several sections on the left hand side of the screen. The setup is
divided into several sections: Available Gases, Rates, Planning, Gas Options
-and Dive Notes.
+and Notes.
At the top right hand is a green *design panel* upon which the profile of
the dive can be manipulated directly by dragging and clicking as explained
@@ -3012,16 +2941,15 @@ image::images/PlannerWindow1_f20.jpg["FIGURE: Dive planner startup window", alig
atmospheric pressure can also be entered as an altitude in metres, assuming
an atmospheric pressure of 1.013 bar.
-- In the table labelled _Available Gases_, add the information of the
- cylinders to be used as well as the gas composition within that
- cylinder. This is done in a similar way as for <<S_CylinderData,providing
- cylinder data for dive logs>>. Choose the cylinder type by double clicking
- the cylinder type and using the dropdown list, then specify the work
- pressure of this cylinder. By leaving the oxygen concentration (O2%) filed
- empty, the cylinder is assumed to contain air. Otherwise enter the oxygen
- and/or helium concentration in the boxes provided in this dialogue. Add
- additional cylinders by using the "+" icon to the top righthand of the
- dialogue.
+- In the table labeled _Available Gases_, add the information of the cylinders
+ to be used as well as the gas composition within that cylinder. This is done
+ in a similar way as for <<S_CylinderData,providing cylinder data for dive
+ logs>>. Choose the cylinder type by double clicking the cylinder type and
+ using the dropdown list, then specify the work pressure of this cylinder. By
+ leaving the oxygen concentration (O2%) filed empty, the cylinder is assumed
+ to contain air. Otherwise enter the oxygen and/or helium concentration in
+ the boxes provided in this dialogue. Add additional cylinders by using the
+ "+" icon to the top righthand of the dialogue.
- The dialogue indicating _Dive Planner Points_ is usually not used at this
stage of the dive planning.
@@ -3102,7 +3030,7 @@ specified in the _Available Gases_ table. Add new waypoints until the main
features of the dive have been completed, e.g. the bottom time segment and
deep stops (if these are implemented). Leave the remaining waypoints on the
ascent to _Subsurface_. In most cases _Subsurface_ computes additional way
-points in order to fulfil decompression requirements for that dive. A
+points in order to fulfill decompression requirements for that dive. A
waypoint can be moved by selecting that waypoint and by using the arrow
keys. The waypoints listed in the _Dive Planner Points_ dialogue can be
edited by hand in order to obtain a precise presentation of the dive
@@ -3140,7 +3068,7 @@ appear in the *Dive List* panel of _Subsurface_.
On the bottom right of the dive planner, under _Dive Plan Details_, the
exact details of the dive plan are provided. These details may be modified
-by checking any of the options under the _Dive Notes_ section of the dive
+by checking any of the options under the _Notes_ section of the dive
planner, immediately to the left of the _Dive Plan Details_. If a _Verbatim
diveplan_ is requested, a detailed sentence-level explanation of the dive
plan is given. If any of the management specifications have been exceeded
@@ -3185,13 +3113,13 @@ The parameters of the pSCR diver can be set by selecting _File -> Preferences
from the main menu, where the gas consumption calculation takes into account the pSCR dump
ratio (default 10:1) as well as the metabolism rate. The calculation also takes the oxygen drop
accross the mouthpiece of the rebreather into account. If the
-pO~2~ drops below what is considered a save value, a warning apears in the _Dive plan
+pO~2~ drops below what is considered a save value, a warning appears in the _Dive plan
details_. A typical pSCR configuration is with a single cylinder and one or more bail-out
cylinders. Therefore the setup of the _Available gases_ and the _Dive planner points_ tables
are very similar to that of a CCR dive plan, described above. However, no oxygen setpoints
are specified for pSCR dives. Below is a dive plan for a pSCR dive. The dive is comparable
to that of the CCR dive above, but note the longer ascent duration due to the lower oxygen
-in the loop due to the oxygen drop accross the mouthpiece of the pSCR equipment.
+in the loop due to the oxygen drop across the mouthpiece of the pSCR equipment.
image::images/Planner_pSCR1_f20.jpg["FIGURE: Planning a pSCR dive: setup", align="center"]
@@ -3239,8 +3167,8 @@ Plan Details_ for inclusion in a text file or word processing document.
Dive plans have many characteristics in common with dive logs (dive profile,
dive notes, etc). After a dive plan has been saved, the dive details and
-gas calculations are saved in the *Dive Notes* tab. While a dive plan is
-being designed, it can be printed using the _Print_ button in the dive
+gas calculations are saved in the *Notes* tab. While a dive plan is being
+designed, it can be printed using the _Print_ button in the dive
planner. This prints the dive details and gas calculations in the _Dive Plan
Details_ panel of the dive planner. However, after the plan has been saved,
it is represented in a way very similar to a dive log and the gas
@@ -3315,8 +3243,7 @@ des sections de ce manuel traitant des opérations relatives.
*liste des plongées*.
- <<S_ViewPanels,_Profil_>> - Affiche uniquement le panneau du *profil de la
plongée*.
-- <<S_ViewPanels,_Info_>> - Affiche uniquement le panneau des *notes de
- plongée*.
+- <<S_ViewPanels,_Info_>> - Affiche uniquement le panneau des *notes*.
- <<S_ViewPanels,_Globe_>> - Affiche uniquement le panneau de la *carte
mondiale*.
- _Statistiques annuelles_ - Affiche par année le résumé des statistiques des
@@ -3677,7 +3604,7 @@ _Subsurface_ as follows:
files_".
- On the list of file names select the .CSV file that has been created
above. An import dialogue opens.
-- In the dropdown list on the middle right labeled '_Pre-configured imports_",
+- In the dropdown list on the top left labeled '_Pre-configured imports_",
select _APD Log Viewer_.
- Ensure the other settings for the ADP dive log are appropriate, then select
_OK_.
@@ -3762,10 +3689,11 @@ Making a backup copy of the Suunto DM4/DM5 database:
=== Exporting from Atomic Logbook
[[Atomic_Export]]
+[icon="images/icons/atomiclogo.jpg"]
[NOTE]
Atomic Logbook is a Windows software by Atomic Aquatics. It allows
downloading of dive information from Cobalt and Cobalt 2 dive computers.
-The divelog is kept in a SQlite database at
+The divelog is kept in a SQLite database at
C:\ProgramData\AtomicsAquatics\Cobalt-Logbook\Cobalt.db. This file can be
directly imported to Subsurface.
@@ -3827,7 +3755,7 @@ following a few simple rules:
1. Date: use one of the following formats: yyyy-mm-dd, dd.mm.yyyy, mm/dd/yyyy
2. Duration: the format should be minutes:seconds.
-3. Unit system: only one unit system shold be used (i.e., no mixture between
+3. Unit system: only one unit system should be used (i.e., no mixture between
imperial and metric units)
4. Tags and buddies: values should be separated using a comma.
5. GPS position: users must use decimal degrees, e.g. 30.22496 30.821798
diff --git a/Documentation/user-manual_ru.html.git b/Documentation/user-manual_ru.html.git
index 96d0dbede..dce91ace8 100644
--- a/Documentation/user-manual_ru.html.git
+++ b/Documentation/user-manual_ru.html.git
@@ -473,7 +473,11 @@ libdivecomputer.</p></div>
<h2 id="S_UserSurvey">1. Работа Ñ Ñтим руководÑтвом</h2>
<div class="sectionbody">
<div class="paragraph"><p>ЕÑли руководÑтво открыто из <em>Subsurface</em>, то вы не увидите никаких Ñлементов
+<<<<<<< HEAD
+управлениÑ. Однака Ð²Ð°Ð¶Ð½Ð°Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ <em>поиÑка</em> доÑтупна по нажатию комбинации клавиш
+=======
управлениÑ. Однако Ð²Ð°Ð¶Ð½Ð°Ñ Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ <em>поиÑка</em> доÑтупна по нажатию комбинации клавиш
+>>>>>>> v4.4-branch
control-F или command-F. ИÑпользуйте текÑтовое поле в нижней чаÑти Ñкрана Ð´Ð»Ñ Ð¿Ð¾Ð¸Ñка
нужной информации в руководÑтве.</p></div>
</div>
@@ -572,8 +576,13 @@ control-F или command-F. ИÑпользуйте текÑтовое поле Ð
<div class="sect1">
<h2 id="S_GetInformation">5. Сохранение погружений в журнале</h2>
<div class="sectionbody">
+<<<<<<< HEAD
+<div class="paragraph"><p>Теперь, когда Ñоздан новый журоанл, очень проÑто добавить Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ðº нему.
+<em>Subsurface</em> предлашает неÑколько ÑпоÑобов Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ð¹, которые подробно
+=======
<div class="paragraph"><p>Теперь, когда Ñоздан новый журнал, очень проÑто добавить Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ðº нему.
<em>Subsurface</em> предлагает неÑколько ÑпоÑобов Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ð¹, которые подробно
+>>>>>>> v4.4-branch
опиÑаны далее:</p></div>
<div class="paragraph"><p>1) ЕÑли вы ведете бумажный журнал, храните информацию в Ñлектронной таблице или
иÑпользуете другой ручной ÑпоÑоб, данные о погружениÑÑ… могут быть добавлены Ñ
@@ -588,6 +597,11 @@ control-F или command-F. ИÑпользуйте текÑтовое поле Ð
</li>
<li>
<p>
+<<<<<<< HEAD
+Импорт данных из журнала, который велÑÑ Ð² Ñлектронной таблице или в виже CSV-файла.
+ ОбратитеÑÑŒ к главам <a href="#S_Appendix_D">ПРИЛОЖЕÐИЕ Г: ЭкÑпорт таблиц в CSV формат</a> и
+ <a href="#S_ImportingCSVDives">Импорт погружений в CSV формате</a>.
+=======
Импорт данных из журнала, который велÑÑ Ð² Ñлектронной таблице или в виде CSV-файла.
ОбратитеÑÑŒ к главам <a href="#S_Appendix_D">ПРИЛОЖЕÐИЕ Г: ЭкÑпорт таблиц в CSV формат</a> и
<a href="#S_ImportingCSVDives">Импорт погружений в CSV формате</a>.
@@ -601,16 +615,35 @@ control-F или command-F. ИÑпользуйте текÑтовое поле Ð
<li>
<p>
ÐепоÑредÑтвенно дайв-компьютера. Смотрите главу <a href="#S_ImportDiveComputer">Импорт данных нового Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð¸Ð· дайв-компьютера</a> или
+>>>>>>> v4.4-branch
+</p>
+</li>
+</ul></div>
+<div class="paragraph"><p>2) ЕÑли ваши Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð·Ð°Ð¿Ð¸Ñаны в дайв-компьютере, вы можете получить значительное
+ количеÑтво информации, Ð²ÐºÐ»ÑŽÑ‡Ð°Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»ÑŒ погружениÑ. ÐŸÐ¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð³ÑƒÑ‚ быть импортированы
+ из:</p></div>
+<div class="ulist"><ul>
+<li>
+<p>
+<<<<<<< HEAD
+ÐепоÑредÑтвенно дайв-компьютера. Смотрите главу <a href="#S_ImportDiveComputer">Импорт данных нового Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð¸Ð· дайв-компьютера</a> или
+=======
+Стороннего программного обеÑпечениÑ, раÑпроÑтранÑемого производителÑми дайв-компьютеров.
+ ОбратитеÑÑŒ к <a href="#S_ImportingAlienDiveLogs">Импорт погружений из других иÑточников и форматов данных</a>.
+>>>>>>> v4.4-branch
</p>
</li>
<li>
<p>
+<<<<<<< HEAD
Стороннего программного обеÑпечениÑ, раÑпроÑтранÑемого производителÑми дайв-компьютеров.
ОбратитеÑÑŒ к <a href="#S_ImportingAlienDiveLogs">Импорт погружений из других иÑточников и форматов данных</a>.
</p>
</li>
<li>
<p>
+=======
+>>>>>>> v4.4-branch
Импорт из Ñлектронных таблиц и CSV-файлов, Ñодержащих профили погружений. Смотрите
<a href="#S_ImportingCSVDives">Импорт погружений в CSV-формате из дайв-компьютеров и другого ПО Ð´Ð»Ñ Ð²ÐµÐ´ÐµÐ½Ð¸Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ð¾Ð²</a>.
</p>
@@ -675,6 +708,24 @@ control-F или command-F. ИÑпользуйте текÑтовое поле Ð
<div class="paragraph"><p>а. Выбрать на карте, ÐºÐ¾Ñ‚Ð¾Ñ€Ð°Ñ Ð½Ð°Ñ…Ð¾Ð´Ð¸Ñ‚ÑÑ Ð² правой нижней чаÑти окна
<em>Subsurface</em>. Ðа карте отображаетÑÑ Ð·ÐµÐ»ÐµÐ½Ð°Ñ Ð¿Ð¾Ð»Ð¾Ñа Ñ Ð½Ð°Ð´Ð¿Ð¸Ñью «Выберите меÑто
на карте двойным щелчком мыши». При двойном нажатии в ÑоответÑтвующем меÑте
+<<<<<<< HEAD
+карты, Ð·ÐµÐ»ÐµÐ½Ð°Ñ Ð¿Ð¾Ð»Ð¾Ñа иÑчезнет и координаты точки будут заполнены в поле.
+</p>
+</li>
+<li>
+<p>
+Координаты могут быть получены Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ вÑпомогательного приложениÑ
+<em>Subsurface</em>, еÑли у Ð²Ð°Ñ ÐµÑÑ‚ÑŒ уÑтройÑтво Android или iPhone Ñ GPS-датчиком
+и координаты дайв-Ñайта были Ñохранены в Ñтом уÑтройÑтве.
+<a href="#S_Companion">Ðажмите, чтобы узнать больше</a>
+</p>
+</li>
+<li>
+<p>
+ЕÑли вам извеÑтны координаты, их можно ввеÑти вручную в одном из четырех
+форматов, Ñначала широта, потом долгота:
+</p>
+=======
карты, Ð·ÐµÐ»ÐµÐ½Ð°Ñ Ð¿Ð¾Ð»Ð¾Ñа иÑчезнет и координаты точки будут заполнены в поле.</p></div>
<div class="paragraph"><p>б. Координаты могут быть получены Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ вÑпомогательного приложениÑ
<em>Subsurface</em>, еÑли у Ð²Ð°Ñ ÐµÑÑ‚ÑŒ уÑтройÑтво Android или iPhone Ñ GPS-датчиком
@@ -682,6 +733,7 @@ control-F или command-F. ИÑпользуйте текÑтовое поле Ð
<a href="#S_Companion">Ðажмите, чтобы узнать больше</a></p></div>
<div class="paragraph"><p>в. ЕÑли вам извеÑтны координаты, их можно ввеÑти вручную в одном из четырех
форматов, Ñначала широта, потом долгота:</p></div>
+>>>>>>> v4.4-branch
<div class="literalblock">
<div class="content">
<pre><code>ISO 6709 Приложение D, например 30°13'28.9"Ю 30°49'1.5"В
@@ -995,8 +1047,13 @@ Freedive (погружение без дыхательного аппарата)
</li>
<li>
<p>
+<<<<<<< HEAD
+Ðажмите кнопку <em>Загрузить</em>. ПоÑле уÑпешной загрузки диалоговое окно будет выглÑдет
+ как показано на риÑунке <strong>B</strong>.
+=======
Ðажмите кнопку <em>Загрузить</em>. ПоÑле уÑпешной загрузки диалоговое окно будет
выглÑдеть как показано на риÑунке <strong>B</strong>.
+>>>>>>> v4.4-branch
</p>
</li>
<li>
@@ -1012,7 +1069,11 @@ Freedive (погружение без дыхательного аппарата)
</p>
</li>
</ul></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>ПоÑле загрузки погружений они отобразÑÑ‚ÑÑ Ð² ввиде таблицы в правой чаÑти окна
+=======
<div class="paragraph"><p>ПоÑле загрузки погружений они отобразÑÑ‚ÑÑ Ð² в виде таблицы в правой чаÑти окна
+>>>>>>> v4.4-branch
(как показано на риÑунке <strong>Ð’</strong> выше). ПроÑтавьте галочки напротив тех погружений,
которые должны быть перенеÑены в <strong>СпиÑок погружений</strong> и нажмите кнопку <strong>OK</strong>.
Окно загрузки будет закрыто, а выбранные Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð¿Ð¾ÑвÑÑ‚ÑÑ Ð² ÑпиÑке.</p></div>
@@ -1196,7 +1257,11 @@ Freedive (погружение без дыхательного аппарата)
<div class="paragraph"><p><strong>ПримечаниÑ</strong>: Ð’ Ñто поле можно ввеÑти любую дополнительную информацию.</p></div>
<div class="paragraph"><p>Кнопка <strong>Применить изменениÑ</strong> иÑпользуютÑÑ Ð´Ð»Ñ ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ð¸ на вÑех
вкладках информационной панели и Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ, поÑтому нет необходимоÑти
+<<<<<<< HEAD
+нажимать её до тех пор, пока вы не заполнили ВСЮ информацию. Ðиже приведен
+=======
нажимать ее до тех пор, пока вы не заполнили ВСЮ информацию. Ðиже приведен
+>>>>>>> v4.4-branch
пример полноÑтью заполненной информационной панели:</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
@@ -1382,7 +1447,11 @@ Organiser, мы рекомендуем Ñначала ÑкÑпортироват
Suunto Dive Manager и Shearwater. При импорте <em>Subsurface</em> пытаетÑÑ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ð¸Ñ‚ÑŒ
множеÑтвенные запиÑи отноÑÑщиеÑÑ Ðº одному погружению и объединить их. ЕÑли не
обнаружено проблем (разница во временной зоне или Ð·Ð½Ð°Ñ‡Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ñ€Ð°Ð·Ð½Ð¸Ñ†Ð° во времени),
+<<<<<<< HEAD
+<em>Subsurface</em> не ÑоздаcÑ‚ дубликатов погружений.</p></div>
+=======
<em>Subsurface</em> не ÑоздаÑÑ‚ дубликатов погружений.</p></div>
+>>>>>>> v4.4-branch
</div>
<div class="sect3">
<h4 id="_иÑпользование_универÑального_импорта">5.2.10. ИÑпользование универÑального импорта</h4>
@@ -1486,10 +1555,17 @@ divelogs.de). Ð’ поÑвившемÑÑ Ð¾ÐºÐ½Ðµ (риÑунок <strong>Ð</str
<h4 id="S_ImportingCSVData">5.2.13. Импорт погружений в формате CSV</h4>
<div class="paragraph"><p>Файл Ñо значениÑми, разделенными запÑтой (.csv) может иÑпользоватьÑÑ ÐºÐ°Ðº Ð´Ð»Ñ Ð¸Ð¼Ð¿Ð¾Ñ€Ñ‚Ð°
Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ (в Ñлучае ребризеров замкнутого цикла APD Inspiration и Evolution), так
+<<<<<<< HEAD
+и Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ¶ÐºÐ¸ общей информации о дайвах (еÑли вы вели учет в Ñлектронной таблице). CSV
+ÑвлÑетÑÑ ÑƒÐ½Ð¸Ð²ÐµÑ€Ñальным и проÑтым форматом Ð´Ð»Ñ Ð¾Ð±Ð¼ÐµÐ½Ð° данными между компьютерам и программами.
+Более подробно об Ñтом формате раÑÑказываетÑÑ Ð² главе <a href="#S_CSV_Intro">Формат CSV Ð´Ð»Ñ Ð´Ð°Ð¹Ð²ÐµÑ€Ð¾Ð²</a>.
+<em>Subsurface</em> позволÑет также выгружать журнал погужений Ð´Ð»Ñ Ð´Ð°Ð»ÑŒÐ½ÐµÐ¹ÑˆÐµÐ¹ загрузки в другие программы.
+=======
и Ð´Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ общей информации о дайвах (еÑли вы вели учет в Ñлектронной таблице). CSV
ÑвлÑетÑÑ ÑƒÐ½Ð¸Ð²ÐµÑ€Ñальным и проÑтым форматом Ð´Ð»Ñ Ð¾Ð±Ð¼ÐµÐ½Ð° данными между компьютерам и программами.
Более подробно об Ñтом формате раÑÑказываетÑÑ Ð² главе <a href="#S_CSV_Intro">Формат CSV Ð´Ð»Ñ Ð´Ð°Ð¹Ð²ÐµÑ€Ð¾Ð²</a>.
<em>Subsurface</em> позволÑет также выгружать журнал погружений Ð´Ð»Ñ Ð´Ð°Ð»ÑŒÐ½ÐµÐ¹ÑˆÐµÐ¹ загрузки в другие программы.
+>>>>>>> v4.4-branch
ОбратитеÑÑŒ к главе <a href="#S_Appendix_D">ПРИЛОЖЕÐИЕ Г: ЭкÑпорт Ñлектронных таблиц в формат CSV</a>
за информацией по загрузке данных из Ñлектронных таблиц в <em>Subsurface</em>.</p></div>
</div>
@@ -1502,7 +1578,11 @@ divelogs.de). Ð’ поÑвившемÑÑ Ð¾ÐºÐ½Ðµ (риÑунок <strong>Ð</str
<div class="olist arabic"><ol class="arabic">
<li>
<p>
+<<<<<<< HEAD
+<em>ÐžÐ±Ñ‰Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ погружении</em>: в Ñтом Ñлучае файл Ñодержит обучную Ð´Ð»Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ð° информацию,
+=======
<em>ÐžÐ±Ñ‰Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ погружении</em>: в Ñтом Ñлучае файл Ñодержит обычную Ð´Ð»Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ð° информацию,
+>>>>>>> v4.4-branch
например, дату и времÑ, глубину, длительноÑÑ‚ÑŒ, имена партнеров и дайв-маÑтера, возможно
данные об баллонах и давлении до и поÑле погружениÑ, примечаниÑ. Ð’Ñе данные Ð´Ð»Ñ Ð¾Ð´Ð½Ð¾Ð³Ð¾
Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñ…Ñ€Ð°Ð½ÑÑ‚ÑÑ Ð² одной Ñтроке, а порÑдке определенном в заголовке.
@@ -1519,7 +1599,11 @@ divelogs.de). Ð’ поÑвившемÑÑ Ð¾ÐºÐ½Ðµ (риÑунок <strong>Ð</str
</p>
</li>
</ol></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>Перед импортом CSV-файла в <em>Subsurface</em> вам <strong>необходимо выÑÑнить некоторые ÑвойÑвтва Ñтого
+=======
<div class="paragraph"><p>Перед импортом CSV-файла в <em>Subsurface</em> вам <strong>необходимо выÑÑнить некоторые ÑвойÑтва Ñтого
+>>>>>>> v4.4-branch
файла</strong>:</p></div>
<div class="paragraph"><p>а. Какой Ñимвол Ñлужит разделителем колонок в одной Ñтроке данных? Этот Ñимвол должен быть
запÑтой (,) или табулÑцией? Ð’Ñ‹ можете определить Ñто, открыв файл в текÑтовом редакторе.
@@ -1540,14 +1624,22 @@ divelogs.de). Ð’ поÑвившемÑÑ Ð¾ÐºÐ½Ðµ (риÑунок <strong>Ð</str
<img src="images/csv_import1_f20.jpg" alt="РиÑунок: Диалог 1 импорт CSV" />
</div>
</div>
+<<<<<<< HEAD
+<div class="paragraph"><p>Обратите внимение на выпадающий ÑпиÑок в левом верхнем углу. Он Ñодержит наÑтройки длÑ
+=======
<div class="paragraph"><p>Обратите внимание на выпадающий ÑпиÑок в левом верхнем углу. Он Ñодержит наÑтройки длÑ
+>>>>>>> v4.4-branch
чаÑто вÑтречающихÑÑ Ð´Ð°Ð¹Ð²-компьютеров и программ. ЕÑли ваш CSV-файл еÑÑ‚ÑŒ в Ñтом ÑпиÑке,
иÑпользуйте его. Ð’ противном Ñлучае Ñледует выбрать <em>Импорт вручную</em>. Ð’ окне конфигурации
также еÑÑ‚ÑŒ выпадающие ÑпиÑок Ð´Ð»Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñимвола-разделителÑ, формата даты и длительноÑти
погружениÑ, а также иÑпользуемой ÑиÑтемы мер. Ð”Ð»Ñ ÑƒÑпешного импорта очень важно задать
правильные Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð² Ñтих ÑпиÑках.</p></div>
<div class="paragraph"><p>Ðа поÑледнем шаге вы должны ÑопоÑтавить Ð¿Ð¾Ð»Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… в файле их названиÑм. ÐŸÐµÑ€Ð²Ð°Ñ Ð±ÐµÐ»Ð°Ñ
+<<<<<<< HEAD
+Ñтрока таблицы данных Ñодержит заголоки, найденные в CSV-файле. Ð“Ð¾Ð»ÑƒÐ±Ð°Ñ Ñтрока таблицы,
+=======
Ñтрока таблицы данных Ñодержит заголовки, найденные в CSV-файле. Ð“Ð¾Ð»ÑƒÐ±Ð°Ñ Ñтрока таблицы,
+>>>>>>> v4.4-branch
находÑщаÑÑÑ Ð½ÐµÐ¿Ð¾ÑредÑтвенно на ней, Ñодержит Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ <em>Subsurface</em>. Ð’ белой облаÑти,
находÑщейÑÑ Ñразу под выпадающими ÑпиÑками, предÑтавлены полÑ-метки, которые могут быть
импортированы в <em>Subsurface</em>. Эти метки, заключенные в овалы голубого цвета, необходимо
@@ -1571,8 +1663,13 @@ divelogs.de). Ð’ поÑвившемÑÑ Ð¾ÐºÐ½Ðµ (риÑунок <strong>Ð</str
<td class="icon">
<img src="images/icons/important.png" alt="Важно" />
</td>
+<<<<<<< HEAD
+<td class="content">Ðббревиатура <em>CSV</em> проиÑходит от английÑкого <em>Comma-Separated Variables</em>, что означает
+<em>зачениÑ, разделенные запÑтой</em>. Файлы Ñтого формата можно отредактировать Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒ текÑтового
+=======
<td class="content">Ðббревиатура <em>CSV</em> проиÑходит от английÑкого <em>Comma-Separated Values</em>, что означает
<em>значениÑ, разделенные запÑтой</em>. Файлы Ñтого формата можно отредактировать Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒ текÑтового
+>>>>>>> v4.4-branch
редактора, например Notepad (Windows), gedit (Linux) или TextWrangler(OS/X). ПреимущеÑтва
Ñтого формата заключаютÑÑ Ð² том, что а) Ð´Ð»Ñ ÐµÐ³Ð¾ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½Ðµ нужно никакого Ñпециализированного
программного обеÑпечениÑ, и б) в нем нет ничего лишнего и он может легко быть
@@ -1641,7 +1738,11 @@ Pulau Weh 2012-12-20 09:46 55:56 38.6 Karaeng Bontonompo</code
Файл должен быть Ñохранен в кодировке UTF-8, еÑли вы иÑпользуете Ñимволы отличные от латинÑких.
Размер файла также может быть причиной определенных проблем. Импорт 100 погружений за раз
(<em>ÐžÐ±Ñ‰Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ погружениÑÑ…_) врÑд ли будет проблемой, но файлы большего размера могут.
+<<<<<<< HEAD
+При возникновении проблем Ñ _Импортом CSV</em> попробуйте Ð´Ð»Ñ Ð½Ð°Ñ‡Ð°Ð»Ð° уменьшить развер файла.</td>
+=======
При возникновении проблем Ñ _Импортом CSV</em> попробуйте Ð´Ð»Ñ Ð½Ð°Ñ‡Ð°Ð»Ð° уменьшить размер файла.</td>
+>>>>>>> v4.4-branch
</tr></table>
</div>
</div>
@@ -1945,21 +2046,36 @@ Pulau Weh 2012-12-20 09:46 55:56 38.6 Karaeng Bontonompo</code
ниже), поÑле чего можно приÑтупать к Ñбору информации о меÑтоположении погружений.</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
+<<<<<<< HEAD
+<img src="images/iphone.jpg" alt="FIGURE: Using iPhone companion application" width="640" />
+</div>
+</div>
+<div class="paragraph"><p>ÐŸÐ¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð³ÑƒÑ‚ быть добавлены автоматичеÑки или вручную. Ð’ ручном редиме, Ñлужба получениÑ
+=======
<img src="images/iphone.jpg" alt="РиÑунок: ИÑпользоване вÑпомогательного Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ Ð½Ð° iPhone" width="640" />
</div>
</div>
<div class="paragraph"><p>ÐŸÐ¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð¼Ð¾Ð³ÑƒÑ‚ быть добавлены автоматичеÑки или вручную. Ð’ ручном режиме, Ñлужба получениÑ
+>>>>>>> v4.4-branch
координат запуÑкаетÑÑ Ð°Ð²Ñ‚Ð¾Ð¼Ð°Ñ‚Ð¸Ñ‡ÐµÑки, а в нижней чаÑти Ñкрана поÑвлÑетÑÑ ÐºÑ€Ð°ÑÐ½Ð°Ñ Ð¿Ð¾Ð»Ð¾Ñа. ПоÑле
Ð·Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð²Ð°Ð¼ нужно нажать на краÑной облаÑти, чтобы оÑтановить Ñлужбу
позиционированиÑ. При запущенной Ñлужбе Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ð¾Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð²Ñ‹ можете добавлÑÑ‚ÑŒ погружениÑ
только в ручном режиме.</p></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>Позже вы можете отредактирование название меÑте погружениÑ, выбрав и нажав на него в ÑпиÑке.
+=======
<div class="paragraph"><p>Позже вы можете отредактировать название меÑта погружениÑ, выбрав и нажав на него в ÑпиÑке.
+>>>>>>> v4.4-branch
Другие Ð¿Ð¾Ð»Ñ Ð´Ð»Ñ Ñ€ÐµÐ´Ð°ÐºÑ‚Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð½ÐµÐ´Ð¾Ñтупны. СпиÑок дайвов автоматичеÑки выгружаетÑÑ Ð½Ð° Ñервер,
возможно вручную Ñинхронизировать Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð¾Ñ‚ÑутÑтвует.</p></div>
</div>
<div class="sect3">
<h4 id="_загрузка_координат_погружений_в_журнал_em_subsurface_em">5.3.6. Загрузка координат погружений в журнал <em>Subsurface</em></h4>
+<<<<<<< HEAD
+<div class="paragraph"><p>Перед получением GPS-кородинат Ñ Ñервера, Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ñ‹ быть загружены в
+=======
<div class="paragraph"><p>Перед получением GPS-координат Ñ Ñервера, Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð´Ð¾Ð»Ð¶Ð½Ñ‹ быть загружены в
+>>>>>>> v4.4-branch
журнал из дайв-компьютера или введены вручную. Ð”Ð»Ñ Ð·Ð°Ð³Ñ€ÑƒÐ·ÐºÐ¸ координат выберите
в главном меню <em>Импорт &#8594; Импорт координат</em> или нажмите комбинацию клавиш
Ctrl-G. Вам будет предÑтавлено окно, как показано на риÑунке <strong>Ð</strong> ниже. При
@@ -2125,6 +2241,15 @@ Ctrl-G. Вам будет предÑтавлено окно, как показа
будьте внимательны, кожа щелкаете мышкой на картинке. При нажатии мышкой на
миниатюрное фото (в профиле или на вкладке _Фотографии), полноразмернаÑ
Ñ„Ð¾Ñ‚Ð¾Ð³Ñ€Ð°Ñ„Ð¸Ñ Ð¾Ñ‚ÐºÑ€Ð¾ÐµÑ‚ÑÑ Ð²Ð¾ внешней программе Ð´Ð»Ñ Ð¿Ñ€Ð¾Ñмотра изображений:</p></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>image::ima
+ges/LoadImage6_f20.jpg["РиÑунок: ПроÑмотр полноразмерных фотографий",align="center"]</p></div>
+</div>
+<div class="sect3">
+<h4 id="_вкладка_em_фотографии_em">5.4.3. Вкладка <em>Фотографии</em></h4>
+<div class="paragraph"><p>Фотографии, добавленные к погружению, отображаютÑÑ Ð¼Ð¸Ð½Ð¸Ð°Ñ‚ÑŽÐ½Ñ‹Ð¼Ð¸ картинками на
+вкладке <em>Фотографии</em> в <em>Информационной ппнели</em>. Снимки, Ñделанные в Ñерии и
+=======
<div class="imageblock" style="text-align:center;">
<div class="content">
<img src="images/LoadImage6_f20.jpg" alt="РиÑунок: ПроÑмотр полноразмерных фотографий" />
@@ -2135,6 +2260,7 @@ Ctrl-G. Вам будет предÑтавлено окно, как показа
<h4 id="_вкладка_em_фотографии_em">5.4.3. Вкладка <em>Фотографии</em></h4>
<div class="paragraph"><p>Фотографии, добавленные к погружению, отображаютÑÑ Ð¼Ð¸Ð½Ð¸Ð°Ñ‚ÑŽÑ€Ð½Ñ‹Ð¼Ð¸ картинками на
вкладке <em>Фотографии</em> в <em>Информационной панели</em>. Снимки, Ñделанные в Ñерии и
+>>>>>>> v4.4-branch
имеющие короткий временной интервал, могут перекрывать друг друга на профиле,
но легко различимы на Ñтой вкладке. Одиночный щелчок мышью на фотографии
выделÑет ее, двойной щелчок мышью открывает окно проÑмотра фото во внешней
@@ -2143,9 +2269,15 @@ Ctrl-G. Вам будет предÑтавлено окно, как показа
</div>
<div class="sect3">
<h4 id="_фотографии_на_внешнем_жеÑтком_диÑке">5.4.4. Фотографии на внешнем жеÑтком диÑке</h4>
+<<<<<<< HEAD
+<div class="paragraph"><p>Многие фотографы хранÑÑ‚ Ñвои Ñнимки на внешнем накопителе. ЕÑли внещний диÑк
+подключен, то <em>Subsurface</em> в большинÑтве Ñлучаев увидит его, и таким образом
+будет обеÑпечен доÑтуп к внешнему хранилищу фотографий. При Ñтом вы добавлете
+=======
<div class="paragraph"><p>Многие фотографы хранÑÑ‚ Ñвои Ñнимки на внешнем накопителе. ЕÑли внешний диÑк
подключен, то <em>Subsurface</em> в большинÑтве Ñлучаев увидит его, и таким образом
будет обеÑпечен доÑтуп к внешнему хранилищу фотографий. При Ñтом вы добавлÑете
+>>>>>>> v4.4-branch
фото Ñ Ð²Ð½ÐµÑˆÐ½ÐµÐ³Ð¾ диÑка так, как опиÑан выше. Однако поÑле того, как внешний
накопитель отключен, у <em>Subsurface</em> не будет доÑтупа к фотографиÑм. ЕÑли на
панели кнопок-переключателей (Ñлева от профилÑ) нажата кнопка <em>Миниатюры
@@ -2157,6 +2289,11 @@ Ctrl-G. Вам будет предÑтавлено окно, как показа
<div class="sect2">
<h3 id="_ведение_журнала_длÑ_Ñпециальных_типов_погружений">5.5. Ведение журнала Ð´Ð»Ñ Ñпециальных типов погружений</h3>
<div class="sect3">
+<<<<<<< HEAD
+<h4 id="_погружениÑ_в_конфигурации_side_mount">5.5.1. ÐŸÐ¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð² конфигурации side-mount</h4>
+<div class="paragraph"><p><em>Subsurface</em> легко ÑправлÑетÑÑ Ñ Ð¼Ð½Ð¾Ð³Ð¾Ð±Ð°Ð»Ð»Ð¾Ð½Ð½Ñ‹Ð¼Ð¸ погружениÑми. Ведение журнала Ñайд-маунт
+погружение заключаетÑÑ Ð² трех шагах:</p></div>
+=======
<h4 id="S_MulticylinderDives">5.5.1. ÐŸÐ¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñ Ð½ÐµÑколькими баллонами</h4>
<div class="paragraph"><p><em>Subsurface</em> позволÑет без проблем веÑти учет многобаллонных погружений. Такие Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð¾Ð±Ñ‹Ñ‡Ð½Ð¾
выполнÑÑŽÑ‚ÑÑ ÐµÑли (а) не хватает воздуха Ð´Ð»Ñ ÑÐ¾Ð²ÐµÑ€ÑˆÐµÐ½Ð¸Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð½Ð° одном баллоне; (б) нужно более
@@ -2204,6 +2341,7 @@ Ctrl-G. Вам будет предÑтавлено окно, как показа
Ð¥Ð¾Ñ‚Ñ Ñта ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð½Ð°Ð¸Ð±Ð¾Ð»ÐµÐµ популÑра Ñреди пещерных дайвером, она может иÑпользоватьÑÑ Ð¸ длÑ
рекреационных погружений поÑле ÑоответÑтвующей подготовки. Как и в Ñлучае многобаллонных погружений,
Ð´Ð»Ñ ÑƒÑ‡ÐµÑ‚Ð° таких погружений необходимо выполнить три шага:</p></div>
+>>>>>>> v4.4-branch
<div class="ulist"><ul>
<li>
<p>
@@ -2246,6 +2384,9 @@ Ctrl-G. Вам будет предÑтавлено окно, как показа
<div class="paragraph"><p>Эта глава демонÑтрирует гибкоÑÑ‚ÑŒ <em>Subsurface</em> при ведении журналов погружений.</p></div>
</div>
<div class="sect3">
+<<<<<<< HEAD
+<h4 id="S_CCR_dives">5.5.2. ÐŸÐ¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñ Ñ€ÐµÐ±Ñ€Ð¸Ð·ÐµÑ€Ð¾Ð¼ закрытого цикла (CCR)</h4>
+=======
<h4 id="S_sSCR_dives">5.5.3. ÐŸÐ¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñ Ñ€ÐµÐ±Ñ€Ð¸Ð·ÐµÑ€Ð¾Ð¼ полузамкнутого цикла (SCR)</h4>
<div class="admonitionblock">
<table><tr>
@@ -2287,13 +2428,18 @@ Ctrl-G. Вам будет предÑтавлено окно, как показа
</div>
<div class="sect3">
<h4 id="S_CCR_dives">5.5.4. ÐŸÐ¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñ Ñ€ÐµÐ±Ñ€Ð¸Ð·ÐµÑ€Ð¾Ð¼ закрытого цикла (CCR)</h4>
+>>>>>>> v4.4-branch
<div class="admonitionblock">
<table><tr>
<td class="icon">
<img src="images/APD.jpg" alt="Замечание" />
</td>
<td class="content">Ребризеры замкнутого цикла иÑпользуют передовые технологии Ð´Ð»Ñ Ñ€ÐµÑ†Ð¸Ñ€ÐºÑƒÐ»Ñции отработанного газа,
+<<<<<<< HEAD
+выполнÑÑ Ð´Ð²Ðµ фукнции Ð´Ð»Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶Ð°Ð½Ð¸Ñ ÐºÐ¾Ð½Ñ†ÐµÐ½Ñ‚Ñ€Ð°Ñ†Ð¸Ð¸ киÑлорода, Ð´ÐµÐ»Ð°Ñ ÑмеÑÑ‚ пригодной Ð´Ð»Ñ Ð´Ñ‹Ñ…Ð°Ð½Ð¸Ñ:
+=======
выполнÑÑ Ð´Ð²Ðµ функции Ð´Ð»Ñ Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶Ð°Ð½Ð¸Ñ ÐºÐ¾Ð½Ñ†ÐµÐ½Ñ‚Ñ€Ð°Ñ†Ð¸Ð¸ киÑлорода, Ð´ÐµÐ»Ð°Ñ ÑмеÑÑ‚ пригодной Ð´Ð»Ñ Ð´Ñ‹Ñ…Ð°Ð½Ð¸Ñ:
+>>>>>>> v4.4-branch
а) удаление углекиÑлого газа из выдыхаемого воздуха
б) поддержание концентрации киÑлорода в безопаÑных пределах.
Ðа текущий момент <em>Subsurface</em> обеÑпечивает наилучшую поддержку CCR дайв-компьютера Poseidon
@@ -2317,17 +2463,30 @@ CCR не позволÑÑŽÑ‚ загружать журналы неÑкольки
</div>
</div>
<div class="sect3">
+<<<<<<< HEAD
+<h4 id="_информациÑ_отображаемаÑ_длÑ_ccr_погружений">5.5.3. ИнформациÑ, Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶Ð°ÐµÐ¼Ð°Ñ Ð´Ð»Ñ CCR-погружений</h4>
+<div class="paragraph"><p><em>Парциальные Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð³Ð°Ð·Ð¾Ð²</em>: График парциального Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÐºÐ¸Ñлорода показывает информацию Ñ
+киÑлородных датчиков ребризера. Ð’ отличие от рекреационного режима, где Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ pO<sub>2</sub> выÑчитываютÑÑ
+иÑÑ…Ð¾Ð´Ñ Ð¸Ð· ÑоÑтава ÑмеÑи и глубины, Ð´Ð»Ñ CCR-погружений Ñти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð±ÐµÑ€ÑƒÑ‚ÑÑ Ð¾Ñ‚ датчиков. Ð’ Ñтом Ñлучае
+график должнен быть доÑтаточно ровным, ÑоответÑтвую значению уÑтановки (set-point). Среднее значение
+pO<sub>2</sub> не ÑвлÑетÑÑ Ñредним значением, рапортуемым датчиком, а раÑчитано <em>Subsurface</em> Ñледующим
+=======
<h4 id="_информациÑ_отображаемаÑ_длÑ_ccr_погружений">5.5.5. ИнформациÑ, Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶Ð°ÐµÐ¼Ð°Ñ Ð´Ð»Ñ CCR-погружений</h4>
<div class="paragraph"><p><em>Парциальные Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð³Ð°Ð·Ð¾Ð²</em>: График парциального Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ ÐºÐ¸Ñлорода показывает информацию Ñ
киÑлородных датчиков ребризера. Ð’ отличие от рекреационного режима, где Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ pO<sub>2</sub> выÑчитываютÑÑ
иÑÑ…Ð¾Ð´Ñ Ð¸Ð· ÑоÑтава ÑмеÑи и глубины, Ð´Ð»Ñ CCR-погружений Ñти Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ Ð±ÐµÑ€ÑƒÑ‚ÑÑ Ð¾Ñ‚ датчиков. Ð’ Ñтом Ñлучае
график должен быть доÑтаточно ровным, ÑоответÑÑ‚Ð²ÑƒÑ Ð·Ð½Ð°Ñ‡ÐµÐ½Ð¸ÑŽ уÑтановки киÑлорода (set-point). Среднее значение
pO<sub>2</sub> не ÑвлÑетÑÑ Ñредним значением от датчика, а раÑÑчитано <em>Subsurface</em> Ñледующим
+>>>>>>> v4.4-branch
образом:</p></div>
<div class="ulist"><ul>
<li>
<p>
+<<<<<<< HEAD
+Ð´Ð»Ñ Ð´Ð²ÑƒÑ… датчиков O<sub>2</sub> раÑчитываетÑÑ Ñреднее значение.
+=======
Ð´Ð»Ñ Ð´Ð²ÑƒÑ… датчиков O<sub>2</sub> раÑÑчитываетÑÑ Ñреднее значение.
+>>>>>>> v4.4-branch
</p>
</li>
<li>
@@ -2343,7 +2502,11 @@ pO<sub>2</sub> не ÑвлÑетÑÑ Ñредним значением от да
</p>
</li>
</ul></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>Среднее значание pO<sub>2</sub> ÑенÑоров отображаетÑÑ Ð·ÐµÐ»ÐµÐ½Ð¾Ð¹ линией.</p></div>
+=======
<div class="paragraph"><p>Среднее значение pO<sub>2</sub> ÑенÑоров отображаетÑÑ Ð·ÐµÐ»ÐµÐ½Ð¾Ð¹ линией.</p></div>
+>>>>>>> v4.4-branch
<div class="paragraph"><p>Ð—Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ ÑƒÑтановок киÑлорода, а также Ð¿Ð¾ÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¸Ð½Ð´Ð¸Ð²Ð¸Ð´ÑƒÐ°Ð»ÑŒÐ½Ñ‹Ñ… датчиков, могут быть показаны на
профиле. Отображение раÑширенной информации Ð´Ð»Ñ CCR-Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñ€ÐµÐ³ÑƒÐ»Ð¸Ñ€ÑƒÐµÑ‚ÑÑ Ð² <em>ÐаÑтройках_ (доÑтупны
в <a href="#S_CCR_options">_Файл &#8594; ÐаÑтройки &#8594; Профиль</em></a>. Вот наÑтройки, влиÑющие на отображение pO<sub>2</sub>
@@ -2380,7 +2543,11 @@ pO<sub>2</sub> не ÑвлÑетÑÑ Ñредним значением от да
</p>
</li>
</ul></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>Среднее значение pO<sub>2</sub> показваетÑÑ Ð·ÐµÐ»ÐµÐ½Ñ‹Ð¼ цветом. Такое отображение позволÑет непоÑредÑтвенно
+=======
<div class="paragraph"><p>Среднее значение pO<sub>2</sub> показываетÑÑ Ð·ÐµÐ»ÐµÐ½Ñ‹Ð¼ цветом. Такое отображение позволÑет непоÑредÑтвенно
+>>>>>>> v4.4-branch
Ñравнить данные от каждого ÑенÑора и выÑвить Ñтранно низкие или абÑолютно неверные показаниÑ.</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
@@ -2391,6 +2558,15 @@ pO<sub>2</sub> не ÑвлÑетÑÑ Ñредним значением от да
галочки напротив обоих параметров. Парциальные Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð°Ð·Ð¾Ñ‚Ð° (и гелиÑ, еÑли применимо) отображаютÑÑ
так же, как Ð´Ð»Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð½Ð° открытом цикле.</p></div>
<div class="paragraph"><p><em>СобытиÑ</em>: в Ñлучае погружений Ñ Ñ€ÐµÐ±Ñ€Ð¸Ð·ÐµÑ€Ð¾Ð¼ могут быть запиÑаны дополнительные ÑобытиÑ, например,
+<<<<<<< HEAD
+перевод загубника в режим открытого цикла. Такие ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶Ð°ÑŽÑ‚ÑÑ Ð½Ð° профиле в виде жетых
+треуголников. При наведении на него ÑƒÐºÐ°Ð·Ð°Ñ‚ÐµÐ»Ñ Ð¼Ñ‹ÑˆÐ¸, в <a href="#S_InfoBox">плавающем информационном окне</a>
+показываетÑÑ Ð¾Ð¿Ð¸Ñание ÑобытиÑ.</p></div>
+<div class="paragraph"><p><em>Давление в баллонах_: некоторые CCR дайв-компьютеры (например, Poseidon MkVI) ÑохранÑÑŽÑ‚ информацию
+о давлении в баллонах Ñ ÐºÐ¸Ñлородом и дилуентом. График давлений в Ñтих баллонах отображаетÑÑ
+зелеными линиÑми поверх Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð³Ð»ÑƒÐ±Ð¸Ð½Ñ‹. Ð’ дополнение к Ñтому, Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ начальном и конечном
+давлениÑÑ… в баллонах Ñ Ð´Ð¸Ð»ÑƒÐµÐ½Ñ‚Ð¾Ð¼ и киÑлородом показываетÑÑ Ð½Ð° вкладке _СнарÑжение</em>.
+=======
перевод загубника в режим открытого цикла. Такие ÑÐ¾Ð±Ñ‹Ñ‚Ð¸Ñ Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶Ð°ÑŽÑ‚ÑÑ Ð½Ð° профиле в виде желтых
треугольников. При наведении на него ÑƒÐºÐ°Ð·Ð°Ñ‚ÐµÐ»Ñ Ð¼Ñ‹ÑˆÐ¸, в <a href="#S_InfoBox">плавающем информационном окне</a>
показываетÑÑ Ð¾Ð¿Ð¸Ñание ÑобытиÑ.</p></div>
@@ -2398,6 +2574,7 @@ pO<sub>2</sub> не ÑвлÑетÑÑ Ñредним значением от да
о давлении в баллонах Ñ ÐºÐ¸Ñлородом и дилуентом. График давлений в Ñтих баллонах отображаетÑÑ
зелеными линиÑми поверх Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð³Ð»ÑƒÐ±Ð¸Ð½Ñ‹. Ð’ дополнение к Ñтому, Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¾ начальном и конечном
давлениÑÑ… в баллонах Ñ Ð´Ð¸Ð»ÑƒÐµÐ½Ñ‚Ð¾Ð¼ и киÑлородом показываетÑÑ Ð½Ð° вкладке <em>СнарÑжение</em>.
+>>>>>>> v4.4-branch
Ðиже предÑтавлен профиль CCR-погружениÑ, на котором показаны графики значений уÑтановки, ÑенÑоров и
давлений в баллонах. Ð’ Ñтом Ñлучае мы видим ÑоглаÑованноÑÑ‚ÑŒ показаний двух ÑенÑоров.</p></div>
<div class="imageblock" style="text-align:center;">
@@ -2408,7 +2585,11 @@ pO<sub>2</sub> не ÑвлÑетÑÑ Ñредним значением от да
<div class="paragraph"><p><em>Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ</em>: ИнформациÑ, ÑÐ¿ÐµÑ†Ð¸Ñ„Ð¸Ñ‡Ð½Ð°Ñ Ð´Ð»Ñ ÐºÐ¾Ð½ÐºÑ€ÐµÑ‚Ð½Ð¾Ð³Ð¾ оборудованиÑ, отображаетÑÑ Ð²
<em>Subsurface</em> на вкладке <a href="#S_ExtraDataTab">Ð”Ð¾Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð°Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ</a>. Она может включать наÑтройки
Ð¾Ð±Ð¾Ñ€ÑƒÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸ прочие данные.</p></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>За более детальной информацией по загружке погружений из ребризеров Poseidon MkVI и APD обратитеÑÑŒ
+=======
<div class="paragraph"><p>За более детальной информацией по загрузке погружений из ребризеров Poseidon MkVI и APD обратитеÑÑŒ
+>>>>>>> v4.4-branch
к <a href="#S_PoseidonMkVI">ПРИЛОЖЕÐИЮ Б</a>.</p></div>
</div>
</div>
@@ -2438,10 +2619,17 @@ pO<sub>2</sub> не ÑвлÑетÑÑ Ñредним значением от да
</div>
<div class="sect2">
<h3 id="S_ExtraDataTab">6.2. Вкладка <strong>Дополнительно</strong> (обычно Ð´Ð»Ñ Ð¸Ð½Ð´Ð¸Ð²Ð¸Ð´ÑƒÐ°Ð»ÑŒÐ½Ð¾Ð³Ð¾ погружениÑ)</h3>
+<<<<<<< HEAD
+<div class="paragraph"><p>При иÑпользовании дайв-компьютера он обычно Ñообщает дополнительную информацию, которуб невозможно
+отобразить единообразным образом, Ð¿Ñ€Ð¸Ð½Ð¸Ð¼Ð°Ñ Ð²Ð¾ внимание, что Ñта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð°ÐµÑ‚ÑÑ Ð´Ð»Ñ Ñ€Ð°Ð·Ð½Ñ‹Ñ…
+моделей. Обычно Ñта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡Ð°ÐµÑ‚ в ÑÐµÐ±Ñ Ð½Ð°Ñтройки компьютера, уровень зарÑда батареи,
+беÑполетное Ð²Ñ€ÐµÐ¼Ñ Ð¸Ð»Ð¸ уÑтановки градиент-фактора. Когда доÑтупны, Ñти данные отображаютÑÑ Ð½Ð° вкладке
+=======
<div class="paragraph"><p>При иÑпользовании дайв-компьютера он обычно Ñообщает дополнительную информацию, которую невозможно
отобразить единообразным образом, Ð¿Ñ€Ð¸Ð½Ð¸Ð¼Ð°Ñ Ð²Ð¾ внимание, что Ñта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð°ÐµÑ‚ÑÑ Ð´Ð»Ñ Ñ€Ð°Ð·Ð½Ñ‹Ñ…
моделей. Обычно Ñта Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð²ÐºÐ»ÑŽÑ‡Ð°ÐµÑ‚ в ÑÐµÐ±Ñ Ð½Ð°Ñтройки компьютера, уровень зарÑда батареи,
неполетное Ð²Ñ€ÐµÐ¼Ñ Ð¸Ð»Ð¸ уÑтановки градиент-фактора. Когда доÑтупны, Ñти данные отображаютÑÑ Ð½Ð° вкладке
+>>>>>>> v4.4-branch
<strong>Дополнительно</strong>. Ðа риÑунке ниже приведены дополнительные данные Ð´Ð»Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ðµ на ребризере Poseidon.</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
@@ -2681,8 +2869,13 @@ cellspacing="0" cellpadding="4">
<img src="images/icons/ShowCylindersButton.jpg" alt="Замечание" />
</td>
<td class="content">ЕÑли выбран Ñтот переключатель, то баллоны, иÑпользуемые в погружении, отображаютÑÑ Ð² виде цветной
+<<<<<<< HEAD
+полоÑÑ‹ в нижней чаÑти Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ. Кодировка цветов ÑледующаÑ: киÑлород отриÑовываетÑÑ
+зеленой полоÑой, азот желтой, а гелий - краÑной. РиÑунк ниже предÑтавлÑÑ‚ профиль Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñ Ð¿ÐµÑ€Ð²Ð¾Ð¹
+=======
полоÑÑ‹ в нижней чаÑти Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ. Кодировка цветов ÑледующаÑ: киÑлород нариÑован
зеленой полоÑой, азот желтой, а гелий - краÑной. РиÑунок ниже предÑтавлÑет профиль Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñ Ð¿ÐµÑ€Ð²Ð¾Ð¹
+>>>>>>> v4.4-branch
ÑмеÑью Trimix (краÑно-Ð·ÐµÐ»ÐµÐ½Ð°Ñ Ð¿Ð¾Ð»Ð¾Ñа), Ñ Ð´Ð°Ð»ÑŒÐ½ÐµÐ¹ÑˆÐ¸Ð¼ переходом на Nitrox (желто-Ð·ÐµÐ»ÐµÐ½Ð°Ñ Ð¿Ð¾Ð»Ð¾Ñа) на 23
минуте. Баллоны Ñ Ð²Ð¾Ð·Ð´ÑƒÑ…Ð¾Ð¼ предÑтавлены Ñветло-голубой полоÑой.</td>
</tr></table>
@@ -2700,12 +2893,21 @@ cellspacing="0" cellpadding="4">
<td class="content">Показывает давление инертных газов в тканÑÑ… отноÑительно внешнего Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ (Ð³Ð¾Ñ€Ð¸Ð·Ð¾Ð½Ñ‚Ð°Ð»ÑŒÐ½Ð°Ñ ÑераÑ
линиÑ). Давление в тканÑÑ… раÑÑчитываетÑÑ Ð¿Ð¾ алгоритму Бюльмана ZH-L16 и отображаетÑÑ Ð»Ð¸Ð½Ð¸Ñми, цвет
которых варьируетÑÑ Ð¾Ñ‚ зеленого (Ñамые быÑтрые ткани) до Ñинего (Ñамые медленные ткани).
+<<<<<<< HEAD
+Ð§ÐµÑ€Ð½Ð°Ñ Ð»Ð¸Ð½Ð¸Ñ, отриÑÐ¾Ð²Ð°Ð½Ð½Ð°Ñ Ð²Ñ‹ÑˆÐµ графика внешнего давлениÑ, показывает макÑимальное допуÑтимое
+перенаÑыщение ÑоглаÑно значений градиент-фактора, указанных в <strong>ÐаÑтройках*. Ð”Ð»Ñ Ð´Ð°Ð¹Ð²ÐµÑ€Ð¾Ð², планирующих
+декомпреÑÑионные погружениÑ, Ñффективное ÑкороÑÑ‚ÑŒ раÑÑÑ‹Ñ‰ÐµÐ½Ð¸Ñ Ð´Ð¾ÑтигаетÑÑ Ð¿Ñ€Ð¸ давлении в тканÑÑ…
+большем чем окружаещее давление (ÑÐµÑ€Ð°Ñ Ð»Ð¸Ð½Ð¸Ñ), но меньшем чем предельное (Ñ‡ÐµÑ€Ð½Ð°Ñ Ð»Ð¸Ð½Ð¸Ñ). Это
+предÑтавление отображает давление в тканÑÑ… на протÑжении вÑего погружениÑ. Ðапротив,
+<a href="#S_gas_pressure_graph">ГиÑтограмма Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð³Ð°Ð·Ð¾Ð²</a> в плавающем *Информационном окне</strong> отображает
+=======
Ð§ÐµÑ€Ð½Ð°Ñ Ð»Ð¸Ð½Ð¸Ñ, нариÑÐ¾Ð²Ð°Ð½Ð½Ð°Ñ Ð²Ñ‹ÑˆÐµ графика внешнего давлениÑ, показывает макÑимальное допуÑтимое
перенаÑыщение ÑоглаÑно значений градиент-фактора, указанных в наÑтройках. Ð”Ð»Ñ Ð´Ð°Ð¹Ð²ÐµÑ€Ð¾Ð², планирующих
декомпреÑÑионные погружениÑ, Ñффективное ÑкороÑÑ‚ÑŒ раÑÑ‹Ñ‰ÐµÐ½Ð¸Ñ Ð´Ð¾ÑтигаетÑÑ Ð¿Ñ€Ð¸ давлении в тканÑÑ…
большем чем окружающее давление (ÑÐµÑ€Ð°Ñ Ð»Ð¸Ð½Ð¸Ñ), но меньшем чем предельное (Ñ‡ÐµÑ€Ð½Ð°Ñ Ð»Ð¸Ð½Ð¸Ñ). Это
предÑтавление отображает давление в тканÑÑ… на протÑжении вÑего погружениÑ. Ðапротив,
<a href="#S_gas_pressure_graph">ГиÑтограмма Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð³Ð°Ð·Ð¾Ð²</a> в плавающем <strong>Информационном окне</strong> отображает
+>>>>>>> v4.4-branch
давление в момент времени, ÑоответÑтвующий положению ÑƒÐºÐ°Ð·Ð°Ñ‚ÐµÐ»Ñ Ð¼Ñ‹ÑˆÐ¸ на оÑи времени.</td>
</tr></table>
</div>
@@ -2838,7 +3040,11 @@ CCR-погружений в дополнение к тем, что были им
<div class="paragraph"><p>Ðа риÑунке <strong>Ð’</strong> выше показано информационное окно практичеÑки Ñо вÑей доÑтупной информацией.</p></div>
<div class="sect3">
<h4 id="S_gas_pressure_graph">6.6.1. ГиÑтограмма Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð³Ð°Ð·Ð¾Ð²</h4>
+<<<<<<< HEAD
+<div class="paragraph"><p>Ð’ левой чаÑти <strong>Информационного окна</strong> раÑположена Ð²ÐµÑ€Ñ‚Ð¸ÐºÐ°Ð»ÑŒÐ½Ð°Ñ Ð³Ð¸Ñтрограмма, Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶Ð°ÑŽÑ‰Ð°Ñ Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ðµ
+=======
<div class="paragraph"><p>Ð’ левой чаÑти <strong>Информационного окна</strong> раÑположена Ð²ÐµÑ€Ñ‚Ð¸ÐºÐ°Ð»ÑŒÐ½Ð°Ñ Ð³Ð¸Ñтограмма, Ð¾Ñ‚Ð¾Ð±Ñ€Ð°Ð¶Ð°ÑŽÑ‰Ð°Ñ Ð´Ð°Ð²Ð»ÐµÐ½Ð¸Ðµ
+>>>>>>> v4.4-branch
азота (и других инертных газов, например гелиÑ, там, где Ñто применимо), вдыхаемых дайвером <em>в
определенный момент времени</em>, ÑоответÑтвующий положению ÑƒÐºÐ°Ð·Ð°Ñ‚ÐµÐ»Ñ Ð¼Ñ‹ÑˆÐ¸ на оÑи времени. РиÑунок ниже
поÑÑнÑет, что именно показывает гиÑтограмма:</p></div>
@@ -2880,7 +3086,11 @@ CCR-погружений в дополнение к тем, что были им
<li>
<p>
ÐижнÑÑ Ð³Ñ€Ð°Ð½Ð¸Ñ†Ð° краÑной облаÑти на гиÑтограмме отображает вычиÑленное по алгоритму Бюльмана
+<<<<<<< HEAD
+ M-значение, - давление инертного газа, при котором веÑьма вероÑтно формирование пузырикьков,
+=======
M-значение, - давление инертного газа, при котором веÑьма вероÑтно формирование пузырьков,
+>>>>>>> v4.4-branch
что в Ñвою очередь может привеÑти к декомпреÑÑионной болезни.
</p>
</li>
@@ -3080,9 +3290,15 @@ CCR-погружений в дополнение к тем, что были им
<div class="paragraph"><p>Ð’Ñ‹ можете отфильтровать Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð² ÑпиÑке, указав те или иные атрибуты дайва (метки, напарник,
меÑто погружениÑ, коÑтюм). Ðапример, можно выбрать вÑе глубокие Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð² определенном меÑте,
либо пещерные дайвы Ñ Ð²Ð°ÑˆÐ¸Ð¼ другом.</p></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>Чтобы вызвать фильтр, выберите в главном меню <em>Журнал &#8594; Фильтр погружений</em>. Вам будет преÑтавлена
+<em>Панель фильтров</em>, раÑÐ¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ð°Ñ Ð² верхней чаÑти окна <em>Subsurface</em>. Ð’ правой чаÑти Ñтой панели
+находÑÑ‚ÑÑ Ñ‚Ñ€Ð¸ кнопки, которые позволÑÑŽÑ‚ очиÑтить фильтры, ÑпрÑтать панель или вовÑе закрыть её (при
+=======
<div class="paragraph"><p>Чтобы вызвать фильтр, выберите в главном меню <em>Журнал &#8594; Фильтр погружений</em>. Вам будет преlÑтавлена
<em>Панель фильтров</em>, раÑÐ¿Ð¾Ð»Ð¾Ð¶ÐµÐ½Ð½Ð°Ñ Ð² верхней чаÑти окна <em>Subsurface</em>. Ð’ правой чаÑти Ñтой панели
находÑÑ‚ÑÑ Ñ‚Ñ€Ð¸ кнопки, которые позволÑÑŽÑ‚ очиÑтить фильтры, ÑпрÑтать панель или вовÑе закрыть ее (при
+>>>>>>> v4.4-branch
Ñто фильтры очищаютÑÑ).</p></div>
<div class="imageblock" style="text-align:center;">
<div class="content">
@@ -3119,10 +3335,17 @@ CCR-погружений в дополнение к тем, что были им
<h3 id="S_facebook">8.1. ЭкÑпорт информации о погружении в <em>Facebook</em></h3>
<div class="paragraph"><p>ЭкÑпорт в <em>Facebook</em> отличаетÑÑ Ð¾Ñ‚ вÑех других видов ÑкÑпорта, поÑкольку он требует подключениÑ
учетной запиÑи, что в Ñвою очередь требует от Ð²Ð°Ñ Ð»Ð¾Ð³Ð¸Ð½ и пароль <em>Facebook</em>. Ð”Ð»Ñ Ð°Ð²Ñ‚Ð¾Ñ€Ð¸Ð·Ð°Ñ†Ð¸Ð¸
+<<<<<<< HEAD
+необхоимо в главном меню выбрать <em>Файл &#8594; ÐаÑтройки</em> и там выбрать вкладку <em>Facebook</em>, на которой
+вам будет предÑтавлена форма авторизации (Ñм. риÑунок <strong>Ð</strong> Ñлева внизу). ÐвторизуйтеÑÑŒ Ñвоими логином
+и паролем, поÑле чего Ñкран должен выглÑдеть как показано на риÑунке <strong>Ð’</strong>. При необходимоÑти вы
+можете отключить <em>Subsurface</em> от <em>Facebook</em>, нажав на ÑоответÑтвующу кнопку.</p></div>
+=======
необходимо в главном меню выбрать <em>Файл &#8594; ÐаÑтройки</em> и там выбрать вкладку <em>Facebook</em>, на которой
вам будет предÑтавлена форма авторизации (Ñм. риÑунок <strong>Ð</strong> Ñлева внизу). ÐвторизуйтеÑÑŒ Ñвоими логином
и паролем, поÑле чего Ñкран должен выглÑдеть как показано на риÑунке <strong>Ð’</strong>. При необходимоÑти вы
можете отключить <em>Subsurface</em> от <em>Facebook</em>, нажав на ÑоответÑтвующую кнопку.</p></div>
+>>>>>>> v4.4-branch
<div class="imageblock" style="text-align:center;">
<div class="content">
<img src="images/facebook1_f20.jpg" alt="РиÑунок: ÐÐ²Ñ‚Ð¾Ñ€Ð¸Ð·Ð°Ñ†Ð¸Ñ Facebook" />
@@ -3131,7 +3354,11 @@ CCR-погружений в дополнение к тем, что были им
<div class="paragraph"><p>ПоÑле того как Ñоединение Ñ <em>Facebook</em> уÑтановлено, Ð¿ÑƒÐ±Ð»Ð¸ÐºÐ°Ñ†Ð¸Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð² вашей Хронике не
ÑоÑтавит проблем. Выберите погружение в ÑпиÑке и убедитеÑÑŒ в том, что именно Ñтот дайв должен быть
опубликован. Ðажмите кнопку Ñ Ð»Ð¾Ð³Ð¾Ñ‚Ð¸Ð¿Ð¾Ð¼ <em>Facebook</em>, раÑположенную в <strong>Информационной панели</strong> Ñправа
+<<<<<<< HEAD
+от Ð¿Ð¾Ð»Ñ <em>ПрмечаниÑ</em> (Ñм. риÑунок <strong>Ð</strong> ниже). По нажатию на Ñту кнопку вам будет предÑтавлено окно, в
+=======
от Ð¿Ð¾Ð»Ñ <em>ПримечаниÑ</em> (Ñм. риÑунок <strong>Ð</strong> ниже). По нажатию на Ñту кнопку вам будет предÑтавлено окно, в
+>>>>>>> v4.4-branch
котором вы можете выбрать какую дополнительную информацию опубликовать вмеÑте Ñ Ð¿Ñ€Ð¾Ñ„Ð¸Ð»ÐµÐ¼ погружениÑ
(риÑунок <strong>Ð’</strong>). ОбÑзательным ÑвлÑетÑÑ Ñ‚Ð¾Ð»ÑŒÐºÐ¾ поле <em>Ðльбом</em>. Кроме ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñтандартных параметров
погружениÑ, вы можете вручную отредактировать Ñопроводительный текÑÑ‚. Ð”Ð»Ñ Ð¾Ñ‚Ð¿Ñ€Ð°Ð²ÐºÐ¸ профилÑ
@@ -3228,7 +3455,11 @@ HTML (Ñм. риÑунок <strong>Ð’</strong> выше). Ð’Ñ‹ можете вы
<li>
<p>
<em>Глубины фото</em>. Создает текÑтовый файл, в котором ÑодержатÑÑ Ð¸Ð¼ÐµÐ½Ð° файлов вÑех фотографий,
+<<<<<<< HEAD
+прикрепленных к погружениÑм вмеÑте Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸ÐµÐ¼ глубины, на котороый Ñти фотографии были Ñделаны.
+=======
прикрепленных к погружениÑм вмеÑте Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð¸ÐµÐ¼ глубины, на которой Ñти фотографии были Ñделаны.
+>>>>>>> v4.4-branch
</p>
</li>
<li>
@@ -3396,7 +3627,11 @@ Print</em>. Вам будет предÑтавлено диалоговое ок
D3, Vyper, Vytec, Cobra, Gekko И Zoop). МножеÑтво параметров компьютера может быть Ñчитано и изменено.
Первым шагом вы должны убедитьÑÑ Ñ‡Ñ‚Ð¾ уÑтановлены вÑе необходимые драйверы Ð¾Ð±Ð¾Ñ€ÑƒÐ´Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¸ что вам извеÑтно
Ð¸Ð¼Ñ ÑƒÑтройÑтва. Внимательно ознакомьтеÑÑŒ Ñ Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸ÐµÐ¹ в <a href="#APPENDIX_A">ПРИЛОЖЕÐИИ Ð</a>.</p></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>ПоÑле того, как дайв-компьютер подключен, выберите <em>Файл &#8594; ÐаÑтройка дайв-компьютера</em> в главом меню.
+=======
<div class="paragraph"><p>ПоÑле того, как дайв-компьютер подключен, выберите <em>Файл &#8594; ÐаÑтройка дайв-компьютера</em> в главном меню.
+>>>>>>> v4.4-branch
Укажите Ð¸Ð¼Ñ ÑƒÑтройÑтва в текÑтовом поле в верхней чаÑти окна, и выберите ÑоответÑтвующую модель
дайв-компьютера в ÑпиÑке Ñлева (Ñм. риÑунок ниже).</p></div>
<div class="imageblock" style="text-align:center;">
@@ -3754,6 +3989,7 @@ ZH-L16 Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸ÐµÐ¼ градиент-факторов за авто
</div>
<div class="sect2">
<h3 id="_пример_планированиÑ_погружениÑ_на_открытом_цикле">13.2. Пример Ð¿Ð»Ð°Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð½Ð° открытом цикле</h3>
+<<<<<<< HEAD
<div class="ulist"><ul>
<li>
<p>
@@ -3768,10 +4004,29 @@ ZH-L16 Ñ Ð´Ð¾Ð±Ð°Ð²Ð»ÐµÐ½Ð¸ÐµÐ¼ градиент-факторов за авто
<li>
<p>
Ребризер замкнутого цикла (CCR)
+=======
+<div class="ulist"><ul>
+<li>
+<p>
+Ð’ левой нижней чаÑти Ñкрана планировщика раÑположен выпадающий ÑпиÑок (на риÑунке ниже обведен Ñиней линией), предоÑтавлÑющий варианта типа погружениÑ:
+</p>
+<div class="ulist"><ul>
+<li>
+<p>
+Открытый цикл (по умолчанию)
+>>>>>>> v4.4-branch
</p>
</li>
<li>
<p>
+<<<<<<< HEAD
+=======
+Ребризер замкнутого цикла (CCR)
+</p>
+</li>
+<li>
+<p>
+>>>>>>> v4.4-branch
ПаÑÑивный ребризер полузамкнутого цикла (pSCR)
</p>
</li>
@@ -3829,7 +4084,11 @@ GFHigh берутÑÑ Ð¸Ð· наÑтроек <em>Subsurface</em>, однако, Ð
</p>
</li>
</ul></div>
+<<<<<<< HEAD
+<div class="paragraph"><p>СкороÑÑ‚ÑŒ вÑÐ¿Ð»Ñ‹Ñ‚Ð¸Ñ Ð²Ð°Ð¶Ð½Ð° в фазе раÑÑÑ‹Ñ‰ÐµÐ½Ð¸Ñ Ð² конце дайва и указываетÑÑ Ð´Ð»Ñ
+=======
<div class="paragraph"><p>СкороÑÑ‚ÑŒ вÑÐ¿Ð»Ñ‹Ñ‚Ð¸Ñ Ð²Ð°Ð¶Ð½Ð° в фазе раÑÑ‹Ñ‰ÐµÐ½Ð¸Ñ Ð² конце дайва и указываетÑÑ Ð´Ð»Ñ
+>>>>>>> v4.4-branch
неÑкольких диапазонов глубины, Ð¿Ñ€Ð¸Ð½Ð¸Ð¼Ð°Ñ Ð²Ð¾ внимание Ñреднюю глубину как точку
отÑчета. СреднÑÑ Ð³Ð»ÑƒÐ±Ð¸Ð½Ð° отображаетÑÑ Ð½Ð° профиле краÑной горизонтальной линией.
СкороÑÑ‚ÑŒ вÑÐ¿Ð»Ñ‹Ñ‚Ð¸Ñ Ð½Ð° больших глубинах находитÑÑ Ð¾Ð±Ñ‹Ñ‡Ð½Ð¾ в пределах 8-12 м/мин,
@@ -3887,8 +4146,13 @@ SAC отдельно Ð´Ð»Ñ Ð´Ð¾Ð½Ð½Ð¾Ð¹ фазы (<em>SAC на дне</em>) и
<div class="paragraph"><p>Ðенулевое значение в колонке "УÑтановка СС" в таблице путевых точек означает корректное значение
уÑтановки и что погружение на Ñтом Ñегменте выполнÑетÑÑ Ð½Ð° CCR-ребризере. ЕÑли поÑледний вручную
введенный Ñегмент выполнÑетÑÑ Ð½Ð° CCR, декомпреÑÑионные процедуры раÑÑчитываютÑÑ ÑоглаÑно значениÑ
+<<<<<<< HEAD
+указанной уÑтавновки. ЕÑли же поÑледний Ñегмент выполнÑетÑÑ Ð½Ð° открытом цикле (значение уÑтновки
+равно нулю), декомпреÑÑионные обÑзательÑтва раÑÑчитаваютÑÑ Ð² режиме ОЦ. Замена газов предуÑмотрена
+=======
указанной уÑтановки. ЕÑли же поÑледний Ñегмент выполнÑетÑÑ Ð½Ð° открытом цикле (значение уÑтновки киÑлорода
равно нулю), декомпреÑÑионные обÑзательÑтва раÑÑчитываютÑÑ Ð² режиме ОЦ. Замена газов предуÑмотрена
+>>>>>>> v4.4-branch
только Ð´Ð»Ñ Ð¾Ñ‚ÐºÑ€Ñ‹Ñ‚Ð¾Ð³Ð¾ цикла.</p></div>
<div class="paragraph"><p>Ðиже на риÑунке приведен пример плана Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð½Ð° 45м Ñ Ð¸Ñпользованием EAN26
и вÑплытием на EAN50, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Ð½Ð°Ñтройки, опиÑанные выше:</p></div>
@@ -3899,7 +4163,13 @@ SAC отдельно Ð´Ð»Ñ Ð´Ð¾Ð½Ð½Ð¾Ð¹ фазы (<em>SAC на дне</em>) и
</div>
<div class="paragraph"><p>ПоÑле Ð¾ÐºÐ¾Ð½Ñ‡Ð°Ð½Ð¸Ñ Ð¿Ð»Ð°Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ðµ, вы можете Ñохранить план, нажав на кнопку
<em>Сохранить</em>. План поÑвитÑÑ Ð² ÑпиÑке погружений.</p></div>
+<<<<<<< HEAD
+</div>
+<div class="sect2">
+<h3 id="_детальный_план_погружениÑ">13.3. Детальный план погружениÑ</h3>
+=======
<div class="paragraph"><p><strong>Детальный план погружениÑ</strong></p></div>
+>>>>>>> v4.4-branch
<div class="paragraph"><p>Ð’ правой нижней чаÑти Ñкрана планировщика находитÑÑ Ñ‚ÐµÐºÑÑ‚Ð¾Ð²Ð°Ñ Ð¾Ð±Ð»Ð°ÑÑ‚ÑŒ Ñ
подробным ÑловеÑным опиÑанием плана погружениÑ. Ð’Ñ‹ можете изменить его
детализацию Ñ Ð¿Ð¾Ð¼Ð¾Ñ‰ÑŒÑŽ неÑкольких параметров в Ñекции <em>Заметки погружениÑ</em>.
@@ -3912,6 +4182,22 @@ SAC отдельно Ð´Ð»Ñ Ð´Ð¾Ð½Ð½Ð¾Ð¹ фазы (<em>SAC на дне</em>) и
деко</em>, то Ð²Ñ€ÐµÐ¼Ñ Ð¿ÐµÑ€ÐµÑ…Ð¾Ð´Ð¾Ð¼ показываетÑÑ Ð¾Ñ‚Ð´ÐµÐ»ÑŒÐ½Ð¾ от времени Ñегментов.</p></div>
</div>
<div class="sect2">
+<<<<<<< HEAD
+<h3 id="_планирование_погружений_на_ребризере_замкнутого_цикла">13.4. Планирование погружений на ребризере замкнутого цикла</h3>
+<div class="paragraph"><p>Ð”Ð»Ñ Ð¿Ð»Ð°Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ‚Ð°ÐºÐ¸Ñ… погружений выберите CCR в ÑпиÑке, как показано на риÑунке выше (ÑпиÑок
+обведен Ñиней линией).</p></div>
+<div class="paragraph"><p><strong>ДоÑтупные ÑмеÑи</strong>: добавьте в таблицу доÑтупных ÑмеÑей информацию о баллонах дилуÑнта и аварийных
+газах. ÐЕ вводите информацию о киÑлородном баллоне, поÑкольку он подразумеватÑÑ Ð¿Ñ€Ð¸ иÑпользовании
+режима CCR.</p></div>
+<div class="paragraph"><p><strong>Ввод уÑтановок</strong>: укажите значение уÑтановки по умолчанию в *ÐаÑтройках* Ð¿Ñ€Ð¸Ð»Ð¾Ð¶ÐµÐ½Ð¸Ñ (в главном меню
+выберите <em>Файл &#8594; ÐаÑтройки</em> и вкладку <em>Профиль</em>). По умолчанию Ð´Ð»Ñ Ð²Ñех дабавлÑемых Ñегментов
+точка уÑтановки беретÑÑ Ð¸Ð· наÑтроек, он вы можете поменÑÑ‚ÑŒ их по Ñвоему желанию. Значение равное
+нулю означает, что дайвер перешел на открытый цикл. ДекомпреÑÑÐ¸Ñ Ð²Ñегда раÑÑчитываетÑÑ Ð¸ÑпользуÑ
+поÑледнюю уÑтановку вручную добавленного Ñегмента. Чтобы запланировать переход на ОЦ во Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ð´ÑŠÐµÐ¼Ð°,
+добавьте одноминутный Ñегмент Ñо значением уÑтановки равным нулю. ДекомрпеÑÑионный алгоритм
+автоматичеÑки не менÑет ÑмеÑи Ð´Ð»Ñ CCR-погружений (Ñ Ð¿Ð¾Ð»Ð¾Ð¶Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð¹ уÑтановкой).</p></div>
+<div class="paragraph"><p>Профиль Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð½Ð° ребризере замкнутого типа модет выглÑдеть так:</p></div>
+=======
<h3 id="_планирование_погружений_на_ребризере_замкнутого_цикла">13.3. Планирование погружений на ребризере замкнутого цикла</h3>
<div class="paragraph"><p>Ð”Ð»Ñ Ð¿Ð»Ð°Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ‚Ð°ÐºÐ¸Ñ… погружений выберите CCR в ÑпиÑке, как показано на риÑунке выше (ÑпиÑок
обведен Ñиней линией).</p></div>
@@ -3926,11 +4212,53 @@ SAC отдельно Ð´Ð»Ñ Ð´Ð¾Ð½Ð½Ð¾Ð¹ фазы (<em>SAC на дне</em>) и
добавьте одноминутный Ñегмент Ñо значением уÑтановки равным нулю. ДекомпреÑÑионный алгоритм
автоматичеÑки не менÑет ÑмеÑи Ð´Ð»Ñ CCR-погружений (Ñ Ð¿Ð¾Ð»Ð¾Ð¶Ð¸Ñ‚ÐµÐ»ÑŒÐ½Ð¾Ð¹ уÑтановкой).</p></div>
<div class="paragraph"><p>Профиль Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð½Ð° ребризере замкнутого типа может выглÑдеть так:</p></div>
+>>>>>>> v4.4-branch
<div class="imageblock" style="text-align:center;">
<div class="content">
<img src="images/Planner_CCR1_f20.jpg" alt="РиÑунок: Планирование CCR-погружениÑ, наÑтройка" />
</div>
</div>
+<<<<<<< HEAD
+<div class="paragraph"><p>Обратите внимание, что в <em>Детальном плане погружениÑ</em> раÑход газа Ð´Ð»Ñ CCR-Ñегментов не раÑÑчитывает
+и вÑегда равен нулю.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_планирование_погружений_на_ребризере_полузамкнутого_типа">13.5. Планирование погружений на ребризере полузамкнутого типа</h3>
+<div class="paragraph"><p>Ð”Ð»Ñ Ð¿Ð»Ð°Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñ‚Ð°ÐºÐ¸Ñ… погружений выберите pSCR в ÑпиÑке, как показано на риÑунке выше (ÑпиÑок
+обведен Ñиней линией).
+Параметры pSCR-погружений также задаютÑÑ Ð² *ÐаÑтройках* (в главном меню выберите <em>Файл &#8594; ÐаÑтройки</em>
+и вкладку <em>Профиль</em>). К Ñтим наÑтройкам отноÑÑÑ‚ÑÑ ÑƒÑ€Ð¾Ð²ÐµÐ½ÑŒ метаболизма и отношение ÑброÑа (1:10 по
+умолчанию).
+=== Печать плана погружениÑ</p></div>
+<div class="paragraph"><p>Ð’Ñ‹ можете раÑпечатать план нажатием на кнопку <em>Печать</em>. Либо можете
+Ñкопировать текÑÑ‚ плана и вÑтавить его в любой текÑтовый редактор. Ðлгоритм также принимает во
+внимание ÑÐ±Ñ€Ð¾Ñ Ð³Ð°Ð·Ð° из загубника. ЕÑли уровень pO<sub>2</sub> падает ниже безопаÑного значениÑ, в
+<em>Детальном плане погружениÑ</em> отображаетÑÑ Ð¿Ñ€ÐµÐ´ÑƒÐ¿Ñ€ÐµÐ¶Ð´ÐµÐ½Ð¸Ðµ. Ð¢Ð¸Ð¿Ð¸Ñ‡Ð½Ð°Ñ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð´Ð»Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ
+на ребризере полузамкнотого цикла включаеи один баллон и неÑколько аварийных баллонов. ПоÑтому
+Ñодержимое таблиц <em>ДоÑтупные ÑмеÑи</em> и <em>Путевые точки</em> очень похожи на те, что опиÑаны Ð´Ð»Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ð¹
+на закрытом цикле выше. Однако, Ð´Ð»Ñ pSCR погружений не указываютÑÑ ÑƒÑтановки. Ðиже приведен пример
+плана Ð´Ð»Ñ Ð¿Ð¾Ð·Ð°Ð¼ÐºÐ½ÑƒÑ‚Ð¾Ð³Ð¾ цикла. Он очень похож на профиль CCR за тем иÑключением, что Ñегменты на
+вÑплытии длиннее, что ÑвÑзано Ñ Ð¿Ð¾Ð½Ð¸Ð¶ÐµÐ½Ð½Ñ‹Ð¼ Ñодержанием киÑлорода в ÑиÑтеме из-за ÑброÑа из загубника.</p></div>
+<div class="imageblock" style="text-align:center;">
+<div class="content">
+<img src="images/Planner_pSCR1_f20.jpg" alt="FIGURE: Planning a pSCR dive: setup" />
+</div>
+</div>
+</div>
+<div class="sect2">
+<h3 id="S_Replan">13.6. Изменение ÑущеÑтвующего плана</h3>
+<div class="paragraph"><p>Обычно, поÑле ÑÐ¾Ñ…Ñ€Ð°Ð½ÐµÐ½Ð¸Ñ Ð¿Ð»Ð°Ð½Ð°, он доÑтупен в <strong>СпиÑке погружений</strong>. <em>Subsurface</em> не предоÑтавлÑет
+возможноÑти изменить план из ÑпиÑка. Ð”Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы изменить план, выберите его в ÑпиÑке. Затем в
+главном меню выберите <em>Журнал &#8594; Перепланировать</em>. Это дейÑтвие откроет планировщик Ñ ÑущеÑтвующим
+планом, позволÑÑ Ð¸Ð·Ð¼ÐµÐ½Ð¸Ñ‚ÑŒ его.</p></div>
+<div class="paragraph"><p>Ð’ Ñлучае Ð¿ÐµÑ€ÐµÐ¿Ð»Ð°Ð½Ð¸Ñ€Ð¾Ð²Ð°Ð½Ð¸Ñ Ñƒ Ð²Ð°Ñ Ð¿Ð¾ÑвлÑетÑÑ Ð²Ð¾Ð·Ð¼Ð¾Ð¶Ð½Ð¾ÑÑ‚ÑŒ <strong>Сохранить новый</strong> план, Ð´Ð»Ñ Ñ‚Ð¾Ð³Ð¾, чтобы
+не перезапиÑывать Ñтарый. ЕÑли Ð½Ð¾Ð²Ð°Ñ ÐºÐ¾Ð¿Ð¸Ñ ÑохранÑетÑÑ Ñ Ñ‚ÐµÐ¼ же временем, что и Ñтарый план, то они
+ÑчитаютÑÑ Ð´Ð²ÑƒÐ¼Ñ Ð²ÐµÑ€ÑиÑми одного плана и не влиÑÑŽÑ‚ друг на друга при вычиÑлении декомпреÑÑионных
+обÑзательÑтв.</p></div>
+</div>
+<div class="sect2">
+<h3 id="_планирование_повторных_погружений">13.7. Планирование повторных погружений</h3>
+=======
<div class="paragraph"><p>Обратите внимание, что в <em>Детальном плане погружениÑ</em> раÑход газа Ð´Ð»Ñ CCR-Ñегментов не раÑÑчитываетÑÑ
и вÑегда равен нулю.</p></div>
</div>
@@ -3966,6 +4294,7 @@ SAC отдельно Ð´Ð»Ñ Ð´Ð¾Ð½Ð½Ð¾Ð¹ фазы (<em>SAC на дне</em>) и
</div>
<div class="sect2">
<h3 id="_планирование_повторных_погружений">13.6. Планирование повторных погружений</h3>
+>>>>>>> v4.4-branch
<div class="paragraph"><p><em>Subsurface</em> позволÑет планировать повторные Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð¿Ñ€Ð¸ уÑловии, что вы
корректно укажете дату и Ð²Ñ€ÐµÐ¼Ñ Ð½Ð°Ñ‡Ð°Ð»Ð°. При Ñтом учитываетÑÑ Ð¾Ñтаточное
наÑыщение поÑле предыдущего погружениÑ.</p></div>
@@ -3980,7 +4309,11 @@ SAC отдельно Ð´Ð»Ñ Ð´Ð¾Ð½Ð½Ð¾Ð¹ фазы (<em>SAC на дне</em>) и
Ð´Ð»Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ плана будет иÑпользоватьÑÑ ÐºÐ¾Ð½Ñ„Ð¸Ð³ÑƒÑ€Ð°Ñ†Ð¸Ñ Ð¸Ð· шаблона.</p></div>
</div>
<div class="sect2">
+<<<<<<< HEAD
+<h3 id="_печать_плана_погружениÑ">13.8. Печать плана погружениÑ</h3>
+=======
<h3 id="_печать_плана_погружениÑ">13.7. Печать плана погружениÑ</h3>
+>>>>>>> v4.4-branch
<div class="paragraph"><p>Ð’Ñ‹ можете раÑпечатать план Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ñ Ñ‚ÐµÐ¼ чтобы взÑÑ‚ÑŒ его Ñ Ñобой под воду, нажав кнопку <em>Печать</em>.
Ðльтернативный ÑпоÑоб - Ñкопировать текÑÑ‚ из <em>Детального плана погружениÑ</em> и вÑтавить его в в ваш
любимый текÑтовый редактор.</p></div>
@@ -4519,6 +4852,9 @@ UDDF-файл Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ погружениÑ. Выделите вÑÐ
</div>
</div>
<div class="sect2">
+<<<<<<< HEAD
+<h3 id="_импорт_погружений_из_shearwater_predator_иÑпользуÑ_bluetooth">16.4. Импорт погружений из Shearwater Predator иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Bluetooth</h3>
+=======
<h3 id="S_ImportingXDeep">16.4. Импорт погружений из xDEEP BLACK</h3>
<div class="admonitionblock">
<table><tr>
@@ -4537,6 +4873,7 @@ UDDF-файл Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ погружениÑ. Выделите вÑÐ
</div>
<div class="sect2">
<h3 id="_импорт_погружений_из_shearwater_predator_иÑпользуÑ_bluetooth">16.5. Импорт погружений из Shearwater Predator иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Bluetooth</h3>
+>>>>>>> v4.4-branch
<div class="admonitionblock">
<table><tr>
<td class="icon">
@@ -4852,6 +5189,9 @@ UDDF-файл Ð´Ð»Ñ ÐºÐ°Ð¶Ð´Ð¾Ð³Ð¾ погружениÑ. Выделите вÑÐ
</ol></div>
</div>
<div class="sect2">
+<<<<<<< HEAD
+<h3 id="_ÑкÑпорт_погружений_из_mares_dive_organiser_v2_1">17.2. ЭкÑпорт погружений из Mares Dive Organiser V2.1</h3>
+=======
<h3 id="_ÑкÑпорт_погружений_из_atomic_logbook">17.2. ЭкÑпорт погружений из Atomic Logbook</h3>
<div class="admonitionblock" id="Atomic_Export">
<table><tr>
@@ -4867,6 +5207,7 @@ Windows. Оно позволÑет загружать журналы погруÐ
</div>
<div class="sect2">
<h3 id="_ÑкÑпорт_погружений_из_mares_dive_organiser_v2_1">17.3. ЭкÑпорт погружений из Mares Dive Organiser V2.1</h3>
+>>>>>>> v4.4-branch
<div class="admonitionblock" id="Mares_Export">
<table><tr>
<td class="icon">
@@ -4907,7 +5248,11 @@ Windows. Оно позволÑет загружать журналы погруÐ
</ol></div>
</div>
<div class="sect2">
+<<<<<<< HEAD
+<h3 id="S_ImportingDivinglog">17.3. ЭкÑпорт погружений из <strong>DivingLog 5.0</strong></h3>
+=======
<h3 id="S_ImportingDivinglog">17.4. ЭкÑпорт погружений из <strong>DivingLog 5.0</strong></h3>
+>>>>>>> v4.4-branch
<div class="admonitionblock">
<table><tr>
<td class="icon">
@@ -4941,6 +5286,15 @@ Language</em> и нажмите кнопку <em>Metric</em>). Затем вып
</div>
</div>
<div class="sect1">
+<<<<<<< HEAD
+<h2 id="_приложение_г_чаÑтые_вопроÑÑ‹_и_ответы">18. ПРИЛОЖЕÐИЕ Г: ЧаÑтые вопроÑÑ‹ и ответы</h2>
+<div class="sectionbody">
+<div class="sect2">
+<h3 id="_похоже_что_em_subsurface_em_неправильно_Ñчитает_раÑход_газов_и_sac">18.1. Похоже, что <em>Subsurface</em> неправильно Ñчитает раÑход газов и SAC</h3>
+<div class="paragraph" id="SAC_CALCULATION"><p><em>ВопроÑ</em>: Я погружалÑÑ Ñ Ð±Ð°Ð»Ð»Ð¾Ð½Ð¾Ð¼ 12.2л, начальное давление 220бар, конечное -
+100 бар. Мои раÑчеты SAC не Ñовпадают Ñо значением в <em>Subsurface</em>. Возможно
+ли, что <em>Subsurface</em> Ñчитает неверно?</p></div>
+=======
<h2 id="S_Appendix_D">18. ПРИЛОЖЕÐИЕ Г: ЭкÑпорт Ñлектронных таблиц в CSV-формат</h2>
<div class="sectionbody">
<div class="paragraph"><p>Многие дайверы ведут журнал погружений в каком-либо Ñлектронном формате, зачаÑтую в виде таблицы
@@ -5078,6 +5432,7 @@ GPS-координаты. Следует иÑпользоватьÑÑ Ð´ÐµÑÑÑ‚
<h3 id="_похоже_что_em_subsurface_em_неправильно_Ñчитает_раÑход_газов_и_sac">19.1. Похоже, что <em>Subsurface</em> неправильно Ñчитает раÑход газов и SAC</h3>
<div class="paragraph" id="SAC_CALCULATION"><p><em>ВопроÑ</em>: Я погружалÑÑ Ñ Ð±Ð°Ð»Ð»Ð¾Ð½Ð¾Ð¼ 12.2л, начальное давление 220бар, конечное - 100 бар. Мои раÑчеты
SAC не Ñовпадают Ñо значением в <em>Subsurface</em>. Возможно ли, что <em>Subsurface</em> Ñчитает неверно?</p></div>
+>>>>>>> v4.4-branch
<div class="paragraph"><p><em>Ответ</em>: Ðет. <em>Subsurface</em> раÑÑчитывает раÑход газа иначе, и даже лучше, чем вы
ожидаете. Ð’ чаÑтноÑти, мы принимаем во внимание неÑжимаемоÑÑ‚ÑŒ газа.
Традиционно, раÑход и SAC ÑчитаютÑÑ Ð¿Ð¾ формуле:
@@ -5104,7 +5459,11 @@ SAC не Ñовпадают Ñо значением в <em>Subsurface</em>. Во
воздух ведет ÑÐµÐ±Ñ Ð¿Ð¾Ñ‡Ñ‚Ð¸ как идеальный газ.</p></div>
</div>
<div class="sect2">
+<<<<<<< HEAD
+<h3 id="_на_некоторых_профилÑÑ…_наблюдаютÑÑ_различиÑ_во_времени_Ñ_данных_дайв_компьютера_8230">18.2. Ðа некоторых профилÑÑ… наблюдаютÑÑ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ Ð²Ð¾ времени Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… дайв-компьютера&#8230;</h3>
+=======
<h3 id="_на_некоторых_профилÑÑ…_наблюдаютÑÑ_различиÑ_во_времени_Ñ_данных_дайв_компьютера_8230">19.2. Ðа некоторых профилÑÑ… наблюдаютÑÑ Ñ€Ð°Ð·Ð»Ð¸Ñ‡Ð¸Ñ Ð²Ð¾ времени Ñ Ð´Ð°Ð½Ð½Ñ‹Ñ… дайв-компьютера&#8230;</h3>
+>>>>>>> v4.4-branch
<div class="paragraph"><p><em>Subsurface</em> игнорирует поверхноÑтное Ð²Ñ€ÐµÐ¼Ñ Ð¿Ñ€Ð¸ различных раÑчетах (ÑреднÑÑ
глубина, Ð²Ñ€ÐµÐ¼Ñ Ð´Ð°Ð¹Ð²Ð°, SAC и Ñ‚.д)</p></div>
<div class="paragraph"><p><em>ВопроÑ</em>: почему Ð²Ñ€ÐµÐ¼Ñ Ð¿Ð¾Ð³Ñ€ÑƒÐ¶ÐµÐ½Ð¸Ñ Ð½Ð° дайв-компьютере и в <em>Subsurface</em> различаютÑÑ?</p></div>
@@ -5124,7 +5483,11 @@ SAC не Ñовпадают Ñо значением в <em>Subsurface</em>. Во
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
+<<<<<<< HEAD
+ПоÑледнее обновление 2015-02-04 13:41:50 PST
+=======
ПоÑледнее обновление 2015-02-17 08:49:01 PST
+>>>>>>> v4.4-branch
</div>
</div>
</body>
diff --git a/Documentation/user-manual_ru.txt b/Documentation/user-manual_ru.txt
index c6f5f1788..ed0877fca 100644
--- a/Documentation/user-manual_ru.txt
+++ b/Documentation/user-manual_ru.txt
@@ -3628,6 +3628,7 @@ Divemanager 3 (DM3) - ÑÑ‚Ð°Ñ€Ð°Ñ Ð²ÐµÑ€ÑÐ¸Ñ Ð¶ÑƒÑ€Ð½Ð°Ð»Ð° погруженÐ
=== ЭкÑпорт погружений из Atomic Logbook
[[Atomic_Export]]
+[icon="images/icons/atomiclogo.jpg"]
[NOTE]
ÐšÐ¾Ð¼Ð¿Ð°Ð½Ð¸Ñ Atomic Aquatics предлагает ÑобÑтвенное программное обеÑпечение Atomic Logbook Ð´Ð»Ñ Ð¿Ð»Ð°Ñ‚Ñ„Ð¾Ñ€Ð¼Ñ‹
Windows. Оно позволÑет загружать журналы погружений Ñ ÐºÐ¾Ð¼Ð¿ÑŒÑŽÑ‚ÐµÑ€Ð¾Ð² Cobalt и Cobalt 2. Журнал хранитÑÑ
diff --git a/dive.c b/dive.c
index fe7807c5e..758368615 100644
--- a/dive.c
+++ b/dive.c
@@ -13,6 +13,7 @@
* it's used in the UI, but it seems to make the most sense to have it
* here */
struct dive displayed_dive;
+struct dive_site displayed_dive_site;
struct tag_entry *g_tag_list = NULL;
@@ -437,7 +438,6 @@ void clear_dive(struct dive *d)
/* free the strings */
free(d->buddy);
free(d->divemaster);
- free(d->location);
free(d->notes);
free(d->suit);
/* free tags, additional dive computers, and pictures */
@@ -463,7 +463,6 @@ void copy_dive(struct dive *s, struct dive *d)
*d = *s;
d->buddy = copy_string(s->buddy);
d->divemaster = copy_string(s->divemaster);
- d->location = copy_string(s->location);
d->notes = copy_string(s->notes);
d->suit = copy_string(s->suit);
for (int i = 0; i < MAX_CYLINDERS; i++)
@@ -500,7 +499,6 @@ void selective_copy_dive(struct dive *s, struct dive *d, struct dive_components
{
if (clear)
clear_dive(d);
- CONDITIONAL_COPY_STRING(location);
CONDITIONAL_COPY_STRING(notes);
CONDITIONAL_COPY_STRING(divemaster);
CONDITIONAL_COPY_STRING(buddy);
@@ -509,10 +507,8 @@ void selective_copy_dive(struct dive *s, struct dive *d, struct dive_components
d->rating = s->rating;
if (what.visibility)
d->visibility = s->visibility;
- if (what.gps) {
- d->longitude = s->longitude;
- d->latitude = s->latitude;
- }
+ if (what.divesite)
+ d->dive_site_uuid = s->dive_site_uuid;
if (what.tags)
STRUCTURED_LIST_COPY(struct tag_entry, s->tag_list, d->tag_list, copy_tl);
if (what.cylinders)
@@ -2699,7 +2695,7 @@ int count_dives_with_location(const char *location)
struct dive *d;
for_each_dive (i, d) {
- if (same_string(d->location, location))
+ if (same_string(get_dive_location(d), location))
counter++;
}
return counter;
@@ -2744,9 +2740,6 @@ struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer
res->when = dl ? dl->when : a->when;
res->selected = a->selected || b->selected;
merge_trip(res, a, b);
- MERGE_NONZERO(res, a, b, latitude.udeg);
- MERGE_NONZERO(res, a, b, longitude.udeg);
- MERGE_TXT(res, a, b, location);
MERGE_TXT(res, a, b, notes);
MERGE_TXT(res, a, b, buddy);
MERGE_TXT(res, a, b, divemaster);
@@ -2766,7 +2759,7 @@ struct dive *merge_dives(struct dive *a, struct dive *b, int offset, bool prefer
interleave_dive_computers(&res->dc, &a->dc, &b->dc, offset);
else
join_dive_computers(&res->dc, &a->dc, &b->dc, 0);
-
+ res->dive_site_uuid = a->dive_site_uuid ?: b->dive_site_uuid;
fixup_dive(res);
return res;
}
@@ -2931,9 +2924,10 @@ unsigned int dive_get_picture_count(struct dive *d)
void dive_set_geodata_from_picture(struct dive *d, struct picture *pic)
{
- if (!d->latitude.udeg && pic->latitude.udeg) {
- d->latitude = pic->latitude;
- d->longitude = pic->longitude;
+ struct dive_site *ds = get_dive_site_by_uuid(d->dive_site_uuid);
+ if (!dive_site_has_gps_location(ds) && (pic->latitude.udeg || pic->longitude.udeg)) {
+ ds->latitude = pic->latitude;
+ ds->longitude = pic->longitude;
}
}
diff --git a/dive.h b/dive.h
index b350527a7..8247a5f50 100644
--- a/dive.h
+++ b/dive.h
@@ -8,6 +8,7 @@
#include <zip.h>
#include <sqlite3.h>
#include <string.h>
+#include "divesite.h"
/* Windows has no MIN/MAX macros - so let's just roll our own */
#define MIN(x, y) ({ \
@@ -47,6 +48,8 @@ extern "C" {
#include <stdbool.h>
#endif
+extern int last_xml_version;
+
enum dive_comp_type {OC, CCR, PSCR, FREEDIVE, NUM_DC_TYPE}; // Flags (Open-circuit and Closed-circuit-rebreather) for setting dive computer type
enum cylinderuse {OC_GAS, DILUENT, OXYGEN, NUM_GAS_USE}; // The different uses for cylinders
@@ -318,11 +321,10 @@ struct dive {
bool hidden_by_filter;
bool downloaded;
timestamp_t when;
- char *location;
+ uint32_t dive_site_uuid;
char *notes;
char *divemaster, *buddy;
int rating;
- degrees_t latitude, longitude;
int visibility; /* 0 - 5 star rating */
cylinder_t cylinder[MAX_CYLINDERS];
weightsystem_t weightsystem[MAX_WEIGHTSYSTEMS];
@@ -347,14 +349,13 @@ extern int get_cylinder_idx_by_use(struct dive *dive, enum cylinderuse cylinder_
/* when selectively copying dive information, which parts should be copied? */
struct dive_components {
- unsigned int location : 1;
+ unsigned int divesite : 1;
unsigned int notes : 1;
unsigned int divemaster : 1;
unsigned int buddy : 1;
unsigned int suit : 1;
unsigned int rating : 1;
unsigned int visibility : 1;
- unsigned int gps : 1;
unsigned int tags : 1;
unsigned int cylinders : 1;
unsigned int weights : 1;
@@ -386,22 +387,6 @@ extern void dive_set_geodata_from_picture(struct dive *d, struct picture *pic);
extern int explicit_first_cylinder(struct dive *dive, struct divecomputer *dc);
-static inline int dive_has_gps_location(struct dive *dive)
-{
- return dive->latitude.udeg || dive->longitude.udeg;
-}
-
-static inline void copy_gps_location(struct dive *from, struct dive *to)
-{
- if (from && to) {
- to->latitude.udeg = from->latitude.udeg;
- to->longitude.udeg = from->longitude.udeg;
- if (!to->location) {
- to->location = strdup(from->location);
- }
- }
-}
-
static inline int get_surface_pressure_in_mbar(const struct dive *dive, bool non_null)
{
int mbar = dive->surface_pressure.mbar;
@@ -489,18 +474,12 @@ struct dive_table {
extern struct dive_table dive_table;
extern struct dive displayed_dive;
+extern struct dive_site displayed_dive_site;
extern int selected_dive;
extern unsigned int dc_number;
#define current_dive (get_dive(selected_dive))
#define current_dc (get_dive_dc(current_dive, dc_number))
-static inline struct dive *get_gps_location(int nr, struct dive_table *table)
-{
- if (nr >= table->nr || nr < 0)
- return NULL;
- return table->dives[nr];
-}
-
static inline struct dive *get_dive(int nr)
{
if (nr >= dive_table.nr || nr < 0)
@@ -515,6 +494,21 @@ static inline struct dive *get_dive_from_table(int nr, struct dive_table *dt)
return dt->dives[nr];
}
+static inline struct dive_site *get_dive_site_for_dive(struct dive *dive)
+{
+ if (dive)
+ return get_dive_site_by_uuid(dive->dive_site_uuid);
+ return NULL;
+}
+
+static inline char *get_dive_location(struct dive *dive)
+{
+ struct dive_site *ds = get_dive_site_by_uuid(dive->dive_site_uuid);
+ if (ds && ds->name)
+ return ds->name;
+ return NULL;
+}
+
static inline unsigned int number_of_computers(struct dive *dive)
{
unsigned int total_number = 0;
@@ -613,6 +607,16 @@ static inline int get_idx_by_uniq_id(int id)
return i;
}
+static inline bool dive_site_has_gps_location(struct dive_site *ds)
+{
+ return ds && (ds->latitude.udeg || ds->longitude.udeg);
+}
+
+static inline int dive_has_gps_location(struct dive *dive)
+{
+ return dive_site_has_gps_location(get_dive_site_by_uuid(dive->dive_site_uuid));
+}
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/divelist.c b/divelist.c
index f1dd7006c..d57188a68 100644
--- a/divelist.c
+++ b/divelist.c
@@ -678,9 +678,9 @@ void add_dive_to_trip(struct dive *dive, dive_trip_t *trip)
dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive)
{
dive_trip_t *dive_trip = calloc(1, sizeof(dive_trip_t));
+
dive_trip->when = dive->when;
- if (dive->location)
- dive_trip->location = strdup(dive->location);
+ dive_trip->location = copy_string(get_dive_location(dive));
insert_trip(&dive_trip);
dive->tripflag = IN_TRIP;
@@ -713,8 +713,8 @@ void autogroup_dives(void)
if (lastdive && dive->when < lastdive->when + TRIP_THRESHOLD) {
dive_trip_t *trip = lastdive->divetrip;
add_dive_to_trip(dive, trip);
- if (dive->location && !trip->location)
- trip->location = strdup(dive->location);
+ if (get_dive_location(dive) && !trip->location)
+ trip->location = copy_string(get_dive_location(dive));
lastdive = dive;
continue;
}
@@ -745,7 +745,6 @@ void delete_single_dive(int idx)
dive_table.dives[--dive_table.nr] = NULL;
/* free all allocations */
free(dive->dc.sample);
- free((void *)dive->location);
free((void *)dive->notes);
free((void *)dive->divemaster);
free((void *)dive->buddy);
diff --git a/dives/test50.xml b/dives/test50.xml
new file mode 100644
index 000000000..36df5b38e
--- /dev/null
+++ b/dives/test50.xml
@@ -0,0 +1,28 @@
+<divelog program='subsurface' version='2'>
+<settings>
+</settings>
+<dives>
+<dive number='1' date='2015-1-1' time='10:00:00' duration='30:00 min'>
+ <location gps='7.132557 134.224213'>Blue Corner</location>
+ <notes>This dive is at the Blue Corner with the correct coordinates</notes>
+ <divecomputer model='Heinrichs Weikamp OSTC 3' deviceid='01234567' diveid='76543210'>
+ <depth max='30.00 m' mean='17.72 m' />
+ </divecomputer>
+</dive>
+<dive number='2' date='2015-1-2' time='10:00:00' duration='30:00 min'>
+ <location gps='7.132557 134.224213'>Yellow Corner</location>
+ <notes>This dive is at the Yellow Corner but with the coordinates of Blue Corner</notes>
+ <divecomputer model='Heinrichs Weikamp OSTC 3' deviceid='01234567' diveid='76543210'>
+ <depth max='30.00 m' mean='17.72 m' />
+ </divecomputer>
+</dive>
+<dive number='1' date='2015-1-3' time='10:00:00' duration='30:00 min'>
+ <location>Blue Corner</location>
+ <location gps='7.132557 34.224213'>Blue Corner</location>
+ <notes>This dive is at the Blue Corner but the coordinates are wrong. In order to trigger the right behavior here I had to mess with the XML file; it contains two sets of location tags, the first just with the name and only the second then adds the gps coordinates. Otherwise the gps coordinates get parsed first and create a new dive site and we don't even notice the duplicate name.</notes>
+ <divecomputer model='Heinrichs Weikamp OSTC 3' deviceid='01234567' diveid='76543210'>
+ <depth max='30.00 m' mean='17.72 m' />
+ </divecomputer>
+</dive>
+</dives>
+</divelog>
diff --git a/divesite.c b/divesite.c
new file mode 100644
index 000000000..f7f6afea1
--- /dev/null
+++ b/divesite.c
@@ -0,0 +1,122 @@
+/* divesite.c */
+#include "divesite.h"
+#include "dive.h"
+
+struct dive_site_table dive_site_table;
+
+/* there could be multiple sites of the same name - return the first one */
+uint32_t get_dive_site_uuid_by_name(const char *name, struct dive_site **dsp)
+{
+ int i;
+ struct dive_site *ds;
+ for_each_dive_site (i, ds) {
+ if (same_string(ds->name, name)) {
+ if (dsp)
+ *dsp = ds;
+ return ds->uuid;
+ }
+ }
+ return 0;
+}
+
+/* there could be multiple sites at the same GPS fix - return the first one */
+uint32_t get_dive_site_uuid_by_gps(degrees_t latitude, degrees_t longitude, struct dive_site **dsp)
+{
+ int i;
+ struct dive_site *ds;
+ for_each_dive_site (i, ds) {
+ if (ds->latitude.udeg == latitude.udeg && ds->longitude.udeg == longitude.udeg) {
+ if (dsp)
+ *dsp = ds;
+ return ds->uuid;
+ }
+ }
+ return 0;
+}
+
+/* try to create a uniqe ID - fingers crossed */
+static uint32_t dive_site_getUniqId()
+{
+ uint32_t id = 0;
+
+ while (id == 0 || get_dive_site_by_uuid(id)) {
+ id = rand() & 0xff;
+ id |= (rand() & 0xff) << 8;
+ id |= (rand() & 0xff) << 16;
+ id |= (rand() & 0xff) << 24;
+ }
+
+ return id;
+}
+
+struct dive_site *alloc_dive_site()
+{
+ int nr = dive_site_table.nr, allocated = dive_site_table.allocated;
+ struct dive_site **sites = dive_site_table.dive_sites;
+
+ if (nr >= allocated) {
+ allocated = (nr + 32) * 3 / 2;
+ sites = realloc(sites, allocated * sizeof(struct dive_site *));
+ if (!sites)
+ exit(1);
+ dive_site_table.dive_sites = sites;
+ dive_site_table.allocated = allocated;
+ }
+ struct dive_site *ds = calloc(1, sizeof(*ds));
+ if (!ds)
+ exit(1);
+ sites[nr] = ds;
+ dive_site_table.nr = nr + 1;
+ ds->uuid = dive_site_getUniqId();
+ return ds;
+}
+
+void delete_dive_site(uint32_t id)
+{
+ int nr = dive_site_table.nr;
+ for (int i = 0; i < nr; i++) {
+ struct dive_site *ds = get_dive_site(i);
+ if (ds->uuid == id) {
+ free(ds->name);
+ free(ds->notes);
+ free(ds);
+ if (nr - 1 > i)
+ memmove(&dive_site_table.dive_sites[i],
+ &dive_site_table.dive_sites[i+1],
+ (nr - 1 - i) * sizeof(dive_site_table.dive_sites[0]));
+ dive_site_table.nr = nr - 1;
+ break;
+ }
+ }
+}
+
+/* allocate a new site and add it to the table */
+uint32_t create_dive_site(const char *name)
+{
+ struct dive_site *ds = alloc_dive_site();
+ ds->name = copy_string(name);
+
+ return ds->uuid;
+}
+
+/* same as before, but with GPS data */
+uint32_t create_dive_site_with_gps(const char *name, degrees_t latitude, degrees_t longitude)
+{
+ struct dive_site *ds = alloc_dive_site();
+ ds->uuid = dive_site_getUniqId();
+ ds->name = copy_string(name);
+ ds->latitude = latitude;
+ ds->longitude = longitude;
+
+ return ds->uuid;
+}
+
+/* a uuid is always present - but if all the other fields are empty, the dive site is pointless */
+bool dive_site_is_empty(struct dive_site *ds)
+{
+ return same_string(ds->name, "") &&
+ same_string(ds->description, "") &&
+ same_string(ds->notes, "") &&
+ ds->latitude.udeg == 0 &&
+ ds->longitude.udeg == 0;
+}
diff --git a/divesite.h b/divesite.h
new file mode 100644
index 000000000..ca650259a
--- /dev/null
+++ b/divesite.h
@@ -0,0 +1,61 @@
+#ifndef DIVESITE_H
+#define DIVESITE_H
+
+#include "units.h"
+#include <stdlib.h>
+
+#ifdef __cplusplus
+extern "C" {
+#else
+#include <stdbool.h>
+#endif
+
+struct dive_site
+{
+ uint32_t uuid;
+ char *name;
+ degrees_t latitude, longitude;
+ char *description;
+ char *notes;
+};
+
+struct dive_site_table {
+ int nr, allocated;
+ struct dive_site **dive_sites;
+};
+
+extern struct dive_site_table dive_site_table;
+
+static inline struct dive_site *get_dive_site(int nr)
+{
+ if (nr >= dive_site_table.nr || nr < 0)
+ return NULL;
+ return dive_site_table.dive_sites[nr];
+}
+
+/* iterate over each dive site */
+#define for_each_dive_site(_i, _x) \
+ for ((_i) = 0; ((_x) = get_dive_site(_i)) != NULL; (_i)++)
+
+static inline struct dive_site *get_dive_site_by_uuid(uint32_t uuid)
+{
+ int i;
+ struct dive_site *ds;
+ for_each_dive_site (i, ds)
+ if (ds->uuid == uuid)
+ return get_dive_site(i);
+ return NULL;
+}
+
+struct dive_site *alloc_dive_site();
+void delete_dive_site(uint32_t id);
+uint32_t create_dive_site(const char *name);
+uint32_t create_dive_site_with_gps(const char *name, degrees_t latitude, degrees_t longitude);
+uint32_t get_dive_site_uuid_by_name(const char *name, struct dive_site **dsp);
+uint32_t get_dive_site_uuid_by_gps(degrees_t latitude, degrees_t longitude, struct dive_site **dsp);
+bool dive_site_is_empty(struct dive_site *ds);
+
+#ifdef __cplusplus
+}
+#endif
+#endif // DIVESITE_H
diff --git a/git-access.c b/git-access.c
new file mode 100644
index 000000000..99dfe3766
--- /dev/null
+++ b/git-access.c
@@ -0,0 +1,274 @@
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <git2.h>
+
+#include "dive.h"
+#include "membuffer.h"
+
+/*
+ * The libgit2 people are incompetent at making libraries. They randomly change
+ * the interfaces, often just renaming things without any sane way to know which
+ * version you should check for etc etc. It's a disgrace.
+ */
+#if !LIBGIT2_VER_MAJOR && LIBGIT2_VER_MINOR < 22
+ #define git_remote_lookup(res, repo, name) git_remote_load(res, repo, name)
+ #define git_remote_fetch(remote, refspecs, signature, reflog) git_remote_fetch(remote, signature, reflog)
+#endif
+
+static char *get_local_dir(const char *remote, const char *branch)
+{
+ SHA_CTX ctx;
+ unsigned char hash[20];
+
+ // That zero-byte update is so that we don't get hash
+ // collisions for "repo1 branch" vs "repo 1branch".
+ SHA1_Init(&ctx);
+ SHA1_Update(&ctx, remote, strlen(remote));
+ SHA1_Update(&ctx, "", 1);
+ SHA1_Update(&ctx, branch, strlen(branch));
+ SHA1_Final(hash, &ctx);
+
+ return format_string("%s/%02x%02x%02x%02x%02x%02x%02x%02x",
+ system_default_directory(),
+ hash[0], hash[1], hash[2], hash[3],
+ hash[4], hash[5], hash[6], hash[7]);
+}
+
+static int check_clean(const char *path, unsigned int status, void *payload)
+{
+ status &= ~GIT_STATUS_CURRENT | GIT_STATUS_IGNORED;
+ if (!status)
+ return 0;
+ report_error("WARNING: Git cache directory modified (path %s)", path);
+ return 1;
+}
+
+static int try_to_update(git_repository *rep, git_reference *local, git_reference *remote)
+{
+ if (!git_reference_cmp(local, remote))
+ return 0;
+ return report_error("Local and remote do not match, not updating");
+}
+
+static git_repository *update_local_repo(const char *localdir, const char *remote, const char *branch)
+{
+ int error;
+ git_repository *repo = NULL;
+ git_remote *origin;
+ git_reference *local_ref, *remote_ref;
+
+ error = git_repository_open(&repo, localdir);
+ if (error) {
+ report_error("Unable to open git cache repository at %s: %s",
+ localdir, giterr_last()->message);
+ return NULL;
+ }
+
+ /*
+ * NOTE! Remote errors are reported, but are nonfatal:
+ * we still successfully return the local repository.
+ */
+ error = git_remote_lookup(&origin, repo, "origin");
+ if (error) {
+ report_error("Repository '%s' origin lookup failed (%s)",
+ remote, giterr_last()->message);
+ return repo;
+ }
+
+ // NOTE! A fetch error is not fatal, we just report it
+ error = git_remote_fetch(origin, NULL, NULL, NULL);
+ git_remote_free(origin);
+ if (error) {
+ report_error("Unable to update cache for remote '%s'", remote);
+ return repo;
+ }
+
+ // Dirty modified state in the working tree? We're not going
+ // to tru to update
+ if (git_status_foreach(repo, check_clean, NULL))
+ return repo;
+
+ if (git_branch_lookup(&local_ref, repo, branch, GIT_BRANCH_LOCAL)) {
+ report_error("Git cache branch %s no longer exists", branch);
+ return repo;
+ }
+
+ if (git_branch_upstream(&remote_ref, local_ref)) {
+ report_error("Git cache branch %s no longer has an upstream branch", branch);
+ git_reference_free(local_ref);
+ return repo;
+ }
+
+ try_to_update(repo, local_ref, remote_ref);
+ git_reference_free(local_ref);
+ git_reference_free(remote_ref);
+ return repo;
+}
+
+static git_repository *create_local_repo(const char *localdir, const char *remote, const char *branch)
+{
+ int error;
+ git_repository *cloned_repo = NULL;
+ git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
+
+ opts.checkout_branch = branch;
+ error = git_clone(&cloned_repo, remote, localdir, &opts);
+ if (error) {
+ report_error("git clone of %s failed (%s)", remote, giterr_last()->message);
+ return NULL;
+ }
+ return cloned_repo;
+}
+
+static struct git_repository *get_remote_repo(const char *localdir, const char *remote, const char *branch)
+{
+ struct stat st;
+
+ /* Do we already have a local cache? */
+ if (!stat(localdir, &st)) {
+ if (!S_ISDIR(st.st_mode)) {
+ report_error("local git cache at '%s' is corrupt");
+ return NULL;
+ }
+ return update_local_repo(localdir, remote, branch);
+ }
+ return create_local_repo(localdir, remote, branch);
+}
+
+/*
+ * This turns a remote repository into a local one if possible.
+ *
+ * The recognized formats are
+ * git://host/repo[branch]
+ * ssh://host/repo[branch]
+ * http://host/repo[branch]
+ * https://host/repo[branch]
+ * file://repo[branch]
+ */
+static struct git_repository *is_remote_git_repository(const char *remote, const char *branch)
+{
+ char c, *localdir;
+ const char *p = remote;
+
+ while ((c = *p++) >= 'a' && c <= 'z')
+ /* nothing */;
+ if (c != ':')
+ return NULL;
+ if (*p++ != '/' || *p++ != '/')
+ return NULL;
+
+ /* Special-case "file://", since it's already local */
+ if (!strncmp(remote, "file://", 7))
+ remote += 7;
+
+ /*
+ * Ok, we found "[a-z]*://", we've simplified the
+ * local repo case (because libgit2 is insanely slow
+ * for that), and we think we have a real "remote
+ * git" format.
+ *
+ * We now create the SHA1 hash of the whole thing,
+ * including the branch name. That will be our unique
+ * unique local repository name.
+ *
+ * NOTE! We will create a local repository per branch,
+ * because
+ *
+ * (a) libgit2 remote tracking branch support seems to
+ * be a bit lacking
+ * (b) we'll actually check the branch out so that we
+ * can do merges etc too.
+ *
+ * so even if you have a single remote git repo with
+ * multiple branches for different people, the local
+ * caches will sadly force that to split into multiple
+ * individual repositories.
+ */
+ localdir = get_local_dir(remote, branch);
+ if (!localdir)
+ return NULL;
+
+ return get_remote_repo(localdir, remote, branch);
+}
+
+/*
+ * If it's not a git repo, return NULL. Be very conservative.
+ */
+struct git_repository *is_git_repository(const char *filename, const char **branchp)
+{
+ int flen, blen, ret;
+ struct stat st;
+ git_repository *repo;
+ char *loc, *branch;
+
+ flen = strlen(filename);
+ if (!flen || filename[--flen] != ']')
+ return NULL;
+
+ /* Find the matching '[' */
+ blen = 0;
+ while (flen && filename[--flen] != '[')
+ blen++;
+
+ /* Ignore slashes at the end of the repo name */
+ while (flen && filename[flen-1] == '/')
+ flen--;
+
+ if (!flen)
+ return NULL;
+
+ /*
+ * This is the "point of no return": the name matches
+ * the git repository name rules, and we will no longer
+ * return NULL.
+ *
+ * We will either return "dummy_git_repository" and the
+ * branch pointer will have the _whole_ filename in it,
+ * or we will return a real git repository with the
+ * branch pointer being filled in with just the branch
+ * name.
+ *
+ * The actual git reading/writing routines can use this
+ * to generate proper error messages.
+ */
+ *branchp = filename;
+ loc = format_string("%.*s", flen, filename);
+ if (!loc)
+ return dummy_git_repository;
+
+ branch = format_string("%.*s", blen, filename+flen+1);
+ if (!branch) {
+ free(loc);
+ return dummy_git_repository;
+ }
+
+ repo = is_remote_git_repository(loc, branch);
+ if (repo) {
+ free(loc);
+ *branchp = branch;
+ return repo;
+ }
+
+ if (stat(loc, &st) < 0 || !S_ISDIR(st.st_mode)) {
+ free(loc);
+ free(branch);
+ return dummy_git_repository;
+ }
+
+ ret = git_repository_open(&repo, loc);
+ free(loc);
+ if (ret < 0) {
+ free(branch);
+ return dummy_git_repository;
+ }
+ *branchp = branch;
+ return repo;
+}
diff --git a/liquivision.c b/liquivision.c
index a42c35aab..7126c9b79 100644
--- a/liquivision.c
+++ b/liquivision.c
@@ -121,21 +121,24 @@ static void parse_dives (int log_version, const unsigned char *buf, unsigned int
// Dive location, assemble Location and Place
unsigned int len, place_len;
+ char *location;
len = array_uint32_le(buf + ptr);
ptr += 4;
place_len = array_uint32_le(buf + ptr + len);
if (len && place_len) {
- dive->location = malloc(len + place_len + 4);
- memset(dive->location, 0, len + place_len + 4);
- memcpy(dive->location, buf + ptr, len);
- memcpy(dive->location + len, ", ", 2);
- memcpy(dive->location + len + 2, buf + ptr + len + 4, place_len);
+ location = malloc(len + place_len + 4);
+ memset(location, 0, len + place_len + 4);
+ memcpy(location, buf + ptr, len);
+ memcpy(location + len, ", ", 2);
+ memcpy(location + len + 2, buf + ptr + len + 4, place_len);
} else if (len) {
- dive->location = strndup(buf + ptr, len);
+ location = strndup(buf + ptr, len);
} else if (place_len) {
- dive->location = strndup(buf + ptr + len + 4, place_len);
+ location = strndup(buf + ptr + len + 4, place_len);
}
+ dive->dive_site_uuid = create_dive_site(location);
+ free(location);
ptr += len + 4 + place_len;
diff --git a/load-git.c b/load-git.c
index 1cdb44cff..053a7140e 100644
--- a/load-git.c
+++ b/load-git.c
@@ -10,6 +10,8 @@
#include <fcntl.h>
#include <git2.h>
+#include "gettext.h"
+
#include "dive.h"
#include "device.h"
#include "membuffer.h"
@@ -23,13 +25,6 @@ struct keyword_action {
#define ARRAY_SIZE(array) (sizeof(array)/sizeof(array[0]))
extern degrees_t parse_degrees(char *buf, char **end);
-static void parse_dive_gps(char *line, struct membuffer *str, void *_dive)
-{
- struct dive *dive = _dive;
-
- dive->latitude = parse_degrees(line, &line);
- dive->longitude = parse_degrees(line, &line);
-}
static char *get_utf8(struct membuffer *b)
{
@@ -145,8 +140,59 @@ static int get_index(const char *line)
static int get_hex(const char *line)
{ return strtoul(line, NULL, 16); }
+/* this is in qthelper.cpp, so including the .h file is a pain */
+extern const char *printGPSCoords(int lat, int lon);
+
+static void parse_dive_gps(char *line, struct membuffer *str, void *_dive)
+{
+ uint32_t uuid;
+ degrees_t latitude = parse_degrees(line, &line);
+ degrees_t longitude = parse_degrees(line, &line);
+ struct dive *dive = _dive;
+ struct dive_site *ds = get_dive_site_for_dive(dive);
+ if (!ds) {
+ uuid = get_dive_site_uuid_by_gps(latitude, longitude, NULL);
+ if (!uuid)
+ uuid = create_dive_site_with_gps("", latitude, longitude);
+ dive->dive_site_uuid = uuid;
+ } else {
+ if (dive_site_has_gps_location(ds) &&
+ (ds->latitude.udeg != latitude.udeg || ds->longitude.udeg != longitude.udeg)) {
+ // we have a dive site that already has GPS coordinates
+ ds->notes = add_to_string(ds->notes, translate("gettextFromC", "multiple gps locations for this dive site; also %s\n"),
+ printGPSCoords(latitude.udeg, longitude.udeg));
+ }
+ ds->latitude = latitude;
+ ds->longitude = longitude;
+ }
+
+}
+
static void parse_dive_location(char *line, struct membuffer *str, void *_dive)
-{ struct dive *dive = _dive; dive->location = get_utf8(str); }
+{
+ uint32_t uuid;
+ char *name = get_utf8(str);
+ struct dive *dive = _dive;
+ struct dive_site *ds = get_dive_site_for_dive(dive);
+ fprintf(stderr, "looking for a site named {%s} ", name);
+ if (!ds) {
+ uuid = get_dive_site_uuid_by_name(name, NULL);
+ if (!uuid) { fprintf(stderr, "found none, creating\n");
+ uuid = create_dive_site(name);
+ } else { fprintf(stderr, "found one with uuid %8x\n", uuid); }
+ dive->dive_site_uuid = uuid;
+ } else {
+ // we already had a dive site linked to the dive
+ fprintf(stderr, "dive had site with uuid %8x and name {%s}\n", ds->uuid, ds->name);
+ if (same_string(ds->name, "")) {
+ ds->name = name;
+ } else {
+ // and that dive site had a name. that's weird - if our name is different, add it to the notes
+ if (!same_string(ds->name, name))
+ ds->notes = add_to_string(ds->notes, translate("gettextFromC", "additional name for site: %s\n"), name);
+ }
+ }
+}
static void parse_dive_divemaster(char *line, struct membuffer *str, void *_dive)
{ struct dive *dive = _dive; dive->divemaster = get_utf8(str); }
@@ -160,6 +206,9 @@ static void parse_dive_suit(char *line, struct membuffer *str, void *_dive)
static void parse_dive_notes(char *line, struct membuffer *str, void *_dive)
{ struct dive *dive = _dive; dive->notes = get_utf8(str); }
+static void parse_dive_divesiteid(char *line, struct membuffer *str, void *_dive)
+{ struct dive *dive = _dive; dive->dive_site_uuid = get_hex(line); }
+
/*
* We can have multiple tags in the membuffer. They are separated by
* NUL bytes.
@@ -205,6 +254,24 @@ static void parse_dive_visibility(char *line, struct membuffer *str, void *_dive
static void parse_dive_notrip(char *line, struct membuffer *str, void *_dive)
{ struct dive *dive = _dive; dive->tripflag = NO_TRIP; }
+static void parse_site_description(char *line, struct membuffer *str, void *_ds)
+{ struct dive_site *ds = _ds; ds->description = strdup(mb_cstring(str)); }
+
+static void parse_site_name(char *line, struct membuffer *str, void *_ds)
+{ struct dive_site *ds = _ds; ds->name = strdup(mb_cstring(str)); }
+
+static void parse_site_notes(char *line, struct membuffer *str, void *_ds)
+{ struct dive_site *ds = _ds; ds->notes = strdup(mb_cstring(str)); }
+
+extern degrees_t parse_degrees(char *buf, char **end);
+static void parse_site_gps(char *line, struct membuffer *str, void *_ds)
+{
+ struct dive_site *ds = _ds;
+
+ ds->latitude = parse_degrees(line, &line);
+ ds->longitude = parse_degrees(line, &line);
+}
+
/* Parse key=val parts of samples and cylinders etc */
static char *parse_keyvalue_entry(void (*fn)(void *, const char *, const char *), void *fndata, char *line)
{
@@ -672,7 +739,7 @@ static void parse_settings_userid(char *line, struct membuffer *str, void *_unus
* *can* do some day. And if we do change the version, this warning will show if
* you read with a version of subsurface that doesn't know about it.
*/
-#define VERSION 2
+#define VERSION 3
static void parse_settings_version(char *line, struct membuffer *str, void *_unused)
{
int version = atoi(line);
@@ -783,7 +850,7 @@ static void divecomputer_parser(char *line, struct membuffer *str, void *_dc)
struct keyword_action dive_action[] = {
#undef D
#define D(x) { #x, parse_dive_ ## x }
- D(airtemp), D(buddy), D(cylinder), D(divemaster), D(duration),
+ D(airtemp), D(buddy), D(cylinder), D(divemaster), D(divesiteid), D(duration),
D(gps), D(location), D(notes), D(notrip), D(rating), D(suit),
D(tags), D(visibility), D(watertemp), D(weightsystem)
};
@@ -794,6 +861,18 @@ static void dive_parser(char *line, struct membuffer *str, void *_dive)
}
/* These need to be sorted! */
+struct keyword_action site_action[] = {
+#undef D
+#define D(x) { #x, parse_site_ ## x }
+ D(description), D(gps), D(name), D(notes)
+};
+
+static void site_parser(char *line, struct membuffer *str, void *_ds)
+{
+ match_action(line, str, _ds, site_action, ARRAY_SIZE(site_action));
+}
+
+/* These need to be sorted! */
struct keyword_action trip_action[] = {
#undef D
#define D(x) { #x, parse_trip_ ## x }
@@ -1190,6 +1269,9 @@ static int walk_tree_directory(const char *root, const git_tree_entry *entry)
if (!strcmp(name, "Pictures"))
return picture_directory(root, name);
+ if (!strcmp(name, "01-Divesites"))
+ return GIT_WALK_OK;
+
while (isdigit(c = name[digits]))
digits++;
@@ -1284,6 +1366,20 @@ static int parse_dive_entry(git_repository *repo, const git_tree_entry *entry, c
return 0;
}
+static int parse_site_entry(git_repository *repo, const git_tree_entry *entry, const char *suffix)
+{
+ if (*suffix == '\0')
+ return report_error("Dive site without uuid");
+ struct dive_site *ds = alloc_dive_site();
+ ds->uuid = strtol(suffix, NULL, 16);
+ git_blob *blob = git_tree_entry_blob(repo, entry);
+ if (!blob)
+ return report_error("Unable to read dive site file");
+ for_each_line(blob, site_parser, ds);
+ git_blob_free(blob);
+ return 0;
+}
+
static int parse_trip_entry(git_repository *repo, const git_tree_entry *entry)
{
git_blob *blob = git_tree_entry_blob(repo, entry);
@@ -1343,7 +1439,6 @@ static int walk_tree_file(const char *root, const git_tree_entry *entry, git_rep
struct dive *dive = active_dive;
dive_trip_t *trip = active_trip;
const char *name = git_tree_entry_name(entry);
-
switch (*name) {
/* Picture file? They are saved as time offsets in the dive */
case '-': case '+':
@@ -1356,6 +1451,9 @@ static int walk_tree_file(const char *root, const git_tree_entry *entry, git_rep
if (dive && !strncmp(name, "Dive", 4))
return parse_dive_entry(repo, entry, name+4);
break;
+ case 'S':
+ if (!strncmp(name, "Site", 4))
+ return parse_site_entry(repo, entry, name + 5);
case '0':
if (trip && !strcmp(name, "00-Trip"))
return parse_trip_entry(repo, entry);
diff --git a/main.cpp b/main.cpp
index 295b9bd44..bc7419211 100644
--- a/main.cpp
+++ b/main.cpp
@@ -10,6 +10,7 @@
#include "subsurfacestartup.h"
#include "qt-ui/mainwindow.h"
#include "qt-ui/diveplanner.h"
+#include "qt-ui/graphicsview-common.h"
#include <QStringList>
#include <git2.h>
diff --git a/membuffer.c b/membuffer.c
index c8a06662f..2889a0cdc 100644
--- a/membuffer.c
+++ b/membuffer.c
@@ -6,12 +6,18 @@
#include "dive.h"
#include "membuffer.h"
-void free_buffer(struct membuffer *b)
+char *detach_buffer(struct membuffer *b)
{
- free(b->buffer);
+ char *result = b->buffer;
b->buffer = NULL;
b->len = 0;
b->alloc = 0;
+ return result;
+}
+
+void free_buffer(struct membuffer *b)
+{
+ free(detach_buffer(b));
}
void flush_buffer(struct membuffer *b, FILE *f)
@@ -100,6 +106,26 @@ void put_vformat(struct membuffer *b, const char *fmt, va_list args)
}
}
+/* Silly helper using membuffer */
+char *vformat_string(const char *fmt, va_list args)
+{
+ struct membuffer mb = { 0 };
+ put_vformat(&mb, fmt, args);
+ mb_cstring(&mb);
+ return detach_buffer(&mb);
+}
+
+char *format_string(const char *fmt, ...)
+{
+ va_list args;
+ char *result;
+
+ va_start(args, fmt);
+ result = vformat_string(fmt, args);
+ va_end(args);
+ return result;
+}
+
void put_format(struct membuffer *b, const char *fmt, ...)
{
va_list args;
@@ -228,3 +254,32 @@ void put_quoted(struct membuffer *b, const char *text, int is_attribute, int is_
text = p;
}
}
+
+char *add_to_string_va(const char *old, const char *fmt, va_list args)
+{
+ char *res;
+ struct membuffer o = { 0 }, n = { 0 };
+ put_vformat(&n, fmt, args);
+ put_format(&o, "%s\n%s", old ?: "", mb_cstring(&n));
+ res = strdup(mb_cstring(&o));
+ free_buffer(&o);
+ free_buffer(&n);
+ free((void *)old);
+ return res;
+}
+
+/* this is a convenience function that cleverly adds text to a string, using our membuffer
+ * infrastructure.
+ * WARNING - this will free(old), the intended pattern is
+ * string = add_to_string(string, fmt, ...)
+ */
+char *add_to_string(const char *old, const char *fmt, ...)
+{
+ char *res;
+ va_list args;
+
+ va_start(args, fmt);
+ res = add_to_string_va(old, fmt, args);
+ va_end(args);
+ return res;
+}
diff --git a/membuffer.h b/membuffer.h
index 153815fd8..434b34c71 100644
--- a/membuffer.h
+++ b/membuffer.h
@@ -18,6 +18,7 @@ struct membuffer {
#define __printf(x, y)
#endif
+extern char *detach_buffer(struct membuffer *b);
extern void free_buffer(struct membuffer *);
extern void flush_buffer(struct membuffer *, FILE *);
extern void put_bytes(struct membuffer *, const char *, int);
@@ -27,6 +28,13 @@ extern void strip_mb(struct membuffer *);
extern const char *mb_cstring(struct membuffer *);
extern __printf(2, 0) void put_vformat(struct membuffer *, const char *, va_list);
extern __printf(2, 3) void put_format(struct membuffer *, const char *fmt, ...);
+extern __printf(2, 0) char *add_to_string_va(const char *old, const char *fmt, va_list args);
+extern __printf(2, 3) char *add_to_string(const char *old, const char *fmt, ...);
+
+/* Helpers that use membuffers internally */
+extern __printf(1, 0) char *vformat_string(const char *, va_list);
+extern __printf(1, 2) char *format_string(const char *, ...);
+
/* Output one of our "milli" values with type and pre/post data */
extern void put_milli(struct membuffer *, const char *, int, const char *);
diff --git a/parse-xml.c b/parse-xml.c
index 9f1e64a0e..3c5bfe063 100644
--- a/parse-xml.c
+++ b/parse-xml.c
@@ -21,6 +21,7 @@
int verbose, quit;
int metric = 1;
+int last_xml_version = -1;
static xmlDoc *test_xslt_transforms(xmlDoc *doc, const char **params);
@@ -128,6 +129,7 @@ const struct units IMPERIAL_units = IMPERIAL_UNITS;
#define MAX_EVENT_NAME 128
static struct divecomputer *cur_dc;
static struct dive *cur_dive;
+static struct dive_site *cur_dive_site;
static dive_trip_t *cur_trip = NULL;
static struct sample *cur_sample;
static struct picture *cur_picture;
@@ -933,10 +935,8 @@ static void try_to_fill_sample(struct sample *sample, const char *name, char *bu
return;
if (MATCH("sensor3.sample", double_to_o2pressure, &sample->o2sensor[2])) // up to 3 CCR sensors
return;
- if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint)) {
- cur_dive->dc.divemode = CCR;
+ if (MATCH("po2.sample", double_to_o2pressure, &sample->setpoint))
return;
- }
if (MATCH("heartbeat", get_uint8, &sample->heartbeat))
return;
if (MATCH("bearing", get_bearing, &sample->bearing))
@@ -968,22 +968,20 @@ void try_to_fill_userid(const char *name, char *buf)
static const char *country, *city;
-static void divinglog_place(char *place, char **location)
+static void divinglog_place(char *place, uint32_t *uuid)
{
- char buffer[1024], *p;
- int len;
+ char buffer[1024];
- len = snprintf(buffer, sizeof(buffer),
- "%s%s%s%s%s",
- place,
- city ? ", " : "",
- city ? city : "",
- country ? ", " : "",
- country ? country : "");
-
- p = malloc(len + 1);
- memcpy(p, buffer, len + 1);
- *location = p;
+ snprintf(buffer, sizeof(buffer),
+ "%s%s%s%s%s",
+ place,
+ city ? ", " : "",
+ city ? city : "",
+ country ? ", " : "",
+ country ? country : "");
+ *uuid = get_dive_site_uuid_by_name(buffer, NULL);
+ if (*uuid == 0)
+ *uuid = create_dive_site(buffer);
city = NULL;
country = NULL;
@@ -1005,7 +1003,7 @@ static int divinglog_dive_match(struct dive *dive, const char *name, char *buf)
MATCH("names.buddy", utf8_string, &dive->buddy) ||
MATCH("name.country", utf8_string, &country) ||
MATCH("name.city", utf8_string, &city) ||
- MATCH("name.place", divinglog_place, &dive->location) ||
+ MATCH("name.place", divinglog_place, &dive->dive_site_uuid) ||
0;
}
@@ -1127,23 +1125,119 @@ degrees_t parse_degrees(char *buf, char **end)
static void gps_lat(char *buffer, struct dive *dive)
{
char *end;
-
- dive->latitude = parse_degrees(buffer, &end);
+ degrees_t latitude = parse_degrees(buffer, &end);
+ struct dive_site *ds = get_dive_site_for_dive(dive);
+ if (!ds) {
+ dive->dive_site_uuid = create_dive_site_with_gps(NULL, latitude, (degrees_t){0});
+ } else {
+ if (ds->latitude.udeg && ds->latitude.udeg != latitude.udeg)
+ fprintf(stderr, "Oops, changing the latitude of existing dive site id %8x name %s; not good\n", ds->uuid, ds->name ?: "(unknown)");
+ ds->latitude = latitude;
+ }
}
static void gps_long(char *buffer, struct dive *dive)
{
char *end;
+ degrees_t longitude = parse_degrees(buffer, &end);
+ struct dive_site *ds = get_dive_site_for_dive(dive);
+ if (!ds) {
+ dive->dive_site_uuid = create_dive_site_with_gps(NULL, (degrees_t){0}, longitude);
+ } else {
+ if (ds->longitude.udeg && ds->longitude.udeg != longitude.udeg)
+ fprintf(stderr, "Oops, changing the longitude of existing dive site id %8x name %s; not good\n", ds->uuid, ds->name ?: "(unknown)");
+ ds->longitude = longitude;
+ }
+
+}
+
+static void gps_location(char *buffer, struct dive_site *ds)
+{
+ char *end;
- dive->longitude = parse_degrees(buffer, &end);
+ ds->latitude = parse_degrees(buffer, &end);
+ ds->longitude = parse_degrees(end, &end);
}
-static void gps_location(char *buffer, struct dive *dive)
+/* this is in qthelper.cpp, so including the .h file is a pain */
+extern const char *printGPSCoords(int lat, int lon);
+extern void reverseGeoLookup(degrees_t, degrees_t, uint32_t);
+
+static void gps_in_dive(char *buffer, struct dive *dive)
{
char *end;
+ struct dive_site *ds = NULL;
+ degrees_t latitude = parse_degrees(buffer, &end);
+ degrees_t longitude = parse_degrees(end, &end);
+ fprintf(stderr, "got lat %f lon %f\n", latitude.udeg / 1000000.0, longitude.udeg / 1000000.0);
+ uint32_t uuid = dive->dive_site_uuid;
+ if (uuid == 0) {
+ uuid = get_dive_site_uuid_by_gps(latitude, longitude, &ds);
+ if (ds) {
+ fprintf(stderr, "found dive site {%s} with these coordinates\n", ds->name);
+ dive->dive_site_uuid = uuid;
+ } else {
+ fprintf(stderr, "found no uuid in dive, no existing dive site with these coordinates, creating a new divesite without name and above GPS\n");
+ dive->dive_site_uuid = create_dive_site_with_gps("", latitude, longitude);
+ ds = get_dive_site_by_uuid(dive->dive_site_uuid);
+ }
+ } else {
+ fprintf(stderr, "found uuid in dive, checking to see if we should add GPS\n");
+ ds = get_dive_site_by_uuid(uuid);
+ if (dive_site_has_gps_location(ds) &&
+ (latitude.udeg != 0 || longitude.udeg != 0) &&
+ (ds->latitude.udeg != latitude.udeg || ds->longitude.udeg != longitude.udeg)) {
+ // Houston, we have a problem
+ fprintf(stderr, "dive site uuid in dive, but gps location (%10.6f/%10.6f) different from dive location (%10.6f/%10.6f)\n",
+ ds->latitude.udeg / 1000000.0, ds->longitude.udeg / 1000000.0,
+ latitude.udeg / 1000000.0, longitude.udeg / 1000000.0);
+ ds->notes = add_to_string(ds->notes, translate("gettextFromC", "multiple gps locations for this dive site; also %s\n"),
+ printGPSCoords(latitude.udeg, longitude.udeg));
+ } else {
+ fprintf(stderr, "let's add the gps coordinates to divesite with uuid %8x and name %s\n", ds->uuid, ds->name ?: "(none)");
+ ds->latitude = latitude;
+ ds->longitude = longitude;
+ }
+ }
+ if (ds && (!ds->notes || strstr(ds->notes, "countrytag:") == NULL))
+ reverseGeoLookup(latitude, longitude, dive->dive_site_uuid);
+}
- dive->latitude = parse_degrees(buffer, &end);
- dive->longitude = parse_degrees(end, &end);
+static void add_dive_site(char *buffer, struct dive *dive)
+{
+ fprintf(stderr, "add_dive_site with name %s\n", buffer);
+ int size = trimspace(buffer);
+ if(size) {
+ uint32_t uuid = dive->dive_site_uuid;
+ struct dive_site *ds = get_dive_site_by_uuid(uuid);
+ if (uuid && !ds) {
+ // that's strange - we have a uuid but it doesn't exist - let's just ignore it
+ fprintf(stderr, "dive contains a non-existing dive site uuid %x\n", dive->dive_site_uuid);
+ uuid = 0;
+ }
+ if (!uuid)
+ // if the dive doesn't have a uuid, check if there's already a dive site by this name
+ uuid = get_dive_site_uuid_by_name(buffer, &ds);
+ if (ds) {
+ // we have a uuid, let's hope there isn't a different name
+ fprintf(stderr, "have existing site with name {%s} gps %f/%f ", ds->name, ds->latitude.udeg / 1000000.0, ds->longitude.udeg / 1000000.0);
+ if (same_string(ds->name, "")) {
+ fprintf(stderr, "so now add name {%s}\n", buffer);
+ ds->name = copy_string(buffer);
+ } else if (!same_string(ds->name, buffer)) {
+ // coin toss, let's just keep the first name we found and add the new one to the notes
+ fprintf(stderr, "which means the dive already links to dive site of different name {%s} / {%s}\n", ds->name, buffer);
+ ds->notes = add_to_string(ds->notes, translate("gettextFromC", "additional name for site: %s\n"), buffer);
+ } else {
+ // add the existing dive site to the current dive
+ fprintf(stderr, "we have an existing location, using {%s}\n", ds->name);
+ dive->dive_site_uuid = uuid;
+ }
+ } else {
+ fprintf(stderr, "no uuid, create new dive site with name {%s}\n", buffer);
+ dive->dive_site_uuid = create_dive_site(buffer);
+ }
+ }
}
static void gps_picture_location(char *buffer, struct picture *pic)
@@ -1173,7 +1267,8 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
default:
break;
}
-
+ if (MATCH("divesiteid", hex_value, &dive->dive_site_uuid))
+ return;
if (MATCH("number", get_index, &dive->number))
return;
if (MATCH("tags", divetags, &dive->tag_list))
@@ -1203,9 +1298,9 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
return;
if (MATCH("cylinderendpressure", pressure, &dive->cylinder[0].end))
return;
- if (MATCH("gps", gps_location, dive))
+ if (MATCH("gps", gps_in_dive, dive))
return;
- if (MATCH("Place", gps_location, dive))
+ if (MATCH("Place", gps_in_dive, dive))
return;
if (MATCH("latitude", gps_lat, dive))
return;
@@ -1219,9 +1314,9 @@ static void try_to_fill_dive(struct dive *dive, const char *name, char *buf)
return;
if (MATCH("lon", gps_long, dive))
return;
- if (MATCH("location", utf8_string, &dive->location))
+ if (MATCH("location", add_dive_site, dive))
return;
- if (MATCH("name.dive", utf8_string, &dive->location))
+ if (MATCH("name.dive", add_dive_site, dive))
return;
if (MATCH("suit", utf8_string, &dive->suit))
return;
@@ -1290,6 +1385,27 @@ static void try_to_fill_trip(dive_trip_t **dive_trip_p, const char *name, char *
nonmatch("trip", name, buf);
}
+/* We're processing a divesite entry - try to fill the components */
+static void try_to_fill_dive_site(struct dive_site **ds_p, const char *name, char *buf)
+{
+ start_match("divesite", name, buf);
+
+ struct dive_site *ds = *ds_p;
+
+ if (MATCH("uuid", hex_value, &ds->uuid))
+ return;
+ if (MATCH("name", utf8_string, &ds->name))
+ return;
+ if (MATCH("description", utf8_string, &ds->description))
+ return;
+ if (MATCH("notes", utf8_string, &ds->notes))
+ return;
+ if (MATCH("gps", gps_location, ds))
+ return;
+
+ nonmatch("divesite", name, buf);
+}
+
/*
* While in some formats file boundaries are dive boundaries, in many
* others (as for example in our native format) there are
@@ -1305,7 +1421,7 @@ static void try_to_fill_trip(dive_trip_t **dive_trip_p, const char *name, char *
static bool is_dive(void)
{
return (cur_dive &&
- (cur_dive->location || cur_dive->when || cur_dive->dc.samples));
+ (cur_dive->dive_site_uuid || cur_dive->when || cur_dive->dc.samples));
}
static void reset_dc_info(struct divecomputer *dc)
@@ -1349,6 +1465,32 @@ static void dc_settings_end(void)
reset_dc_settings();
}
+static void dive_site_start(void)
+{
+ if (cur_dive_site)
+ return;
+ cur_dive_site = calloc(1, sizeof(struct dive_site));
+}
+
+static void dive_site_end(void)
+{
+ if (!cur_dive_site)
+ return;
+ if (cur_dive_site->uuid) {
+ uint32_t tmp = create_dive_site_with_gps(cur_dive_site->name, cur_dive_site->latitude, cur_dive_site->longitude);
+ struct dive_site *ds = get_dive_site_by_uuid(tmp);
+ ds->uuid = cur_dive_site->uuid;
+ ds->notes = cur_dive_site->notes;
+ ds->description = cur_dive_site->description;
+ if (verbose > 3)
+ printf("completed dive site uuid %x8 name {%s}\n", ds->uuid, ds->name);
+ }
+ free(cur_dive_site);
+ cur_dive_site = NULL;
+}
+
+// now we need to add the code to parse the parts of the divesite enry
+
static void dive_start(void)
{
if (cur_dive)
@@ -1529,6 +1671,9 @@ static void userid_stop(void)
static void entry(const char *name, char *buf)
{
+ if (!strncmp(name, "version.program", sizeof("version.program") - 1) ||
+ !strncmp(name, "version.divelog", sizeof("version.divelog") - 1))
+ last_xml_version = atoi(buf);
if (in_userid) {
try_to_fill_userid(name, buf);
return;
@@ -1538,6 +1683,10 @@ static void entry(const char *name, char *buf)
try_to_match_autogroup(name, buf);
return;
}
+ if (cur_dive_site) {
+ try_to_fill_dive_site(&cur_dive_site, name, buf);
+ return;
+ }
if (!cur_event.deleted) {
try_to_fill_event(name, buf);
return;
@@ -1666,6 +1815,7 @@ static struct nesting {
} nesting[] = {
{ "divecomputerid", dc_settings_start, dc_settings_end },
{ "settings", settings_start, settings_end },
+ { "site", dive_site_start, dive_site_end },
{ "dive", dive_start, dive_end },
{ "Dive", dive_start, dive_end },
{ "trip", trip_start, trip_end },
@@ -1861,9 +2011,19 @@ extern int dm4_events(void *handle, int columns, char **data, char **column)
strcpy(cur_event.name, "deco");
break;
case 22:
+ case 32:
/* 22 Mandatory safety stop violation */
+ /* 32 Deep stop violation */
strcpy(cur_event.name, "violation");
break;
+ case 30:
+ /* Tissue level warning */
+ strcpy(cur_event.name, "tissue warning");
+ break;
+ case 37:
+ /* Tank pressure alarm */
+ strcpy(cur_event.name, "tank pressure");
+ break;
case 257:
/* 257 Dive active */
/* This seems to be given after surface
@@ -1878,6 +2038,23 @@ extern int dm4_events(void *handle, int columns, char **data, char **column)
strcpy(cur_event.name, "bookmark");
}
break;
+ case 259:
+ /* Deep stop */
+ strcpy(cur_event.name, "Deep stop");
+ break;
+ case 260:
+ /* Deep stop */
+ strcpy(cur_event.name, "Deep stop cleared");
+ break;
+ case 266:
+ /* Mandatory safety stop activated */
+ strcpy(cur_event.name, "safety stop (mandatory)");
+ break;
+ case 267:
+ /* Mandatory safety stop deactivated */
+ /* DM5 shows this only on event list, not on the
+ * profile so skipping as well for now */
+ break;
default:
strcpy(cur_event.name, "unknown");
cur_event.value = atoi(data[2]);
@@ -2070,11 +2247,11 @@ extern int dm5_dive(void *param, int columns, char **data, char **column)
* TODO: handle multiple cylinders
*/
cylinder_start();
- if (data[22] && atoi(data[22]) > 0)
+ if (data[22] && atoi(data[22]) > 0 && atoi(data[22]) < 350000)
cur_dive->cylinder[cur_cylinder_index].start.mbar = atoi(data[22]);
else if (data[10] && atoi(data[10]) > 0)
cur_dive->cylinder[cur_cylinder_index].start.mbar = atoi(data[10]);
- if (data[23] && atoi(data[23]) > 0)
+ if (data[23] && atoi(data[23]) > 0 && atoi(data[23]) < 350000)
cur_dive->cylinder[cur_cylinder_index].end.mbar = (atoi(data[23]));
if (data[11] && atoi(data[11]) > 0)
cur_dive->cylinder[cur_cylinder_index].end.mbar = (atoi(data[11]));
@@ -2291,7 +2468,7 @@ extern int shearwater_dive(void *param, int columns, char **data, char **column)
cur_dive->when = (time_t)(atol(data[1]));
if (data[2])
- utf8_string(data[2], &cur_dive->location);
+ add_dive_site(data[2], cur_dive);
if (data[3])
utf8_string(data[3], &cur_dive->buddy);
if (data[4])
@@ -2388,19 +2565,20 @@ extern int cobalt_visibility(void *handle, int columns, char **data, char **colu
extern int cobalt_location(void *handle, int columns, char **data, char **column)
{
+ static char *location = NULL;
if (data[0]) {
- if (cur_dive->location) {
- char *tmp = malloc(strlen(cur_dive->location) + strlen(data[0]) + 4);
+ if (location) {
+ char *tmp = malloc(strlen(location) + strlen(data[0]) + 4);
if (!tmp)
return -1;
- sprintf(tmp, "%s / %s", cur_dive->location, data[0]);
- free(cur_dive->location);
- cur_dive->location = tmp;
+ sprintf(tmp, "%s / %s", location, data[0]);
+ free(location);
+ location = NULL;
+ cur_dive->dive_site_uuid = create_dive_site(tmp);
} else {
- utf8_string(data[0], &cur_dive->location);
+ location = strdup(data[0]);
}
}
-
return 0;
}
diff --git a/pref.h b/pref.h
index 8804ce260..c33b55438 100644
--- a/pref.h
+++ b/pref.h
@@ -94,6 +94,8 @@ extern struct preferences prefs, default_prefs;
extern const char *system_divelist_default_font;
extern double system_divelist_default_font_size;
+
+extern const char *system_default_directory(void);
extern const char *system_default_filename();
extern bool subsurface_ignore_font(const char *font);
extern void subsurface_OS_pref_setup();
diff --git a/qt-gui.cpp b/qt-gui.cpp
index e007a2563..98a45a5d6 100644
--- a/qt-gui.cpp
+++ b/qt-gui.cpp
@@ -19,6 +19,7 @@
#include "qt-ui/mainwindow.h"
#include "helpers.h"
#include "qthelper.h"
+#include "divecomputer.h"
#include <QApplication>
#include <QFileDialog>
diff --git a/qt-ui/about.cpp b/qt-ui/about.cpp
index 361031599..203357010 100644
--- a/qt-ui/about.cpp
+++ b/qt-ui/about.cpp
@@ -1,5 +1,5 @@
#include "about.h"
-#include "ssrf-version.h"
+#include "version.h"
#include <QDesktopServices>
#include <QUrl>
#include <QShortcut>
@@ -9,7 +9,7 @@ SubsurfaceAbout::SubsurfaceAbout(QWidget *parent, Qt::WindowFlags f) : QDialog(p
ui.setupUi(this);
setWindowModality(Qt::ApplicationModal);
- QString versionString(GIT_VERSION_STRING);
+ QString versionString(subsurface_git_version());
QStringList readableVersions = QStringList() << "4.3.950" << "4.4 Beta 1" <<
"4.3.960" << "4.4 Beta 2" <<
"4.3.970" << "4.4 Beta 3";
diff --git a/qt-ui/completionmodels.cpp b/qt-ui/completionmodels.cpp
index fd3cc7504..f2e70afd1 100644
--- a/qt-ui/completionmodels.cpp
+++ b/qt-ui/completionmodels.cpp
@@ -40,9 +40,21 @@
CREATE_CSV_UPDATE_METHOD(BuddyCompletionModel, buddy);
CREATE_CSV_UPDATE_METHOD(DiveMasterCompletionModel, divemaster);
-CREATE_UPDATE_METHOD(LocationCompletionModel, location);
CREATE_UPDATE_METHOD(SuitCompletionModel, suit);
+void LocationCompletionModel::updateModel()
+{
+ QStringList list;
+ struct dive_site *ds;
+ int i = 0;
+ for_each_dive_site(i, ds) {
+ if (!list.contains(ds->name))
+ list.append(ds->name);
+ }
+ std::sort(list.begin(), list.end());
+ setStringList(list);
+}
+
void TagCompletionModel::updateModel()
{
if (g_tag_list == NULL)
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 95bc0f882..172a1a480 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -2,6 +2,8 @@
#include "helpers.h"
#include "mainwindow.h"
+#include "display.h"
+
#include <QFileDialog>
#include <QMessageBox>
#include <QSettings>
diff --git a/qt-ui/divecomponentselection.ui b/qt-ui/divecomponentselection.ui
index dbd0839ba..7eade039b 100644
--- a/qt-ui/divecomponentselection.ui
+++ b/qt-ui/divecomponentselection.ui
@@ -9,8 +9,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>308</width>
- <height>263</height>
+ <width>401</width>
+ <height>317</height>
</rect>
</property>
<property name="sizePolicy">
@@ -41,9 +41,9 @@
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
- <widget class="QCheckBox" name="location">
+ <widget class="QCheckBox" name="divesite">
<property name="text">
- <string>Location</string>
+ <string>Dive site</string>
</property>
</widget>
</item>
@@ -54,34 +54,6 @@
</property>
</widget>
</item>
- <item row="1" column="0">
- <widget class="QCheckBox" name="gps">
- <property name="text">
- <string>GPS coordinates</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QCheckBox" name="divemaster">
- <property name="text">
- <string>Divemaster</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QCheckBox" name="buddy">
- <property name="text">
- <string>Buddy</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QCheckBox" name="rating">
- <property name="text">
- <string>Rating</string>
- </property>
- </widget>
- </item>
<item row="5" column="0">
<widget class="QCheckBox" name="visibility">
<property name="text">
@@ -117,6 +89,27 @@
</property>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="divemaster">
+ <property name="text">
+ <string>Divemaster</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QCheckBox" name="buddy">
+ <property name="text">
+ <string>Buddy</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="rating">
+ <property name="text">
+ <string>Rating</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
diff --git a/qt-ui/divecomputermanagementdialog.cpp b/qt-ui/divecomputermanagementdialog.cpp
index 742facdcb..552f6058f 100644
--- a/qt-ui/divecomputermanagementdialog.cpp
+++ b/qt-ui/divecomputermanagementdialog.cpp
@@ -1,6 +1,7 @@
#include "divecomputermanagementdialog.h"
#include "mainwindow.h"
#include "helpers.h"
+#include "models.h"
#include <QMessageBox>
#include <QShortcut>
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index d4e744237..e4ccb7208 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -8,9 +8,13 @@
#include "filtermodels.h"
#include "modeldelegates.h"
#include "mainwindow.h"
+#include "divepicturewidget.h"
+#include "display.h"
#include <QSettings>
+#include <QKeyEvent>
#include <QFileDialog>
#include "qthelper.h"
+#include "undocommands.h"
// # Date Rtg Dpth Dur Tmp Wght Suit Cyl Gas SAC OTU CNS Loc
static int defaultWidth[] = { 70, 140, 90, 50, 50, 50, 50, 70, 50, 50, 70, 50, 50, 500};
@@ -30,6 +34,7 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelec
setSortingEnabled(false);
setContextMenuPolicy(Qt::DefaultContextMenu);
+ setSelectionMode(ExtendedSelection);
header()->setContextMenuPolicy(Qt::ActionsContextMenu);
const QFontMetrics metrics(defaultModelFont());
@@ -84,6 +89,8 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelec
header()->setStretchLastSection(true);
+
+ installEventFilter(this);
}
DiveListView::~DiveListView()
@@ -343,6 +350,10 @@ bool DiveListView::eventFilter(QObject *, QEvent *event)
if (event->type() != QEvent::KeyPress)
return false;
QKeyEvent *keyEv = static_cast<QKeyEvent *>(event);
+ if (keyEv->key() == Qt::Key_Delete) {
+ contextMenuIndex = currentIndex();
+ deleteDive();
+ }
if (keyEv->key() != Qt::Key_Escape)
return false;
return true;
@@ -721,13 +732,19 @@ void DiveListView::deleteDive()
// so instead of using the for_each_dive macro I'm using an explicit for loop
// to make this easier to understand
int lastDiveNr = -1;
+ QList<struct dive*> deletedDives; //a list of all deleted dives to be stored in the undo command
for_each_dive (i, d) {
if (!d->selected)
continue;
+ struct dive* undo_entry = alloc_dive();
+ copy_dive(get_dive(i), undo_entry);
+ deletedDives.append(undo_entry);
delete_single_dive(i);
i--; // so the next dive isn't skipped... it's now #i
lastDiveNr = i;
}
+ UndoDeleteDive *undoEntry = new UndoDeleteDive(deletedDives);
+ MainWindow::instance()->undoStack->push(undoEntry);
if (amount_selected == 0) {
MainWindow::instance()->cleanUpEmpty();
}
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index bb4701ce3..ce12ef7ec 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -1,5 +1,6 @@
#include "divelogimportdialog.h"
#include "mainwindow.h"
+#include "color.h"
#include "ui_divelogimportdialog.h"
#include <QShortcut>
#include <QDrag>
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 7831cc6d9..434da1fab 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -3,6 +3,8 @@
#include "mainwindow.h"
#include "planner.h"
#include "helpers.h"
+#include "models.h"
+#include "profile/profilewidget2.h"
#include <QGraphicsSceneMouseEvent>
#include <QMessageBox>
@@ -1266,3 +1268,8 @@ void DivePlannerPointsModel::createPlan(bool replanCopy)
setPlanMode(NOTHING);
planCreated();
}
+
+PlannerDetails::PlannerDetails(QWidget *parent) : QWidget(parent)
+{
+ ui.setupUi(this);
+}
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 4093bacd1..196e17546 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -186,6 +186,20 @@ private:
void updateUnitsUI();
};
+#include "ui_plannerDetails.h"
+
+class PlannerDetails : public QWidget {
+ Q_OBJECT
+public:
+ explicit PlannerDetails(QWidget *parent = 0);
+ QPushButton *printPlan() const { return ui.printPlan; }
+ QTextEdit *divePlanOutput() const { return ui.divePlanOutput; }
+
+private:
+ Ui::plannerDetails ui;
+};
+
+
QString dpGasToStr(const divedatapoint &p);
#endif // DIVEPLANNER_H
diff --git a/qt-ui/downloadfromdivecomputer.cpp b/qt-ui/downloadfromdivecomputer.cpp
index cd3dd90d0..c57aa1ef2 100644
--- a/qt-ui/downloadfromdivecomputer.cpp
+++ b/qt-ui/downloadfromdivecomputer.cpp
@@ -1,6 +1,8 @@
#include "downloadfromdivecomputer.h"
#include "helpers.h"
#include "mainwindow.h"
+#include "divelistview.h"
+#include "display.h"
#include <QTimer>
#include <QFileDialog>
@@ -536,8 +538,8 @@ void DownloadThread::run()
}
DiveImportedModel::DiveImportedModel(QObject *o) : QAbstractTableModel(o),
- lastIndex(-1),
firstIndex(0),
+ lastIndex(-1),
checkStates(0)
{
}
diff --git a/qt-ui/filtermodels.cpp b/qt-ui/filtermodels.cpp
index e2597a634..f44ab7cf8 100644
--- a/qt-ui/filtermodels.cpp
+++ b/qt-ui/filtermodels.cpp
@@ -1,5 +1,8 @@
#include "filtermodels.h"
#include "mainwindow.h"
+#include "models.h"
+#include "divelistview.h"
+#include "display.h"
#define CREATE_INSTANCE_METHOD( CLASS ) \
CLASS *CLASS::instance() \
@@ -246,7 +249,7 @@ bool LocationFilterModel::doFilter(struct dive *d, QModelIndex &index0, QAbstrac
return true;
}
// Checked means 'Show', Unchecked means 'Hide'.
- QString location(d->location);
+ QString location(get_dive_location(d));
// only show empty location dives if the user checked that.
if (location.isEmpty()) {
if (rowCount() > 0)
@@ -274,7 +277,7 @@ void LocationFilterModel::repopulate()
struct dive *dive;
int i = 0;
for_each_dive (i, dive) {
- QString location(dive->location);
+ QString location(get_dive_location(dive));
if (!location.isEmpty() && !list.contains(location)) {
list.append(location);
}
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index 1e4639d5c..91bb4e858 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -2,7 +2,13 @@
#ifndef NO_MARBLE
#include "mainwindow.h"
#include "helpers.h"
+#include "divelistview.h"
+#include "maintab.h"
+#include "display.h"
+
#include <QTimer>
+#include <QContextMenuEvent>
+#include <QMouseEvent>
#include <marble/AbstractFloatItem.h>
#include <marble/GeoDataPlacemark.h>
@@ -158,10 +164,11 @@ void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
QList<int> selectedDiveIds;
for_each_dive (idx, dive) {
long lat_diff, lon_diff;
- if (!dive_has_gps_location(dive))
+ struct dive_site *ds = get_dive_site_for_dive(dive);
+ if (!dive_site_has_gps_location(ds))
continue;
- lat_diff = labs(dive->latitude.udeg - lat_udeg);
- lon_diff = labs(dive->longitude.udeg - lon_udeg);
+ lat_diff = labs(ds->latitude.udeg - lat_udeg);
+ lon_diff = labs(ds->longitude.udeg - lon_udeg);
if (lat_diff > 180000000)
lat_diff = 360000000 - lat_diff;
if (lon_diff > 180000000)
@@ -180,6 +187,7 @@ void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
void GlobeGPS::repopulateLabels()
{
+ struct dive_site *ds;
if (loadedDives) {
model()->treeModel()->removeDocument(loadedDives);
delete loadedDives;
@@ -198,12 +206,16 @@ void GlobeGPS::repopulateLabels()
// don't show that flag, it's either already shown as displayed_dive
// or it's the one that we are moving right now...
continue;
- if (dive_has_gps_location(dive)) {
- GeoDataPlacemark *place = new GeoDataPlacemark(dive->location);
- place->setCoordinate(dive->longitude.udeg / 1000000.0, dive->latitude.udeg / 1000000.0, 0, GeoDataCoordinates::Degree);
+ if (idx == -1)
+ ds = &displayed_dive_site;
+ else
+ ds = get_dive_site_for_dive(dive);
+ if (dive_site_has_gps_location(ds)) {
+ GeoDataPlacemark *place = new GeoDataPlacemark(ds->name);
+ place->setCoordinate(ds->longitude.udeg / 1000000.0, ds->latitude.udeg / 1000000.0, 0, GeoDataCoordinates::Degree);
// don't add dive locations twice, unless they are at least 50m apart
- if (locationMap[QString(dive->location)]) {
- GeoDataCoordinates existingLocation = locationMap[QString(dive->location)]->coordinate();
+ if (locationMap[QString(ds->name)]) {
+ GeoDataCoordinates existingLocation = locationMap[QString(ds->name)]->coordinate();
GeoDataLineString segment = GeoDataLineString();
segment.append(existingLocation);
GeoDataCoordinates newLocation = place->coordinate();
@@ -214,7 +226,7 @@ void GlobeGPS::repopulateLabels()
if (dist < 0.05)
continue;
}
- locationMap[QString(dive->location)] = place;
+ locationMap[QString(ds->name)] = place;
loadedDives->append(place);
}
}
@@ -230,23 +242,23 @@ void GlobeGPS::reload()
void GlobeGPS::centerOnCurrentDive()
{
- struct dive *dive = current_dive;
+ struct dive_site *ds = get_dive_site_for_dive(current_dive);
// dive has changed, if we had the 'editingDive', hide it.
- if (messageWidget->isVisible() && (!dive || dive_has_gps_location(dive) || amount_selected != 1))
+ if (messageWidget->isVisible() && (!ds || dive_site_has_gps_location(ds) || amount_selected != 1))
messageWidget->hide();
editingDiveLocation = false;
- if (!dive)
+ if (!ds)
return;
- qreal longitude = dive->longitude.udeg / 1000000.0;
- qreal latitude = dive->latitude.udeg / 1000000.0;
+ qreal longitude = ds->longitude.udeg / 1000000.0;
+ qreal latitude = ds->latitude.udeg / 1000000.0;
- if ((!dive_has_gps_location(dive) || MainWindow::instance()->information()->isEditing()) && amount_selected == 1) {
+ if ((!dive_site_has_gps_location(ds) || MainWindow::instance()->information()->isEditing()) && amount_selected == 1) {
prepareForGetDiveCoordinates();
return;
}
- if (!dive_has_gps_location(dive)) {
+ if (!dive_site_has_gps_location(ds)) {
zoomOutForNoGPS();
return;
}
@@ -303,8 +315,10 @@ void GlobeGPS::prepareForGetDiveCoordinates()
}
}
+// This needs to update the dive site, not just this dive
void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
{
+ struct dive_site *ds;
messageWidget->hide();
if (MainWindow::instance()->dive_list()->selectionModel()->selection().isEmpty())
@@ -318,8 +332,8 @@ void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::U
centerOn(lon, lat, true);
// change the location of the displayed_dive and put the UI in edit mode
- displayed_dive.latitude.udeg = lrint(lat * 1000000.0);
- displayed_dive.longitude.udeg = lrint(lon * 1000000.0);
+ displayed_dive_site.latitude.udeg = lrint(lat * 1000000.0);
+ displayed_dive_site.longitude.udeg = lrint(lon * 1000000.0);
emit(coordinatesChanged());
repopulateLabels();
editingDiveLocation = false;
@@ -335,7 +349,12 @@ void GlobeGPS::mousePressEvent(QMouseEvent *event)
// there could be two scenarios that got us here; let's check if we are editing a dive
if (MainWindow::instance()->information()->isEditing() && clickOnGlobe) {
- MainWindow::instance()->information()->updateCoordinatesText(lat, lon);
+ //
+ // FIXME
+ // TODO
+ //
+ // this needs to do this on the dive site screen
+ // MainWindow::instance()->information()->updateCoordinatesText(lat, lon);
repopulateLabels();
} else if (clickOnGlobe) {
changeDiveGeoPosition(lon, lat, GeoDataCoordinates::Degree);
diff --git a/qt-ui/globe.h b/qt-ui/globe.h
index b6a33bbbe..4f9d7c611 100644
--- a/qt-ui/globe.h
+++ b/qt-ui/globe.h
@@ -19,7 +19,7 @@ class GlobeGPS : public MarbleWidget {
Q_OBJECT
public:
using MarbleWidget::centerOn;
- GlobeGPS(QWidget *parent);
+ GlobeGPS(QWidget *parent = 0);
void reload();
void repopulateLabels();
void centerOnCurrentDive();
diff --git a/qt-ui/locationInformation.ui b/qt-ui/locationInformation.ui
new file mode 100644
index 000000000..658395b35
--- /dev/null
+++ b/qt-ui/locationInformation.ui
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>LocationInformation</class>
+ <widget class="QGroupBox" name="LocationInformation">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>GroupBox</string>
+ </property>
+ <property name="title">
+ <string>Dive Site</string>
+ </property>
+ <layout class="QFormLayout" name="formLayout">
+ <item row="0" column="0" colspan="2">
+ <widget class="KMessageWidget" name="diveSiteMessage" native="true"/>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Name</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QLineEdit" name="diveSiteName"/>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Coordinates</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLineEdit" name="diveSiteCoordinates"/>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>Description</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLineEdit" name="diveSiteDescription"/>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Notes</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QPlainTextEdit" name="diveSiteNotes"/>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>KMessageWidget</class>
+ <extends>QWidget</extends>
+ <header>kmessagewidget.h</header>
+ <container>1</container>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp
index 88cfd8849..3f6345c18 100644
--- a/qt-ui/maintab.cpp
+++ b/qt-ui/maintab.cpp
@@ -6,9 +6,15 @@
*/
#include "maintab.h"
#include "mainwindow.h"
+#include "globe.h"
#include "helpers.h"
#include "statistics.h"
#include "modeldelegates.h"
+#include "models.h"
+#include "divelistview.h"
+#include "display.h"
+#include "profile/profilewidget2.h"
+#include "diveplanner.h"
#if defined(FBSUPPORT)
#include "socialnetworks.h"
@@ -43,18 +49,19 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
ui.extraData->setModel(extraDataModel);
closeMessage();
+ connect(ui.manageDiveSite, SIGNAL(clicked()), this, SLOT(prepareDiveSiteEdit()));
+
QAction *action = new QAction(tr("Apply changes"), this);
connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges()));
addMessageAction(action);
action = new QAction(tr("Discard changes"), this);
connect(action, SIGNAL(triggered(bool)), this, SLOT(rejectChanges()));
+ addMessageAction(action);
QShortcut *closeKey = new QShortcut(QKeySequence(Qt::Key_Escape), this);
connect(closeKey, SIGNAL(activated()), this, SLOT(escDetected()));
- addMessageAction(action);
-
if (qApp->style()->objectName() == "oxygen")
setDocumentMode(true);
else
@@ -65,7 +72,6 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
setEnabled(false);
ui.location->installEventFilter(this);
- ui.coordinates->installEventFilter(this);
ui.divemaster->installEventFilter(this);
ui.buddy->installEventFilter(this);
ui.suit->installEventFilter(this);
@@ -206,6 +212,10 @@ MainTab::~MainTab()
}
}
+void MainTab::prepareDiveSiteEdit() {
+ emit requestDiveSiteEdit(displayed_dive.dive_site_uuid);
+}
+
void MainTab::toggleTriggeredColumn()
{
QAction *action = qobject_cast<QAction *>(sender());
@@ -385,6 +395,11 @@ bool MainTab::isEditing()
return editMode != NONE;
}
+void MainTab::showLocation()
+{
+ ui.location->setText(get_dive_location(&displayed_dive));
+}
+
void MainTab::updateDiveInfo(bool clear)
{
// don't execute this while adding / planning a dive
@@ -418,9 +433,7 @@ void MainTab::updateDiveInfo(bool clear)
else
ui.notes->setPlainText(tmp);
}
-
UPDATE_TEXT(displayed_dive, notes);
- UPDATE_TEXT(displayed_dive, location);
UPDATE_TEXT(displayed_dive, suit);
UPDATE_TEXT(displayed_dive, divemaster);
UPDATE_TEXT(displayed_dive, buddy);
@@ -429,7 +442,11 @@ void MainTab::updateDiveInfo(bool clear)
ui.DiveType->setCurrentIndex(displayed_dive.dc.divemode);
if (!clear) {
- updateGpsCoordinates();
+ struct dive_site *ds = get_dive_site_by_uuid(displayed_dive.dive_site_uuid);
+ if (ds)
+ ui.location->setText(ds->name);
+ else
+ ui.location->clear();
// Subsurface always uses "local time" as in "whatever was the local time at the location"
// so all time stamps have no time zone information and are in UTC
QDateTime localTime = QDateTime::fromTime_t(displayed_dive.when - gettimezoneoffset(displayed_dive.when));
@@ -440,8 +457,6 @@ void MainTab::updateDiveInfo(bool clear)
setTabText(0, tr("Trip notes"));
currentTrip = *MainWindow::instance()->dive_list()->selectedTrips().begin();
// only use trip relevant fields
- ui.coordinates->setVisible(false);
- ui.CoordinatedLabel->setVisible(false);
ui.divemaster->setVisible(false);
ui.DivemasterLabel->setVisible(false);
ui.buddy->setVisible(false);
@@ -468,11 +483,9 @@ void MainTab::updateDiveInfo(bool clear)
clearEquipment();
ui.equipmentTab->setEnabled(false);
} else {
- setTabText(0, tr("Dive notes"));
+ setTabText(0, tr("Notes"));
currentTrip = NULL;
// make all the fields visible writeable
- ui.coordinates->setVisible(true);
- ui.CoordinatedLabel->setVisible(true);
ui.divemaster->setVisible(true);
ui.buddy->setVisible(true);
ui.suit->setVisible(true);
@@ -641,8 +654,8 @@ void MainTab::updateDiveInfo(bool clear)
clearStats();
clearEquipment();
ui.rating->setCurrentStars(0);
- ui.coordinates->clear();
ui.visibility->setCurrentStars(0);
+ ui.location->clear();
}
editMode = NONE;
ui.cylinders->view()->hideColumn(CylindersModel::DEPTH);
@@ -750,8 +763,6 @@ void MainTab::acceptChanges()
copy_samples(&displayed_dive.dc, &current_dive->dc);
}
struct dive *cd = current_dive;
- //Reset coordinates field, in case it contains garbage.
- updateGpsCoordinates();
// now check if something has changed and if yes, edit the selected dives that
// were identical with the master dive shown (and mark the divelist as changed)
if (!same_string(displayed_dive.buddy, cd->buddy))
@@ -779,17 +790,6 @@ void MainTab::acceptChanges()
time_t offset = cd->when - displayed_dive.when;
MODIFY_SELECTED_DIVES(mydive->when -= offset;);
}
- if (displayed_dive.latitude.udeg != cd->latitude.udeg ||
- displayed_dive.longitude.udeg != cd->longitude.udeg)
- MODIFY_SELECTED_DIVES(
- if (copyPaste ||
- (same_string(mydive->location, cd->location) &&
- mydive->latitude.udeg == cd->latitude.udeg &&
- mydive->longitude.udeg == cd->longitude.udeg))
- gpsHasChanged(mydive, cd, ui.coordinates->text(), 0);
- );
- if (!same_string(displayed_dive.location, cd->location))
- MODIFY_SELECTED_DIVES(EDIT_TEXT(location));
saveTags();
@@ -895,7 +895,6 @@ void MainTab::resetPallete()
ui.buddy->setPalette(p);
ui.notes->setPalette(p);
ui.location->setPalette(p);
- ui.coordinates->setPalette(p);
ui.divemaster->setPalette(p);
ui.suit->setPalette(p);
ui.airtemp->setPalette(p);
@@ -1133,8 +1132,17 @@ void MainTab::on_location_textChanged(const QString &text)
free(displayedTrip.location);
displayedTrip.location = strdup(ui.location->text().toUtf8().data());
} else {
- free(displayed_dive.location);
- displayed_dive.location = strdup(ui.location->text().toUtf8().data());
+ // this means we switched dive sites... this requires a lot more thinking
+ //
+ //
+ // FIXME
+ //
+ // TODO
+ //
+ //
+ //
+ // free(displayed_dive.location);
+ // displayed_dive.location = strdup(ui.location->text().toUtf8().data());
}
markChangedWidget(ui.location);
}
@@ -1142,25 +1150,12 @@ void MainTab::on_location_textChanged(const QString &text)
// If we have GPS data for the location entered, add it.
void MainTab::on_location_editingFinished()
{
- // if we have a location and no GPS data, look up the GPS data;
- // but if the GPS data was intentionally cleared then don't
- if (!currentTrip &&
- !same_string(displayed_dive.location, "") &&
- ui.coordinates->text().trimmed().isEmpty() &&
- !(editMode == DIVE && dive_has_gps_location(current_dive))) {
- struct dive *dive;
- int i = 0;
- for_each_dive (i, dive) {
- if (same_string(displayed_dive.location, dive->location) &&
- (dive->latitude.udeg || dive->longitude.udeg)) {
- displayed_dive.latitude = dive->latitude;
- displayed_dive.longitude = dive->longitude;
- MainWindow::instance()->globe()->reload();
- updateGpsCoordinates();
- break;
- }
- }
- }
+ // find the dive site or create it
+ const char *name = ui.location->text().toUtf8().data();
+ uint32_t uuid = get_dive_site_uuid_by_name(name, NULL);
+ if (!uuid)
+ uuid = create_dive_site(name);
+ displayed_dive.dive_site_uuid = uuid;
}
void MainTab::on_suit_textChanged(const QString &text)
@@ -1193,6 +1188,7 @@ void MainTab::on_notes_textChanged()
markChangedWidget(ui.notes);
}
+#if 0 // we'll need something like this for the dive site management
void MainTab::on_coordinates_textChanged(const QString &text)
{
if (editMode == IGNORE || acceptingEdit == true)
@@ -1209,6 +1205,7 @@ void MainTab::on_coordinates_textChanged(const QString &text)
ui.coordinates->setPalette(p); // marks things red
}
}
+#endif
void MainTab::on_rating_valueChanged(int value)
{
@@ -1260,6 +1257,7 @@ void MainTab::editWeightWidget(const QModelIndex &index)
ui.weights->edit(index);
}
+#if 0 // we'll need this for dive sites
void MainTab::updateCoordinatesText(qreal lat, qreal lon)
{
int ulat = rint(lat * 1000000);
@@ -1272,9 +1270,16 @@ void MainTab::updateGpsCoordinates()
if (editMode == NONE)
enableEdition();
- ui.coordinates->setText(printGPSCoords(displayed_dive.latitude.udeg, displayed_dive.longitude.udeg));
- ui.coordinates->setModified(displayed_dive.latitude.udeg || displayed_dive.longitude.udeg);
+ struct dive_site *ds = get_dive_site_by_uuid(displayed_dive.dive_site_uuid);
+ if (ds && dive_site_has_gps_location(ds)) {
+ ui.coordinates->setText(printGPSCoords(ds->latitude.udeg, ds->longitude.udeg));
+ ui.coordinates->setModified(true);
+ } else if (!ui.coordinates->text().isEmpty()) {
+ ui.coordinates->setModified(true);
+ ui.coordinates->clear();
+ }
}
+#endif
void MainTab::escDetected()
{
@@ -1306,7 +1311,6 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what)
// take the data in our copyPasteDive and apply it to selected dives
enableEdition();
copyPaste = true;
- SHOW_SELECTIVE(location);
SHOW_SELECTIVE(buddy);
SHOW_SELECTIVE(divemaster);
SHOW_SELECTIVE(suit);
@@ -1321,8 +1325,8 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what)
ui.rating->setCurrentStars(displayed_dive.rating);
if (what.visibility)
ui.visibility->setCurrentStars(displayed_dive.visibility);
- if (what.gps)
- updateGpsCoordinates();
+ if (what.divesite)
+ ui.location->setText(get_dive_location(&displayed_dive));
if (what.tags) {
char buf[1024];
taglist_get_tagstring(displayed_dive.tag_list, buf, 1024);
diff --git a/qt-ui/maintab.h b/qt-ui/maintab.h
index 71703e3f1..8869b068e 100644
--- a/qt-ui/maintab.h
+++ b/qt-ui/maintab.h
@@ -10,6 +10,7 @@
#include <QTabWidget>
#include <QDialog>
#include <QMap>
+#include <QUuid>
#include "ui_maintab.h"
#include "completionmodels.h"
@@ -40,7 +41,7 @@ public:
IGNORE
};
- MainTab(QWidget *parent);
+ MainTab(QWidget *parent = 0);
~MainTab();
void clearStats();
void clearInfo();
@@ -55,7 +56,7 @@ public:
signals:
void addDiveFinished();
void dateTimeChanged();
-
+ void requestDiveSiteEdit(uint32_t uuid);
public
slots:
void addCylinder_clicked();
@@ -65,7 +66,6 @@ slots:
void rejectChanges();
void on_location_textChanged(const QString &text);
void on_location_editingFinished();
- void on_coordinates_textChanged(const QString &text);
void on_divemaster_textChanged();
void on_buddy_textChanged();
void on_suit_textChanged(const QString &text);
@@ -92,7 +92,8 @@ slots:
void escDetected(void);
void photoDoubleClicked(const QString filePath);
void removeSelectedPhotos();
- void updateGpsCoordinates();
+ void prepareDiveSiteEdit();
+ void showLocation();
private:
Ui::MainTab ui;
diff --git a/qt-ui/maintab.ui b/qt-ui/maintab.ui
index bffbac97a..3626548c3 100644
--- a/qt-ui/maintab.ui
+++ b/qt-ui/maintab.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>443</width>
+ <width>463</width>
<height>815</height>
</rect>
</property>
@@ -15,14 +15,15 @@
</property>
<widget class="QWidget" name="notesTab">
<attribute name="title">
- <string>Dive notes</string>
+ <string>Notes</string>
</attribute>
<layout class="QGridLayout" name="diveNotesLayout">
<property name="spacing">
<number>0</number>
</property>
<item row="2" column="1">
- <widget class="KMessageWidget" name="diveNotesMessage" native="true"/>
+ <widget class="KMessageWidget" name="diveNotesMessage" native="true">
+ </widget>
</item>
<item row="3" column="1">
<widget class="QScrollArea" name="scrollArea">
@@ -40,112 +41,72 @@
<rect>
<x>0</x>
<y>0</y>
- <width>397</width>
- <height>744</height>
+ <width>441</width>
+ <height>753</height>
</rect>
</property>
- <layout class="QGridLayout" name="diveNotesScrollAreaLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <item row="4" column="0" colspan="3">
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="sizeConstraint">
- <enum>QLayout::SetNoConstraint</enum>
- </property>
- <item>
- <widget class="QLabel" name="CoordinatedLabel">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_2">
<property name="text">
- <string>Coordinates</string>
+ <string>Date</string>
</property>
</widget>
</item>
- <item>
- <widget class="QLabel" name="TypeLabel">
+ <item row="0" column="1">
+ <widget class="QLabel" name="label">
<property name="text">
- <string>Dive mode</string>
+ <string>Time</string>
</property>
</widget>
</item>
- </layout>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Date</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>Time</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <layout class="QHBoxLayout" name="temperatureLabels">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
+ <item row="0" column="2">
<widget class="QLabel" name="airTempLabel">
<property name="text">
<string>Air temp.</string>
</property>
</widget>
</item>
- <item>
+ <item row="0" column="3">
<widget class="QLabel" name="waterTempLabel">
<property name="text">
<string>Water temp.</string>
</property>
</widget>
</item>
- </layout>
- </item>
- <item row="1" column="1">
- <widget class="QTimeEdit" name="timeEdit">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="timeSpec">
- <enum>Qt::UTC</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QDateEdit" name="dateEdit">
- <property name="calendarPopup">
- <bool>true</bool>
- </property>
- <property name="timeSpec">
- <enum>Qt::UTC</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <layout class="QHBoxLayout" name="airWaterTempLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
+ <item row="1" column="0">
+ <widget class="QDateEdit" name="dateEdit">
+ <property name="calendarPopup">
+ <bool>true</bool>
+ </property>
+ <property name="timeSpec">
+ <enum>Qt::UTC</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QTimeEdit" name="timeEdit">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="timeSpec">
+ <enum>Qt::UTC</enum>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
<widget class="QLineEdit" name="airtemp">
<property name="readOnly">
<bool>false</bool>
</property>
</widget>
</item>
- <item>
+ <item row="1" column="3">
<widget class="QLineEdit" name="watertemp">
<property name="readOnly">
<bool>false</bool>
@@ -154,47 +115,66 @@
</item>
</layout>
</item>
- <item row="2" column="0">
+ <item>
<widget class="QLabel" name="LocationLabel">
<property name="text">
<string>Location</string>
</property>
</widget>
</item>
- <item row="10" column="0">
- <widget class="QLabel" name="DivemasterLabel">
- <property name="text">
- <string>Divemaster</string>
- </property>
- </widget>
- </item>
- <item row="10" column="2">
- <widget class="QLabel" name="BuddyLabel">
- <property name="text">
- <string>Buddy</string>
- </property>
- </widget>
- </item>
- <item row="11" column="0" colspan="2">
- <widget class="TagWidget" name="divemaster">
- <property name="readOnly">
- <bool>false</bool>
- </property>
- </widget>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_2">
+ <item>
+ <widget class="QLineEdit" name="location">
+ <property name="readOnly">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="manageDiveSite">
+ <property name="text">
+ <string>manage</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
- <item row="11" column="2">
- <widget class="TagWidget" name="buddy">
- <property name="readOnly">
- <bool>false</bool>
- </property>
- </widget>
+ <item>
+ <layout class="QGridLayout" name="gridLayout_4">
+ <item row="0" column="0">
+ <widget class="QLabel" name="DivemasterLabel">
+ <property name="text">
+ <string>Divemaster</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="BuddyLabel">
+ <property name="text">
+ <string>Buddy</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="TagWidget" name="divemaster">
+ <property name="readOnly">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="TagWidget" name="buddy">
+ <property name="readOnly">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
- <item row="12" column="0" colspan="2">
- <layout class="QHBoxLayout" name="ratingVisibilityLabels">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
+ <item>
+ <layout class="QGridLayout" name="gridLayout_3">
+ <item row="0" column="0">
<widget class="QLabel" name="RatingLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -207,7 +187,7 @@
</property>
</widget>
</item>
- <item>
+ <item row="0" column="1">
<widget class="QLabel" name="visibilityLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -220,28 +200,14 @@
</property>
</widget>
</item>
- </layout>
- </item>
- <item row="12" column="2">
- <widget class="QLabel" name="SuitLabel">
- <property name="text">
- <string>Suit</string>
- </property>
- </widget>
- </item>
- <item row="13" column="2">
- <widget class="QLineEdit" name="suit">
- <property name="readOnly">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="13" column="0" colspan="2">
- <layout class="QHBoxLayout" name="ratingVisibilityWidgets">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="SuitLabel">
+ <property name="text">
+ <string>Suit</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
<widget class="StarWidget" name="rating" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -254,7 +220,7 @@
</property>
</widget>
</item>
- <item>
+ <item row="1" column="1">
<widget class="StarWidget" name="visibility" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
@@ -267,55 +233,69 @@
</property>
</widget>
</item>
+ <item row="1" column="2">
+ <widget class="QLineEdit" name="suit">
+ <property name="readOnly">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
- <item row="14" column="0">
- <widget class="QLabel" name="TagLabel">
- <property name="text">
- <string>Tags</string>
- </property>
- </widget>
+ <item>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="1" column="1">
+ <widget class="QComboBox" name="DiveType"/>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="TagLabel">
+ <property name="text">
+ <string>Tags</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="TypeLabel">
+ <property name="text">
+ <string>Dive mode</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="TagWidget" name="tagWidget">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="lineWrapMode">
+ <enum>QPlainTextEdit::NoWrap</enum>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
- <item row="16" column="0">
+ <item>
<widget class="QLabel" name="NotesLabel">
<property name="text">
<string>Notes</string>
</property>
</widget>
</item>
- <item row="15" column="0" colspan="3">
- <widget class="TagWidget" name="tagWidget">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="verticalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="horizontalScrollBarPolicy">
- <enum>Qt::ScrollBarAlwaysOff</enum>
- </property>
- <property name="lineWrapMode">
- <enum>QPlainTextEdit::NoWrap</enum>
- </property>
- </widget>
- </item>
- <item row="3" column="0" colspan="3">
- <widget class="QLineEdit" name="location">
- <property name="readOnly">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="17" column="0" colspan="3">
+ <item>
<layout class="QHBoxLayout" name="notesAndSocialNetworksLayout">
<property name="spacing">
<number>0</number>
@@ -371,20 +351,6 @@
</item>
</layout>
</item>
- <item row="7" column="0" colspan="3">
- <layout class="QHBoxLayout" name="coordinatesDiveTypeLayout">
- <item>
- <widget class="QLineEdit" name="coordinates">
- <property name="readOnly">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="DiveType"/>
- </item>
- </layout>
- </item>
</layout>
</widget>
</widget>
@@ -415,8 +381,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>397</width>
- <height>734</height>
+ <width>68</width>
+ <height>40</height>
</rect>
</property>
<layout class="QGridLayout" name="equipmentTabScrollAreaLayout">
@@ -449,7 +415,7 @@
</widget>
<widget class="QWidget" name="infoTab">
<attribute name="title">
- <string>Dive info</string>
+ <string>Info</string>
</attribute>
<layout class="QGridLayout" name="diveInfoLayout">
<item row="0" column="0">
@@ -471,8 +437,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>397</width>
- <height>734</height>
+ <width>441</width>
+ <height>363</height>
</rect>
</property>
<layout class="QGridLayout" name="diveInfoScrollAreaLayout">
@@ -788,8 +754,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>397</width>
- <height>734</height>
+ <width>446</width>
+ <height>215</height>
</rect>
</property>
<layout class="QGridLayout" name="statsScrollAreaLayout">
@@ -1051,7 +1017,6 @@
<tabstop>rating</tabstop>
<tabstop>visibility</tabstop>
<tabstop>suit</tabstop>
- <tabstop>tagWidget</tabstop>
<tabstop>notes</tabstop>
</tabstops>
<resources>
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 82eaaac57..648ead174 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -11,7 +11,8 @@
#include <QSettings>
#include <QShortcut>
#include <QToolBar>
-#include "ssrf-version.h"
+#include "version.h"
+#include "divelistview.h"
#include "downloadfromdivecomputer.h"
#include "preferences.h"
#include "subsurfacewebservices.h"
@@ -20,6 +21,10 @@
#include "updatemanager.h"
#include "planner.h"
#include "filtermodels.h"
+#include "profile/profilewidget2.h"
+#include "globe.h"
+#include "maintab.h"
+#include "diveplanner.h"
#ifndef NO_PRINTING
#include <QPrintDialog>
#include "printdialog.h"
@@ -31,6 +36,7 @@
#include "usermanual.h"
#endif
#include <QNetworkProxy>
+#include <QUndoStack>
MainWindow *MainWindow::m_Instance = NULL;
@@ -44,7 +50,25 @@ MainWindow::MainWindow() : QMainWindow(),
Q_ASSERT_X(m_Instance == NULL, "MainWindow", "MainWindow recreated!");
m_Instance = this;
ui.setupUi(this);
- ui.multiFilter->hide();
+ // Define the States of the Application Here, Currently the states are situations where the different
+ // widgets will change on the mainwindow.
+
+ // for the "default" mode
+ MainTab *mainTab = new MainTab();
+ DiveListView *diveListView = new DiveListView();
+ ProfileWidget2 *profileWidget = new ProfileWidget2();
+
+#ifndef NO_MARBLE
+ GlobeGPS *globeGps = new GlobeGPS();
+#else
+ QWidget *globeGps = NULL;
+#endif
+
+ PlannerSettingsWidget *plannerSettings = new PlannerSettingsWidget();
+ DivePlannerWidget *plannerWidget = new DivePlannerWidget();
+ PlannerDetails *plannerDetails = new PlannerDetails();
+ LocationInformationWidget *locationInformation = new LocationInformationWidget();
+
// what is a sane order for those icons? we should have the ones the user is
// most likely to want towards the top so they are always visible
// and the ones that someone likely sets and then never touches again towards the bottom
@@ -57,69 +81,83 @@ MainWindow::MainWindow() : QMainWindow(),
ui.profEad << ui.profSAC <<
ui.profHR << // very few dive computers support this
ui.profTissues; // maybe less frequently used
+
+ QToolBar *toolBar = new QToolBar();
+ Q_FOREACH (QAction *a, profileToolbarActions)
+ toolBar->addAction(a);
+ toolBar->setOrientation(Qt::Vertical);
+ toolBar->setIconSize(QSize(24,24));
+
+ QWidget *profileContainer = new QWidget();
+ QHBoxLayout *profLayout = new QHBoxLayout();
+ profLayout->addWidget(toolBar);
+ profLayout->addWidget(profileWidget);
+ profileContainer->setLayout(profLayout);
+
+ registerApplicationState("Default", mainTab, profileContainer, diveListView, globeGps );
+ registerApplicationState("AddDive", mainTab, profileContainer, diveListView, globeGps );
+ registerApplicationState("EditDive", mainTab, profileContainer, diveListView, globeGps );
+ registerApplicationState("PlanDive", plannerWidget, profileContainer, plannerSettings, plannerDetails );
+ registerApplicationState("EditPlannedDive", plannerWidget, profileContainer, diveListView, globeGps );
+ registerApplicationState("EditDiveSite",locationInformation, profileContainer, diveListView, globeGps );
+
+ setApplicationState("Default");
+
+ ui.multiFilter->hide();
+
setWindowIcon(QIcon(":subsurface-icon"));
if (!QIcon::hasThemeIcon("window-close")) {
QIcon::setThemeName("subsurface");
}
- connect(ui.ListWidget, SIGNAL(currentDiveChanged(int)), this, SLOT(current_dive_changed(int)));
+ connect(dive_list(), SIGNAL(currentDiveChanged(int)), this, SLOT(current_dive_changed(int)));
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), this, SLOT(readSettings()));
- connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui.ListWidget, SLOT(update()));
- connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui.ListWidget, SLOT(reloadHeaderActions()));
- connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui.InfoWidget, SLOT(updateDiveInfo()));
- connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui.divePlannerWidget, SLOT(settingsChanged()));
- connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), ui.plannerSettingsWidget, SLOT(settingsChanged()));
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), diveListView, SLOT(update()));
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), diveListView, SLOT(reloadHeaderActions()));
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), information(), SLOT(updateDiveInfo()));
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), divePlannerWidget(), SLOT(settingsChanged()));
+ connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), divePlannerSettingsWidget(), SLOT(settingsChanged()));
connect(PreferencesDialog::instance(), SIGNAL(settingsChanged()), TankInfoModel::instance(), SLOT(update()));
connect(ui.actionRecent1, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool)));
connect(ui.actionRecent2, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool)));
connect(ui.actionRecent3, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool)));
connect(ui.actionRecent4, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool)));
- connect(information(), SIGNAL(addDiveFinished()), ui.newProfile, SLOT(setProfileState()));
+ connect(information(), SIGNAL(addDiveFinished()), graphics(), SLOT(setProfileState()));
connect(DivePlannerPointsModel::instance(), SIGNAL(planCreated()), this, SLOT(planCreated()));
connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), this, SLOT(planCanceled()));
- connect(ui.printPlan, SIGNAL(pressed()), ui.divePlannerWidget, SLOT(printDecoPlan()));
+ connect(plannerDetails->printPlan(), SIGNAL(pressed()), divePlannerWidget(), SLOT(printDecoPlan()));
+ connect(mainTab, SIGNAL(requestDiveSiteEdit(uint32_t)), this, SLOT(enableDiveSiteEdit(uint32_t)));
+ connect(locationInformation, SIGNAL(informationManagementEnded()), this, SLOT(setDefaultState()));
+ connect(locationInformation, SIGNAL(informationManagementEnded()), this, SLOT(refreshDisplay()));
+ connect(locationInformation, SIGNAL(informationManagementEnded()), information(), SLOT(showLocation()));
+
#ifdef NO_PRINTING
ui.printPlan->hide();
+ ui.menuFile->removeAction(ui.actionPrint);
#endif
ui.mainErrorMessage->hide();
- ui.newProfile->setEmptyState();
+ graphics()->setEmptyState();
initialUiSetup();
readSettings();
- ui.ListWidget->reload(DiveTripModel::TREE);
- ui.ListWidget->reloadHeaderActions();
- ui.ListWidget->setFocus();
- ui.globe->reload();
- ui.ListWidget->expand(ui.ListWidget->model()->index(0, 0));
- ui.ListWidget->scrollTo(ui.ListWidget->model()->index(0, 0), QAbstractItemView::PositionAtCenter);
- ui.divePlannerWidget->settingsChanged();
- ui.plannerSettingsWidget->settingsChanged();
+ diveListView->reload(DiveTripModel::TREE);
+ diveListView->reloadHeaderActions();
+ diveListView->setFocus();
+ globe()->reload();
+ diveListView->expand(dive_list()->model()->index(0, 0));
+ diveListView->scrollTo(dive_list()->model()->index(0, 0), QAbstractItemView::PositionAtCenter);
+ divePlannerWidget()->settingsChanged();
+ divePlannerSettingsWidget()->settingsChanged();
#ifdef NO_MARBLE
- ui.globePane->hide();
ui.menuView->removeAction(ui.actionViewGlobe);
#else
- connect(ui.globe, SIGNAL(coordinatesChanged()), ui.InfoWidget, SLOT(updateGpsCoordinates()));
+ connect(globe(), SIGNAL(coordinatesChanged()), locationInformation, SLOT(updateGpsCoordinates()));
#endif
#ifdef NO_USERMANUAL
ui.menuHelp->removeAction(ui.actionUserManual);
#endif
-#ifdef NO_PRINTING
- ui.menuFile->removeAction(ui.actionPrint);
-#endif
memset(&copyPasteDive, 0, sizeof(copyPasteDive));
memset(&what, 0, sizeof(what));
- QToolBar *toolBar = new QToolBar();
- Q_FOREACH (QAction *a, profileToolbarActions)
- toolBar->addAction(a);
- toolBar->setOrientation(Qt::Vertical);
- toolBar->setIconSize(QSize(24,24));
- // since I'm adding the toolBar by hand, because designer
- // has no concept of "toolbar" for a non-mainwindow widget (...)
- // I need to take the current item that's in the toolbar Position
- // and reposition it alongside the grid layout.
- QLayoutItem *p = ui.profileInnerLayout->takeAt(0);
- ui.profileInnerLayout->addWidget(toolBar, 0, 0);
- ui.profileInnerLayout->addItem(p, 0, 1);
// and now for some layout hackery
// this gets us consistent margins everywhere and a much more balanced look
@@ -146,12 +184,19 @@ MainWindow::MainWindow() : QMainWindow(),
else
layout->setContentsMargins(margins);
}
- margins = QMargins(0, 5, 5, 5);
- ui.profileInnerLayout->setContentsMargins(margins);
- ui.profileInnerLayout->setSpacing(0);
toolBar->setContentsMargins(zeroMargins);
updateManager = new UpdateManager(this);
+
+ undoStack = new QUndoStack(this);
+ QAction *undoAction = undoStack->createUndoAction(this, tr("&Undo"));
+ QAction *redoAction = undoStack->createRedoAction(this, tr("&Redo"));
+ undoAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Z));
+ redoAction->setShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_Z));
+ QList<QAction*>undoRedoActions;
+ undoRedoActions.append(undoAction);
+ undoRedoActions.append(redoAction);
+ ui.menu_Edit->addActions(undoRedoActions);
}
MainWindow::~MainWindow()
@@ -159,6 +204,26 @@ MainWindow::~MainWindow()
m_Instance = NULL;
}
+PlannerDetails *MainWindow::plannerDetails() const {
+ return qobject_cast<PlannerDetails*>(applicationState["PlanDive"].bottomRight);
+}
+
+PlannerSettingsWidget *MainWindow::divePlannerSettingsWidget() {
+ return qobject_cast<PlannerSettingsWidget*>(applicationState["PlanDive"].bottomLeft);
+}
+
+LocationInformationWidget *MainWindow::locationInformationWidget() {
+ return qobject_cast<LocationInformationWidget*>(applicationState["EditDiveSite"].topLeft);
+}
+
+void MainWindow::enableDiveSiteEdit(uint32_t id) {
+ setApplicationState("EditDiveSite");
+}
+
+void MainWindow::setDefaultState() {
+ setApplicationState("Default");
+}
+
void MainWindow::setLoadedWithFiles(bool f)
{
filesAsArguments = f;
@@ -178,18 +243,15 @@ MainWindow *MainWindow::instance()
void MainWindow::refreshDisplay(bool doRecreateDiveList)
{
showError(get_error_string());
- ui.InfoWidget->reload();
+ information()->reload();
TankInfoModel::instance()->update();
- ui.globe->reload();
+ globe()->reload();
if (doRecreateDiveList)
recreateDiveList();
- ui.diveListPane->setCurrentIndex(0); // switch to the dive list
-#ifdef NO_MARBLE
- ui.globePane->hide();
-#endif
- ui.globePane->setCurrentIndex(0);
- ui.ListWidget->setEnabled(true);
- ui.ListWidget->setFocus();
+
+ setApplicationState("Default");
+ dive_list()->setEnabled(true);
+ dive_list()->setFocus();
WSInfoModel::instance()->updateInfo();
if (amount_selected == 0)
cleanUpEmpty();
@@ -197,7 +259,7 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList)
void MainWindow::recreateDiveList()
{
- ui.ListWidget->reload(DiveTripModel::CURRENT);
+ dive_list()->reload(DiveTripModel::CURRENT);
TagFilterModel::instance()->repopulate();
BuddyFilterModel::instance()->repopulate();
LocationFilterModel::instance()->repopulate();
@@ -208,10 +270,11 @@ void MainWindow::current_dive_changed(int divenr)
{
if (divenr >= 0) {
select_dive(divenr);
- ui.globe->centerOnCurrentDive();
+ globe()->centerOnCurrentDive();
}
- ui.newProfile->plotDive();
- ui.InfoWidget->updateDiveInfo();
+ graphics()->plotDive();
+ information()->updateDiveInfo();
+ locationInformationWidget()->setLocationId(displayed_dive.dive_site_uuid);
}
void MainWindow::on_actionNew_triggered()
@@ -254,18 +317,19 @@ void MainWindow::on_actionSaveAs_triggered()
ProfileWidget2 *MainWindow::graphics() const
{
- return ui.newProfile;
+ return qobject_cast<ProfileWidget2*>(applicationState["Default"].topRight->layout()->itemAt(1)->widget());
}
void MainWindow::cleanUpEmpty()
{
- ui.InfoWidget->clearStats();
- ui.InfoWidget->clearInfo();
- ui.InfoWidget->clearEquipment();
- ui.InfoWidget->updateDiveInfo(true);
- ui.newProfile->setEmptyState();
- ui.ListWidget->reload(DiveTripModel::TREE);
- ui.globe->reload();
+ information()->clearStats();
+ information()->clearInfo();
+ information()->clearEquipment();
+ information()->updateDiveInfo(true);
+ graphics()->setEmptyState();
+ dive_list()->reload(DiveTripModel::TREE);
+ locationInformationWidget()->setLocationId(0);
+ globe()->reload();
if (!existing_filename)
setTitle(MWTF_DEFAULT);
disableShortcuts();
@@ -274,7 +338,8 @@ void MainWindow::cleanUpEmpty()
bool MainWindow::okToClose(QString message)
{
if (DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING ||
- ui.InfoWidget->isEditing()) {
+ information()->isEditing() ||
+ currentApplicationState == "EditDiveSite") {
QMessageBox::warning(this, tr("Warning"), message);
return false;
}
@@ -286,11 +351,13 @@ bool MainWindow::okToClose(QString message)
void MainWindow::closeCurrentFile()
{
- ui.newProfile->setEmptyState();
+ graphics()->setEmptyState();
/* free the dives and trips */
clear_git_id();
while (dive_table.nr)
delete_single_dive(0);
+ while (dive_site_table.nr)
+ delete_dive_site(get_dive_site(0)->uuid);
free((void *)existing_filename);
existing_filename = NULL;
@@ -362,8 +429,8 @@ void MainWindow::enableShortcuts()
void MainWindow::showProfile()
{
enableShortcuts();
- ui.newProfile->setProfileState();
- ui.infoPane->setCurrentIndex(MAINTAB);
+ graphics()->setProfileState();
+ setApplicationState("Default");
}
void MainWindow::on_actionPreferences_triggered()
@@ -373,9 +440,9 @@ void MainWindow::on_actionPreferences_triggered()
void MainWindow::on_actionQuit_triggered()
{
- if (ui.InfoWidget->isEditing()) {
- ui.InfoWidget->rejectChanges();
- if (ui.InfoWidget->isEditing())
+ if (information()->isEditing()) {
+ information()->rejectChanges();
+ if (information()->isEditing())
// didn't discard the edits
return;
}
@@ -421,7 +488,7 @@ void MainWindow::on_actionEditDeviceNames_triggered()
bool MainWindow::plannerStateClean()
{
if (DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING ||
- ui.InfoWidget->isEditing()) {
+ information()->isEditing()) {
QMessageBox::warning(this, tr("Warning"), tr("Please save or cancel the current dive edit before trying to add a dive."));
return false;
}
@@ -433,16 +500,16 @@ void MainWindow::planCanceled()
// while planning we might have modified the displayed_dive
// let's refresh what's shown on the profile
showProfile();
- ui.newProfile->replot();
+ graphics()->replot();
refreshDisplay(false);
- ui.newProfile->plotDive(get_dive(selected_dive));
+ graphics()->plotDive(get_dive(selected_dive));
DivePictureModel::instance()->updateDivePictures();
}
void MainWindow::planCreated()
{
// get the new dive selected and assign a number if reasonable
- ui.newProfile->setProfileState();
+ graphics()->setProfileState();
if (displayed_dive.id == 0) {
// we might have added a new dive (so displayed_dive was cleared out by clone_dive()
dive_list()->unselectDives();
@@ -451,20 +518,20 @@ void MainWindow::planCreated()
set_dive_nr_for_current_dive();
}
// make sure our UI is in a consistent state
- ui.InfoWidget->updateDiveInfo();
+ information()->updateDiveInfo();
showProfile();
refreshDisplay();
}
void MainWindow::setPlanNotes(const char *notes)
{
- ui.divePlanOutput->setHtml(notes);
+ plannerDetails()->divePlanOutput()->setHtml(notes);
}
void MainWindow::printPlan()
{
#ifndef NO_PRINTING
- QString diveplan = ui.divePlanOutput->toHtml();
+ QString diveplan = plannerDetails()->divePlanOutput()->toHtml();
QString withDisclaimer = QString("<img height=50 src=\":subsurface-icon\"> ") + diveplan + QString(disclaimer);
QPrinter printer;
@@ -473,9 +540,9 @@ void MainWindow::printPlan()
if (dialog->exec() != QDialog::Accepted)
return;
- ui.divePlanOutput->setHtml(withDisclaimer);
- ui.divePlanOutput->print(&printer);
- ui.divePlanOutput->setHtml(diveplan);
+ plannerDetails()->divePlanOutput()->setHtml(withDisclaimer);
+ plannerDetails()->divePlanOutput()->print(&printer);
+ plannerDetails()->divePlanOutput()->setHtml(diveplan);
#endif
}
@@ -489,6 +556,7 @@ void MainWindow::setupForAddAndPlan(const char *model)
// setup the dive cylinders
DivePlannerPointsModel::instance()->clear();
DivePlannerPointsModel::instance()->setupCylinders();
+ locationInformationWidget()->setLocationId(0);
}
void MainWindow::on_actionReplanDive_triggered()
@@ -503,17 +571,12 @@ void MainWindow::on_actionReplanDive_triggered()
DivePlannerPointsModel::instance()->clear();
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
- ui.newProfile->setPlanState();
- ui.newProfile->clearHandlers();
- ui.infoPane->setCurrentIndex(PLANNERWIDGET);
- ui.divePlannerWidget->setReplanButton(true);
+ graphics()->setPlanState();
+ graphics()->clearHandlers();
+ setApplicationState("PlanDive");
+ divePlannerWidget()->setReplanButton(true);
DivePlannerPointsModel::instance()->loadFromDive(current_dive);
reset_cylinders(&displayed_dive, true);
- ui.diveListPane->setCurrentIndex(1); // switch to the plan output
- ui.globePane->setCurrentIndex(1);
-#ifdef NO_MARBLE
- ui.globePane->show();
-#endif
}
void MainWindow::on_actionDivePlanner_triggered()
@@ -523,22 +586,20 @@ void MainWindow::on_actionDivePlanner_triggered()
// put us in PLAN mode
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
+ setApplicationState("PlanDive");
- ui.newProfile->setPlanState();
- ui.infoPane->setCurrentIndex(PLANNERWIDGET);
+ graphics()->setPlanState();
// create a simple starting dive, using the first gas from the just copied cylidners
setupForAddAndPlan("planned dive"); // don't translate, stored in XML file
DivePlannerPointsModel::instance()->setupStartTime();
DivePlannerPointsModel::instance()->createSimpleDive();
DivePictureModel::instance()->updateDivePictures();
- ui.divePlannerWidget->setReplanButton(false);
+ divePlannerWidget()->setReplanButton(false);
+}
- ui.diveListPane->setCurrentIndex(1); // switch to the plan output
- ui.globePane->setCurrentIndex(1);
-#ifdef NO_MARBLE
- ui.globePane->show();
-#endif
+DivePlannerWidget* MainWindow::divePlannerWidget() {
+ return qobject_cast<DivePlannerWidget*>(applicationState["PlanDive"].topLeft);
}
void MainWindow::on_actionAddDive_triggered()
@@ -551,23 +612,23 @@ void MainWindow::on_actionAddDive_triggered()
dive_list()->clearSelection();
}
+ setApplicationState("AddDive");
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::ADD);
// setup things so we can later create our starting dive
setupForAddAndPlan("manually added dive"); // don't translate, stored in the XML file
// now show the mostly empty main tab
- ui.InfoWidget->updateDiveInfo();
+ information()->updateDiveInfo();
// show main tab
- ui.InfoWidget->setCurrentIndex(0);
+ information()->setCurrentIndex(0);
- ui.InfoWidget->addDiveStarted();
- ui.infoPane->setCurrentIndex(MAINTAB);
+ information()->addDiveStarted();
- ui.newProfile->setAddState();
+ graphics()->setAddState();
DivePlannerPointsModel::instance()->createSimpleDive();
- ui.newProfile->plotDive();
+ graphics()->plotDive();
}
void MainWindow::on_actionRenumber_triggered()
@@ -612,16 +673,16 @@ void MainWindow::on_actionYearlyStatistics_triggered()
#define TOGGLE_COLLAPSABLE( X ) \
ui.mainSplitter->setCollapsible(0, X); \
ui.mainSplitter->setCollapsible(1, X); \
- ui.infoProfileSplitter->setCollapsible(0, X); \
- ui.infoProfileSplitter->setCollapsible(1, X); \
- ui.listGlobeSplitter->setCollapsible(0, X); \
- ui.listGlobeSplitter->setCollapsible(1, X);
+ ui.topSplitter->setCollapsible(0, X); \
+ ui.topSplitter->setCollapsible(1, X); \
+ ui.bottomSplitter->setCollapsible(0, X); \
+ ui.bottomSplitter->setCollapsible(1, X);
void MainWindow::on_actionViewList_triggered()
{
TOGGLE_COLLAPSABLE( true );
beginChangeState(LIST_MAXIMIZED);
- ui.listGlobeSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
+ ui.topSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
ui.mainSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
}
@@ -629,7 +690,7 @@ void MainWindow::on_actionViewProfile_triggered()
{
TOGGLE_COLLAPSABLE( true );
beginChangeState(PROFILE_MAXIMIZED);
- ui.infoProfileSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
+ ui.topSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
ui.mainSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
}
@@ -637,7 +698,7 @@ void MainWindow::on_actionViewInfo_triggered()
{
TOGGLE_COLLAPSABLE( true );
beginChangeState(INFO_MAXIMIZED);
- ui.infoProfileSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
+ ui.topSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
ui.mainSplitter->setSizes(BEHAVIOR << EXPANDED << COLLAPSED);
}
@@ -646,7 +707,7 @@ void MainWindow::on_actionViewGlobe_triggered()
TOGGLE_COLLAPSABLE( true );
beginChangeState(GLOBE_MAXIMIZED);
ui.mainSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
- ui.listGlobeSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
+ ui.bottomSplitter->setSizes(BEHAVIOR << COLLAPSED << EXPANDED);
}
#undef BEHAVIOR
@@ -677,26 +738,26 @@ void MainWindow::on_actionViewAll_triggered()
settings.beginGroup("MainWindow");
if (settings.value("mainSplitter").isValid()) {
ui.mainSplitter->restoreState(settings.value("mainSplitter").toByteArray());
- ui.infoProfileSplitter->restoreState(settings.value("infoProfileSplitter").toByteArray());
- ui.listGlobeSplitter->restoreState(settings.value("listGlobeSplitter").toByteArray());
+ ui.topSplitter->restoreState(settings.value("topSplitter").toByteArray());
+ ui.bottomSplitter->restoreState(settings.value("bottomSplitter").toByteArray());
if (ui.mainSplitter->sizes().first() == 0 || ui.mainSplitter->sizes().last() == 0)
ui.mainSplitter->setSizes(mainSizes);
- if (ui.infoProfileSplitter->sizes().first() == 0 || ui.infoProfileSplitter->sizes().last() == 0)
- ui.infoProfileSplitter->setSizes(infoProfileSizes);
- if (ui.listGlobeSplitter->sizes().first() == 0 || ui.listGlobeSplitter->sizes().last() == 0)
- ui.listGlobeSplitter->setSizes(listGlobeSizes);
+ if (ui.topSplitter->sizes().first() == 0 || ui.topSplitter->sizes().last() == 0)
+ ui.topSplitter->setSizes(infoProfileSizes);
+ if (ui.bottomSplitter->sizes().first() == 0 || ui.bottomSplitter->sizes().last() == 0)
+ ui.bottomSplitter->setSizes(listGlobeSizes);
} else {
ui.mainSplitter->setSizes(mainSizes);
- ui.infoProfileSplitter->setSizes(infoProfileSizes);
- ui.listGlobeSplitter->setSizes(listGlobeSizes);
+ ui.topSplitter->setSizes(infoProfileSizes);
+ ui.bottomSplitter->setSizes(listGlobeSizes);
}
ui.mainSplitter->setCollapsible(0, false);
ui.mainSplitter->setCollapsible(1, false);
- ui.infoProfileSplitter->setCollapsible(0, false);
- ui.infoProfileSplitter->setCollapsible(1, false);
- ui.listGlobeSplitter->setCollapsible(0,false);
- ui.listGlobeSplitter->setCollapsible(1,false);
+ ui.topSplitter->setCollapsible(0, false);
+ ui.topSplitter->setCollapsible(1, false);
+ ui.bottomSplitter->setCollapsible(0,false);
+ ui.bottomSplitter->setCollapsible(1,false);
}
#undef TOGGLE_COLLAPSABLE
@@ -714,24 +775,24 @@ void MainWindow::saveSplitterSizes()
QSettings settings;
settings.beginGroup("MainWindow");
settings.setValue("mainSplitter", ui.mainSplitter->saveState());
- settings.setValue("infoProfileSplitter", ui.infoProfileSplitter->saveState());
- settings.setValue("listGlobeSplitter", ui.listGlobeSplitter->saveState());
+ settings.setValue("topSplitter", ui.topSplitter->saveState());
+ settings.setValue("bottomSplitter", ui.bottomSplitter->saveState());
}
void MainWindow::on_actionPreviousDC_triggered()
{
unsigned nrdc = number_of_computers(current_dive);
dc_number = (dc_number + nrdc - 1) % nrdc;
- ui.newProfile->plotDive();
- ui.InfoWidget->updateDiveInfo();
+ graphics()->plotDive();
+ information()->updateDiveInfo();
}
void MainWindow::on_actionNextDC_triggered()
{
unsigned nrdc = number_of_computers(current_dive);
dc_number = (dc_number + 1) % nrdc;
- ui.newProfile->plotDive();
- ui.InfoWidget->updateDiveInfo();
+ graphics()->plotDive();
+ information()->updateDiveInfo();
}
void MainWindow::on_actionFullScreen_triggered(bool checked)
@@ -937,7 +998,7 @@ void MainWindow::checkSurvey(QSettings *s)
s->setValue("FirstUse42", value);
}
// wait a week for production versions, but not at all for non-tagged builds
- QString ver(VERSION_STRING);
+ QString ver(subsurface_version());
int waitTime = 7;
QDate firstUse42 = s->value("FirstUse42").toDate();
if (run_survey || (firstUse42.daysTo(QDate().currentDate()) > waitTime && !s->contains("SurveyDone"))) {
@@ -965,7 +1026,7 @@ void MainWindow::writeSettings()
void MainWindow::closeEvent(QCloseEvent *event)
{
if (DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING ||
- ui.InfoWidget->isEditing()) {
+ information()->isEditing()) {
on_actionQuit_triggered();
event->ignore();
return;
@@ -994,17 +1055,17 @@ void MainWindow::closeEvent(QCloseEvent *event)
DiveListView *MainWindow::dive_list()
{
- return ui.ListWidget;
+ return qobject_cast<DiveListView*>(applicationState["Default"].bottomLeft);
}
GlobeGPS *MainWindow::globe()
{
- return ui.globe;
+ return qobject_cast<GlobeGPS*>(applicationState["Default"].bottomRight);
}
MainTab *MainWindow::information()
{
- return ui.InfoWidget;
+ return qobject_cast<MainTab*>(applicationState["Default"].topLeft);
}
void MainWindow::loadRecentFiles(QSettings *s)
@@ -1179,8 +1240,8 @@ int MainWindow::file_save_as(void)
if (filename.isNull() || filename.isEmpty())
return report_error("No filename to save into");
- if (ui.InfoWidget->isEditing())
- ui.InfoWidget->acceptChanges();
+ if (information()->isEditing())
+ information()->acceptChanges();
if (save_dives(filename.toUtf8().data())) {
showError(get_error_string());
@@ -1202,8 +1263,8 @@ int MainWindow::file_save(void)
if (!existing_filename)
return file_save_as();
- if (ui.InfoWidget->isEditing())
- ui.InfoWidget->acceptChanges();
+ if (information()->isEditing())
+ information()->acceptChanges();
current_default = prefs.default_filename;
if (strcmp(existing_filename, current_default) == 0) {
@@ -1368,20 +1429,16 @@ void MainWindow::editCurrentDive()
if (defaultDC == "manually added dive") {
disableShortcuts();
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::ADD);
- ui.newProfile->setAddState();
- ui.infoPane->setCurrentIndex(MAINTAB);
+ graphics()->setAddState();
+ setApplicationState("EditDive");
DivePlannerPointsModel::instance()->loadFromDive(d);
- ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
+ information()->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
} else if (defaultDC == "planned dive") {
disableShortcuts();
DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::PLAN);
- //TODO: I BROKE THIS BY COMMENTING THE LINE BELOW
- // and I'm sleepy now, so I think I should not try to fix right away.
- // we don't setCurrentIndex anymore, we ->setPlanState() or ->setAddState() on the ProfileView.
- //ui.stackedWidget->setCurrentIndex(PLANNERPROFILE); // Planner.
- ui.infoPane->setCurrentIndex(PLANNERWIDGET);
+ setApplicationState("EditPlannedDive");
DivePlannerPointsModel::instance()->loadFromDive(d);
- ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
+ information()->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
}
}
@@ -1456,7 +1513,7 @@ void MainWindow::on_paste_triggered()
{
// take the data in our copyPasteDive and apply it to selected dives
selective_copy_dive(&copyPasteDive, &displayed_dive, what, false);
- ui.InfoWidget->showAndTriggerEditSelective(what);
+ information()->showAndTriggerEditSelective(what);
}
void MainWindow::on_actionFilterTags_triggered()
@@ -1466,3 +1523,43 @@ void MainWindow::on_actionFilterTags_triggered()
else
ui.multiFilter->setVisible(true);
}
+
+void MainWindow::registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *topRight, QWidget *bottomLeft, QWidget *bottomRight)
+{
+ applicationState[state] = WidgetForQuadrant(topLeft, topRight, bottomLeft, bottomRight);
+ if (ui.topLeft->indexOf(topLeft) == -1 && topLeft) {
+ ui.topLeft->addWidget(topLeft);
+ }
+ if (ui.topRight->indexOf(topRight) == -1 && topRight) {
+ ui.topRight->addWidget(topRight);
+ }
+ if (ui.bottomLeft->indexOf(bottomLeft) == -1 && bottomLeft) {
+ ui.bottomLeft->addWidget(bottomLeft);
+ }
+ if(ui.bottomRight->indexOf(bottomRight) == -1 && bottomRight) {
+ ui.bottomRight->addWidget(bottomRight);
+ }
+}
+
+void MainWindow::setApplicationState(const QByteArray& state) {
+ if (!applicationState.keys().contains(state))
+ return;
+
+ if (currentApplicationState == state)
+ return;
+
+ currentApplicationState = state;
+#define SET_CURRENT_INDEX( X ) \
+ if (applicationState[state].X) { \
+ ui.X->setCurrentWidget( applicationState[state].X); \
+ ui.X->show(); \
+ } else { \
+ ui.X->hide(); \
+ }
+
+ SET_CURRENT_INDEX( topLeft )
+ SET_CURRENT_INDEX( topRight )
+ SET_CURRENT_INDEX( bottomLeft )
+ SET_CURRENT_INDEX( bottomRight )
+#undef SET_CURRENT_INDEX
+}
diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h
index 2364caadc..85a63123b 100644
--- a/qt-ui/mainwindow.h
+++ b/qt-ui/mainwindow.h
@@ -10,6 +10,7 @@
#include <QMainWindow>
#include <QAction>
#include <QUrl>
+#include <QUuid>
#include "ui_mainwindow.h"
@@ -30,6 +31,11 @@ class QWebView;
class QSettings;
class UpdateManager;
class UserManual;
+class DivePlannerWidget;
+class ProfileWidget2;
+class PlannerDetails;
+class PlannerSettingsWidget;
+class QUndoStack;
enum MainWindowTitleFormat {
MWTF_DEFAULT,
@@ -43,10 +49,7 @@ public:
COLLAPSED,
EXPANDED
};
- enum InfoWidgetIndexes {
- MAINTAB,
- PLANNERWIDGET
- };
+
enum CurrentState {
VIEWALL,
GLOBE_MAXIMIZED,
@@ -64,6 +67,9 @@ public:
void removeRecentFile(QStringList failedFiles);
DiveListView *dive_list();
GlobeGPS *globe();
+ DivePlannerWidget *divePlannerWidget();
+ PlannerSettingsWidget *divePlannerSettingsWidget();
+ LocationInformationWidget *locationInformationWidget();
void showError(QString message);
void setTitle(enum MainWindowTitleFormat format);
@@ -77,11 +83,14 @@ public:
void cleanUpEmpty();
void setToolButtonsEnabled(bool enabled);
ProfileWidget2 *graphics() const;
+ PlannerDetails *plannerDetails() const;
void setLoadedWithFiles(bool filesFromCommandLine);
bool filesFromCommandLine() const;
void setPlanNotes(const char *notes);
void printPlan();
void checkSurvey(QSettings *s);
+ void setApplicationState(const QByteArray& state);
+ QUndoStack *undoStack;
private
slots:
/* file menu action */
@@ -151,6 +160,8 @@ slots:
void on_paste_triggered();
void on_actionFilterTags_triggered();
void on_actionConfigure_Dive_Computer_triggered();
+ void enableDiveSiteEdit(uint32_t id);
+ void setDefaultState();
protected:
void closeEvent(QCloseEvent *);
@@ -185,6 +196,7 @@ private:
void saveSplitterSizes();
QString lastUsedDir();
void updateLastUsedDir(const QString &s);
+ void registerApplicationState(const QByteArray& state, QWidget *topLeft, QWidget *topRight, QWidget *bottomLeft, QWidget *bottomRight);
bool filesAsArguments;
UpdateManager *updateManager;
@@ -194,6 +206,17 @@ private:
struct dive copyPasteDive;
struct dive_components what;
QList<QAction *> profileToolbarActions;
+
+ struct WidgetForQuadrant {
+ WidgetForQuadrant(QWidget *tl = 0, QWidget *tr = 0, QWidget *bl = 0, QWidget *br = 0) :
+ topLeft(tl), topRight(tr), bottomLeft(bl), bottomRight(br) {}
+ QWidget *topLeft;
+ QWidget *topRight;
+ QWidget *bottomLeft;
+ QWidget *bottomRight;
+ };
+ QHash<QByteArray, WidgetForQuadrant> applicationState;
+ QByteArray currentApplicationState;
};
#endif // MAINWINDOW_H
diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui
index 8ffb8bbd8..b6cd4a358 100644
--- a/qt-ui/mainwindow.ui
+++ b/qt-ui/mainwindow.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>1682</width>
- <height>1151</height>
+ <width>861</width>
+ <height>800</height>
</rect>
</property>
<widget class="QWidget" name="centralwidget">
@@ -23,164 +23,19 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <widget class="QSplitter" name="infoProfileSplitter">
+ <widget class="QSplitter" name="topSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <widget class="QStackedWidget" name="infoPane">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="page">
- <layout class="QHBoxLayout" name="mainTabOuterLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <item>
- <widget class="MainTab" name="InfoWidget" native="true"/>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="page_2">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <layout class="QHBoxLayout" name="divePlannerLayout">
- <item>
- <widget class="DivePlannerWidget" name="divePlannerWidget" native="true">
- <property name="enabled">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <widget class="QWidget" name="ProfileWidget">
- <layout class="QGridLayout" name="profileInnerLayout">
- <item row="0" column="0" rowspan="3">
- <widget class="ProfileWidget2" name="newProfile"/>
- </item>
- </layout>
- </widget>
+ <widget class="QStackedWidget" name="topLeft"/>
+ <widget class="QStackedWidget" name="topRight"/>
</widget>
- <widget class="QSplitter" name="listGlobeSplitter">
+ <widget class="QSplitter" name="bottomSplitter">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
- <widget class="QStackedWidget" name="diveListPane">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="page_3">
- <layout class="QVBoxLayout" name="diveListLayout">
- <item>
- <widget class="DiveListView" name="ListWidget">
- <property name="selectionMode">
- <enum>QAbstractItemView::ExtendedSelection</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="PlannerSettingsWidget" name="plannerSettingsWidget"/>
- </widget>
- <widget class="QStackedWidget" name="globePane">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="stackedWidgetPage1">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QVBoxLayout" name="globeLayout">
- <item>
- <widget class="GlobeGPS" name="globe" native="true"/>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="page_5">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <layout class="QHBoxLayout" name="divePlanLayout">
- <item>
- <widget class="QLabel" name="divePlanOutputLabel">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>20</height>
- </size>
- </property>
- <property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Dive plan details&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- <property name="textFormat">
- <enum>Qt::RichText</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="printPlan">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Print</string>
- </property>
- <property name="autoDefault">
- <bool>false</bool>
- </property>
- <property name="default">
- <bool>false</bool>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QTextEdit" name="divePlanOutput">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="styleSheet">
- <string notr="true">font: 13pt &quot;Courier&quot;;</string>
- </property>
- <property name="readOnly">
- <bool>true</bool>
- </property>
- <property name="html">
- <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Courier'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Curier New';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
+ <widget class="QStackedWidget" name="bottomLeft"/>
+ <widget class="QStackedWidget" name="bottomRight"/>
</widget>
</widget>
</item>
@@ -194,8 +49,8 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
- <width>1682</width>
- <height>27</height>
+ <width>861</width>
+ <height>25</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">
@@ -271,7 +126,13 @@ p, li { white-space: pre-wrap; }
<addaction name="actionDownloadWeb"/>
<addaction name="actionDivelogs_de"/>
</widget>
+ <widget class="QMenu" name="menu_Edit">
+ <property name="title">
+ <string>&amp;Edit</string>
+ </property>
+ </widget>
<addaction name="menuFile"/>
+ <addaction name="menu_Edit"/>
<addaction name="menuImport"/>
<addaction name="menuLog"/>
<addaction name="menuView"/>
@@ -813,6 +674,22 @@ p, li { white-space: pre-wrap; }
<string>User &amp;survey</string>
</property>
</action>
+ <action name="action_Undo">
+ <property name="text">
+ <string>&amp;Undo</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+Z</string>
+ </property>
+ </action>
+ <action name="action_Redo">
+ <property name="text">
+ <string>&amp;Redo</string>
+ </property>
+ <property name="shortcut">
+ <string>Ctrl+Shift+Z</string>
+ </property>
+ </action>
</widget>
<customwidgets>
<customwidget>
@@ -822,40 +699,6 @@ p, li { white-space: pre-wrap; }
<container>1</container>
</customwidget>
<customwidget>
- <class>MainTab</class>
- <extends>QWidget</extends>
- <header>qt-ui/maintab.h</header>
- <container>1</container>
- </customwidget>
- <customwidget>
- <class>DiveListView</class>
- <extends>QTreeView</extends>
- <header>divelistview.h</header>
- </customwidget>
- <customwidget>
- <class>GlobeGPS</class>
- <extends>QWidget</extends>
- <header>globe.h</header>
- <container>1</container>
- </customwidget>
- <customwidget>
- <class>DivePlannerWidget</class>
- <extends>QWidget</extends>
- <header>diveplanner.h</header>
- <container>1</container>
- </customwidget>
- <customwidget>
- <class>ProfileWidget2</class>
- <extends>QGraphicsView</extends>
- <header>qt-ui/profile/profilewidget2.h</header>
- </customwidget>
- <customwidget>
- <class>PlannerSettingsWidget</class>
- <extends>QWidget</extends>
- <header>diveplanner.h</header>
- <container>1</container>
- </customwidget>
- <customwidget>
<class>MultiFilter</class>
<extends>QWidget</extends>
<header>simplewidgets.h</header>
diff --git a/qt-ui/modeldelegates.cpp b/qt-ui/modeldelegates.cpp
index ee7dc6cf5..c6c46aa46 100644
--- a/qt-ui/modeldelegates.cpp
+++ b/qt-ui/modeldelegates.cpp
@@ -2,8 +2,13 @@
#include "dive.h"
#include "gettextfromc.h"
#include "mainwindow.h"
+#include "models.h"
+#include "starwidget.h"
+#include "profile/profilewidget2.h"
#include <QCompleter>
+#include <QKeyEvent>
+#include <QTextDocument>
QSize DiveListDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
{
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp
index fec7d02ed..bac9b4df0 100644
--- a/qt-ui/models.cpp
+++ b/qt-ui/models.cpp
@@ -14,6 +14,7 @@
#include "qthelper.h"
#include "gettextfromc.h"
#include "display.h"
+#include "color.h"
#include <QCoreApplication>
#include <QDebug>
@@ -1191,7 +1192,7 @@ QVariant DiveItem::data(int column, int role) const
retVal = dive->maxcns;
break;
case LOCATION:
- retVal = QString(dive->location);
+ retVal = QString(get_dive_location(dive));
break;
}
break;
@@ -1232,7 +1233,7 @@ QVariant DiveItem::data(int column, int role) const
retVal = dive->maxcns;
break;
case LOCATION:
- retVal = QString(dive->location);
+ retVal = QString(get_dive_location(dive));
break;
case GAS:
const char *gas_string = get_dive_gas_string(dive);
@@ -2110,7 +2111,7 @@ QVariant ProfilePrintModel::data(const QModelIndex &index, int role) const
}
if (row == 1) {
if (col == 0)
- return QString(dive->location);
+ return QString(get_dive_location(dive));
if (col == 3)
return QString(tr("Duration: %1 min")).arg(di.displayDuration());
}
diff --git a/qt-ui/plannerDetails.ui b/qt-ui/plannerDetails.ui
new file mode 100644
index 000000000..349ec536a
--- /dev/null
+++ b/qt-ui/plannerDetails.ui
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>plannerDetails</class>
+ <widget class="QWidget" name="plannerDetails">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>300</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="divePlanOutputLabel">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Dive plan details&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="printPlan">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Print</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTextEdit" name="divePlanOutput">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="styleSheet">
+ <string notr="true">font: 13pt &quot;Courier&quot;;</string>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ <property name="html">
+ <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
+&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
+p, li { white-space: pre-wrap; }
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Courier'; font-size:13pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Curier New';&quot;&gt;&lt;br /&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/qt-ui/plannerSettings.ui b/qt-ui/plannerSettings.ui
index af03fd1fb..440fb534a 100644
--- a/qt-ui/plannerSettings.ui
+++ b/qt-ui/plannerSettings.ui
@@ -475,7 +475,7 @@
<item>
<widget class="QGroupBox" name="groupBox_6">
<property name="title">
- <string>Dive notes</string>
+ <string>Notes</string>
</property>
<layout class="QGridLayout" name="gridLayout_6">
<property name="leftMargin">
diff --git a/qt-ui/preferences.cpp b/qt-ui/preferences.cpp
index ab241f358..e4f97002e 100644
--- a/qt-ui/preferences.cpp
+++ b/qt-ui/preferences.cpp
@@ -1,5 +1,7 @@
#include "preferences.h"
#include "mainwindow.h"
+#include "models.h"
+
#include <QSettings>
#include <QFileDialog>
#include <QMessageBox>
diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp
index 6b88f0d29..4be5fef73 100644
--- a/qt-ui/printlayout.cpp
+++ b/qt-ui/printlayout.cpp
@@ -3,11 +3,14 @@
#include <QPicture>
#include <QMessageBox>
#include <QPointer>
+#include <QTableView>
#include "mainwindow.h"
#include "printdialog.h"
#include "printlayout.h"
#include "modeldelegates.h"
+#include "models.h"
+#include "profile/profilewidget2.h"
PrintLayout::PrintLayout(PrintDialog *dialogPtr, QPrinter *printerPtr, struct print_options *optionsPtr)
{
@@ -459,7 +462,7 @@ void PrintLayout::addTablePrintDataRow(TablePrintModel *model, int row, struct d
model->setData(model->index(row, 3), di.displayDuration(), Qt::DisplayRole);
model->setData(model->index(row, 4), dive->divemaster, Qt::DisplayRole);
model->setData(model->index(row, 5), dive->buddy, Qt::DisplayRole);
- model->setData(model->index(row, 6), dive->location, Qt::DisplayRole);
+ model->setData(model->index(row, 6), get_dive_location(dive), Qt::DisplayRole);
}
void PrintLayout::addTablePrintHeadingRow(TablePrintModel *model, int row) const
diff --git a/qt-ui/profile/divecartesianaxis.cpp b/qt-ui/profile/divecartesianaxis.cpp
index 467a8b978..41d94a9a0 100644
--- a/qt-ui/profile/divecartesianaxis.cpp
+++ b/qt-ui/profile/divecartesianaxis.cpp
@@ -5,6 +5,8 @@
#include "diveplotdatamodel.h"
#include "animationfunctions.h"
#include "mainwindow.h"
+#include "divelineitem.h"
+#include "profilewidget2.h"
static QPen gridPen()
{
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index 3bc79832e..4ad0ba3ca 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -9,6 +9,9 @@
#include "helpers.h"
#include "libdivecomputer/parser.h"
#include "mainwindow.h"
+#include "maintab.h"
+#include "profile/profilewidget2.h"
+#include "diveplanner.h"
#include <QSettings>
@@ -682,8 +685,8 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
bool offsets_initialised = false;
int o2cyl = -1, dilcyl = -1;
- QFlags<Qt::AlignmentFlag> alignVar, align_dil = Qt::AlignBottom, align_o2 = Qt::AlignBottom;
- double axisRange = (vAxis->maximum() - vAxis->minimum())/1000;
+ QFlags<Qt::AlignmentFlag> alignVar= Qt::AlignTop, align_dil = Qt::AlignBottom, align_o2 = Qt::AlignTop;
+ double axisRange = (vAxis->maximum() - vAxis->minimum())/1000; // Convert axis pressure range to bar
double axisLog = log10(log10(axisRange));
for (int i = 0, count = dataModel->rowCount(); i < count; i++) {
entry = dataModel->data().entry + i;
@@ -691,23 +694,17 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
if (displayed_dive.dc.divemode == CCR && displayed_dive.oxygen_cylinder_index >= 0)
o2mbar = GET_O2CYLINDER_PRESSURE(entry);
- if (o2mbar) {
+ if (o2mbar) { // If there is an o2mbar value then this is a CCR dive. Then do:
// The first time an o2 value is detected, see if the oxygen cyl pressure graph starts above or below the dil graph
if (!offsets_initialised) { // Initialise the parameters for placing the text correctly near the graph line:
o2cyl = displayed_dive.oxygen_cylinder_index;
dilcyl = displayed_dive.diluent_cylinder_index;
if ((o2mbar > mbar)) { // If above, write o2 start cyl pressure above graph and diluent pressure below graph:
- print_y_offset[o2cyl][0] = -7 * axisLog; // y offset for oxygen gas lable (above)
- print_y_offset[o2cyl][1] = -0.5; // y offset for oxygen start pressure value (above)
+ print_y_offset[o2cyl][0] = -7 * axisLog; // y offset for oxygen gas lable (above); pressure offsets=-0.5, already initialised
print_y_offset[dilcyl][0] = 5 * axisLog; // y offset for diluent gas lable (below)
- print_y_offset[dilcyl][1] = 0; // y offset for diluent start pressure value (below)
- align_dil = Qt::AlignBottom;
- align_o2 = Qt::AlignTop;
- } else { // ... else write o2 start cyl pressure below graph:
- print_y_offset[o2cyl][0] = 5 * axisLog; // o2 lable & pressure below graph,
- print_y_offset[o2cyl][1] = 0;
- print_y_offset[dilcyl][0] = -7 * axisLog; // and diluent lable above graph.
- print_y_offset[dilcyl][1] = -0.5; // and diluent pressure above graph.
+ } else { // ... else write o2 start cyl pressure below graph:
+ print_y_offset[o2cyl][0] = 5 * axisLog; // o2 lable & pressure below graph; pressure offsets=-0.5, already initialised
+ print_y_offset[dilcyl][0] = -7.8 * axisLog; // and diluent lable above graph.
align_dil = Qt::AlignTop;
align_o2 = Qt::AlignBottom;
}
@@ -722,9 +719,6 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
last_pressure[displayed_dive.oxygen_cylinder_index] = o2mbar;
last_time[displayed_dive.oxygen_cylinder_index] = entry->sec;
alignVar = align_dil;
- } else {
- alignVar = Qt::AlignBottom;
- align_dil = Qt::AlignTop;
}
if (!mbar)
@@ -733,29 +727,19 @@ void DiveGasPressureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
if (cyl != entry->cylinderindex) { // Pressure value near the left hand edge of the profile - other cylinders:
cyl = entry->cylinderindex; // For each other cylinder, write the gas lable and pressure
if (!seen_cyl[cyl]) {
- plotPressureValue(mbar, entry->sec, alignVar, print_y_offset[cyl][0]);
- plotGasValue(mbar, entry->sec, displayed_dive.cylinder[cyl].gasmix, align_dil, print_y_offset[cyl][1]);
+ plotPressureValue(mbar, entry->sec, alignVar, print_y_offset[cyl][1]);
+ plotGasValue(mbar, entry->sec, displayed_dive.cylinder[cyl].gasmix, align_dil, print_y_offset[cyl][0]);
seen_cyl[cyl] = true;
}
}
last_pressure[cyl] = mbar;
last_time[cyl] = entry->sec;
}
- // Now, for the cylinder pressure written near the right edge of the profile:
- if ((o2cyl >= 0) && (dilcyl >= 0)) { // At first, skip uninitialised values of o2cyl and dilcyl
- if (last_pressure[o2cyl] > last_pressure[dilcyl]) { // If oxygen cyl pressure graph ends above diluent graph:
- align_dil = Qt::AlignTop; // initialise to write diluent cyl end pressure underneath the graph
- align_o2 = Qt::AlignBottom;
- } else {
- align_dil = Qt::AlignBottom; // else initialise to write diluent cyl end pressure above the graph
- align_o2 = Qt::AlignTop;
- }
- }
for (cyl = 0; cyl < MAX_CYLINDERS; cyl++) { // For each cylinder, on right hand side of profile, write cylinder pressure
alignVar = ((o2cyl >= 0) && (cyl == displayed_dive.oxygen_cylinder_index)) ? align_o2 : align_dil;
if (last_time[cyl]) {
- plotPressureValue(last_pressure[cyl], last_time[cyl], (alignVar | Qt::AlignLeft), print_y_offset[cyl][0]);
+ plotPressureValue(last_pressure[cyl], last_time[cyl], (alignVar | Qt::AlignLeft), print_y_offset[cyl][1]);
}
}
}
@@ -808,12 +792,14 @@ DiveCalculatedCeiling::DiveCalculatedCeiling() : is3mIncrement(false), gradientF
gradientFactor->setY(0);
gradientFactor->setBrush(getColor(PRESSURE_TEXT));
gradientFactor->setAlignment(Qt::AlignHCenter | Qt::AlignBottom);
- connect(MainWindow::instance()->information(), SIGNAL(dateTimeChanged()), this, SLOT(recalc()));
settingsChanged();
}
void DiveCalculatedCeiling::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
+ if (MainWindow::instance()->information())
+ connect(MainWindow::instance()->information(), SIGNAL(dateTimeChanged()), this, SLOT(recalc()), Qt::UniqueConnection);
+
// We don't have enougth data to calculate things, quit.
if (!shouldCalculateStuff(topLeft, bottomRight))
return;
diff --git a/qt-ui/profile/divetextitem.cpp b/qt-ui/profile/divetextitem.cpp
index 85e046638..4c0137177 100644
--- a/qt-ui/profile/divetextitem.cpp
+++ b/qt-ui/profile/divetextitem.cpp
@@ -1,5 +1,6 @@
#include "divetextitem.h"
#include "mainwindow.h"
+#include "profilewidget2.h"
DiveTextItem::DiveTextItem(QGraphicsItem *parent) : QGraphicsItemGroup(parent),
internalAlignFlags(Qt::AlignHCenter | Qt::AlignVCenter),
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index f04d16b3f..1de45ff9f 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -10,12 +10,18 @@
#include "ruleritem.h"
#include "tankitem.h"
#include "pref.h"
+#include "divepicturewidget.h"
+#include "models.h"
+#include "maintab.h"
+#include "diveplanner.h"
+
#include <libdivecomputer/parser.h>
#include <QScrollBar>
#include <QtCore/qmath.h>
#include <QMessageBox>
#include <QInputDialog>
#include <QDebug>
+#include <QWheelEvent>
#ifndef QT_NO_DEBUG
#include <QTableView>
diff --git a/qt-ui/profile/ruleritem.cpp b/qt-ui/profile/ruleritem.cpp
index c88a3353d..ddd8f4620 100644
--- a/qt-ui/profile/ruleritem.cpp
+++ b/qt-ui/profile/ruleritem.cpp
@@ -1,6 +1,8 @@
#include "ruleritem.h"
#include "preferences.h"
#include "mainwindow.h"
+#include "profilewidget2.h"
+#include "display.h"
#include <qgraphicssceneevent.h>
diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp
index f8f4c2493..f7944c90c 100644
--- a/qt-ui/simplewidgets.cpp
+++ b/qt-ui/simplewidgets.cpp
@@ -5,12 +5,17 @@
#include <QFileDialog>
#include <QShortcut>
#include <QCalendarWidget>
+#include <QKeyEvent>
+#include <QAction>
#include "file.h"
#include "mainwindow.h"
#include "helpers.h"
#include "libdivecomputer/parser.h"
-
+#include "divelistview.h"
+#include "display.h"
+#include "profile/profilewidget2.h"
+#include "undocommands.h"
class MinMaxAvgWidgetPrivate {
public:
@@ -169,7 +174,6 @@ void SetpointDialog::buttonClicked(QAbstractButton *button)
add_event(dc, time, SAMPLE_EVENT_PO2, 0, (int)(1000.0 * ui.spinbox->value()), "SP change");
mark_divelist_changed(true);
MainWindow::instance()->graphics()->replot();
-
}
SetpointDialog::SetpointDialog(QWidget *parent) : QDialog(parent)
@@ -198,7 +202,16 @@ void ShiftTimesDialog::buttonClicked(QAbstractButton *button)
amount *= -1;
if (amount != 0) {
// DANGER, DANGER - this could get our dive_table unsorted...
- shift_times(amount);
+ int i;
+ struct dive *dive;
+ QList<int> affectedDives;
+ for_each_dive (i, dive) {
+ if (!dive->selected)
+ continue;
+
+ affectedDives.append(dive->id);
+ }
+ MainWindow::instance()->undoStack->push(new UndoShiftTime(affectedDives, amount));
sort_table(&dive_table);
mark_divelist_changed(true);
MainWindow::instance()->dive_list()->rememberSelection();
@@ -454,8 +467,7 @@ DiveComponentSelection::DiveComponentSelection(QWidget *parent, struct dive *tar
{
ui.setupUi(this);
what = _what;
- UI_FROM_COMPONENT(location);
- UI_FROM_COMPONENT(gps);
+ UI_FROM_COMPONENT(divesite);
UI_FROM_COMPONENT(divemaster);
UI_FROM_COMPONENT(buddy);
UI_FROM_COMPONENT(rating);
@@ -475,8 +487,7 @@ DiveComponentSelection::DiveComponentSelection(QWidget *parent, struct dive *tar
void DiveComponentSelection::buttonClicked(QAbstractButton *button)
{
if (ui.buttonBox->buttonRole(button) == QDialogButtonBox::AcceptRole) {
- COMPONENT_FROM_UI(location);
- COMPONENT_FROM_UI(gps);
+ COMPONENT_FROM_UI(divesite);
COMPONENT_FROM_UI(divemaster);
COMPONENT_FROM_UI(buddy);
COMPONENT_FROM_UI(rating);
@@ -644,3 +655,93 @@ void MultiFilter::closeFilter()
MultiFilterSortModel::instance()->clearFilter();
hide();
}
+#include <QDebug>
+#include <QShowEvent>
+
+LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBox(parent)
+{
+ ui.setupUi(this);
+ ui.diveSiteMessage->setText("You are editing the Dive Site");
+ ui.diveSiteMessage->setCloseButtonVisible(false);
+
+ QAction *action = new QAction(tr("Apply changes"), this);
+ connect(action, SIGNAL(triggered(bool)), this, SLOT(acceptChanges()));
+ ui.diveSiteMessage->addAction(action);
+
+ action = new QAction(tr("Discard changes"), this);
+ connect(action, SIGNAL(triggered(bool)), this, SLOT(rejectChanges()));
+ ui.diveSiteMessage->addAction(action);
+}
+
+void LocationInformationWidget::setLocationId(uint32_t uuid)
+{
+ currentDs = get_dive_site_by_uuid(uuid);
+
+ if (!currentDs) {
+ currentDs = get_dive_site_by_uuid(create_dive_site(""));
+ displayed_dive.dive_site_uuid = currentDs->uuid;
+ ui.diveSiteName->clear();
+ ui.diveSiteDescription->clear();
+ ui.diveSiteNotes->clear();
+ ui.diveSiteCoordinates->clear();
+ }
+ displayed_dive_site = *currentDs;
+ ui.diveSiteName->setText(displayed_dive_site.name);
+ ui.diveSiteDescription->setText(displayed_dive_site.description);
+ ui.diveSiteNotes->setPlainText(displayed_dive_site.notes);
+ ui.diveSiteCoordinates->setText(printGPSCoords(displayed_dive_site.latitude.udeg, displayed_dive_site.longitude.udeg));
+}
+
+void LocationInformationWidget::updateGpsCoordinates()
+{
+ ui.diveSiteCoordinates->setText(printGPSCoords(displayed_dive_site.latitude.udeg, displayed_dive_site.longitude.udeg));
+ MainWindow::instance()->setApplicationState("EditDiveSite");
+}
+
+void LocationInformationWidget::acceptChanges()
+{
+ char *uiString;
+ currentDs->latitude = displayed_dive_site.latitude;
+ currentDs->longitude = displayed_dive_site.longitude;
+ uiString = ui.diveSiteName->text().toUtf8().data();
+ if (!same_string(uiString, currentDs->name)) {
+ free(currentDs->name);
+ currentDs->name = copy_string(uiString);
+ }
+ uiString = ui.diveSiteDescription->text().toUtf8().data();
+ if (!same_string(uiString, currentDs->description)) {
+ free(currentDs->description);
+ currentDs->description = copy_string(uiString);
+ }
+ uiString = ui.diveSiteNotes->document()->toPlainText().toUtf8().data();
+ if (!same_string(uiString, currentDs->notes)) {
+ free(currentDs->notes);
+ currentDs->notes = copy_string(uiString);
+ }
+ if (dive_site_is_empty(currentDs)) {
+ delete_dive_site(currentDs->uuid);
+ displayed_dive.dive_site_uuid = 0;
+ setLocationId(0);
+ } else {
+ setLocationId(currentDs->uuid);
+ }
+ mark_divelist_changed(true);
+ emit informationManagementEnded();
+}
+
+void LocationInformationWidget::rejectChanges()
+{
+ Q_ASSERT(currentDs != NULL);
+ if (dive_site_is_empty(currentDs)) {
+ delete_dive_site(currentDs->uuid);
+ displayed_dive.dive_site_uuid = 0;
+ setLocationId(0);
+ } else {
+ setLocationId(currentDs->uuid);
+ }
+ emit informationManagementEnded();
+}
+
+void LocationInformationWidget::showEvent(QShowEvent *ev) {
+ ui.diveSiteMessage->setCloseButtonVisible(false);
+}
diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h
index 8d5b4f73c..d0cb60508 100644
--- a/qt-ui/simplewidgets.h
+++ b/qt-ui/simplewidgets.h
@@ -6,6 +6,7 @@ class QAbstractButton;
class QNetworkReply;
#include <QWidget>
+#include <QGroupBox>
#include <QDialog>
#include <stdint.h>
@@ -214,6 +215,30 @@ private:
Ui::FilterWidget ui;
};
+#include "ui_locationInformation.h"
+
+class LocationInformationWidget : public QGroupBox {
+Q_OBJECT
+public:
+ LocationInformationWidget(QWidget *parent = 0);
+
+public slots:
+ void acceptChanges();
+ void rejectChanges();
+
+ void showEvent(QShowEvent *);
+
+ void setLocationId(uint32_t uuid);
+ void updateGpsCoordinates(void);
+
+signals:
+ void informationManagementEnded();
+
+private:
+ struct dive_site *currentDs;
+ Ui::LocationInformation ui;
+};
+
bool isGnome3Session();
QImage grayImage(const QImage &coloredImg);
diff --git a/qt-ui/socialnetworks.cpp b/qt-ui/socialnetworks.cpp
index 21ccf9354..6a81d5db7 100644
--- a/qt-ui/socialnetworks.cpp
+++ b/qt-ui/socialnetworks.cpp
@@ -302,7 +302,7 @@ void SocialNetworkDialog::selectionChanged()
tr("min", "abbreviation for minutes")));
}
if (ui->Location->isChecked()) {
- fullText += tr("Dive location: %1 \n").arg(d->location);
+ fullText += tr("Dive location: %1 \n").arg(get_dive_location(d));
}
if (ui->Buddy->isChecked()) {
fullText += tr("Buddy: %1 \n").arg(d->buddy);
diff --git a/qt-ui/subsurfacewebservices.cpp b/qt-ui/subsurfacewebservices.cpp
index fe7605ad7..0348d6b8f 100644
--- a/qt-ui/subsurfacewebservices.cpp
+++ b/qt-ui/subsurfacewebservices.cpp
@@ -2,6 +2,10 @@
#include "webservice.h"
#include "mainwindow.h"
#include "usersurvey.h"
+#include "divelist.h"
+#include "globe.h"
+#include "maintab.h"
+#include "display.h"
#include <errno.h>
#include <QDir>
@@ -26,7 +30,25 @@
#endif
struct dive_table gps_location_table;
-static bool merge_locations_into_dives(void);
+
+// we don't overwrite any existing GPS info in the dive
+// so get the dive site and if there is none or there is one without GPS fix, add it
+static void copy_gps_location(struct dive *from, struct dive *to)
+{
+ struct dive_site *ds = get_dive_site_for_dive(to);
+ if (!ds || !dive_site_has_gps_location(ds)) {
+ struct dive_site *gds = get_dive_site_for_dive(from);
+ if (!ds) {
+ // simply link to the one created for the fake dive
+ to->dive_site_uuid = gds->uuid;
+ } else {
+ ds->latitude = gds->latitude;
+ ds->longitude = gds->longitude;
+ if (same_string(ds->name, ""))
+ ds->name = copy_string(gds->name);
+ }
+ }
+}
#define SAME_GROUP 6 * 3600 // six hours
//TODO: C Code. static functions are not good if we plan to have a test for them.
@@ -39,14 +61,14 @@ static bool merge_locations_into_dives(void)
for_each_dive (i, dive) {
if (!dive_has_gps_location(dive)) {
- for (j = tracer; (gpsfix = get_gps_location(j, &gps_location_table)) !=NULL; j++) {
+ for (j = tracer; (gpsfix = get_dive_from_table(j, &gps_location_table)) !=NULL; j++) {
if (dive_within_time_range (dive, gpsfix->when, SAME_GROUP)) {
/*
* If position is fixed during dive. This is the good one.
* Asign and mark position, and end gps_location loop
*/
if ((dive->when <= gpsfix->when && gpsfix->when <= dive->when + dive->duration.seconds)) {
- copy_gps_location(gpsfix,dive);
+ copy_gps_location(gpsfix, dive);
changed++;
tracer = j;
break;
@@ -54,7 +76,7 @@ static bool merge_locations_into_dives(void)
/*
* If it is not, check if there are more position fixes in SAME_GROUP range
*/
- if ((nextgpsfix = get_gps_location(j+1,&gps_location_table)) &&
+ if ((nextgpsfix = get_dive_from_table(j+1,&gps_location_table)) &&
dive_within_time_range (dive, nextgpsfix->when, SAME_GROUP)) {
/*
* If distance from gpsfix to end of dive is shorter than distance between
@@ -62,7 +84,7 @@ static bool merge_locations_into_dives(void)
* If not, simply fail and nextgpsfix will be evaluated in next iteration.
*/
if ((dive->when + dive->duration.seconds - gpsfix->when) < (nextgpsfix->when - gpsfix->when)) {
- copy_gps_location(gpsfix,dive);
+ copy_gps_location(gpsfix, dive);
tracer = j;
break;
}
@@ -70,7 +92,7 @@ static bool merge_locations_into_dives(void)
* If no more positions in range, the actual is the one. Asign, mark and end loop.
*/
} else {
- copy_gps_location(gpsfix,dive);
+ copy_gps_location(gpsfix, dive);
changed++;
tracer = j;
break;
@@ -326,10 +348,19 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button)
ui.buttonBox->button(QDialogButtonBox::Apply)->setEnabled(false);
switch (ui.buttonBox->buttonRole(button)) {
case QDialogButtonBox::ApplyRole: {
+ int i;
+ struct dive *d;
+ struct dive_site *ds;
clear_table(&gps_location_table);
QByteArray url = tr("Webservice").toLocal8Bit();
parse_xml_buffer(url.data(), downloadedData.data(), downloadedData.length(), &gps_location_table, NULL);
-
+ // make sure we mark all the dive sites that were created
+ for (i = 0; i < gps_location_table.nr; i++) {
+ d = get_dive_from_table(i, &gps_location_table);
+ ds = get_dive_site_by_uuid(d->dive_site_uuid);
+ if (ds)
+ ds->notes = strdup("SubsurfaceWebservice");
+ }
/* now merge the data in the gps_location table into the dive_table */
if (merge_locations_into_dives()) {
mark_divelist_changed(true);
@@ -358,6 +389,16 @@ void SubsurfaceWebServices::buttonClicked(QAbstractButton *button)
hide();
close();
resetState();
+ /* and now clean up and remove all the extra dive sites that were created */
+ QSet<uint32_t> usedUuids;
+ for_each_dive(i, d) {
+ if (d->dive_site_uuid)
+ usedUuids.insert(d->dive_site_uuid);
+ }
+ for_each_dive_site(i, ds) {
+ if (!usedUuids.contains(ds->uuid) && same_string(ds->notes, "SubsurfaceWebservice"))
+ delete_dive_site(ds->uuid);
+ }
} break;
case QDialogButtonBox::RejectRole:
if (reply != NULL && reply->isOpen()) {
diff --git a/qt-ui/tagwidget.cpp b/qt-ui/tagwidget.cpp
index 8365a2ea7..3b61b492a 100644
--- a/qt-ui/tagwidget.cpp
+++ b/qt-ui/tagwidget.cpp
@@ -1,5 +1,6 @@
#include "tagwidget.h"
#include "mainwindow.h"
+#include "maintab.h"
#include <QCompleter>
TagWidget::TagWidget(QWidget *parent) : GroupedLineEdit(parent), m_completer(NULL), lastFinishedTag(false)
diff --git a/qt-ui/undocommands.cpp b/qt-ui/undocommands.cpp
new file mode 100644
index 000000000..316def495
--- /dev/null
+++ b/qt-ui/undocommands.cpp
@@ -0,0 +1,64 @@
+#include "undocommands.h"
+#include "mainwindow.h"
+#include "divelist.h"
+
+UndoDeleteDive::UndoDeleteDive(QList<dive *> diveList)
+{
+ dives = diveList;
+ setText("delete dive");
+ if (dives.count() > 1)
+ setText(QString("delete %1 dives").arg(QString::number(dives.count())));
+}
+
+void UndoDeleteDive::undo()
+{
+ for (int i = 0; i < dives.count(); i++)
+ record_dive(dives.at(i));
+ mark_divelist_changed(true);
+ MainWindow::instance()->refreshDisplay();
+}
+
+void UndoDeleteDive::redo()
+{
+ QList<struct dive*> newList;
+ for (int i = 0; i < dives.count(); i++) {
+ //make a copy of the dive before deleting it
+ struct dive* d = alloc_dive();
+ copy_dive(dives.at(i), d);
+ newList.append(d);
+ //delete the dive
+ delete_single_dive(get_divenr(dives.at(i)));
+ }
+ mark_divelist_changed(true);
+ MainWindow::instance()->refreshDisplay();
+ dives.clear();
+ dives = newList;
+}
+
+
+UndoShiftTime::UndoShiftTime(QList<int> diveList, int amount)
+{
+ setText("shift time");
+ dives = diveList;
+ timeChanged = amount;
+}
+
+void UndoShiftTime::undo()
+{
+ for (int i = 0; i < dives.count(); i++) {
+ struct dive* d = get_dive_by_uniq_id(dives.at(i));
+ d->when -= timeChanged;
+ }
+ mark_divelist_changed(true);
+ MainWindow::instance()->refreshDisplay();
+}
+
+void UndoShiftTime::redo()
+{
+ for (int i = 0; i < dives.count(); i++) {
+ struct dive* d = get_dive_by_uniq_id(dives.at(i));
+ d->when += timeChanged;
+ }
+ mark_divelist_changed(true);
+ MainWindow::instance()->refreshDisplay();
+}
diff --git a/qt-ui/undocommands.h b/qt-ui/undocommands.h
new file mode 100644
index 000000000..addef8138
--- /dev/null
+++ b/qt-ui/undocommands.h
@@ -0,0 +1,28 @@
+#ifndef UNDOCOMMANDS_H
+#define UNDOCOMMANDS_H
+
+#include <QUndoCommand>
+#include "dive.h"
+
+class UndoDeleteDive : public QUndoCommand {
+public:
+ UndoDeleteDive(QList<struct dive*> diveList);
+ virtual void undo();
+ virtual void redo();
+
+private:
+ QList<struct dive*> dives;
+};
+
+class UndoShiftTime : public QUndoCommand {
+public:
+ UndoShiftTime(QList<int> diveList, int amount);
+ virtual void undo();
+ virtual void redo();
+
+private:
+ QList<int> dives;
+ int timeChanged;
+};
+
+#endif // UNDOCOMMANDS_H
diff --git a/qt-ui/updatemanager.cpp b/qt-ui/updatemanager.cpp
index 3fff8b45d..fbaa6ba3c 100644
--- a/qt-ui/updatemanager.cpp
+++ b/qt-ui/updatemanager.cpp
@@ -4,7 +4,7 @@
#include <QMessageBox>
#include <QUuid>
#include "subsurfacewebservices.h"
-#include "ssrf-version.h"
+#include "version.h"
#include "mainwindow.h"
UpdateManager::UpdateManager(QObject *parent) : QObject(parent)
@@ -16,9 +16,9 @@ UpdateManager::UpdateManager(QObject *parent) : QObject(parent)
return;
if (settings.contains("LastVersionUsed")) {
// we have checked at least once before
- if (settings.value("LastVersionUsed").toString() != GIT_VERSION_STRING) {
+ if (settings.value("LastVersionUsed").toString() != subsurface_git_version()) {
// we have just updated - wait two weeks before you check again
- settings.setValue("LastVersionUsed", QString(GIT_VERSION_STRING));
+ settings.setValue("LastVersionUsed", QString(subsurface_git_version()));
settings.setValue("NextCheck", QDateTime::currentDateTime().addDays(14).toString(Qt::ISODate));
} else {
// is it time to check again?
@@ -28,7 +28,7 @@ UpdateManager::UpdateManager(QObject *parent) : QObject(parent)
return;
}
}
- settings.setValue("LastVersionUsed", QString(GIT_VERSION_STRING));
+ settings.setValue("LastVersionUsed", QString(subsurface_git_version()));
settings.setValue("NextCheck", QDateTime::currentDateTime().addDays(14).toString(Qt::ISODate));
checkForUpdates(true);
}
@@ -47,7 +47,7 @@ void UpdateManager::checkForUpdates(bool automatic)
os = "unknown";
#endif
isAutomaticCheck = automatic;
- QString version = CANONICAL_VERSION_STRING;
+ QString version = subsurface_canonical_version();
QString uuidString = getUUID();
QString url = QString("http://subsurface-divelog.org/updatecheck.html?os=%1&version=%2&uuid=%3").arg(os, version, uuidString);
QNetworkRequest request;
diff --git a/qt-ui/usersurvey.cpp b/qt-ui/usersurvey.cpp
index 4061d46df..a2b47e4d0 100644
--- a/qt-ui/usersurvey.cpp
+++ b/qt-ui/usersurvey.cpp
@@ -4,7 +4,7 @@
#include "usersurvey.h"
#include "ui_usersurvey.h"
-#include "ssrf-version.h"
+#include "version.h"
#include "subsurfacewebservices.h"
#include "updatemanager.h"
@@ -22,12 +22,12 @@ UserSurvey::UserSurvey(QWidget *parent) : QDialog(parent),
QShortcut *quitKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this);
connect(quitKey, SIGNAL(activated()), parent, SLOT(close()));
- os = QString("ssrfVers=%1").arg(VERSION_STRING);
+ os = QString("ssrfVers=%1").arg(subsurface_version());
os.append(QString("&prettyOsName=%1").arg(SubsurfaceSysInfo::prettyOsName()));
- QString arch = SubsurfaceSysInfo::cpuArchitecture();
+ QString arch = SubsurfaceSysInfo::buildCpuArchitecture();
os.append(QString("&appCpuArch=%1").arg(arch));
if (arch == "i386") {
- QString osArch = SubsurfaceSysInfo::osArch();
+ QString osArch = SubsurfaceSysInfo::currentCpuArchitecture();
os.append(QString("&osCpuArch=%1").arg(osArch));
}
os.append(QString("&uiLang=%1").arg(uiLanguage(NULL)));
@@ -39,12 +39,12 @@ QString UserSurvey::getVersion()
{
QString arch;
// fill in the system data
- QString sysInfo = QString("Subsurface %1").arg(VERSION_STRING);
+ QString sysInfo = QString("Subsurface %1").arg(subsurface_version());
sysInfo.append(tr("\nOperating system: %1").arg(SubsurfaceSysInfo::prettyOsName()));
- arch = SubsurfaceSysInfo::cpuArchitecture();
+ arch = SubsurfaceSysInfo::buildCpuArchitecture();
sysInfo.append(tr("\nCPU architecture: %1").arg(arch));
if (arch == "i386")
- sysInfo.append(tr("\nOS CPU architecture: %1").arg(SubsurfaceSysInfo::osArch()));
+ sysInfo.append(tr("\nOS CPU architecture: %1").arg(SubsurfaceSysInfo::currentCpuArchitecture()));
sysInfo.append(tr("\nLanguage: %1").arg(uiLanguage(NULL)));
return sysInfo;
}
@@ -54,12 +54,12 @@ QString UserSurvey::getUserAgent()
QString arch;
// fill in the system data - use ':' as separator
// replace all other ':' with ' ' so that this is easy to parse
- QString userAgent = QString("Subsurface:%1:").arg(VERSION_STRING);
+ QString userAgent = QString("Subsurface:%1:").arg(subsurface_version());
userAgent.append(SubsurfaceSysInfo::prettyOsName().replace(':', ' ') + ":");
- arch = SubsurfaceSysInfo::cpuArchitecture().replace(':', ' ');
+ arch = SubsurfaceSysInfo::buildCpuArchitecture().replace(':', ' ');
userAgent.append(arch);
if (arch == "i386")
- userAgent.append("/" + SubsurfaceSysInfo::osArch());
+ userAgent.append("/" + SubsurfaceSysInfo::currentCpuArchitecture());
userAgent.append(":" + uiLanguage(NULL));
return userAgent;
diff --git a/qthelper.cpp b/qthelper.cpp
index acb1e103a..b26bdf467 100644
--- a/qthelper.cpp
+++ b/qthelper.cpp
@@ -1,6 +1,10 @@
#include "qthelper.h"
+#include "helpers.h"
#include "gettextfromc.h"
#include "statistics.h"
+#include "subsurfacewebservices.h"
+#include "usersurvey.h"
+#include "membuffer.h"
#include <exif.h>
#include "file.h"
#include <QFile>
@@ -8,6 +12,16 @@
#include <QDir>
#include <QDebug>
#include <QSettings>
+#include <QStandardPaths>
+#include <QJsonDocument>
+#include <QJsonArray>
+#include <QJsonObject>
+#include <QNetworkReply>
+#include <QNetworkRequest>
+#include <QNetworkAccessManager>
+#include <QUrlQuery>
+#include <QEventLoop>
+
#include <libxslt/documents.h>
#define translate(_context, arg) trGettext(arg)
@@ -31,7 +45,7 @@ QString weight_string(int weight_in_grams)
return (str);
}
-QString printGPSCoords(int lat, int lon)
+extern "C" const char *printGPSCoords(int lat, int lon)
{
unsigned int latdeg, londeg;
unsigned int latmin, lonmin;
@@ -39,7 +53,7 @@ QString printGPSCoords(int lat, int lon)
QString lath, lonh, result;
if (!lat && !lon)
- return QString();
+ return strdup("");
lath = lat >= 0 ? translate("gettextFromC", "N") : translate("gettextFromC", "S");
lonh = lon >= 0 ? translate("gettextFromC", "E") : translate("gettextFromC", "W");
@@ -54,7 +68,7 @@ QString printGPSCoords(int lat, int lon)
result.sprintf("%u%s%02d\'%06.3f\"%s %u%s%02d\'%06.3f\"%s",
latdeg, UTF8_DEGREE, latmin / 1000000, latsec / 1000000, lath.toUtf8().data(),
londeg, UTF8_DEGREE, lonmin / 1000000, lonsec / 1000000, lonh.toUtf8().data());
- return result;
+ return strdup(result.toUtf8().data());
}
static bool parseCoord(const QString& txt, int& pos, const QString& positives,
@@ -165,6 +179,7 @@ bool parseGpsText(const QString &gps_text, double *latitude, double *longitude)
pos == gps_text.size();
}
+#if 0 // we'll need something like this for the dive site management, eventually
bool gpsHasChanged(struct dive *dive, struct dive *master, const QString &gps_text, bool *parsed_out)
{
double latitude, longitude;
@@ -193,6 +208,7 @@ bool gpsHasChanged(struct dive *dive, struct dive *master, const QString &gps_te
dive->longitude.udeg = longudeg;
return true;
}
+#endif
QList<int> getDivesInTrip(dive_trip_t *trip)
{
@@ -283,6 +299,26 @@ picture_load_exit:
return;
}
+extern "C" const char *system_default_directory(void)
+{
+ static char filename[PATH_MAX];
+
+ if (!*filename) {
+ enum QStandardPaths::StandardLocation location;
+#if QT_VERSION >= 0x050400
+ location = QStandardPaths::AppDataLocation;
+#else
+ location = QStandardPaths::DataLocation;
+#endif
+ QString name = QStandardPaths::standardLocations(location).first();
+ QDir dir(name);
+ dir.mkpath(name);
+ // Why no "dir.encodeName()"? Crazy Qt
+ strncpy(filename, QFile::encodeName(name), PATH_MAX-1);
+ }
+ return filename;
+}
+
extern "C" char *get_file_name(const char *fileName)
{
QFileInfo fileInfo(fileName);
@@ -340,3 +376,28 @@ void selectedDivesGasUsed(QVector<QPair<QString, int> > &gasUsedOrdered)
}
qSort(gasUsedOrdered.begin(), gasUsedOrdered.end(), lessThan);
}
+
+extern "C" void reverseGeoLookup(degrees_t latitude, degrees_t longitude, uint32_t uuid)
+{
+ QNetworkRequest request;
+ QNetworkAccessManager *rgl = new QNetworkAccessManager();
+ request.setUrl(QString("http://open.mapquestapi.com/nominatim/v1/reverse.php?format=json&accept-language=%1&lat=%2&lon=%3")
+ .arg(uiLanguage(NULL)).arg(latitude.udeg / 1000000.0).arg(longitude.udeg / 1000000.0));
+ request.setRawHeader("Accept", "text/json");
+ request.setRawHeader("User-Agent", UserSurvey::getUserAgent().toUtf8());
+ QNetworkReply *reply = rgl->get(request);
+ QEventLoop loop;
+ QObject::connect(reply, SIGNAL(finished()), &loop, SLOT(quit()));
+ loop.exec();
+ QJsonParseError errorObject;
+ QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll(), &errorObject);
+ if (errorObject.error != QJsonParseError::NoError) {
+ qDebug() << errorObject.errorString();
+ } else {
+ QJsonObject obj = jsonDoc.object();
+ QJsonObject address = obj.value("address").toObject();
+ qDebug() << "found country:" << address.value("country").toString();
+ struct dive_site *ds = get_dive_site_by_uuid(uuid);
+ ds->notes = add_to_string(ds->notes, "countrytag: %s", address.value("country").toString().toUtf8().data());
+ }
+}
diff --git a/qthelper.h b/qthelper.h
index ccc57bc93..a367a9dac 100644
--- a/qthelper.h
+++ b/qthelper.h
@@ -13,7 +13,7 @@ extern QTranslator *qtTranslator, *ssrfTranslator;
QString weight_string(int weight_in_grams);
bool gpsHasChanged(struct dive *dive, struct dive *master, const QString &gps_text, bool *parsed_out = 0);
-QString printGPSCoords(int lat, int lon);
+extern "C" const char *printGPSCoords(int lat, int lon);
QList<int> getDivesInTrip(dive_trip_t *trip);
QString gasToStr(struct gasmix gas);
diff --git a/save-git.c b/save-git.c
index 6c2587bf8..0125f64d7 100644
--- a/save-git.c
+++ b/save-git.c
@@ -13,7 +13,7 @@
#include "dive.h"
#include "device.h"
#include "membuffer.h"
-#include "ssrf-version.h"
+#include "version.h"
/*
* handle libgit2 revision 0.20 and earlier
@@ -104,8 +104,6 @@ static void show_utf8(struct membuffer *b, const char *prefix, const char *value
static void save_overview(struct membuffer *b, struct dive *dive)
{
- show_gps(b, dive->latitude, dive->longitude);
- show_utf8(b, "location ", dive->location, "\n");
show_utf8(b, "divemaster ", dive->divemaster, "\n");
show_utf8(b, "buddy ", dive->buddy, "\n");
show_utf8(b, "suit ", dive->suit, "\n");
@@ -390,6 +388,7 @@ static void create_dive_buffer(struct dive *dive, struct membuffer *b)
SAVE("visibility", visibility);
cond_put_format(dive->tripflag == NO_TRIP, b, "notrip\n");
save_tags(b, dive->tag_list);
+ cond_put_format(dive->dive_site_uuid, b, "divesiteid %08x\n", dive->dive_site_uuid);
save_overview(b, dive);
save_cylinder_info(b, dive);
@@ -804,7 +803,7 @@ static void save_one_device(void *_b, const char *model, uint32_t deviceid,
put_string(b, "\n");
}
-#define VERSION 2
+#define VERSION 3
static void save_settings(git_repository *repo, struct dir *tree)
{
@@ -818,6 +817,38 @@ static void save_settings(git_repository *repo, struct dir *tree)
blob_insert(repo, tree, &b, "00-Subsurface");
}
+static void save_divesites(git_repository *repo, struct dir *tree)
+{
+ struct dir *subdir;
+ struct membuffer dirname = { 0 };
+ put_format(&dirname, "01-Divesites");
+ subdir = new_directory(repo, tree, &dirname);
+
+ for (int i = 0; i < dive_site_table.nr; i++) {
+ struct membuffer b = { 0 };
+ struct dive_site *ds = get_dive_site(i);
+ if (dive_site_is_empty(ds)) {
+ int j;
+ struct dive *d;
+ for_each_dive(j, d) {
+ if (d->dive_site_uuid == ds->uuid)
+ d->dive_site_uuid = 0;
+ }
+ delete_dive_site(get_dive_site(i)->uuid);
+ i--; // since we just deleted that one
+ continue;
+ }
+ int size = sizeof("Site-012345678");
+ char name[size];
+ snprintf(name, size, "Site-%08x", ds->uuid);
+ show_utf8(&b, "name ", ds->name, "\n");
+ show_utf8(&b, "description ", ds->description, "\n");
+ show_utf8(&b, "notes ", ds->notes, "\n");
+ show_gps(&b, ds->latitude, ds->longitude);
+ blob_insert(repo, subdir, &b, name);
+ }
+}
+
static int create_git_tree(git_repository *repo, struct dir *root, bool select_only)
{
int i;
@@ -826,6 +857,8 @@ static int create_git_tree(git_repository *repo, struct dir *root, bool select_o
save_settings(repo, root);
+ save_divesites(repo, root);
+
for (trip = dive_trip_list; trip != NULL; trip = trip->next)
trip->index = 0;
@@ -938,7 +971,7 @@ static void create_commit_message(struct membuffer *msg)
if (dive) {
dive_trip_t *trip = dive->divetrip;
- const char *location = dive->location ? : "no location";
+ const char *location = get_dive_location(dive) ? : "no location";
struct divecomputer *dc = &dive->dc;
const char *sep = "\n";
@@ -957,7 +990,7 @@ static void create_commit_message(struct membuffer *msg)
} while ((dc = dc->next) != NULL);
put_format(msg, "\n");
}
- put_format(msg, "Created by subsurface %s\n", VERSION_STRING);
+ put_format(msg, "Created by subsurface %s\n", subsurface_version());
}
static int create_new_commit(git_repository *repo, const char *branch, git_oid *tree_id)
@@ -1094,73 +1127,6 @@ static int do_git_save(git_repository *repo, const char *branch, bool select_onl
return create_new_commit(repo, branch, &id);
}
-/*
- * If it's not a git repo, return NULL. Be very conservative.
- */
-struct git_repository *is_git_repository(const char *filename, const char **branchp)
-{
- int flen, blen, ret;
- struct stat st;
- git_repository *repo;
- char *loc, *branch;
-
- flen = strlen(filename);
- if (!flen || filename[--flen] != ']')
- return NULL;
-
- /* Find the matching '[' */
- blen = 0;
- while (flen && filename[--flen] != '[')
- blen++;
-
- if (!flen)
- return NULL;
-
- /*
- * This is the "point of no return": the name matches
- * the git repository name rules, and we will no longer
- * return NULL.
- *
- * We will either return "dummy_git_repository" and the
- * branch pointer will have the _whole_ filename in it,
- * or we will return a real git repository with the
- * branch pointer being filled in with just the branch
- * name.
- *
- * The actual git reading/writing routines can use this
- * to generate proper error messages.
- */
- *branchp = filename;
- loc = malloc(flen+1);
- if (!loc)
- return dummy_git_repository;
- memcpy(loc, filename, flen);
- loc[flen] = 0;
-
- branch = malloc(blen+1);
- if (!branch) {
- free(loc);
- return dummy_git_repository;
- }
- memcpy(branch, filename+flen+1, blen);
- branch[blen] = 0;
-
- if (stat(loc, &st) < 0 || !S_ISDIR(st.st_mode)) {
- free(loc);
- free(branch);
- return dummy_git_repository;
- }
-
- ret = git_repository_open(&repo, loc);
- free(loc);
- if (ret < 0) {
- free(branch);
- return dummy_git_repository;
- }
- *branchp = branch;
- return repo;
-}
-
int git_save_dives(struct git_repository *repo, const char *branch, bool select_only)
{
int ret;
diff --git a/save-html.c b/save-html.c
index d67931d8f..13d2fd559 100644
--- a/save-html.c
+++ b/save-html.c
@@ -172,8 +172,11 @@ void put_HTML_samples(struct membuffer *b, struct dive *dive)
void put_HTML_coordinates(struct membuffer *b, struct dive *dive)
{
- degrees_t latitude = dive->latitude;
- degrees_t longitude = dive->longitude;
+ struct dive_site *ds = get_dive_site_for_dive(dive);
+ if (!ds)
+ return;
+ degrees_t latitude = ds->latitude;
+ degrees_t longitude = ds->longitude;
//don't put coordinates if in (0,0)
if (!latitude.udeg && !longitude.udeg)
@@ -304,7 +307,7 @@ void write_one_dive(struct membuffer *b, struct dive *dive, const char *photos_d
put_format(b, "\"subsurface_number\":%d,", dive->number);
put_HTML_date(b, dive, "\"date\":\"", "\",");
put_HTML_time(b, dive, "\"time\":\"", "\",");
- write_attribute(b, "location", dive->location, ", ");
+ write_attribute(b, "location", get_dive_location(dive), ", ");
put_HTML_coordinates(b, dive);
put_format(b, "\"rating\":%d,", dive->rating);
put_format(b, "\"visibility\":%d,", dive->visibility);
diff --git a/save-xml.c b/save-xml.c
index 8ca2bfd38..8366f87ff 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -110,38 +110,8 @@ static void save_salinity(struct membuffer *b, struct divecomputer *dc)
put_string(b, " />\n");
}
-static void show_location(struct membuffer *b, struct dive *dive)
-{
- degrees_t latitude = dive->latitude;
- degrees_t longitude = dive->longitude;
-
- /* Should we write a location tag at all? */
- if (!(latitude.udeg || longitude.udeg) && !dive->location)
- return;
-
- put_string(b, " <location");
-
- /*
- * Ok, theoretically I guess you could dive at
- * exactly 0,0. But we don't support that. So
- * if you do, just fudge it a bit, and say that
- * you dove a few meters away.
- */
- if (latitude.udeg || longitude.udeg) {
- put_degrees(b, latitude, " gps='", " ");
- put_degrees(b, longitude, "", "'");
- }
-
- /* Do we have a location name or should we write a empty tag? */
- if (dive->location && dive->location[0] != '\0')
- show_utf8(b, dive->location, ">", "</location>\n", 0);
- else
- put_string(b, "/>\n");
-}
-
static void save_overview(struct membuffer *b, struct dive *dive)
{
- show_location(b, dive);
show_utf8(b, dive->divemaster, " <divemaster>", "</divemaster>\n", 0);
show_utf8(b, dive->buddy, " <buddy>", "</buddy>\n", 0);
show_utf8(b, dive->notes, " <notes>", "</notes>\n", 0);
@@ -424,7 +394,8 @@ void save_one_dive(struct membuffer *b, struct dive *dive)
if (dive->visibility)
put_format(b, " visibility='%d'", dive->visibility);
save_tags(b, dive->tag_list);
-
+ if (dive->dive_site_uuid)
+ put_format(b, " divesiteid='%8x'", dive->dive_site_uuid);
show_date(b, dive->when);
put_format(b, " duration='%u:%02u min'>\n",
FRACTION(dive->dc.duration.seconds, 60));
@@ -507,7 +478,7 @@ static void save_one_device(void *_f, const char *model, uint32_t deviceid,
put_format(b, "/>\n");
}
-#define VERSION 2
+#define VERSION 3
int save_dives(const char *filename)
{
@@ -529,8 +500,34 @@ void save_dives_buffer(struct membuffer *b, const bool select_only)
call_for_each_dc(b, save_one_device);
if (autogroup)
put_format(b, " <autogroup state='1' />\n");
- put_format(b, "</settings>\n<dives>\n");
-
+ put_format(b, "</settings>\n");
+
+ /* save the dive sites */
+ put_format(b, "<divesites>\n");
+ for (i = 0; i < dive_site_table.nr; i++) {
+ struct dive_site *ds = get_dive_site(i);
+ if (dive_site_is_empty(ds)) {
+ int j;
+ struct dive *d;
+ for_each_dive(j, d) {
+ if (d->dive_site_uuid == ds->uuid)
+ d->dive_site_uuid = 0;
+ }
+ delete_dive_site(get_dive_site(i)->uuid);
+ i--; // since we just deleted that one
+ continue;
+ }
+ put_format(b, "<site uuid='%8x'", ds->uuid);
+ show_utf8(b, ds->name, " name='", "'", 1);
+ if (ds->latitude.udeg || ds->longitude.udeg) {
+ put_degrees(b, ds->latitude, " gps='", " ");
+ put_degrees(b, ds->longitude, "", "'");
+ }
+ show_utf8(b, ds->description, " description='", "'", 1);
+ show_utf8(b, ds->notes, " notes='", "'", 1);
+ put_format(b, "/>\n");
+ }
+ put_format(b, "</divesites>\n<dives>\n");
for (trip = dive_trip_list; trip != NULL; trip = trip->next)
trip->index = 0;
@@ -605,7 +602,15 @@ static void try_to_backup(const char *filename)
while (extension[i][0] != '\0') {
int elen = strlen(extension[i]);
if (strcasecmp(filename + flen - elen, extension[i]) == 0) {
- save_backup(filename, extension[i], "bak");
+ if (last_xml_version < VERSION) {
+ int se_len = strlen(extension[i]) + 5;
+ char *special_ext = malloc(se_len);
+ snprintf(special_ext, se_len, "%s.v%d", extension[i], last_xml_version);
+ save_backup(filename, extension[i], special_ext);
+ free(special_ext);
+ } else {
+ save_backup(filename, extension[i], "bak");
+ }
break;
}
i++;
diff --git a/scripts/write-version b/scripts/write-version
new file mode 100644
index 000000000..81562fbb8
--- /dev/null
+++ b/scripts/write-version
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+#
+# arguments:
+# $1 - target H file
+# $2 - fallback version string
+# $3 - os name {linux|darwin|win}
+#
+# doesn't have much error checking!
+# should be started from where .git is!
+#
+
+if [ "$#" -lt 3 ]; then
+ echo "ERROR: missing arguments";
+ exit 1;
+fi
+
+# set OS and TARGET
+TARGET=$1
+TARGET_TEMP=$TARGET.tmp
+VERSION=$2
+OS=$3
+
+# get the full version: git based or hardcoded from .gitversion or the fallback version string
+if gitpwd=`git rev-parse --show-toplevel 2> /dev/null`; then
+ FULL_VER=`sh "$gitpwd/scripts/get-version" linux`
+else
+ FULL_VER=`cat .gitversion 2> /dev/null || echo $VERSION`
+fi
+
+# grab some strings from get-version
+CANONICAL_VER=`sh ./scripts/get-version full $FULL_VER`
+OS_USABLE_VER=`sh ./scripts/get-version $OS $FULL_VER`
+
+# write to a temp file
+echo "#define VERSION_STRING \"$OS_USABLE_VER\"" > $TARGET_TEMP
+echo "#define GIT_VERSION_STRING \"$FULL_VER\"" >> $TARGET_TEMP
+echo "#define CANONICAL_VERSION_STRING \"$CANONICAL_VER\"" >> $TARGET_TEMP
+
+# if the target file is missing create it
+if [ ! -f $TARGET ]; then
+ CMD=`touch $TARGET`
+fi
+
+# if the temp file and the target file differ, replace the target file with the temp file
+CMD=`diff -q $TARGET $TARGET_TEMP || cp $TARGET_TEMP $TARGET`
+
+# remove the temp file
+CMD=`rm -f $TARGET_TEMP`
diff --git a/subsurface-gen-version.pri b/subsurface-gen-version.pri
index 7d4cda513..1e62b0d6d 100644
--- a/subsurface-gen-version.pri
+++ b/subsurface-gen-version.pri
@@ -1,40 +1,23 @@
# Generate the ssrf-version.h file
-VERSION_FILE = ssrf-version.h
macx: VER_OS = darwin
unix: !macx: VER_OS = linux
win32: VER_OS = win
-exists(.git/HEAD): {
- win32: SET_GIT_DIR = set GIT_DIR
- else: SET_GIT_DIR = GIT_DIR
- GIT_HEAD = .git/HEAD
- VERSION_SCRIPT = $$PWD/scripts/get-version
- # always use linux here -------------------vvv so we get the true full version
- FULL_VERSION = "`$$VERSION_SCRIPT linux`"
- VERSION = $$system("sh scripts/get-version full || echo $${VERSION}")
- PRODVERSION_STRING = $$system("sh scripts/get-version win $$FULL_VERSION || echo $${VERSION}.0.0-git")
- VERSION_STRING = $$system("sh scripts/get-version linux $$FULL_VERSION || echo $${VERSION}-git")
- version_h.depends = $$VERSION_SCRIPT $$PWD/.git/$$system("$$SET_GIT_DIR=$$PWD/.git git rev-parse --symbolic-full-name HEAD")
- version_h.commands = echo \\$${LITERAL_HASH}define VERSION_STRING \\\"`GIT_DIR=$$PWD/.git $$VERSION_SCRIPT $$VER_OS || echo $$VERSION-git`\\\" > ${QMAKE_FILE_OUT}
- version_h.commands += $$escape_expand(\\n)$$escape_expand(\\t)
- version_h.commands += echo \\$${LITERAL_HASH}define GIT_VERSION_STRING \\\"`GIT_DIR=$$PWD/.git $$VERSION_SCRIPT linux || echo $$VERSION-git`\\\" >> ${QMAKE_FILE_OUT}
- version_h.commands += $$escape_expand(\\n)$$escape_expand(\\t)
- version_h.commands += echo \\$${LITERAL_HASH}define CANONICAL_VERSION_STRING \\\"`GIT_DIR=$$PWD/.git $$VERSION_SCRIPT full || echo $$VERSION-git`\\\" >> ${QMAKE_FILE_OUT}
- version_h.input = GIT_HEAD
- version_h.output = $$VERSION_FILE
- version_h.variable_out = GENERATED_FILES
- version_h.CONFIG = ignore_no_exist
- QMAKE_EXTRA_COMPILERS += version_h
-} else {
- # This is probably a package
- exists(.gitversion): {
- FULL_VERSION = $$system("cat .gitversion")
- } else {
- FULL_VERSION = $$VERSION
- }
- CANONICAL_VERSION = $$system("sh scripts/get-version full $$FULL_VERSION")
- OS_USABLE_VERSION = $$system("sh scripts/get-version $$VER_OS $$FULL_VERSION")
- system(echo \\$${LITERAL_HASH}define VERSION_STRING \\\"$$OS_USABLE_VERSION\\\" > $$VERSION_FILE)
- system(echo \\$${LITERAL_HASH}define GIT_VERSION_STRING \\\"$$FULL_VERSION\\\" >> $$VERSION_FILE)
- system(echo \\$${LITERAL_HASH}define CANONICAL_VERSION_STRING \\\"$$CANONICAL_VERSION\\\" >> $$VERSION_FILE)
- QMAKE_CLEAN += $$VERSION_FILE
-}
+
+# use a compiler target that has a phony input and is forced on each `make` invocation
+# the resulted file is not a link target and is cleared with `make clean`
+PHONY_DEPS = .
+version_h.input = PHONY_DEPS
+version_h.depends = FORCE
+version_h.output = $$VERSION_FILE
+version_h.commands = cd $$PWD && sh $$PWD/scripts/write-version $$VERSION_FILE $$VERSION $$VER_OS
+silent: version_h.commands = @echo Checking $$VERSION_FILE && $$version_h.commands
+version_h.CONFIG += no_link
+QMAKE_EXTRA_COMPILERS += version_h
+QMAKE_CLEAN += $$VERSION_FILE
+
+# some qmake-time variables needed by subsurface-install.pri
+VERSION_SCRIPT = sh scripts/get-version
+FULL_VERSION = $$system("$$VERSION_SCRIPT linux")
+VERSION = $$system("$$VERSION_SCRIPT full || echo $${VERSION}")
+PRODVERSION_STRING = $$system("$$VERSION_SCRIPT win $$FULL_VERSION || echo $${VERSION}.0.0-git")
+VERSION_STRING = $$system("$$VERSION_SCRIPT linux $$FULL_VERSION || echo $${VERSION}-git")
diff --git a/subsurface.pro b/subsurface.pro
index ed78bce4a..a9afae426 100644
--- a/subsurface.pro
+++ b/subsurface.pro
@@ -20,8 +20,13 @@ else: TARGET = subsurface
QMAKE_CLEAN += $$TARGET
VERSION = 4.4.1
+VERSION_FILE = $$OUT_PWD/ssrf-version.h
+# create a blank VERSION_FILE if missing
+system(cat $$VERSION_FILE > /dev/null 2>&1 || touch $$VERSION_FILE)
HEADERS = \
+ $$VERSION_FILE \
+ version.h \
cochran.h \
color.h \
deco.h \
@@ -29,6 +34,7 @@ HEADERS = \
display.h \
dive.h \
divelist.h \
+ divesite.h \
file.h \
gettextfromc.h \
gettext.h \
@@ -104,7 +110,8 @@ HEADERS = \
qt-ui/statistics/statisticsbar.h \
qt-ui/statistics/yearstatistics.h \
qt-ui/diveshareexportdialog.h \
- qt-ui/filtermodels.h
+ qt-ui/filtermodels.h \
+ qt-ui/undocommands.h
android: HEADERS -= \
qt-ui/usermanual.h \
@@ -113,14 +120,17 @@ android: HEADERS -= \
qt-ui/printoptions.h
SOURCES = \
+ version.c \
cochran.c \
deco.c \
device.c \
dive.c \
divelist.c \
+ divesite.c \
equipment.c \
file.c \
gettextfromc.cpp \
+ git-access.c \
libdivecomputer.c \
liquivision.c \
load-git.c \
@@ -198,7 +208,8 @@ SOURCES = \
qt-ui/statistics/statisticsbar.cpp \
qt-ui/statistics/monthstatistics.cpp \
qt-ui/diveshareexportdialog.cpp \
- qt-ui/filtermodels.cpp
+ qt-ui/filtermodels.cpp \
+ qt-ui/undocommands.cpp
android: SOURCES += android.cpp
else: win32: SOURCES += windows.c
@@ -235,7 +246,9 @@ FORMS = \
qt-ui/configuredivecomputerdialog.ui \
qt-ui/listfilter.ui \
qt-ui/diveshareexportdialog.ui \
- qt-ui/filterwidget.ui
+ qt-ui/filterwidget.ui \
+ qt-ui/plannerDetails.ui \
+ qt-ui/locationInformation.ui
# Nether usermanual or printing is supported on android right now
android: FORMS -= qt-ui/printoptions.ui
diff --git a/subsurfacestartup.c b/subsurfacestartup.c
index 0722e954e..62e37f932 100644
--- a/subsurfacestartup.c
+++ b/subsurfacestartup.c
@@ -1,5 +1,5 @@
#include "subsurfacestartup.h"
-#include "ssrf-version.h"
+#include "version.h"
#include <stdbool.h>
#include <string.h>
#include "gettext.h"
@@ -110,7 +110,7 @@ bool imported = false;
static void print_version()
{
- printf("Subsurface v%s, ", GIT_VERSION_STRING);
+ printf("Subsurface v%s, ", subsurface_git_version());
printf("built with libdivecomputer v%s\n", dc_version(NULL));
}
diff --git a/subsurfacesysinfo.cpp b/subsurfacesysinfo.cpp
index 4a55e7315..175668cbf 100644
--- a/subsurfacesysinfo.cpp
+++ b/subsurfacesysinfo.cpp
@@ -42,16 +42,19 @@
#include "subsurfacesysinfo.h"
#include <QString>
-#include <QFile>
-#include <QSettings>
-#include <QTextStream>
+
+#ifdef Q_OS_UNIX
+#include <sys/utsname.h>
+#endif
+
+#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0)
#ifndef QStringLiteral
# define QStringLiteral QString::fromUtf8
#endif
#ifdef Q_OS_UNIX
-#include <sys/utsname.h>
+#include <qplatformdefs.h>
#endif
#ifdef __APPLE__
@@ -132,6 +135,7 @@
#define ARCH_FULL ARCH_PROCESSOR "-" ARCH_ENDIANNESS "-" ARCH_POINTER ARCH_ABI
// --- end of archdetect.cpp ---
+// copied from Qt 5.4.1's src/corelib/global/qglobal.cpp
#if defined(Q_OS_WIN) || defined(Q_OS_CYGWIN) || defined(Q_OS_WINCE) || defined(Q_OS_WINRT)
@@ -140,33 +144,50 @@ QT_BEGIN_INCLUDE_NAMESPACE
QT_END_INCLUDE_NAMESPACE
#ifndef Q_OS_WINRT
+# ifndef Q_OS_WINCE
+// Fallback for determining Windows versions >= 8 by looping using the
+// version check macros. Note that it will return build number=0 to avoid
+// inefficient looping.
+static inline void determineWinOsVersionFallbackPost8(OSVERSIONINFO *result)
+{
+ result->dwBuildNumber = 0;
+ DWORDLONG conditionMask = 0;
+ VER_SET_CONDITION(conditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
+ VER_SET_CONDITION(conditionMask, VER_PLATFORMID, VER_EQUAL);
+ OSVERSIONINFOEX checkVersion = { sizeof(OSVERSIONINFOEX), result->dwMajorVersion, 0,
+ result->dwBuildNumber, result->dwPlatformId, {'\0'}, 0, 0, 0, 0, 0 };
+ for ( ; VerifyVersionInfo(&checkVersion, VER_MAJORVERSION | VER_PLATFORMID, conditionMask); ++checkVersion.dwMajorVersion)
+ result->dwMajorVersion = checkVersion.dwMajorVersion;
+ conditionMask = 0;
+ checkVersion.dwMajorVersion = result->dwMajorVersion;
+ checkVersion.dwMinorVersion = 0;
+ VER_SET_CONDITION(conditionMask, VER_MAJORVERSION, VER_EQUAL);
+ VER_SET_CONDITION(conditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
+ VER_SET_CONDITION(conditionMask, VER_PLATFORMID, VER_EQUAL);
+ for ( ; VerifyVersionInfo(&checkVersion, VER_MAJORVERSION | VER_MINORVERSION | VER_PLATFORMID, conditionMask); ++checkVersion.dwMinorVersion)
+ result->dwMinorVersion = checkVersion.dwMinorVersion;
+}
+
+# endif // !Q_OS_WINCE
+
static inline OSVERSIONINFO winOsVersion()
{
OSVERSIONINFO result = { sizeof(OSVERSIONINFO), 0, 0, 0, 0, {'\0'}};
// GetVersionEx() has been deprecated in Windows 8.1 and will return
// only Windows 8 from that version on.
-# if defined(_MSC_VER) && _MSC_VER >= 1800
-# pragma warning( push )
-# pragma warning( disable : 4996 )
-# endif
+# if defined(_MSC_VER) && _MSC_VER >= 1800
+# pragma warning( push )
+# pragma warning( disable : 4996 )
+# endif
GetVersionEx(&result);
-# if defined(_MSC_VER) && _MSC_VER >= 1800
-# pragma warning( pop )
-# endif
-# ifndef Q_OS_WINCE
- if (result.dwMajorVersion == 6 && result.dwMinorVersion == 2) {
- // This could be Windows 8.1 or higher. Note that as of Windows 9,
- // the major version needs to be checked as well.
- DWORDLONG conditionMask = 0;
- VER_SET_CONDITION(conditionMask, VER_MAJORVERSION, VER_GREATER_EQUAL);
- VER_SET_CONDITION(conditionMask, VER_MINORVERSION, VER_GREATER_EQUAL);
- VER_SET_CONDITION(conditionMask, VER_PLATFORMID, VER_EQUAL);
- OSVERSIONINFOEX checkVersion = { sizeof(OSVERSIONINFOEX), result.dwMajorVersion, result.dwMinorVersion,
- result.dwBuildNumber, result.dwPlatformId, {'\0'}, 0, 0, 0, 0, 0 };
- for ( ; VerifyVersionInfo(&checkVersion, VER_MAJORVERSION | VER_MINORVERSION | VER_PLATFORMID, conditionMask); ++checkVersion.dwMinorVersion)
- result.dwMinorVersion = checkVersion.dwMinorVersion;
- }
-# endif // !Q_OS_WINCE
+# if defined(_MSC_VER) && _MSC_VER >= 1800
+# pragma warning( pop )
+# endif
+# ifndef Q_OS_WINCE
+ if (result.dwMajorVersion == 6 && result.dwMinorVersion == 2) {
+ determineWinOsVersionFallbackPost8(&result);
+ }
+# endif // !Q_OS_WINCE
return result;
}
#endif // !Q_OS_WINRT
@@ -206,105 +227,217 @@ static const char *winVer_helper()
#endif
#if defined(Q_OS_UNIX)
-# if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_FREEBSD)
-# define USE_ETC_OS_RELEASE
-# endif
+# if (defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)) || defined(Q_OS_FREEBSD)
+# define USE_ETC_OS_RELEASE
struct QUnixOSVersion
{
- // from uname(2)
- QString sysName;
- QString sysNameLower;
- QString sysRelease;
-
-# if !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_MAC)
- // from /etc/os-release or guessed
- QString versionIdentifier; // ${ID}_$VERSION_ID
- QString versionText; // $PRETTY_NAME
-# endif
+ // from /etc/os-release
+ QString productType; // $ID
+ QString productVersion; // $VERSION_ID
+ QString prettyName; // $PRETTY_NAME
};
+static QString unquote(const char *begin, const char *end)
+{
+ if (*begin == '"') {
+ Q_ASSERT(end[-1] == '"');
+ return QString::fromLatin1(begin + 1, end - begin - 2);
+ }
+ return QString::fromLatin1(begin, end - begin);
+}
-#ifdef USE_ETC_OS_RELEASE
static bool readEtcOsRelease(QUnixOSVersion &v)
{
- QFile osRelease("/etc/os-release");
- if (osRelease.exists()) {
- QSettings parse("/etc/os-release", QSettings::IniFormat);
- if (parse.contains("PRETTY_NAME")) {
- v.versionText = parse.value("PRETTY_NAME").toString();
- }
- return true;
+ // we're avoiding QFile here
+ int fd = QT_OPEN("/etc/os-release", O_RDONLY);
+ if (fd == -1)
+ return false;
+
+ QT_STATBUF sbuf;
+ if (QT_FSTAT(fd, &sbuf) == -1) {
+ QT_CLOSE(fd);
+ return false;
}
- QFile lsbRelease("/etc/lsb-release");
- if (lsbRelease.exists()) {
- QSettings parse("/etc/lsb-release", QSettings::IniFormat);
- if (parse.contains("DISTRIB_DESCRIPTION")) {
- v.versionText = parse.value("DISTRIB_DESCRIPTION").toString();
- if (v.versionText == "PCLinuxOS") {
- QFile release("/etc/release");
- if (release.exists()) {
- if (release.open(QFile::ReadOnly | QFile::Text)) {
- QTextStream in(&release);
- v.versionText = in.readAll();
- // need to get rid of the redundant text after '('
- int i = v.versionText.indexOf('(');
- v.versionText.remove(i, 1000);
- }
- }
- }
+
+ QByteArray buffer(sbuf.st_size, Qt::Uninitialized);
+ buffer.resize(QT_READ(fd, buffer.data(), sbuf.st_size));
+ QT_CLOSE(fd);
+
+ const char *ptr = buffer.constData();
+ const char *end = buffer.constEnd();
+ const char *eol;
+ for ( ; ptr != end; ptr = eol + 1) {
+ static const char idString[] = "ID=";
+ static const char prettyNameString[] = "PRETTY_NAME=";
+ static const char versionIdString[] = "VERSION_ID=";
+
+ // find the end of the line after ptr
+ eol = static_cast<const char *>(memchr(ptr, '\n', end - ptr));
+ if (!eol)
+ eol = end - 1;
+
+ // note: we're doing a binary search here, so comparison
+ // must always be sorted
+ int cmp = strncmp(ptr, idString, strlen(idString));
+ if (cmp < 0)
+ continue;
+ if (cmp == 0) {
+ ptr += strlen(idString);
+ v.productType = unquote(ptr, eol);
+ continue;
+ }
+
+ cmp = strncmp(ptr, prettyNameString, strlen(prettyNameString));
+ if (cmp < 0)
+ continue;
+ if (cmp == 0) {
+ ptr += strlen(prettyNameString);
+ v.prettyName = unquote(ptr, eol);
+ continue;
+ }
+
+ cmp = strncmp(ptr, versionIdString, strlen(versionIdString));
+ if (cmp < 0)
+ continue;
+ if (cmp == 0) {
+ ptr += strlen(versionIdString);
+ v.productVersion = unquote(ptr, eol);
+ continue;
}
- return true;
}
- return false;
+
+ return true;
}
-#endif // USE_ETC_OS_RELEASE
+# endif // USE_ETC_OS_RELEASE
+#endif // Q_OS_UNIX
-static QUnixOSVersion detectUnixVersion()
+static QString unknownText()
{
- QUnixOSVersion v;
- struct utsname u;
- if (uname(&u) != -1) {
- v.sysName = QString::fromLatin1(u.sysname);
- v.sysNameLower = v.sysName.toLower();
- v.sysRelease = QString::fromLatin1(u.release);
- } else {
- v.sysName = QLatin1String("Detection failed");
- // leave sysNameLower & sysRelease unset
- }
+ return QStringLiteral("unknown");
+}
-# if !defined(Q_OS_ANDROID) && !defined(Q_OS_BLACKBERRY) && !defined(Q_OS_MAC)
-# ifdef USE_ETC_OS_RELEASE
- if (readEtcOsRelease(v))
- return v;
-# endif
+QString SubsurfaceSysInfo::buildCpuArchitecture()
+{
+ return QStringLiteral(ARCH_PROCESSOR);
+}
- if (!v.sysNameLower.isEmpty()) {
- // will produce "qnx_6.5" or "sunos_5.9"
- v.versionIdentifier = v.sysNameLower + QLatin1Char('_') + v.sysRelease;
+QString SubsurfaceSysInfo::currentCpuArchitecture()
+{
+#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
+ // We don't need to catch all the CPU architectures in this function;
+ // only those where the host CPU might be different than the build target
+ // (usually, 64-bit platforms).
+ SYSTEM_INFO info;
+ GetNativeSystemInfo(&info);
+ switch (info.wProcessorArchitecture) {
+# ifdef PROCESSOR_ARCHITECTURE_AMD64
+ case PROCESSOR_ARCHITECTURE_AMD64:
+ return QStringLiteral("x86_64");
+# endif
+# ifdef PROCESSOR_ARCHITECTURE_IA32_ON_WIN64
+ case PROCESSOR_ARCHITECTURE_IA32_ON_WIN64:
+# endif
+ case PROCESSOR_ARCHITECTURE_IA64:
+ return QStringLiteral("ia64");
}
+#elif defined(Q_OS_UNIX)
+ long ret = -1;
+ struct utsname u;
+
+# if defined(Q_OS_SOLARIS)
+ // We need a special call for Solaris because uname(2) on x86 returns "i86pc" for
+ // both 32- and 64-bit CPUs. Reference:
+ // http://docs.oracle.com/cd/E18752_01/html/816-5167/sysinfo-2.html#REFMAN2sysinfo-2
+ // http://fxr.watson.org/fxr/source/common/syscall/systeminfo.c?v=OPENSOLARIS
+ // http://fxr.watson.org/fxr/source/common/conf/param.c?v=OPENSOLARIS;im=10#L530
+ if (ret == -1)
+ ret = sysinfo(SI_ARCHITECTURE_64, u.machine, sizeof u.machine);
# endif
- return v;
-}
+ if (ret == -1)
+ ret = uname(&u);
+
+ // we could use detectUnixVersion() above, but we only need a field no other function does
+ if (ret != -1) {
+ // the use of QT_BUILD_INTERNAL here is simply to ensure all branches build
+ // as we don't often build on some of the less common platforms
+# if defined(Q_PROCESSOR_ARM) || defined(QT_BUILD_INTERNAL)
+ if (strcmp(u.machine, "aarch64") == 0)
+ return QStringLiteral("arm64");
+ if (strncmp(u.machine, "armv", 4) == 0)
+ return QStringLiteral("arm");
+# endif
+# if defined(Q_PROCESSOR_POWER) || defined(QT_BUILD_INTERNAL)
+ // harmonize "powerpc" and "ppc" to "power"
+ if (strncmp(u.machine, "ppc", 3) == 0)
+ return QLatin1String("power") + QLatin1String(u.machine + 3);
+ if (strncmp(u.machine, "powerpc", 7) == 0)
+ return QLatin1String("power") + QLatin1String(u.machine + 7);
+ if (strcmp(u.machine, "Power Macintosh") == 0)
+ return QLatin1String("power");
+# endif
+# if defined(Q_PROCESSOR_SPARC) || defined(QT_BUILD_INTERNAL)
+ // Solaris sysinfo(2) (above) uses "sparcv9", but uname -m says "sun4u";
+ // Linux says "sparc64"
+ if (strcmp(u.machine, "sun4u") == 0 || strcmp(u.machine, "sparc64") == 0)
+ return QStringLiteral("sparcv9");
+ if (strcmp(u.machine, "sparc32") == 0)
+ return QStringLiteral("sparc");
+# endif
+# if defined(Q_PROCESSOR_X86) || defined(QT_BUILD_INTERNAL)
+ // harmonize all "i?86" to "i386"
+ if (strlen(u.machine) == 4 && u.machine[0] == 'i'
+ && u.machine[2] == '8' && u.machine[3] == '6')
+ return QStringLiteral("i386");
+ if (strcmp(u.machine, "amd64") == 0) // Solaris
+ return QStringLiteral("x86_64");
+# endif
+ return QString::fromLatin1(u.machine);
+ }
#endif
+ return buildCpuArchitecture();
+}
-static QString unknownText()
+
+QString SubsurfaceSysInfo::buildAbi()
{
- return QStringLiteral("unknown");
+ return QLatin1String(ARCH_FULL);
}
-QString SubsurfaceSysInfo::cpuArchitecture()
+QString SubsurfaceSysInfo::kernelType()
{
- return QStringLiteral(ARCH_PROCESSOR);
+#if defined(Q_OS_WINCE)
+ return QStringLiteral("wince");
+#elif defined(Q_OS_WIN)
+ return QStringLiteral("winnt");
+#elif defined(Q_OS_UNIX)
+ struct utsname u;
+ if (uname(&u) == 0)
+ return QString::fromLatin1(u.sysname).toLower();
+#endif
+ return unknownText();
}
-QString SubsurfaceSysInfo::fullCpuArchitecture()
+QString SubsurfaceSysInfo::kernelVersion()
{
- return QLatin1String(ARCH_FULL);
+#ifdef Q_OS_WINRT
+ // TBD
+ return QString();
+#elif defined(Q_OS_WIN)
+ const OSVERSIONINFO osver = winOsVersion();
+ return QString::number(int(osver.dwMajorVersion)) + QLatin1Char('.') + QString::number(int(osver.dwMinorVersion))
+ + QLatin1Char('.') + QString::number(int(osver.dwBuildNumber));
+#else
+ struct utsname u;
+ if (uname(&u) == 0)
+ return QString::fromLatin1(u.release);
+ return QString();
+#endif
}
-QString SubsurfaceSysInfo::osType()
+QString SubsurfaceSysInfo::productType()
{
+ // similar, but not identical to QFileSelectorPrivate::platformSelectors
#if defined(Q_OS_WINPHONE)
return QStringLiteral("winphone");
#elif defined(Q_OS_WINRT)
@@ -321,8 +454,6 @@ QString SubsurfaceSysInfo::osType()
#elif defined(Q_OS_ANDROID)
return QStringLiteral("android");
-#elif defined(Q_OS_LINUX)
- return QStringLiteral("linux");
#elif defined(Q_OS_IOS)
return QStringLiteral("ios");
@@ -331,31 +462,16 @@ QString SubsurfaceSysInfo::osType()
#elif defined(Q_OS_DARWIN)
return QStringLiteral("darwin");
-#elif defined(Q_OS_FREEBSD_KERNEL)
- return QStringLiteral("freebsd");
-#elif defined(Q_OS_UNIX)
- QUnixOSVersion unixOsVersion = detectUnixVersion();
- if (!unixOsVersion.sysNameLower.isEmpty())
- return unixOsVersion.sysNameLower;
+#elif defined(USE_ETC_OS_RELEASE) // Q_OS_UNIX
+ QUnixOSVersion unixOsVersion;
+ readEtcOsRelease(unixOsVersion);
+ if (!unixOsVersion.productType.isEmpty())
+ return unixOsVersion.productType;
#endif
return unknownText();
}
-QString SubsurfaceSysInfo::osKernelVersion()
-{
-#ifdef Q_OS_WINRT
- // TBD
- return QString();
-#elif defined(Q_OS_WIN)
- const OSVERSIONINFO osver = winOsVersion();
- return QString::number(int(osver.dwMajorVersion)) + QLatin1Char('.') + QString::number(int(osver.dwMinorVersion))
- + QLatin1Char('.') + QString::number(int(osver.dwBuildNumber));
-#else
- return detectUnixVersion().sysRelease;
-#endif
-}
-
-QString SubsurfaceSysInfo::osVersion()
+QString SubsurfaceSysInfo::productVersion()
{
#if defined(Q_OS_IOS)
int major = (int(MacintoshVersion) >> 4) & 0xf;
@@ -392,24 +508,34 @@ QString SubsurfaceSysInfo::osVersion()
deviceinfo_free_details(&deviceInfo);
return bbVersion;
}
-#elif defined(Q_OS_UNIX)
- QUnixOSVersion unixOsVersion = detectUnixVersion();
- if (!unixOsVersion.versionIdentifier.isEmpty())
- return unixOsVersion.versionIdentifier;
+#elif defined(USE_ETC_OS_RELEASE) // Q_OS_UNIX
+ QUnixOSVersion unixOsVersion;
+ readEtcOsRelease(unixOsVersion);
+ if (!unixOsVersion.productVersion.isEmpty())
+ return unixOsVersion.productVersion;
#endif
// fallback
return unknownText();
}
-QString SubsurfaceSysInfo::prettyOsName()
+QString SubsurfaceSysInfo::prettyProductName()
{
#if defined(Q_OS_IOS)
- return QLatin1String("iOS ") + osVersion();
+ return QLatin1String("iOS ") + productVersion();
#elif defined(Q_OS_OSX)
// get the known codenames
const char *basename = 0;
switch (int(MacintoshVersion)) {
+ case MV_CHEETAH:
+ case MV_PUMA:
+ case MV_JAGUAR:
+ case MV_PANTHER:
+ case MV_TIGER:
+ // This version of Qt does not run on those versions of OS X
+ // so this case label will never be reached
+ Q_UNREACHABLE();
+ break;
case MV_LEOPARD:
basename = "Mac OS X Leopard (";
break;
@@ -422,79 +548,62 @@ QString SubsurfaceSysInfo::prettyOsName()
case MV_MOUNTAINLION:
basename = "OS X Mountain Lion (";
break;
-#ifdef MV_MAVERICKS
case MV_MAVERICKS:
-#else
- case 0x000B: // MV_MAVERICKS
-#endif
basename = "OS X Mavericks (";
break;
-#ifdef MV_YOSEMITE
case MV_YOSEMITE:
-#else
- case 0x000C: // MV_YOSEMITE
-#endif
basename = "OS X Yosemite (";
break;
}
if (basename)
- return QLatin1String(basename) + osVersion() + QLatin1Char(')');
+ return QLatin1String(basename) + productVersion() + QLatin1Char(')');
// a future version of OS X
- return QLatin1String("OS X ") + osVersion();
+ return QLatin1String("OS X ") + productVersion();
#elif defined(Q_OS_WINPHONE)
return QLatin1String("Windows Phone ") + QLatin1String(winVer_helper());
#elif defined(Q_OS_WIN)
return QLatin1String("Windows ") + QLatin1String(winVer_helper());
#elif defined(Q_OS_ANDROID)
- return QLatin1String("Android ") + osVersion();
+ return QLatin1String("Android ") + productVersion();
#elif defined(Q_OS_BLACKBERRY)
- return QLatin1String("BlackBerry ") + osVersion();
+ return QLatin1String("BlackBerry ") + productVersion();
#elif defined(Q_OS_UNIX)
- QUnixOSVersion unixOsVersion = detectUnixVersion();
- if (unixOsVersion.versionText.isEmpty())
- return unixOsVersion.sysName;
- else
- return unixOsVersion.sysName + QLatin1String(" (") + unixOsVersion.versionText + QLatin1Char(')');
-#else
- return unknownText();
+# ifdef USE_ETC_OS_RELEASE
+ QUnixOSVersion unixOsVersion;
+ readEtcOsRelease(unixOsVersion);
+ if (!unixOsVersion.prettyName.isEmpty())
+ return unixOsVersion.prettyName;
+# endif
+ struct utsname u;
+ if (uname(&u) == 0)
+ return QString::fromLatin1(u.sysname) + QLatin1Char(' ') + QString::fromLatin1(u.release);
#endif
+ return unknownText();
}
-// detect if the OS we are running on is 64 or 32bit
-// we only care when building on Intel for 32bit
-QString SubsurfaceSysInfo::osArch()
+#endif // Qt >= 5.4
+
+QString SubsurfaceSysInfo::prettyOsName()
{
- QString res = "";
-#if defined(Q_PROCESSOR_X86_32)
-#if defined(Q_OS_UNIX)
+ // Matches the pre-release version of Qt 5.4
+ QString pretty = prettyProductName();
+#if defined(Q_OS_UNIX) && !defined(Q_OS_MAC) && !defined(Q_OS_ANDROID)
+ // QSysInfo::kernelType() returns lowercase ("linux" instead of "Linux")
struct utsname u;
- if (uname(&u) != -1) {
- res = u.machine;
- }
-#elif defined(Q_OS_WIN)
-
- /* this code is from
- * http://mark.koli.ch/reliably-checking-os-bitness-32-or-64-bit-on-windows-with-a-tiny-c-app
- * there is no license given, but 5 lines of code should be fine to reuse unless explicitly forbidden */
- typedef BOOL (WINAPI *IW64PFP)(HANDLE, BOOL *);
- BOOL os64 = FALSE;
- IW64PFP IW64P = (IW64PFP)GetProcAddress(
- GetModuleHandle((LPCSTR)"kernel32"), "IsWow64Process");
-
- if(IW64P != NULL){
- IW64P(GetCurrentProcess(), &os64);
- }
- res = os64 ? "x86_64" : "i386";
+ if (uname(&u) == 0)
+ return QString::fromLatin1(u.sysname) + QLatin1String(" (") + pretty + QLatin1Char(')');
#endif
-#endif
- return res;
+ return pretty;
}
extern "C" {
bool isWin7Or8()
{
- QString os = SubsurfaceSysInfo::prettyOsName();
- return os == "Windows 7" || os.startsWith("Windows 8");
+#ifdef Q_OS_WIN
+ return (QSysInfo::WindowsVersion & QSysInfo::WV_NT_based) >= QSysInfo::WV_WINDOWS7;
+#else
+ return false;
+#endif
}
}
diff --git a/subsurfacesysinfo.h b/subsurfacesysinfo.h
index 877f7ef00..23c7011bc 100644
--- a/subsurfacesysinfo.h
+++ b/subsurfacesysinfo.h
@@ -205,16 +205,18 @@
class SubsurfaceSysInfo : public QSysInfo {
public:
-#if QT_VERSION <= 0x050400
- static QString cpuArchitecture();
- static QString fullCpuArchitecture();
- static QString osType();
- static QString osKernelVersion();
- static QString osVersion();
- static QString prettyOsName();
-
+#if QT_VERSION < 0x050400
+ static QString buildCpuArchitecture();
+ static QString currentCpuArchitecture();
+ static QString buildAbi();
+
+ static QString kernelType();
+ static QString kernelVersion();
+ static QString productType();
+ static QString productVersion();
+ static QString prettyProductName();
#endif
- static QString osArch();
+ static QString prettyOsName();
};
diff --git a/theme/dive_export.html b/theme/dive_export.html
index e171b070f..e7c643e0f 100644
--- a/theme/dive_export.html
+++ b/theme/dive_export.html
@@ -121,6 +121,7 @@ window.onload=function(){
searchingModules["tags"].Enter_search_tag(items[i].tags,i);
}
+ set_units();
sizeofpage=10;
showAllDives();
document.getElementById("divePanel").style.display='none';
@@ -132,8 +133,6 @@ window.onload=function(){
document.onkeydown = switchDives;
- set_units();
-
//translate Page
translate_page();
getDefaultColor();
@@ -214,8 +213,8 @@ function changeAdvSearch(e){
<div id="date_header" onClick="change_sort_col('2')" class="item">Date</div>
<div id="time_header" onClick="change_sort_col('3')" class="item">Time</div>
<div id="location_header" onClick="change_sort_col('6')" class="item_large">Location</div>
- <div id="air_temp_header" onClick="change_sort_col('4')" class="item">Air temp</div>
- <div id="water_temp_header" onClick="change_sort_col('5')" class="item">Water temp</div>
+ <div id="duration_header" onClick="change_sort_col('4')" class="item">Duration</div>
+ <div id="maxdepth_header" onClick="change_sort_col('5')" class="item">Max Depth</div>
</div>
<div id="diveslist">
</div>
diff --git a/theme/list_lib.js b/theme/list_lib.js
index 6fde5417c..b44ffb1fe 100644
--- a/theme/list_lib.js
+++ b/theme/list_lib.js
@@ -200,8 +200,8 @@ function getlimited(dive)
'<div class="item">' + dive.date + '</div>' +
'<div class="item">' + dive.time + '</div>' +
'<div class="item_large">' + dive.location + '</div>' +
- '<div class="item">' + dive.temperature.air + '</div>' +
- '<div class="item">' + dive.temperature.water + '</div></div>';
+ '<div class="item">' + dive.dive_duration + '</div>' +
+ '<div class="item">' + put_depth_unit(dive.maxdepth) + " " + depth_unit + '</div></div>';
};
function getExpanded(dive)
@@ -266,8 +266,8 @@ each col. sorted asc or des
var number = true;
var time = true;
var date = true;
-var air = true;
-var water = true;
+var duration = true;
+var depth = true;
var locat = true;
/*
@@ -307,18 +307,18 @@ function list_sort(sortOn)
sort_it(sortOn, cmpTimeAsc);
}
break;
- case '4': //Air temp
- if (air) {
- sort_it(sortOn, cmpAtempDes);
+ case '4': //Duration
+ if (duration) {
+ sort_it(sortOn, cmpDurDes);
} else {
- sort_it(sortOn, cmpAtempAsc);
+ sort_it(sortOn, cmpDurAsc);
}
break;
- case '5': //Water temp
- if (water) {
- sort_it(sortOn, cmpWtempDes);
+ case '5': //Max Depth
+ if (depth) {
+ sort_it(sortOn, cmpDepthDes);
} else {
- sort_it(sortOn, cmpWtempAsc);
+ sort_it(sortOn, cmpDepthAsc);
}
break;
case '6': //Location
@@ -343,11 +343,11 @@ function toggle_sort_state(sortOn)
case '3': //time
time = 1 - time;
break;
- case '4': //Air temp
- air = 1 - air;
+ case '4': //Duration
+ duration = 1 - duration;
break;
- case '5': //Water temp
- water = 1 - water;
+ case '5': //depth
+ depth = 1 - depth;
break;
case '6': //Location
locat = 1 - locat;
@@ -404,24 +404,24 @@ function cmpDateDes(j, iSmaller)
return items[j].date > items[iSmaller].date;
}
-function cmpAtempAsc(j, iSmaller)
+function cmpDurAsc(j, iSmaller)
{
- return parseFloat(items[j].temperature.air, 10) < parseFloat(items[iSmaller].temperature.air, 10);
+ return items[j].duration < items[iSmaller].duration;
}
-function cmpAtempDes(j, iSmaller)
+function cmpDurDes(j, iSmaller)
{
- return parseFloat(items[j].temperature.air, 10) > parseFloat(items[iSmaller].temperature.air, 10);
+ return items[j].duration > items[iSmaller].duration;
}
-function cmpWtempAsc(j, iSmaller)
+function cmpDepthAsc(j, iSmaller)
{
- return parseFloat(items[j].temperature.water, 10) < parseFloat(items[iSmaller].temperature.water, 10);
+ return items[j].maxdepth < items[iSmaller].maxdepth;
}
-function cmpWtempDes(j, iSmaller)
+function cmpDepthDes(j, iSmaller)
{
- return parseFloat(items[j].temperature.water, 10) > parseFloat(items[iSmaller].temperature.water, 10);
+ return items[j].maxdepth > items[iSmaller].maxdepth;
}
function sort_it(sortOn, function_)
@@ -1328,8 +1328,8 @@ function translate_page()
document.getElementById("date_header").innerHTML = translate.Date;
document.getElementById("time_header").innerHTML = translate.Time;
document.getElementById("location_header").innerHTML = translate.Location;
- document.getElementById("air_temp_header").innerHTML = translate.Air_Temp;
- document.getElementById("water_temp_header").innerHTML = translate.Water_Temp;
+ document.getElementById("duration_header").innerHTML = translate.Duration;
+ document.getElementById("maxdepth_header").innerHTML = translate.Max_Depth;
document.getElementById("adv_srch_sp").innerHTML = translate.Advanced_Search;
document.getElementById("expnd_all_btn").innerHTML = translate.Expand_All;
document.getElementById("claps_all_btn").innerHTML = translate.Collapse_All;
diff --git a/uemis-downloader.c b/uemis-downloader.c
index 7ce25cd57..b9ea57b62 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -638,12 +638,12 @@ static void parse_divespot(char *buf)
uemis_set_divelocation(divespot, locationstring, latitude, longitude);
}
-static void track_divespot(char *val, int diveid, char **location, degrees_t *latitude, degrees_t *longitude)
+static void track_divespot(char *val, int diveid, uint32_t dive_site_uuid)
{
int id = atoi(val);
if (id >= 0 && id > nr_divespots)
nr_divespots = id;
- uemis_mark_divelocation(diveid, id, location, latitude, longitude);
+ uemis_mark_divelocation(diveid, id, dive_site_uuid);
return;
}
@@ -783,7 +783,8 @@ static bool process_raw_buffer(device_data_t *devdata, uint32_t deviceid, char *
if (for_dive)
*for_dive = atoi(val);
} else if (!log && dive && !strcmp(tag, "divespot_id")) {
- track_divespot(val, dive->dc.diveid, &dive->location, &dive->latitude, &dive->longitude);
+ dive->dive_site_uuid = create_dive_site("from Uemis");
+ track_divespot(val, dive->dc.diveid, dive->dive_site_uuid);
} else if (dive) {
parse_tag(dive, tag, val);
}
diff --git a/uemis.c b/uemis.c
index b6cadb848..1f4db09cf 100644
--- a/uemis.c
+++ b/uemis.c
@@ -103,9 +103,7 @@ struct uemis_helper {
int diveid;
int lbs;
int divespot;
- char **location;
- degrees_t *latitude;
- degrees_t *longitude;
+ int dive_site_uuid;
struct uemis_helper *next;
};
static struct uemis_helper *uemis_helper = NULL;
@@ -150,27 +148,22 @@ int uemis_get_weight_unit(int diveid)
return 0;
}
-void uemis_mark_divelocation(int diveid, int divespot, char **location, degrees_t *latitude, degrees_t *longitude)
+void uemis_mark_divelocation(int diveid, int divespot, uint32_t dive_site_uuid)
{
struct uemis_helper *hp = uemis_get_helper(diveid);
hp->divespot = divespot;
- hp->location = location;
- hp->longitude = longitude;
- hp->latitude = latitude;
+ hp->dive_site_uuid = dive_site_uuid;
}
void uemis_set_divelocation(int divespot, char *text, double longitude, double latitude)
{
struct uemis_helper *hp = uemis_helper;
-#if 0 /* seems overkill */
- if (!g_utf8_validate(text, -1, NULL))
- return;
-#endif
while (hp) {
- if (hp->divespot == divespot && hp->location) {
- *hp->location = strdup(text);
- hp->longitude->udeg = round(longitude * 1000000);
- hp->latitude->udeg = round(latitude * 1000000);
+ if (hp->divespot == divespot) {
+ struct dive_site *ds = get_dive_site_by_uuid(hp->dive_site_uuid);
+ ds->name = strdup(text);
+ ds->longitude.udeg = round(longitude * 1000000);
+ ds->latitude.udeg = round(latitude * 1000000);
}
hp = hp->next;
}
diff --git a/uemis.h b/uemis.h
index 32c4bdc24..ad4fa10de 100644
--- a/uemis.h
+++ b/uemis.h
@@ -14,7 +14,7 @@ extern "C" {
void uemis_parse_divelog_binary(char *base64, void *divep);
int uemis_get_weight_unit(int diveid);
-void uemis_mark_divelocation(int diveid, int divespot, char **location, degrees_t *latitude, degrees_t *longitude);
+void uemis_mark_divelocation(int diveid, int divespot, uint32_t dive_site_uuid);
void uemis_set_divelocation(int divespot, char *text, double longitude, double latitude);
typedef struct
diff --git a/version.c b/version.c
new file mode 100644
index 000000000..5b54bf4c7
--- /dev/null
+++ b/version.c
@@ -0,0 +1,16 @@
+#include "ssrf-version.h"
+
+const char *subsurface_version(void)
+{
+ return VERSION_STRING;
+}
+
+const char *subsurface_git_version(void)
+{
+ return GIT_VERSION_STRING;
+}
+
+const char *subsurface_canonical_version(void)
+{
+ return CANONICAL_VERSION_STRING;
+}
diff --git a/version.h b/version.h
new file mode 100644
index 000000000..bc0aac00d
--- /dev/null
+++ b/version.h
@@ -0,0 +1,16 @@
+#ifndef VERSION_H
+#define VERSION_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+const char *subsurface_version(void);
+const char *subsurface_git_version(void);
+const char *subsurface_canonical_version(void);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/worldmap-save.c b/worldmap-save.c
index c28a52d5f..25c5ee33f 100644
--- a/worldmap-save.c
+++ b/worldmap-save.c
@@ -27,11 +27,11 @@ void writeMarkers(struct membuffer *b, const bool selected_only)
if (!dive->selected)
continue;
}
- if (dive->latitude.udeg == 0 && dive->longitude.udeg == 0)
+ struct dive_site *ds = get_dive_site_for_dive(dive);
+ if (!ds || !dive_site_has_gps_location(ds))
continue;
-
- put_degrees(b, dive->latitude, "temp = new google.maps.Marker({position: new google.maps.LatLng(", "");
- put_degrees(b, dive->longitude, ",", ")});\n");
+ put_degrees(b, ds->latitude, "temp = new google.maps.Marker({position: new google.maps.LatLng(", "");
+ put_degrees(b, ds->longitude, ",", ")});\n");
put_string(b, "markers.push(temp);\ntempinfowindow = new google.maps.InfoWindow({content: '<div id=\"content\">'+'<div id=\"siteNotice\">'+'</div>'+'<div id=\"bodyContent\">");
snprintf(pre, sizeof(pre), "<p>%s ", translate("gettextFromC", "Date:"));
put_HTML_date(b, dive, pre, "</p>");
@@ -51,7 +51,7 @@ void writeMarkers(struct membuffer *b, const bool selected_only)
put_HTML_watertemp(b, dive, " ", "</p>");
snprintf(pre, sizeof(pre), "<p>%s <b>", translate("gettextFromC", "Location:"));
put_string(b, pre);
- put_HTML_quoted(b, dive->location);
+ put_HTML_quoted(b, get_dive_location(dive));
put_string(b, "</b></p>");
snprintf(pre, sizeof(pre), "<p> %s ", translate("gettextFromC", "Notes:"));
put_HTML_notes(b, dive, pre, " </p>");
diff --git a/xslt/uddf-export.xslt b/xslt/uddf-export.xslt
index d1d46a9b9..4365702dc 100644
--- a/xslt/uddf-export.xslt
+++ b/xslt/uddf-export.xslt
@@ -279,11 +279,75 @@
<xsl:value-of select="format-number(substring-before(., ' ') + 273.15, '0.00')"/>
</airtemperature>
</xsl:for-each>
+ <xsl:variable name="trimmedweightlist">
+ <xsl:for-each select="weightsystem">
+ <weight>
+ <xsl:value-of select="substring-before(@weight, ' ')"/>
+ </weight>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:if test="sum(xt:node-set($trimmedweightlist)/node()) >= 0">
+ <equipmentused>
+ <leadquantity>
+ <xsl:value-of select="sum(xt:node-set($trimmedweightlist)/node())"/>
+ </leadquantity>
+ </equipmentused>
+ </xsl:if>
<xsl:if test="parent::trip">
<tripmembership ref="trip{generate-id(..)}"/>
</xsl:if>
</informationbeforedive>
+ <xsl:for-each select="cylinder">
+ <tankdata>
+ <link>
+ <xsl:attribute name="ref">
+ <xsl:choose>
+ <xsl:when test="@o2 != ''">
+ <xsl:value-of select="concat('mix', substring-before(@o2, '.'))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="'mix21'"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ </link>
+
+ <xsl:if test="@size">
+
+ <tankvolume>
+ <xsl:value-of select="substring-before(@size, ' ')"/>
+ </tankvolume>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="@start">
+ <tankpressurebegin>
+ <xsl:value-of select="substring-before(@start, ' ') * 100000"/>
+ </tankpressurebegin>
+ </xsl:when>
+ <xsl:otherwise>
+ <tankpressurebegin>
+ <xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure]/@pressure[1], ' ') * 100000"/>
+ </tankpressurebegin>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ <xsl:choose>
+ <xsl:when test="@end">
+ <tankpressureend>
+ <xsl:value-of select="substring-before(@end, ' ') * 100000"/>
+ </tankpressureend>
+ </xsl:when>
+ <xsl:otherwise>
+ <tankpressureend>
+ <xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') * 100000"/>
+ </tankpressureend>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </tankdata>
+ </xsl:for-each>
+
<samples>
<xsl:for-each select="divecomputer[1]/event | divecomputer[1]/sample">
@@ -483,65 +547,7 @@
</xsl:for-each>
</samples>
- <xsl:for-each select="cylinder">
- <tankdata>
- <link>
- <xsl:attribute name="ref">
- <xsl:choose>
- <xsl:when test="@o2 != ''">
- <xsl:value-of select="concat('mix', substring-before(@o2, '.'))"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="'mix21'"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
- </link>
-
- <xsl:if test="@size">
-
- <tankvolume>
- <xsl:value-of select="substring-before(@size, ' ')"/>
- </tankvolume>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="@start">
- <tankpressurebegin>
- <xsl:value-of select="substring-before(@start, ' ') * 100000"/>
- </tankpressurebegin>
- </xsl:when>
- <xsl:otherwise>
- <tankpressurebegin>
- <xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure]/@pressure[1], ' ') * 100000"/>
- </tankpressurebegin>
- </xsl:otherwise>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test="@end">
- <tankpressureend>
- <xsl:value-of select="substring-before(@end, ' ') * 100000"/>
- </tankpressureend>
- </xsl:when>
- <xsl:otherwise>
- <tankpressureend>
- <xsl:value-of select="substring-before(divecomputer[1]/sample[@pressure][last()]/@pressure, ' ') * 100000"/>
- </tankpressureend>
- </xsl:otherwise>
- </xsl:choose>
-
- </tankdata>
- </xsl:for-each>
-
<informationafterdive>
- <xsl:variable name="trimmedweightlist">
- <xsl:for-each select="weightsystem">
- <weight>
- <xsl:value-of select="substring-before(@weight, ' ')"/>
- </weight>
- </xsl:for-each>
- </xsl:variable>
-
<xsl:if test="node()/depth/@max != ''">
<greatestdepth>
<xsl:value-of select="substring-before(node()/depth/@max, ' ')"/>
@@ -605,14 +611,6 @@
</xsl:when>
</xsl:choose>
</visibility>
- <equipmentused>
- <leadquantity>
- <xsl:if test="sum(xt:node-set($trimmedweightlist)/node()) >= 0">
- <xsl:value-of select="sum(xt:node-set($trimmedweightlist)/node())"/>
- </xsl:if>
- </leadquantity>
- </equipmentused>
-
</informationafterdive>
</dive>