Skip to content

Commit

Permalink
Organize configuration screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Nightkingale committed Oct 22, 2023
1 parent 3d5dd85 commit c7da63d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion source/cfg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace cfg {
int hours = 0;
int minutes = 0;
int msg_duration = 5;
bool notify = true;
bool notify = false;
std::string server = "pool.ntp.org";
bool sync = false;
int tolerance = 250;
Expand Down
11 changes: 5 additions & 6 deletions source/config_screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,15 @@ config_screen::config_screen() :
{
add(make_unique<bool_item>(cfg::key::sync, "Syncing Enabled", cfg::sync));
add(make_unique<bool_item>(cfg::key::notify, "Show Notifications", cfg::notify));
add(make_unique<int_item>(cfg::key::msg_duration, "Notification Duration (seconds)",
cfg::msg_duration, 0, 30));
add(make_unique<int_item>(cfg::key::hours, "Hours Offset", cfg::hours, -12, 14));
add(make_unique<int_item>(cfg::key::minutes, "Minutes Offset", cfg::minutes, 0, 59));

add(make_unique<timezone_item>());

add(make_unique<int_item>(cfg::key::msg_duration, "Notification Duration (seconds)",
cfg::msg_duration, 0, 30));
add(make_unique<int_item>(cfg::key::tolerance, "Tolerance (milliseconds)",
cfg::tolerance, 0, 5000));

add(make_unique<timezone_item>());

// show current NTP server address, no way to change it.
add(make_unique<wups::text_item>(cfg::key::server, "NTP servers", cfg::server));
add(make_unique<wups::text_item>(cfg::key::server, "NTP Servers", cfg::server));
}

0 comments on commit c7da63d

Please sign in to comment.