diff options
-rw-r--r-- | po/Furtherance.pot | 34 | ||||
-rwxr-xr-x | src/ui/window.rs | 26 |
2 files changed, 29 insertions, 31 deletions
diff --git a/po/Furtherance.pot b/po/Furtherance.pot index ea2fd5b..4c36890 100644 --- a/po/Furtherance.pot +++ b/po/Furtherance.pot @@ -124,7 +124,7 @@ msgstr "" msgid "_Dark theme" msgstr "" -#: src/gtk/preferences_window.ui:28 src/ui/window.rs:556 +#: src/gtk/preferences_window.ui:28 src/ui/window.rs:562 msgid "Idle" msgstr "" @@ -306,7 +306,7 @@ msgid "Task Details" msgstr "" #: src/gtk/task_details.ui:96 src/application.rs:287 src/ui/task_details.rs:191 -#: src/ui/window.rs:333 src/ui/window.rs:595 +#: src/ui/window.rs:333 src/ui/window.rs:601 msgid "Stop" msgstr "" @@ -378,16 +378,16 @@ msgstr "" msgid "DELETE" msgstr "" -#: src/application.rs:264 src/ui/window.rs:559 +#: src/application.rs:264 src/ui/window.rs:565 msgid "Discard" msgstr "" -#: src/application.rs:265 src/application.rs:286 src/ui/window.rs:560 -#: src/ui/window.rs:594 +#: src/application.rs:265 src/application.rs:286 src/ui/window.rs:566 +#: src/ui/window.rs:600 msgid "Continue" msgstr "" -#: src/application.rs:276 src/ui/window.rs:591 +#: src/application.rs:276 src/ui/window.rs:597 msgid "Time's up!" msgstr "" @@ -419,11 +419,11 @@ msgstr "" msgid "Edit Task" msgstr "" -#: src/ui/task_details.rs:210 +#: src/ui/task_details.rs:210 src/ui/window.rs:355 msgid "*Use your local format XX/XX/XX HH:MM:SS" msgstr "" -#: src/ui/task_details.rs:212 +#: src/ui/task_details.rs:212 src/ui/window.rs:357 msgid "*Use your local format XX/XX/XX HH:MM" msgstr "" @@ -483,36 +483,28 @@ msgstr "" msgid "tags" msgstr "" -#: src/ui/window.rs:355 -msgid "*Use the format MMM DD YYYY HH:MM:SS" -msgstr "" - -#: src/ui/window.rs:357 -msgid "*Use the format MMM DD YYYY HH:MM" -msgstr "" - #: src/ui/window.rs:373 msgid "*Task name cannot be blank." msgstr "" -#: src/ui/window.rs:547 +#: src/ui/window.rs:553 msgid "You have been idle for " msgstr "" -#: src/ui/window.rs:548 +#: src/ui/window.rs:554 msgid "" "\n" "Would you like to discard that time, or continue the clock?" msgstr "" -#: src/ui/window.rs:689 +#: src/ui/window.rs:695 msgid "Autosave Restored" msgstr "" -#: src/ui/window.rs:692 +#: src/ui/window.rs:698 msgid "Furtherance shut down improperly. An autosave was restored." msgstr "" -#: src/ui/window.rs:751 +#: src/ui/window.rs:757 msgid "Stop the timer to duplicate a task." msgstr "" diff --git a/src/ui/window.rs b/src/ui/window.rs index 992bc9f..133da09 100755 --- a/src/ui/window.rs +++ b/src/ui/window.rs @@ -338,13 +338,13 @@ impl FurtheranceWindow { let stop_time = Local::now(); let start_time = stop_time - ChronDur::seconds(1); - let mut start_time_w_year = start_time.format("%h %d %Y %H:%M:%S").to_string(); + let mut start_time_w_year = start_time.format("%x %H:%M:%S").to_string(); if !settings_manager::get_bool("show-seconds") { - start_time_w_year = start_time.format("%h %d %Y %H:%M").to_string(); + start_time_w_year = start_time.format("%x %H:%M").to_string(); } - let mut stop_time_w_year = stop_time.format("%h %d %Y %H:%M:%S").to_string(); + let mut stop_time_w_year = stop_time.format("%x %H:%M:%S").to_string(); if !settings_manager::get_bool("show-seconds") { - stop_time_w_year = stop_time.format("%h %d %Y %H:%M").to_string(); + stop_time_w_year = stop_time.format("%x %H:%M").to_string(); } let start_time_edit = gtk::Entry::new(); start_time_edit.set_text(&start_time_w_year); @@ -352,9 +352,9 @@ impl FurtheranceWindow { stop_time_edit.set_text(&stop_time_w_year); let instructions = gtk::Label::new(Some( - &gettext("*Use the format MMM DD YYYY HH:MM:SS"))); + &gettext("*Use your local format XX/XX/XX HH:MM:SS"))); if !settings_manager::get_bool("show-seconds") { - instructions.set_text(&gettext("*Use the format MMM DD YYYY HH:MM")); + instructions.set_text(&gettext("*Use your local format XX/XX/XX HH:MM")); } instructions.set_visible(false); instructions.add_css_class("error_message"); @@ -410,11 +410,11 @@ impl FurtheranceWindow { if settings_manager::get_bool("show-seconds") { new_start_time = NaiveDateTime::parse_from_str( &new_start_time_str, - "%h %d %Y %H:%M:%S"); + "%x %H:%M:%S"); } else { new_start_time = NaiveDateTime::parse_from_str( &new_start_time_str, - "%h %d %Y %H:%M"); + "%x %H:%M"); } if let Err(_) = new_start_time { instructions.set_visible(true); @@ -433,11 +433,11 @@ impl FurtheranceWindow { if settings_manager::get_bool("show-seconds") { new_stop_time = NaiveDateTime::parse_from_str( &new_stop_time_str, - "%h %d %Y %H:%M:%S"); + "%x %H:%M:%S"); } else { new_stop_time = NaiveDateTime::parse_from_str( &new_stop_time_str, - "%h %d %Y %H:%M"); + "%x %H:%M"); } if let Err(_) = new_stop_time { instructions.set_visible(true); @@ -450,6 +450,12 @@ impl FurtheranceWindow { } } + // Start time can't be later than stop time + if !do_not_close && (new_stop_time_local - new_start_time_local).num_seconds() < 0 { + time_error.set_visible(true); + do_not_close = true; + } + // Tags let mut new_tag_list = "".to_string(); if !task_tags_edit.text().trim().is_empty() { |