Compare commits

..

No commits in common. "d7af07b2755d5d032f36c8c1f858fd4f0ef60c0e" and "6fbbe918fe377f356c0f1a097844affc00025963" have entirely different histories.

3 changed files with 4 additions and 23 deletions

2
Cargo.lock generated
View File

@ -4,7 +4,7 @@ version = 3
[[package]]
name = "annoying_journal"
version = "0.1.3"
version = "0.1.2"
dependencies = [
"chrono",
"fltk",

View File

@ -8,7 +8,7 @@ license = "AGPL-3.0"
name = "annoying_journal"
readme = "README.md"
repository = "https://six-five-six-four.com/git/reactor/annoying_journal"
version = "0.1.3"
version = "0.1.2"
exclude = [
"COPYING",

View File

@ -11,7 +11,6 @@ use chrono::{
use fltk::{
app,
button,
frame,
prelude::*,
text,
window::Window,
@ -99,7 +98,6 @@ struct JournalLine {
struct Gui {
time_popped_up: Option <DateTime <Local>>,
editor: text::TextEditor,
status: frame::Frame,
wind: Window,
}
@ -121,31 +119,15 @@ impl Gui {
let mut but = button::ReturnButton::new (640 - 100, 480 - 50, 100, 50, "Submit");
but.emit (fltk_tx, Message::Submit);
let status = frame::Frame::new (0, 480 - 50, 640 - 100, 50, "");
wind.set_label ("ANNOYING JOURNAL");
wind.end ();
wind.show ();
let mut that = Self {
Self {
time_popped_up: Some (Local::now ()),
editor,
status,
wind,
};
that.refresh_status ();
that
}
fn refresh_status (&mut self) {
let version = option_env! ("CARGO_PKG_VERSION").unwrap_or ("(???)");
let time_popped_up = self.time_popped_up
.map (|x| x.to_rfc3339_opts (SecondsFormat::Secs, true))
.unwrap_or_else (|| "(???)".to_string ());
self.status.set_label (&format! ("v{}, popped up at {}", version, time_popped_up));
}
fn pop_up (&mut self) -> Result <(), Error> {
@ -155,7 +137,6 @@ impl Gui {
}
self.time_popped_up = Some (Local::now ());
self.refresh_status ();
self.wind.set_label ("ANNOYING JOURNAL");
self.wind.show ();
self.editor.take_focus ()?;