Commit 5cd50eed authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

paginator: Use derive Default instead

parent df887df0
......@@ -9,7 +9,7 @@ mod imp {
use super::*;
use std::cell::{Cell, RefCell};
#[derive(Debug, gtk::CompositeTemplate)]
#[derive(Default, Debug, gtk::CompositeTemplate)]
#[template(resource = "/org/gnome/Tour/ui/paginator.ui")]
pub struct PaginatorWidget {
#[template_child]
......@@ -25,20 +25,6 @@ mod imp {
pub(super) going_backward: Cell<bool>,
}
impl Default for PaginatorWidget {
fn default() -> Self {
Self {
carousel: TemplateChild::default(),
start_btn: TemplateChild::default(),
next_btn: TemplateChild::default(),
previous_btn: TemplateChild::default(),
pages: RefCell::default(),
current_page: Cell::new(0),
going_backward: Cell::new(false),
}
}
}
#[glib::object_subclass]
impl ObjectSubclass for PaginatorWidget {
const NAME: &'static str = "PaginatorWidget";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment