aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
AgeCommit message (Collapse)Author
2013-04-15Added the code that will load and populate the Tank InfoGravatar Tomaz Canabrava
Added the code that will load and populate the Tank Info ComboBox that`s used by the user to select the Cylinder description. Code curerntly implements more than the GTK version since the GTK version of it was a plain-list, this one is a table based model that can be used in ListViews ( like we use now in the ComboBox ) but also in TableViews ( if there`s a need in the future to see everything that`s catalogued in the Tank Info struct. ) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-14Separate Gtk related code from core logic: statisticsGravatar Dirk Hohndel
Fairly straight forward, so far just one tiny bit of code restructuring, everything else separated cleanly. Added statistics-gtk.c and statistics.h This should make no difference to functionality. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-14Separate Gtk related code from core logic: infoGravatar Dirk Hohndel
Surprisingly straight forward, just a couple of places where we really mix significant logic with UI code (for example setting the window title). I had to move amount_selected from display-gtk.h to display.h - I guess the number of dives that are selected is UI independent. But I wonder if we still will track this as a global variable in a Qt UI (since the Gtk selection logic is the main reason this existed in the first place). Added a new info.h files for the necessary declarations. This should make no difference to functionality. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-14Undoing the last Qtr_ hackGravatar Dirk Hohndel
The Qtr_ hack isn't needed as in commit 720fc15b2dcd ("Introduce QApplication") had already made sure that we are using gettext. I didn't revert the two commits as I wanted to keep the added header comments and fix the tooling in the Makefile as well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-13Add Qtr_ macros that uses gettext in a tr() compatible mannerGravatar Dirk Hohndel
This should wrap gettext nicely and replace the "_()" macros we use in C code. Also added comments to the top of all the new files. Suggested-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-13Remove the mandatory -fPIC from CXXFLAGSGravatar Thiago Macieira
This isn't necessary. There's code below adding -fPIE when necessary only. Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-13Started the real code on the Qt Interface.Gravatar Tomaz Canabrava
1 - Open File already open files, it tries to not break the Gtk version, but some methods on the GTK version still need to be called inside Qt because the code is too tight-coupled. 2 - Close file already close files, same comments for the open file dialog applies here. 3 - The code for adding new cylinders in the cylinder dialog is done, already works and it's integrated with the system. There's a need to implement the edit and delete now, but it will be easyer since I'm starting to not get lost on the code. 4 - Some functions that were used to convert unities have been moved to convert.h ( can be changed later, put there because it's easyer to find something that converts in a convert.h =p ) because they were static functions that operated in the GTK version but I need those functions in the Qt version too. [Dirk Hohndel: lots and lots of whitespace and coding style changes] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-12Add dive list view to main windowGravatar Amit Chaudhuri
Add files for dive list model/view implementation. Replace TableView with the custom list view. Amendments to makefile to match. Note: we don't yet handle trips and may want to add additional columns to describe the dive. A single, dummy dive is added to show how this works (get root; item is child of root). Purely to illustrate - needs proper integration etc. Amend member names for dive list view components Various naming changes to conform to coding style. Required changes to members (remove prefix) and methods (avoid clash with members). Clean up indentation (swap spaces for tabs). Code for model/view was written with a different editor which had different settings :-/ [Dirk Hohndel: minor whitespace cleanup] Signed-off-by: Amit Chaudhuri <amit.k.chaudhuri@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-09Makefile: detect which files need moc and uicGravatar Alberto Mardegan
Add some magic rules to detect which files need to be processed by the moc or uic tools, as well as a way to manually specify exceptions. Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-08Separate Gtk related code from core logic: plannerGravatar Dirk Hohndel
Relatively straight forward, just a handful of places where we call show_error() (a UI function) from the logic code. In the process I noticed a few places where error returns weren't dealt with correctly. Added a new planner.h files for the necessary declarations. This should make no difference to functionality. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-07Separate Gtk related code from core logic: plannerGravatar Dirk Hohndel
Relatively straight forward, just a handful of places where we call show_error() (a UI function) from the logic code. In the process I noticed a few places where error returns weren't dealt with correctly. Added a new planner.h files for the necessary declarations. This should make no difference to functionality. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-07Start creating the Qt UIGravatar Tomaz Canabrava
This is based on several commits from Tomaz - mingled together and mildly extended by Dirk (mostly Makefile hacking). All Qt UI related stuff should eventually move into the qt-ui directory. So the Makefile rules for moc and uic have been adjusted accordingly. The MainWindow class has been moved into its own file in qt-ui (but just with a placeholder, the existing class has simply been ifdef'ed out in qt-gui.cpp for the moment). We still have a couple of Qt things in qt-gui.cpp in the main directory... all this needs to move into the qt-ui directory and be built with separate .h files. Right now we have the one-off Makefile rule to create the qt-gui.moc file from the qt-gui.cpp file. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-07Separate Gtk related code from core logic: divelistGravatar Dirk Hohndel
This is simplistic & brute force: any function that touches Gtk related data structures is moved to divelist-gtk.c, everything else stays in divelist.c. Header files have been adjusted so that this still compiles and appears to work. More thought is needed to truly abstract this out, but this seems to be a good point to commit this change. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-06Separate Gtk related code from core logic: divelistGravatar Dirk Hohndel
This is simplistic & brute force: any function that touches Gtk related data structures is moved to divelist-gtk.c, everything else stays in divelist.c. Header files have been adjusted so that this still compiles and appears to work. More thought is needed to truly abstract this out, but this seems to be a good point to commit this change. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-04-02Add a Qt main windowGravatar Alberto Mardegan
This is just an empty window with a File menu and a few items. It shows how to hook up functions to menu actions. Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
2013-04-01Improve Makefile rules for running mocGravatar Alberto Mardegan
The previous rules were conflicting, and the naming of the moc-generated file to be included in .cpp files was deviating from what's most used in Qt: the usual way is to #include "file.moc" and not #include "file.moc.cpp" Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
2013-04-01Define QT_NO_KEYWORDSGravatar Alberto Mardegan
This prevents Qt headers from defining macro symbols such as "emit" and "signals", therefore avoiding conflicts when struct members with the same names are defined in some C header. Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
2013-04-01Introduce QApplicationGravatar Alberto Mardegan
Instantiate a QApplication and let Qt handle the event loop. Add a QTranslator subclass to translate the UI via gettext. Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
2013-04-01Have some C++ file in the projectGravatar Alberto Mardegan
Rename gtk-gui.c to qt-gui.cpp, and make the necessary changes so that the project still builds. Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
2013-04-01Setup Makefile for Qt/C++ buildsGravatar Alberto Mardegan
Setup the build variables for building with QtWidgets, and add rules for processing the Q_OBJECT macros with moc and generate widget code from .ui files with uic. Signed-off-by: Alberto Mardegan <mardy@users.sourceforge.net>
2013-03-14Revert "Only include .po files that has a companion .aliases file"Gravatar Henrik Brautaset Aronsen
Commit 6044c22741 wrongly assumed that a disabled .po file had a companion .disabled file instead of an .aliases file. Running make after "tx pull -af" generated errors which I tried to fix. I shouldn't have, because the Makefile did the right thing. It warned about a missing .aliases file for a brand new translation. So, I'm reverting the commit and use "tx pull -f" instead the next time I need to test existing translations. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-13Only include .po files that has a companion .aliases fileGravatar Henrik Brautaset Aronsen
Disabled translations have a .disabled file instead of an .aliases file. Without this patch I couldn't make subsurface after a tx pull (when testing translations). This patch makes the .aliases file an explicit requirement for a valid translation. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-12Fix the build under Kfreebsd & HURD.Gravatar Sylvestre Ledru
Ensure that Kfreebsd and HURD are recognized as "like Linux" Signed-off-by: Sylvestre Ledru <sylvestre@debian.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-04Limited support for Suunto DM4 importGravatar Miika Turkia
Basic functionality is implemented but at least support for multiple cylinders is missing. Event/alarm support is only partial. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-04Fix the permission of the ICONFILE and the locale filesGravatar Sylvestre Ledru
Lintian, the Debian package static analyzer, was complaining about the "wrong" permissions on these files. Signed-off-by: Sylvestre Ledru <sylvestre@debian.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-03Update README, ReleaseNotes and Makefile for 3.0.2Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28Move translations to transifex.comGravatar Kévin Raymond
Translation management is done through Transifex now for easy translations. Translators should note that fuzzy strings are not used any more since Transifex does not handle it (by choice). In order to pull translations, you need a transifex.com account. Signed-off-by: Kévin Raymond <shaiton@fedoraproject.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-28OSX: also need to add the CoreServices framework to linkerGravatar Dirk Hohndel
We had this before - it appears that some versions of OSX need us to explicitly list the frameworks we are using during the linking stage while others are perfectly happy without that. But since listing them doesn't appear to hurt this commit should be safe. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27Suppress the "/bin/sh: 1: cannot open version.h: No such file" noise.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-27Add target `all' to avoid "target order is important" confusion.Gravatar Cristian Ionescu-Idbohrn
Signed-off-by: Cristian Ionescu-Idbohrn <cii@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26Update versions to 3.0.1Gravatar Dirk Hohndel
almost forgot Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26Get make to rebuild Subsurface by default againGravatar Dirk Hohndel
To quote Linus: Move the rule for the new version thing down. Plain "make" will try to make the first target in the Makefile. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26Generate/update a version.h header file.Gravatar Cristian Ionescu-Idbohrn
This is dedicated to Lubomir ;) Should work (tm). Not sure though if you want target 'gen_version_file' as a pre-requisite to $(NAME) or some other target. [Dirk Hohndel: minor adjustments to make it work with gtk-gui.c] Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-22Add correct XSLT search path for WindowsGravatar Dirk Hohndel
And report error if XSLT stylesheet not found Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-20Updating versions for 3.0Gravatar Dirk Hohndel
Most of the actual version numbers are derived from the git tag, but we do have the fallback hard-coded in the Makefile (e.g. for people building from a source tar-ball). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-16Unified handling of version extraction.Gravatar Cristian Ionescu-Idbohrn
Removed oddly named and ridiculously outdated documentation text (scripts). Created new directory 'scripts'. Added unified version extraction script (scripts/get-version). Yes, it's more shell script code but faster and more maintainable than the sed commands and the swearwords/regexps repeated over and over again. Makefile and packaging/macosx/make-package.sh modified accordingly. I don't do windos neither macos but, AFAICS my tests show, it should be safe. Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-15Further automization of the Mac build processGravatar Dirk Hohndel
This improves the Plist.info and automates the version data that it uses utilizing the same git magic that the Makefile uses. It also makes the complete DMG creation a matter of simply running packaging/macosx/make-package.sh Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-15Fix sha1 build for WindowsGravatar Dirk Hohndel
This works at least when cross compiling. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-15Get the SHA1 routines from git instead of opensslGravatar Linus Torvalds
..they are of a higher quality anyway, and this way we have one less library to worry about. And this way there is nobody who can claim that openssl is not a system library and thus not compatible with the GPL. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-14Add support for signing Mac applications to the MakefileGravatar Dirk Hohndel
Maybe I should comment out the target that requires my private key to work... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09New Makefile target to create smaller diffs for translationsGravatar Dirk Hohndel
Simply run make prepare-po-files and msgcat will be run over all po files to create consistent location references. That plus the change I made earlier to how we update the po files should create much smaller and easier to read diffs for translators. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Hopefully last change to po filesGravatar Dirk Hohndel
While this is a pain for everyone, I decided not to edit out the code reference noise - after all this is supposed to help translators find where the text is used in case it's unclear how to translate something. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Enable XSLT transforms on OSXGravatar Henrik Brautaset Aronsen
We still need proper paths and install options for the install-macosx and create-macosx-bundle targets. This enables XSLT support when running as ./subsurface, but doesn't hurt the other install targets. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-09Add XSLT support for the macosx install and bundle targetsGravatar Henrik Brautaset Aronsen
Works like it should for the install-macosx target. I haven't tested the create-macosx-bundle target, but it shouldn't be any different. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-02Move about icon to include fileGravatar Henrik Brautaset Aronsen
Getting the about icon to display in various scenarios on MacOSX was a pain. Moving the icon to an include file solved the problem. This commit also fixes the problem Dirk was having when converting satellite.svg to a png in commit cf3c0266c2. I couldn't quite get ImageMagick to preserve transparency and color when converting subsurface-icon.svg, though, so I used Gimp instead. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2013-02-02Rename subsurface.svg to subsurface-icon.svgGravatar Henrik Brautaset Aronsen
In preparation for a subsurface-icon.h, this should avoid confusion about whether "subsurface.h" is a core header file. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
2013-02-01Fix the rules for creating the windows .nsi fileGravatar Dirk Hohndel
This was one of the reasons why I tagged version 2.9. I wanted to test all the Makefile magic we added to get sane and automated versions on Windows and Linux. And it turned out my sed script failed in rather obvious ways. These changes appear to fix that - but of course you won't see that unless you reset your git repository to the tag and manually apply this patch. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01Bump version number to 2.9v2.9Gravatar Dirk Hohndel
This is intended as a visual sign that we are getting closer to 3.0. We should consider this a "soft" code freeze / string freeze - I'm still looking for a bunch of fixes, small additions and of course documentation, but no new major features. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-01Move flag icon to include fileGravatar Dirk Hohndel
Just like with the satellite icon we are creating a pixdata structure for the flag. The Makefile cleanup in commit df6a9ddd8a21 ("Auto-generate C file dependencies, and make the build more quiet") removed the rules for generating the .h file by mistake (I hope). This adds a more generic rule back in and also makes sure that the data structures get more useful names. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-31Hide the error output from pkg_config if you don't have osm-gps-mapGravatar Dirk Hohndel
This became very obvious after commit df6a9ddd8a21 ("Auto-generate C file dependencies, and make the build more quiet") went in; since not having osm-gps-map is one of the few errors that aren't fatal for building it seemed worth quieting this down. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>