Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-welcome
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-welcome
Commits
5cd50eed
Commit
5cd50eed
authored
Sep 20, 2022
by
Bilal Elmoussaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
paginator: Use derive Default instead
parent
df887df0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
15 deletions
+1
-15
paginator.rs
src/widgets/paginator.rs
+1
-15
No files found.
src/widgets/paginator.rs
View file @
5cd50eed
...
...
@@ -9,7 +9,7 @@ mod imp {
use
super
::
*
;
use
std
::
cell
::{
Cell
,
RefCell
};
#[derive(Debug,
gtk
::
CompositeTemplate)]
#[derive(De
fault,
De
bug,
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"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment