aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2014-03-31Merge branch 'planner-mods'Gravatar Dirk Hohndel
Nothing exciting here, just a few independent changes close to each other. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-31Diveplan with entered and computed waypoints to UIGravatar Lakshman Anumolu
Recently Robert Helling provided a patch "Distinguish between entered and calculated waypoints" in an attempt to distinguish between entered and calculated stops. This patch is an independent (content wise) extension of the above patch and is built relative to it which adds new table to display computed waypoints in plan mode. Currently table includes only two columns "Comp. Depth" and "Comp. Duration", which can extended to show further information. This is only a start to the UI interaction in PLAN mode. In addition to this there are many TODO things that diveplan feature demands TODO: 1. Show more details through "Computed Waypoints" table. 2. Remove tooltip from "Computed Waypoints" table widget. 3. Make contents in "Computed Waypoints" table widget non-editable. 4. Fix error when trying to save dive plan without using cylinder data. 5. Make dive plan editable after saving it. 6. Improvise dive planner graphics window. Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-31Distinguish between entered and calculated waypointsGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-31Fix crash with libgit when it's compiled with GIT_THREADSGravatar Linus Torvalds
Call git_threads_init() before using libgit functions. The documentation says: "If libgit2 has been built with GIT_THREADS on, this function must be called once before any other library functions. If libgit2 has been built without GIT_THREADS support, this function is a no-op" Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-31EAD/END explanation in user manual.Gravatar Robert C. Helling
E is for "equivalent". Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-31Exchange EAD and END to align our language with the rest of the worldGravatar Robert C. Helling
This needs to be tracked in the documentation as well. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-31Show EAD/END only for trimix/nitrox dives respectivelyGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-30Get rid of division by 0 by reshuffling EAD and EAN logicGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-30Exporting a World-MapGravatar Gehad
This patch adds the world map exporter. - add worldmap-save.c that writes the html to the file - use Google maps v3 API to put the place marks on the map - add worldmap-options.h to contain some settings for the JS which will make it easier for those to be changed - add save HTML action in the mainwindow user interface Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-28Toggle showing average depthGravatar Lakshman
Add additional check box in "preferences->graph" section that allows users to hide average depth on dive profile. By default this option is checked to show average depth. Fixes #475 Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Fix redundant spaces in info panelGravatar Lakshman
Remove redundant spaces from dive master and buddy list fields. Ticket also mentions about similar space behaviour in tag field, which I couldn't reproduce. Fixes #476 Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Profile2: hide the tooltip and ruler if we are printingGravatar Lubomir I. Ivanov
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Print: enable printing with the new profileGravatar Lubomir I. Ivanov
Some weird things happen if we use a local instance of the ProfileWidget2 class in printProfileDives(). Once we exit the printing dialog the profile crashes, which could hint of singleton issues. Instead we are going to use the already active instance of the class which we can retrieve from MainWindow. This should also be faster because the class is pretty heavy. In such a case the cleanup at the end of printProfileDives() is still relevant (removed in ac9a23ef3b69). First we resize the widget for printing purposes and then resize it back to the original values and re-plot the current selected dive in the dive list. Fixes #477, #478 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Profile2: add use of the isGrayscale flag when getting a colorGravatar Lubomir I. Ivanov
getColor() has a default argument for grayscale set to false. With this patch we pass it the local isGrayscale flag, which can only be set during printing. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Profile2: add some print related flagsGravatar Lubomir I. Ivanov
Some flags like printMode and isGrayscale are missing yet needed. The flag printMode is required so that we know *when* to hide certain elements such as the ruler and tool tip (e.g. not needed while printing). isGrayscale should be passed to all getColor() calls, so that the greyscale color table is respected. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Ruler: fix bad scaling for the text backgroundGravatar Lubomir I. Ivanov
The ruler text's white background scales badly. This patch adds the ItemIgnoresTransformations for the textItemBack object and matches the dimensions and position of the textItem object in front of it. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27User manual: Updates to sections 6 and 10-13Gravatar Willem Ferguson
These are updates that are not version 4.1 dependent, but many linguistic and logical edits are made, as are edits for consistency. No substantive material has been removed or added. This text is ready for V4.1 Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Repaint ruler when enable/disabling itGravatar Jan Mulder
Repaint ruler when enable/disabling it. Straightforward replot() added. Fixes #479 Signed-off-by: Jan Mulder <jlmulder@planet.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Remove printing when building for AndroidGravatar Anton Lundin
Qt for Android doesn't support printing. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Remove usermanual when building for AndroidGravatar Anton Lundin
Our usermanual is based on webkit, and thats not supported in Qt for Android. We should probably replace it with a Android native webview somehow. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Disable marble on AndroidGravatar Anton Lundin
marble uses webkit, and thats not compatible with Android. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Introduce android specific fileGravatar Anton Lundin
This contains a first stab at Subsurface platform interfacing code for Android, and surrounding parts. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-27Introduce NO_MARBLE define, make GlobeGPS a dummyGravatar Anton Lundin
Some users have requested a way to build subsurface without marble. This hides all traces in the ui and creates a GlobeGPS-dummy thats just a QLabel saying that marble is disabled, in case its shown somehow. The dummy is there so we can just ignore the fact that marble is disabled in the rest of the code. Fixes #394 Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-25simplewidgets: Include stdint for cross compatabilityGravatar Alberto Corona
Not including stdint leaves 'int64_t when' without a type and undefined when compiling for Windows with mingw Signed-off-by: Alberto Corona <albcoron@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-25User manual: Update included .html.git fileGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-25Minor edits to updated section-3 documentationGravatar Lakshman
Patch provided by Willem Ferguson, "0002-Updates-to-Section-3-of- the-user-manual" addresses large number of typos and inconsistencies in the previous documentation of section 3. This patch makes some additional corrections on top of the provided patch, and also removes the trailing whitespaces brought in with the provided patch. Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-25Updates to Section 3 of the user manualGravatar Willem Ferguson
Section 3 is quite a long section. Ten of the screen shots are replaced. Large numbers of typos and inconsistencies are corrected. A few sentences are included e.g when dealing with the Subsurface Companion. Section dealing with creating libdivecomputer dump files has been reorganised slightly. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-25Add optional Win32 console allocationGravatar Lubomir I. Ivanov
This patch adds the optional --win32console command line option. It does nothing on OSx and Linux, while is only useable on Win32. On Win32 if the application was built as GUI (not console), there is no way to view stdout and stderr. With windows.c's subsurface_console_init() we are able to either redirect stdout and stderr to the terminal from which subsurface.exe was started (always happens; --win32console does nothing in this case) or if --win32console is explicitly added to a shortcut, create a dedicated console window and monitor the output there. if set, WIN32_CONSOLE_APP is a condition that will make the subsurface_console_init() and subsurface_console_exit() functions NOP on Windows. The definition will be created if the user passes 'CONFIG += console' to qmake. Fixes #436 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-25Add the WIN32_CONSOLE_APP flagGravatar Lubomir I. Ivanov
If the user passes 'CONFIG += console' to qmake, we define WIN32_CONSOLE_APP that will be used in the source code to determine if this is a console or a GUI application on Win32. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-25Redraw profile when manipulating cylindersGravatar Jan Mulder
Manipulating cylinders, especially changing the exact gas content (o2, he), changes the pp02, ppHe graphs. This patch simply replots the profile in case of cylinder change at time of saving. Signed-off-by: Jan Mulder <jlmulder@planet.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-23Don't crash if we try to save a empty planGravatar Anton Lundin
Just treat it as a cancel instead. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-23Enable parts of planner based on defineGravatar Anton Lundin
In bf205726 DEPTH/Switch at was disabled by commenting out that code. This puts it back behind ifdefs Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-23Divemaster and Buddy fields auto-completion are not savedGravatar Yosef Hamza
The added characters by auto-completion "for the last item" isn't saved when using Return to save it "works well with tab" Fixes #469 Signed-off-by: Yousef Hamza <jo.adama.93@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-23save-git.c: fix another libgit2 API issueGravatar Lubomir I. Ivanov
GIT_CHECKOUT_OPTS_INIT, git_checkout_opts has changed to: GIT_CHECKOUT_OPTIONS_INIT, git_checkout_options Solution-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-21Fix system default font handlingGravatar Anton Lundin
We didn't care about system default fonts and sizes, we just used the Qt default font. Due to how QFont is constructed, there was need to split font and font size. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-21Make pp graphs visible at startup according to settingsGravatar Jan Mulder
Changeset a90818671 introduces a small inconvenience. The pp graphs at startup are not shown according to the visibility settings. Requiring to toggle the icons to show the desired pp graph. Trivial fix. Signed-off-by: Jan Mulder <jlmulder@planet.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-21Add current time and adjusted time to gui when adjusting dive's timestampGravatar Gehad
This patch adds the current dive time and the adjusted time to the time shift window. I added a function to dive.c to get the timestamp of the first selected dive. This will view the time of the first selected dive only even when multi dives are selected but it does change the times for multiple dives properly. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Make esc-key discard the new tag selectionGravatar Gehad
Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Do not use default dive filename before setting itGravatar Jan Mulder
Changeset ee2e43f introduced a small bug. The default dive file as set in the Prefences is not opened, requiring manual opening. This patch reshuffles a little code, allowing first the preferences being set, and than using it. Signed-off-by: Jan Mulder <jlmulder@planet.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Removed Duplicate IncludesGravatar Hugle
Signed-off-by: Hugle <wulong@comp.nus.edu.sg> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Better handling of keyboard on the inline edition on equipmentGravatar Tomaz Canabrava
The handling of keyboard is broken on Qt inside QComboBoxes. I'm trying ( and losing ) to make it less broken. This patch makes the code work reasonably well if you press Key_down or Key_up after having displayed the filter popup, which is different from the combobox popup for some reason. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Remove a bit of space from the Axis and its labels.Gravatar Tomaz Canabrava
This should make the layout work better on smaller screens. Fixes #458 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Make ruler respect dive depth.Gravatar Tomaz Canabrava
The only place on the code that the y() position didn't accompanied the dive-depth was this one, so let's see if this patch fixes it. See #455 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Don't create then set, do both at the same time.Gravatar Tomaz Canabrava
When we create, then set the value of a variable, we are wasting cycles and making the code more verbose. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20QString starts empty, do not set "" as empty string.Gravatar Tomaz Canabrava
Let's not be evil by creating "" as empty strings inside of the code, really. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Do not copy strings when you don't need it.Gravatar Tomaz Canabrava
This patch removed the use of copy-constructors on the QString to use the const-references. Even knowing that the QString is a refcounted class, let's not get that bad habit. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Code CleanupGravatar Tomaz Canabrava
The offending code is line-by-line equal to the completion highlited method, so why make it duplicated? Call that method instead. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-20Enable posibility to add dives to trip belowGravatar Anton Lundin
When I'm on a dive trip i usually download dives multiple times to start logging them while i still remember them. When i have already created a trip and downloads new dives they needs to be able to be added to the already existing trip, without relying on autogroup. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-19git object store: make it possible to work with checked-out git branchesGravatar Linus Torvalds
This makes the git object save logic also check out the changes in the working tree and index if the branch we save to is checked out. It used to be that we would just update the object store (and the branch ref, of course), but leave any checked-out state untouched. Note that if the working directory is dirty (ie you have made changes by hand and not committed them), the checkout will skip any dirty files and report it as a warning to the user. However, the save still succeeds (since the _real_ save goes to the backing store). NOTE NOTE NOTE! Both loading and saving very fundamentally work on the git object store level, and if you are working with a checked-out branch and make modifications to the working tree, saving will not touch those dirty files (so that you can try to recover your edits manually in the working tree), but it's worth pointing out that subsufrace loading state will totally ignore the working tree. So the only way to make subsurface *see* your changes is to commit them. Having edited state checked out in the working tree will only confuse you when subsurface first ignores it on reading, and then refuses to touch the checked-out state on writing. Put another way: working with a checked-out branch is now _possible_, but you need to be aware of the limitations. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-19Main: separate the QApplication and UI creationGravatar Lubomir I. Ivanov
When some arguments like --help and --version are passed to the executable, we don't need to create the UI at all. This patch separates the QApplication creation which is at first only needed to parse the arguments and then if exit() is not called from subsurfacestartup.c, we can call some of the "init" methods such as setup_system_prefs(), fill_profile_color() etc. At this point init_ui() can be called which no longer needs to accept the command line argument list. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>