Skip to content

Commit

Permalink
Updates relm to 0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
sanpii committed Feb 7, 2020
1 parent 7a7b871 commit 1c49c16
Show file tree
Hide file tree
Showing 20 changed files with 35 additions and 41 deletions.
18 changes: 7 additions & 11 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,23 @@ homepage = "https://github.com/sanpii/effitask"
edition = "2018"

[dependencies]
cairo-rs = "^0.7"
cairo-rs = "^0.8"
chrono = "^0.4"
gdk = "^0.11"
dirs-sys = "^0.3"
gdk = "^0.12"
gdk-sys = "^0.9"
glib = "^0.8"
glib = "^0.9"
human-panic = "^1.0"
lazy_static = "^1.4"
notify = "^4.0"
pulldown-cmark = "^0.6"
rand = "^0.7"
regex = "^1.0"
relm = "^0.18"
relm-attributes = "^0.16"
relm-derive = "^0.18"
xdg = "^2.1"
relm = "^0.19"
relm-derive = "^0.19"

[dependencies.gtk]
version = "0.7"
version = "0.8"
features = ["v3_22"]

[dependencies.log]
Expand All @@ -34,8 +33,5 @@ features = ["std"]
version = "^1.2"
features = ["extended"]

[features]
default = ["relm-attributes/unstable"]

[badges]
gitlab = { repository = "sanpi/effitask", branch = "master" }
2 changes: 1 addition & 1 deletion src/add.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pub enum Msg {
Add(Option<String>),
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Widget {
fn model(_: ()) {}

Expand Down
2 changes: 1 addition & 1 deletion src/agenda.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl Widget {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Widget {
fn model(_: ()) {}

Expand Down
2 changes: 1 addition & 1 deletion src/application/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ impl Widget {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Widget {
fn init_view(&mut self) {
self.edit.widget().hide();
Expand Down
2 changes: 1 addition & 1 deletion src/done.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ impl Widget {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Widget {
fn model(_: ()) {}

Expand Down
2 changes: 1 addition & 1 deletion src/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ impl Widget {
}

#[allow(clippy::cognitive_complexity)]
#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Widget {
fn init_view(&mut self) {
self.note.set_property_height_request(150);
Expand Down
2 changes: 1 addition & 1 deletion src/flag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Widget {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Widget {
fn model(_: ()) {}

Expand Down
2 changes: 1 addition & 1 deletion src/inbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Widget {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Widget {
fn model() {}

Expand Down
2 changes: 1 addition & 1 deletion src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ impl Widget {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Widget {
fn init_view(&mut self) {
self.init();
Expand Down
2 changes: 0 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#[macro_use]
extern crate relm;

use relm::Widget;

Expand Down
2 changes: 1 addition & 1 deletion src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Widget {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Widget {
fn model(_: ()) -> String {
String::new()
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/calendar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl Calendar {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Calendar {
fn init_view(&mut self) {
self.entry
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/circle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl Circle {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Circle {
fn init_view(&mut self) {
self.model.draw_handler.init(&self.drawing_area);
Expand Down
14 changes: 7 additions & 7 deletions src/widgets/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl Filter {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Filter {
fn init_view(&mut self) {
self.filters.set_size_request(200, -1);
Expand All @@ -134,10 +134,10 @@ impl relm::Widget for Filter {

fn model(_: ()) -> gtk::TreeStore {
let columns = vec![
gtk::Type::String,
gtk::Type::String,
gtk::Type::U32,
gtk::Type::String,
glib::types::Type::String,
glib::types::Type::String,
glib::types::Type::U32,
glib::types::Type::String,
];

gtk::TreeStore::new(&columns)
Expand Down Expand Up @@ -177,8 +177,8 @@ impl relm::Widget for Filter {
};

match list_model.get_value(&iter, Column::Raw.into()).get() {
Some(value) => filters.push(value),
None => continue,
Ok(Some(value)) => filters.push(value),
Ok(None) | Err(_) => continue,
};
}

Expand Down
10 changes: 5 additions & 5 deletions src/widgets/keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ impl Keywords {
None => return keywords,
};

while let Some(name) = self.model.store.get_value(&iter, Column::Name.into()).get() {
while let Ok(Some(name)) = self.model.store.get_value(&iter, Column::Name.into()).get() {
let value = match self
.model
.store
.get_value(&iter, Column::Value.into())
.get()
{
Some(value) => value,
None => break,
Ok(Some(value)) => value,
Ok(None) | Err(_) => break,
};

keywords.insert(name, value);
Expand Down Expand Up @@ -117,7 +117,7 @@ impl Keywords {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Keywords {
fn init_view(&mut self) {
self.scroll
Expand Down Expand Up @@ -160,7 +160,7 @@ impl relm::Widget for Keywords {
}

fn model(relm: &relm::Relm<Self>, _: ()) -> Model {
let columns = vec![::gtk::Type::String, gtk::Type::String];
let columns = vec![glib::types::Type::String, glib::types::Type::String];

Model {
store: gtk::ListStore::new(&columns),
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/priority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl Priority {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Priority {
fn init_view(&mut self) {
self.button
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/repeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ impl Repeat {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Repeat {
fn init_view(&mut self) {
self.num.set_adjustment(&gtk::Adjustment::new(
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/tags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl Tags {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Tags {
fn model(tag: Type) -> Type {
tag
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub struct Model {
}

#[allow(clippy::cognitive_complexity)]
#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Task {
fn init_view(&mut self) {
use gtk::StyleContextExt;
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/tasks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl Tasks {
}
}

#[relm_attributes::widget]
#[relm_derive::widget]
impl relm::Widget for Tasks {
fn model(relm: &relm::Relm<Self>, _: ()) -> Model {
Model {
Expand Down

0 comments on commit 1c49c16

Please sign in to comment.