<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/desktop-widgets/preferences, branch v4.7.6</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=v4.7.6</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=v4.7.6'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2017-12-29T21:16:58Z</updated>
<entry>
<title>cleanup: less than operators shall not use equal</title>
<updated>2017-12-29T21:16:58Z</updated>
<author>
<name>Jan Mulder</name>
<email>jlmulder@xs4all.nl</email>
</author>
<published>2017-12-29T18:29:23Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=75142b0a63279bac1e0b276edbf48ba3cea62862'/>
<id>urn:sha1:75142b0a63279bac1e0b276edbf48ba3cea62862</id>
<content type='text'>
See also commit c032006d91ee3c. Compare functions passed
to sort functions need to compare for less-than and not
less-or-equal.

Signed-off-by: Jan Mulder &lt;jlmulder@xs4all.nl&gt;
</content>
</entry>
<entry>
<title>Unify float calulations: use double</title>
<updated>2017-12-17T17:02:44Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2017-11-20T20:39:50Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=a748e7f239f29f5aa63a7ff221d1bd5081e698a2'/>
<id>urn:sha1:a748e7f239f29f5aa63a7ff221d1bd5081e698a2</id>
<content type='text'>
Internal floating point (FP) calculations should be performed using double
unless there is a very good reason. This avoids headaches with conversions.
Indeed, the vast majority of FP calculations were already done using double.
This patch adapts most remaining calculations. Not converted where things
that were based on binary representations and variables which weren't used
anyway.

An analysis of all instances follows:

core/plannernotes.c, l.404:

This was a comparison between two floats. On the left side, first an integer
was cast to float then multiplied with and integer and divided by a constant
double. The right hand side was an integer cast to a float. Simply divide by
1000.0 first to convert to double and continue with calculations. On the right
hand side, remove the cast, because the integer will be implicitely cast to
double for comparison. This conversion actually emits less instructions,
because no conversion to double and back is performed.

core/planner.c, l.613:

Same analysis as previous case.

subsurface-desktop-main.cpp, l.155:

A local variable representing the version OpenGL version. Turn this into
integer logic. Not only does this avoid dreaded FP rounding issues, it also
works correctly for minor version &gt; 10 (not that such a thing is to be
expected anytime soon).

abstractpreferenceswidget.[h/cpp]:

A widget where the position is described as a float. Turn into double.

desktop-widgets/divelogexportdialog.cpp, l.313:

total_weight is described as float. Use double arithmetics instead. This
instance fixes a truncation warning emitted by gcc.
</content>
</entry>
<entry>
<title>Use better aliases for icons.</title>
<updated>2017-12-01T07:14:46Z</updated>
<author>
<name>Martin Měřinský</name>
<email>mermar@centrum.cz</email>
</author>
<published>2017-11-29T09:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=8ef87e618afd1ec943c0f42a852b3b393c1e2113'/>
<id>urn:sha1:8ef87e618afd1ec943c0f42a852b3b393c1e2113</id>
<content type='text'>
Icon aliases were complete mess.
Some icons had alias some didn't.
Named with underscores vs. hyphens vs. camelCase.
Lower vs. upper case.
"ICON" prefix vs. suffix vs. nothing.
With vs. without filename suffix.
Some didn't make sence. Eg. mapwidget-marker-gray
(I can see, it's grey, but what does it represent?)
Some were duplicated, eg warning vs. warning-icon.
Some were name after widget, which is wrong.

Do not reinvent wheel. Use widely used naming scheme
close to Freedesktop Icon Naming Specification. This
will enable usage of common icons from current set in
the future. Thus Subsurface will fit nicely to GUI.

This changes icon aliases to one, easy grep-able style.

Signed-off-by: Martin Měřinský &lt;mermar@centrum.cz&gt;
</content>
</entry>
<entry>
<title>Use icons relative path.</title>
<updated>2017-12-01T07:14:46Z</updated>
<author>
<name>Martin Měřinský</name>
<email>mermar@centrum.cz</email>
</author>
<published>2017-11-28T07:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=0855f6f31577789888aa6d9b955c1bc46ed34d40'/>
<id>urn:sha1:0855f6f31577789888aa6d9b955c1bc46ed34d40</id>
<content type='text'>
Icon paths are defined in one place only - application's embedded resources.

Signed-off-by: Martin Měřinský &lt;mermar@centrum.cz&gt;
</content>
</entry>
<entry>
<title>Revert "Use icons relative path."</title>
<updated>2017-11-29T22:05:07Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>dirk@hohndel.org</email>
</author>
<published>2017-11-29T22:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=fd9c905ba357a37fe13338600bbc2b669c867f6f'/>
<id>urn:sha1:fd9c905ba357a37fe13338600bbc2b669c867f6f</id>
<content type='text'>
This reverts commit b0d98f6e269be9560de1b9c140855c85fecf1dd1.
</content>
</entry>
<entry>
<title>Revert "Use consistent aliases for all icons."</title>
<updated>2017-11-29T22:05:07Z</updated>
<author>
<name>Dirk Hohndel</name>
<email>dirk@hohndel.org</email>
</author>
<published>2017-11-29T22:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=2747056889c6e003880201998353e28591faab62'/>
<id>urn:sha1:2747056889c6e003880201998353e28591faab62</id>
<content type='text'>
This reverts commit 92e9c6606f6ef3ad16d2e31f9f9a8f5fa14f2c1a.
</content>
</entry>
<entry>
<title>Use consistent aliases for all icons.</title>
<updated>2017-11-29T10:46:35Z</updated>
<author>
<name>Martin Měřinský</name>
<email>mermar@centrum.cz</email>
</author>
<published>2017-11-29T09:57:08Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=92e9c6606f6ef3ad16d2e31f9f9a8f5fa14f2c1a'/>
<id>urn:sha1:92e9c6606f6ef3ad16d2e31f9f9a8f5fa14f2c1a</id>
<content type='text'>
Icon aliases were inconsistent mess. Underscores vs. hyphens vs. camelCase.
With vs. without filename suffix. Lower vs. upper case. "icon" suffix vs.
prefix vs. nothing. Some were duplicated, eg warning vs. warning-icon. Some
icons didn't have alias at all.

This changes all icon aliases to one, easy grep-able style which complies
to Freedesktop Icon Naming Specification (Guidelines).

Signed-off-by: Martin Měřinský &lt;mermar@centrum.cz&gt;
</content>
</entry>
<entry>
<title>Use icons relative path.</title>
<updated>2017-11-29T10:46:35Z</updated>
<author>
<name>Martin Měřinský</name>
<email>mermar@centrum.cz</email>
</author>
<published>2017-11-28T07:37:01Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b0d98f6e269be9560de1b9c140855c85fecf1dd1'/>
<id>urn:sha1:b0d98f6e269be9560de1b9c140855c85fecf1dd1</id>
<content type='text'>
Icon paths are defined in one place only - application's embedded resources.

Signed-off-by: Martin Měřinský &lt;mermar@centrum.cz&gt;
</content>
</entry>
<entry>
<title>Fix ownership issues in preferences code</title>
<updated>2017-11-25T15:41:09Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2017-11-25T08:22:19Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=4fb01dd766c824529dad4bd1ca64a981e137d476'/>
<id>urn:sha1:4fb01dd766c824529dad4bd1ca64a981e137d476</id>
<content type='text'>
Each preferences object owns its string members. In three cases, pointers
were copied instead of strings, leading to (in the best case) dangling
pointers if the user edited values:
1) In the GET_TXT macro in core/prefs-macros.h
2) In the PreferencesDialog::defaultsRequested() method
3) In main() of the mobile version

This patch fixes these issues, by using copy_string() or copy_prefs()
as appropriate.

The only reason that the old code didn't crash regularly is that the
default_prefs object was only used at startup and defaultsRequested()
is (at the moment?) dead code.

This patch also aligns the backslashes in core/pref.h and fixes a typo.
The declaration of copy_prefs() is moved to the core/prefs.h header.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
<entry>
<title>Fix typo: successfull -&gt; successful and succesfully -&gt; successfully</title>
<updated>2017-11-20T09:01:15Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2017-11-19T12:28:57Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=e762fd2d416cbe77669a83e302709aa3fbda68f7'/>
<id>urn:sha1:e762fd2d416cbe77669a83e302709aa3fbda68f7</id>
<content type='text'>
Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
</feed>
