Skip to content

Commit

Permalink
config: parse "primary_monitor_first"
Browse files Browse the repository at this point in the history
Ignored, as tint2 has removed support for it already. It will at least print out a more specific error message.

Related issues:
  - #35
  • Loading branch information
jmc-88 committed Sep 16, 2017
1 parent 2da459b commit 6b24a53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,10 @@ bool Reader::AddEntry_Legacy(std::string const& key, std::string const& value) {
return true;
#endif // ENABLE_BATTERY
}
if (key == "primary_monitor_first") {
util::log::Error() << "Ignoring legacy option \"primary_monitor_first\".\n";
return true;
}

return false;
}
Expand Down
3 changes: 3 additions & 0 deletions src/config_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ battery_font_color = #FFFFFF 74
battery_padding = 1 0
battery_background_id = 0
# Ignored legacy options
primary_monitor_first = 1
# End of config)EOF";

TEST_CASE("ConfigParser", "Correctly loads a valid configuration file") {
Expand Down

0 comments on commit 6b24a53

Please sign in to comment.