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
46ca4110
Commit
46ca4110
authored
Mar 20, 2023
by
Bilal Elmoussaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use nightly rustfmt features
parent
85c69147
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
20 deletions
+25
-20
rustfmt.toml
rustfmt.toml
+7
-0
application.rs
src/application.rs
+6
-6
image_page.rs
src/widgets/image_page.rs
+5
-5
paginator.rs
src/widgets/paginator.rs
+2
-1
window.rs
src/widgets/window.rs
+5
-8
No files found.
rustfmt.toml
0 → 100644
View file @
46ca4110
imports_granularity
=
"Crate"
format_code_in_doc_comments
=
true
group_imports
=
"StdExternalCrate"
newline_style
=
"Unix"
normalize_comments
=
true
normalize_doc_attributes
=
true
wrap_comments
=
true
src/application.rs
View file @
46ca4110
use
crate
::
config
;
use
adw
::{
prelude
::
*
,
subclass
::
prelude
::
*
}
;
use
crate
::
widgets
::
Window
;
use
gtk
::{
gio
,
glib
}
;
use
adw
::
prelude
::
*
;
use
gtk
::{
gio
,
glib
,
subclass
::
prelude
::
*
};
use
crate
::{
config
,
widgets
::
Window
};
mod
imp
{
mod
imp
{
use
glib
::{
once_cell
::
sync
::
OnceCell
,
WeakRef
};
use
super
::
*
;
use
super
::
*
;
use
adw
::
subclass
::
prelude
::
*
;
use
gtk
::
glib
::{
once_cell
::
sync
::
OnceCell
,
WeakRef
};
#[derive(Debug,
Default)]
#[derive(Debug,
Default)]
pub
struct
Application
{
pub
struct
Application
{
...
...
src/widgets/image_page.rs
View file @
46ca4110
use
gtk
::
glib
;
use
gtk
::{
glib
,
prelude
::
*
,
subclass
::
prelude
::
*
};
use
gtk
::
prelude
::
*
;
use
gtk
::
subclass
::
prelude
::
*
;
mod
imp
{
mod
imp
{
use
super
::
*
;
use
gtk
::
glib
::
once_cell
::
sync
::
OnceCell
;
use
std
::
cell
::
RefCell
;
use
std
::
cell
::
RefCell
;
use
glib
::
once_cell
::
sync
::
OnceCell
;
use
super
::
*
;
#[derive(Debug,
Default,
glib
::
Properties,
gtk
::
CompositeTemplate)]
#[derive(Debug,
Default,
glib
::
Properties,
gtk
::
CompositeTemplate)]
#[properties(wrapper_type
=
super
::
ImagePageWidget)]
#[properties(wrapper_type
=
super
::
ImagePageWidget)]
#[template(resource
=
"/org/gnome/Tour/ui/image-page.ui"
)]
#[template(resource
=
"/org/gnome/Tour/ui/image-page.ui"
)]
...
...
src/widgets/paginator.rs
View file @
46ca4110
use
gtk
::{
gdk
,
glib
,
prelude
::
*
,
subclass
::
prelude
::
*
};
use
gtk
::{
gdk
,
glib
,
prelude
::
*
,
subclass
::
prelude
::
*
};
mod
imp
{
mod
imp
{
use
super
::
*
;
use
std
::
cell
::{
Cell
,
RefCell
};
use
std
::
cell
::{
Cell
,
RefCell
};
use
super
::
*
;
#[derive(Default,
Debug,
gtk
::
CompositeTemplate)]
#[derive(Default,
Debug,
gtk
::
CompositeTemplate)]
#[template(resource
=
"/org/gnome/Tour/ui/paginator.ui"
)]
#[template(resource
=
"/org/gnome/Tour/ui/paginator.ui"
)]
pub
struct
PaginatorWidget
{
pub
struct
PaginatorWidget
{
...
...
src/widgets/window.rs
View file @
46ca4110
use
crate
::
utils
::
i18n_f
;
use
adw
::{
prelude
::
*
,
subclass
::
prelude
::
*
};
use
adw
::
prelude
::
*
;
use
gtk
::
subclass
::
prelude
::
*
;
use
gtk
::{
gio
,
glib
};
use
gtk
::{
gio
,
glib
};
use
super
::
paginator
::
PaginatorWidget
;
use
super
::
paginator
::
PaginatorWidget
;
use
crate
::
Application
;
use
crate
::
{
utils
::
i18n_f
,
Application
}
;
mod
imp
{
mod
imp
{
use
super
::
*
;
use
super
::
*
;
use
crate
::
config
;
use
crate
::{
config
,
widgets
::
ImagePageWidget
};
use
crate
::
widgets
::
ImagePageWidget
;
use
adw
::
subclass
::
prelude
::
*
;
#[derive(Debug,
Default,
gtk
::
CompositeTemplate)]
#[derive(Debug,
Default,
gtk
::
CompositeTemplate)]
#[template(resource
=
"/org/gnome/Tour/ui/window.ui"
)]
#[template(resource
=
"/org/gnome/Tour/ui/window.ui"
)]
...
@@ -68,7 +64,8 @@ mod imp {
...
@@ -68,7 +64,8 @@ mod imp {
let
version
=
glib
::
os_info
(
"VERSION"
)
.unwrap_or_else
(||
""
.into
());
let
version
=
glib
::
os_info
(
"VERSION"
)
.unwrap_or_else
(||
""
.into
());
let
body
=
i18n_f
(
let
body
=
i18n_f
(
// Translators: The following string is formated as "Learn about new and essential features in GNOME 3.36" for example
// Translators: The following string is formated as "Learn about new and essential
// features in GNOME 3.36" for example
"Learn about the key features in {name} {version}."
,
"Learn about the key features in {name} {version}."
,
&
[(
"name"
,
&
name
),
(
"version"
,
&
version
)],
&
[(
"name"
,
&
name
),
(
"version"
,
&
version
)],
);
);
...
...
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