aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/configreader.vala (follow)
Commit message (Collapse)AuthorAgeLines
* Clarify warning on duplicate keysWolfgang Müller2021-11-27-3/+3
| | | | | | | | | | | | | | | | | | | | | In order to alert the user to any potential errors in the configuration files, we keep track of configuration entries that we have not accessed and print them out. These might include misspellings or otherwise malformed strings. To collect those unparsed configuration entries, we remove the ones that have been successfully parsed from our in-memory KeyFile. The remaining keys are the offending ones. Unfortunately, because KeyFile.remove_key() removes only one matching key, we might also be left with any duplicates that would otherwise be valid entries. So, if the entry misc.font is specified twice, we currently warn about an "unknown" key, the second misc.font entry. This could potentially be misleading to the user. Since it is too expensive to fix this issue in the code, make sure we warn instead about "unknown or duplicate" keys. This way we say the correct thing without incurring a big complexity cost.
* Add ability to specify additional URI handlersJuhani Krekelä2021-11-27-0/+38
| | | | | | | | | This commit adds a new section, open-with, to the configuration file. The options specified there will be added as "Open with …" menu items in the URI context menu. This is to make it easier to perform other actions on the URI than opening it in the system default browser; a user might for example add another browser, media player, or a script that preprocesses the URI before opening it.
* Mark messages for translationWolfgang Müller2021-06-27-5/+12
| | | | | | | | | | | | | | | | With the translation infrastructure now in place, make sure to mark every user-bound message for translation. All but one of the strings in terminal.ui are already marked. This commit marks all remaining messages in the Vala code as well as the missing one from terminal.ui. One of the messages in terminal.ui is a sample error message for the infobar label. Since this message will never be visible to the user (the code overrides the label's contents with any relevant warning messages), we do not need to keep it marked. Finally, give translators ample context for what they will have to translate and fix a small inconsistency with the capitalization of warning messages in configreader.vala.
* Add setting for controlling cursor blinkingJuhani Krekelä2021-06-17-0/+16
| | | | | | | | | | Currently weltschmerz always uses the global GTK setting for cursor blink, which means that the cursor blink setting is stored separately from the rest of the configuration. Add a setting for overriding it in the config file, so that all the relevant settings can be adjusted in one standardized place. Reviewed-by: Wolfgang Müller <wolf@oriole.systems>
* Improve configuration handlingWynn Wolf Arbor2020-02-04-0/+188
This commit improves and simplifies weltschmerz's configuration handling. Obtaining and parsing the KeyFile is split out into ConfigReader, which is fully agnostic of the specific configuration values. Config now contains all configuration values in the form of primitive types or class instances, and no longer delegates access to the KeyFile structure directly. This means that the configuration file is read once, and then kept in the Config instance. Indirectly this commit also fixes a bug where weltschmerz would segfault if one of the palette entries contained an invalid value.