summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2013-11-09Moved the code that handles DiveList column sizes to its correct file.Gravatar Tomaz Canabrava
I got a bit lost trying to find the code that handled DiveList columns today, so I thought it was better to move it to its file, after all we do have a divelistview.h :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-09Fixes breaking the sizes of the columns of the listView.Gravatar Tomaz Canabrava
This just proves one point: I'm retarded. I moved some code around and forgot to close the old group, so I created a group inside 'MainWindow' that handled the ListWidget, wich was not the right thing to do at all. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-09Fix inconsistent position of screen splittersGravatar Tomaz Canabrava
I basically rewrote the way we handled the splitters. It now uses a state to know what it's doing, and will only update the value of the saved-to-disk splitter size if the state shows the splitters (currently only VIEWALL), where all the other states should hide the splitters, and the values of the splitters don't matter. Fixes #225 Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07Include the cylinder information in a dive added with "Add Dive"Gravatar Dirk Hohndel
We only copied the samples, but not the related cylinder data. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07Don't translate the fake DC modelsGravatar Dirk Hohndel
Since the model name is written into the XML file it has to be a literal string that isn't translated. Otherwise a datafile written in one locale behaves differently when opened by Subsurface under a different locale. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07Adjust default start time of added diveGravatar Dirk Hohndel
It should be 'now' in the current timezone. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07Remove debug output left in the previous commit by mistakeGravatar Dirk Hohndel
Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07Make the tag widget act more sanely when pressing TabGravatar Dirk Hohndel
When dealing with autocompletion, tag usually means "take this, move on". In the tag widget the tab was added to the tag itself (and then stripped when the input line was processed). Not exactly useful. This feels a bit "hackish", but it seems to get the job done. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07Fix stupid off by one errorGravatar Dirk Hohndel
This was missing the space for the \0 character so the paths were one byte short. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07Fix for equipment tab cancel button bugGravatar Taiane Ramos
On equipment tab, when editing a cell and then clicking on cancel button, it would delete all the cylinders table. Now it performs the original behaviour of recovering the original value of the cell and don't delete the table. Signed-off-by: exhora <exhora.tat@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-07Hide temperature fields when displaying / editing trip dataGravatar Dirk Hohndel
And show them again when displaying a dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-05Hide TadWidget and Label when editing a tripGravatar Maximilian Güntner
Also hide ui.CoordinatedLabel when editing a trip, since ui.coordinates is hidden. Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-05Show a different message when editing more than one diveGravatar Dirk Hohndel
I still wonder if we have all the semantics correct for multi dive editing. This will need more testing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-05Fix dive mergingGravatar Dirk Hohndel
When merging dives, the indices of the following dives change - so we need to adjust the variable used in the for_each loop. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-05Remember the column we are sorting byGravatar Dirk Hohndel
A call to DiveListView::reload always reset our sortcolumn to be 0. Instead we are tracking the correct sort column and sort direction. This also removes an obsolete private member that was unused. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-05Don't force the DiveListView to be a tree when reloadingGravatar Dirk Hohndel
We should keep whatever view the user last used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-05Create installer with qmakeGravatar Dirk Hohndel
This is seriously flawed. makensis is run twice for some reason. I also noticed that the data and xslt directories under packaging/windows aren't created when running make install. Running make -f Makefile.Release install_marbledir install_deploy works, but obviously this should be taken care of by the dependency. The installed binary under Windows is not finding its icon, the translations are missing... lots of work left to do here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-02Merge branch 'tagwidget-pr' of github.com:mguentner/subsurfaceGravatar Dirk Hohndel
2013-11-02Fix warning about ambiguous if / else nestingGravatar Dirk Hohndel
Should have cleaned that up when committing the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-02Speed up XML loadingGravatar Linus Torvalds
This tries to speed up XML loading for large XML files (and thus subsurface startup times) by trimming the fat off our own matching code. The actual libxml overhead (particularly string allocation) tends to be the dominant part, so this only speeds up a big load by about 12% for me, but hey, it can be noticeable. Dirk's example nasty 175MB xml file with ~5200 dives takes "only' 7.7 seconds to load, when it used to take 8.8s. And that's on a fast machine. For smaller xml files, the dynamic loading costs etc startup costs tend to be big enough that the xml parsing costs aren't as noticeable. Aside from switching the node names around to "little endian" (ie least significant name first) format to avoid some unnecessary strlen() calls, this makes the nodename generation use a non-locale 'tolower()', and only decodes up to two levels of names (since that's the maximum we ever match against anyway). It also introduces a "-q" argument to make startup timing easier. Passing in "-q" just makes subsurface quit imediately after doing all necessary startup code. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-11-02Fix the inconsistent behaviour of QCompleterGravatar Maximilian Güntner
The TagWidget behaves now similiar to a QLineEdit. Pressing Enter/Return will now close the completion widget. Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-11-02Correct tabstops in MainTabGravatar Maximilian Güntner
Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-11-02Corrected indentation, added license/copyrightGravatar Maximilian Güntner
Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-11-02Added a custom widget for tagging divesGravatar Maximilian Güntner
A custom tag widget has been added to MainTab. Tags are seperated by a comma ",". The implementation supports escaping a comma by using "\,". While typing, the widget supports the user by suggesting tags using a QCompleter. Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-11-02Replaced the tag implementationGravatar Maximilian Güntner
The new implementation supports custom tags which are provided by the user as well as default tags which are provided by subsurface. Default tags can be translated and will be written to XML in their non-localized form. Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-11-02change the key from const char * to QByteArrayGravatar Maximilian Güntner
if trGettext() gets called with a *text that resides in the stack, the QHash will return incorrect values after the second call of trGettext() with that *text. Example (assuming nothing has been translated): void func(const char *text) { char *translated = trGettext(text); doSomethingWith(translated); } func("foo"); (1) func("bar"); (2) (1) *translated is "foo" (2) *translated should be "bar" but is "foo" because the key (const char*) points to the value "foo" which has been set in the previous call (1). Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
2013-11-01Merge branch 'editMode' of github.com:tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-11-01Enable undo for the Edit mode on Added Dives.Gravatar Tomaz Canabrava
This enables undo for the edit mode on added dives, it uses the premade backup to fill the old dive with data. :) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
2013-11-01Changed the backup implementation of the samples on EditDive.Gravatar Tomaz Canabrava
Changed the backup implementation of the samples on EditDive, it's way cleaner now what's happening, and it's also better for the cancel edit. Next: The Cancel Edit. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
2013-11-01Enable editing a dive that was manually entered.Gravatar Tomaz Canabrava
This patch enables editing a dive that was manually entered, it doesn't cover dive plans yet because on the plan I need to figure out what are the 'user-entered' points, and what are the algorithm point. and I feel lazy. =p One last thing that's missing is to revert the dive to the previous condition if the user cancels the edition, currently canceling and applying ok is the same thing. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
2013-11-01Code cleanup - Stop calling the same 6 lines everywhere.Gravatar Tomaz Canabrava
There's a method named refreshDisplay, fairly unused, let's use it a bit mroe. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
2013-11-01Added a new option to edit the dives.Gravatar Tomaz Canabrava
Added a new option to edit the dive in the profile view. The option will only be visible if the dive was manually entered or if the dive is a plan. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
2013-10-31Removed Reference to dangling pointer.Gravatar Tomaz Canabrava
We cannot use tr("").toLocal8bit().constData(); on a function that expects a char* because the object will be deleted on the next line, so a strdup is necessary. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
2013-10-27Add alt based shortcuts to access menusGravatar Miika Turkia
This adds alt-f shortcut to access file menu as well as other similar alt based shortcuts for other menu items. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-27Merge branch 'webservices' of github.com:tcanabrava/subsurfaceGravatar Dirk Hohndel
2013-10-25fix device probing for UEMIS computer on linuxGravatar Danilo Cesar Lemes de Paula
When the device probing was ported from the Gtk version we skipped the UEMIS code. It's still based on the contents of /proc/mounts, although without the use of glib's helpers. Signed-off-by: Danilo Cesar Lemes de Paula <danilo.eu@gmail.com>
2013-10-24code cleanup: removed unused function from mainwindow.hGravatar Tomaz Canabrava
The setupSplitters method was created quite a while ago to deal with the splitters when I didn't used a more sane approach. I forgot to delete it back them, removing now. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24Minimum hooking-up done, divelogs.de shows on menu-activation.Gravatar Tomaz Canabrava
This patch does the hooking up to show the dialog of the divelogs.de window when the user selects it on the menu.: Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24Reorganized the downlads menu for the inclusion of more webservices.Gravatar Tomaz Canabrava
This patch moves around a few items on the menu to a new submenu downloads/uploads. I think it's not the best way, but it already fives a bit more of 'unverbosity', because the old menu had 'Download from Dive Computer', 'Download from Webservices', and now we would introduce a new 'Download from Divelogs.de' I tougth it was better to have a 'parent' named 'Download' and put all children inside. this can grow quite big as soon as I implement the plugin system for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24Added the skeleton for the Download / Upload from Divelogs.deGravatar Tomaz Canabrava
Added the skeleton code for the Download / Upload from Divelogs. de webservice. Now I need to hoopup things from the .ui side and do the actual implementation of the code. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24fix the string of the subsurfice webservice on the settings.Gravatar Tomaz Canabrava
The setting was 'webservice', but this is too wide, since we are supporting more than one. changed it to 'subsurface_webservice_uid' Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24Fixed a crash when the user canceled the download from webservice dialog.Gravatar Tomaz Canabrava
Null references, ah, love them. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24Created a 'WebService' dialog that will handle download and upload.Gravatar Tomaz Canabrava
Created a WebService dialog that will handle download and upload from all child based webservices. Also, ported the currently - only - one webservice to use the new dialog. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
2013-10-24Subject: [PATCH] No need to center on dive after editing coordinates.Gravatar Michael Andreen
This is done automatically now. Signed-off-by: Michael Andreen <harv@ruin.nu> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-20Add current date to CSV importGravatar Miika Turkia
Since CSV import does not include date/time stamp, we need to generate one for ourselves. This patch uses current time of the import as dive time. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-20Export dives in UDDF formatGravatar Miika Turkia
Implement exporting in UDDF format as was done in Gtk version. File menu exports all the dives, right click on selection exports the selected ones. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-20Get rid of compiler warning on format stringsGravatar Miika Turkia
This gets rid of compiler warnings "format not a string literal and no format arguments [-Wformat-security]". E.g. when building distribution packages these warnings are often treated as errors preventing the build (with good reason). Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2013-10-20Use configured vertical speed units in rulerGravatar Anton Lundin
Ruler was hard-coded to use seconds as speed unit. This makes it use get_vertical_speed_units to switch between seconds and minutes. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-17Remove the "in C" part about Subsurface's descriptionGravatar Thiago Macieira
It's not written purely in C anymore. There's quite a lot of C++ now, not to mention Perl, XSLT, shell scripting, etc. :-) Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-17Some adjustments to "save as"Gravatar Dirk Hohndel
The popup menu entries should be all lowercase. Also we should handle this the same as regular save and open when it comes to remembering the last path. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>