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ý <mermar@centrum.cz>
Add a combo-box that holds a list of pre-defined time formats
in the Language preferences.
The user is still allowed to enter a custom time format.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Add a combo-box in place of the single line text field and
support some pre-defined date formats, such as:
MM/dd/yyyy
Each long format has a corresponding short variant stored in the
QMap dateFormatShortMap and it's updated automatically once
the user selects a combo box item for the long format.
The regex for dates is slighly modified:
[^dMy/\\s:;\\.,\\-]
The user is still allowed to enter custom long / short date foramats.
Fixes#276
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Open the cache folder via QDir and call removeRecursively().
At that point the user needs to restart Subsurface to be able to
use the map in another language properly.
This change is triggered by the fact that the user might want to see
the street map in his preferred language after he/she picks another
language from Settings. But one problem here is that the cached files
do not carry a language flag - e.g. they are in the lines of:
googlemaps_100-1-9-445-245.png
Which means that the only way to not mix tiles in different languages
is to clear the cache and start downloading the new tiles in the newly
picked language after Subsurface has restarted.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
There's one function named uiLanguage() that should return
the current uiLanguage() that subsurface is running, but
it actually sets a whole lot of preferences, I think
that the general idea of that function is okay, but it seems
broken for me.
still, I used it to load the correct language from the preferences
since it's what this function is currently doing right now.
Also, a lot of missing groups where added.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Save the language settings using the SettingsObjectWrapper.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Don't use a QSettings to read properties, it's really
easy to mispell something. Just use the internal prefs structure.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.
And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.
This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We didn't respond at all to that button. Also, the language settings
didn't propagate without this explicit call.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The list widget takes too much space and isn't really any better. The
dropdown plus fliter is actually rather neat.
Also added back the connections so the dropdown and filter get disabled
when system default is selected (just as it was in the old preferences
dialog).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And this actually made me find one memory leak on the old version:
We are constantly creating / leaking a new QSortFilterProxyModel
everytime a sync() is done on the settings. That's not a lot, maybe
once per time a user changes its settings... but it's still a leak.
And the code is more sanely separated this time. yey.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is not hooked into anything - It's the bare minimum that I
need to continue creating the new preferences dialog. But take a
look at it... very simple. :)
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>