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
d5041715
Commit
d5041715
authored
Feb 25, 2023
by
Bilal Elmoussaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop various uneeded constructors
parent
e386df84
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
30 deletions
+10
-30
application.rs
src/application.rs
+10
-10
image_page.rs
src/widgets/image_page.rs
+0
-10
paginator.rs
src/widgets/paginator.rs
+0
-10
No files found.
src/application.rs
View file @
d5041715
...
...
@@ -82,14 +82,6 @@ glib::wrapper! {
}
impl
Application
{
#[allow(clippy
::
new_without_default)]
pub
fn
new
()
->
Self
{
glib
::
Object
::
builder
()
.property
(
"application-id"
,
&
config
::
APP_ID
)
.property
(
"resource-base-path"
,
&
Some
(
"/org/gnome/Tour"
))
.build
()
}
fn
window
(
&
self
)
->
Window
{
self
.imp
()
.window
.get
()
.and_then
(|
w
|
w
.upgrade
())
.unwrap
()
}
...
...
@@ -98,7 +90,15 @@ impl Application {
log
::
info!
(
"GNOME Tour ({})"
,
config
::
APP_ID
);
log
::
info!
(
"Version: {} ({})"
,
config
::
VERSION
,
config
::
PROFILE
);
log
::
info!
(
"Datadir: {}"
,
config
::
PKGDATADIR
);
let
app
=
Self
::
new
();
app
.run
()
Self
::
default
()
.run
()
}
}
impl
Default
for
Application
{
fn
default
()
->
Self
{
glib
::
Object
::
builder
()
.property
(
"application-id"
,
config
::
APP_ID
)
.property
(
"resource-base-path"
,
"/org/gnome/Tour"
)
.build
()
}
}
src/widgets/image_page.rs
View file @
d5041715
...
...
@@ -115,13 +115,3 @@ glib::wrapper! {
pub
struct
ImagePageWidget
(
ObjectSubclass
<
imp
::
ImagePageWidget
>
)
@
extends
gtk
::
Widget
,
gtk
::
Box
;
}
impl
ImagePageWidget
{
pub
fn
new
(
resource_uri
:
&
str
,
head
:
String
,
body
:
String
)
->
Self
{
glib
::
Object
::
builder
()
.property
(
"resource-uri"
,
&
resource_uri
)
.property
(
"head"
,
&
head
)
.property
(
"body"
,
&
body
)
.build
()
}
}
src/widgets/paginator.rs
View file @
d5041715
...
...
@@ -91,10 +91,6 @@ glib::wrapper! {
}
impl
PaginatorWidget
{
pub
fn
new
()
->
Self
{
glib
::
Object
::
new
()
}
pub
fn
try_next
(
&
self
)
->
Option
<
()
>
{
let
imp
=
self
.imp
();
let
p
=
imp
.current_page
.get
()
+
1
;
...
...
@@ -189,9 +185,3 @@ impl PaginatorWidget {
}
}
}
impl
Default
for
PaginatorWidget
{
fn
default
()
->
Self
{
Self
::
new
()
}
}
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