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
efa5daac
Commit
efa5daac
authored
Jan 29, 2020
by
Bilal Elmoussaoui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare i18n
parent
4524b06d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
35 deletions
+36
-35
POTFILES.in
po/POTFILES.in
+3
-5
headerbar.rs
src/widgets/headerbar.rs
+5
-4
image.rs
src/widgets/pages/image.rs
+4
-4
welcome.rs
src/widgets/pages/welcome.rs
+5
-4
window.rs
src/widgets/window.rs
+19
-18
No files found.
po/POTFILES.in
View file @
efa5daac
data/org.gnome.Tour.metainfo.xml.in.in
data/org.gnome.Tour.desktop.in.in
data/org.gnome.Tour.gschema.xml.in
data/resources/ui/about_dialog.ui.in
data/resources/ui/menu.ui
data/resources/ui/shortcuts.ui
data/resources/ui/window.ui.in
src/widgets/pages/welcome.rs
src/widgets/headerbar.rs
src/widgets/window.rs
src/widgets/headerbar.rs
View file @
efa5daac
use
gettextrs
::
gettext
;
use
gtk
::
prelude
::
*
;
pub
struct
HeaderBar
{
...
...
@@ -24,9 +25,9 @@ impl HeaderBar {
pub
fn
set_page_nr
(
&
self
,
page_nr
:
i32
,
total_pages
:
i32
)
{
if
page_nr
==
total_pages
{
self
.next_btn
.set_label
(
"Done"
);
self
.next_btn
.set_label
(
&
gettext
(
"Close"
)
);
}
else
{
self
.next_btn
.set_label
(
"Next"
);
self
.next_btn
.set_label
(
&
gettext
(
"Next"
)
);
}
}
...
...
@@ -48,7 +49,7 @@ impl HeaderBar {
let
container
=
gtk
::
HeaderBar
::
new
();
container
.set_show_title_buttons
(
true
);
container
.set_title
(
Some
(
"Welcome Tour"
));
container
.set_title
(
Some
(
&
gettext
(
"Welcome Tour"
)
));
self
.widget
.add_named
(
&
container
,
"welcome"
);
let
previous_btn
=
gtk
::
Button
::
new
();
...
...
@@ -58,7 +59,7 @@ impl HeaderBar {
previous_btn
.set_hexpand
(
true
);
previous_btn
.set_property_width_request
(
60
);
self
.next_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
"Next"
)));
self
.next_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"Next"
)
)));
self
.next_btn
.get_style_context
()
.add_class
(
"suggested-action"
);
self
.next_btn
.set_action_name
(
Some
(
"app.next-page"
));
self
.next_btn
.set_halign
(
gtk
::
Align
::
End
);
...
...
src/widgets/pages/image.rs
View file @
efa5daac
...
...
@@ -28,15 +28,15 @@ impl Pageable for ImagePageWidget {
}
impl
ImagePageWidget
{
pub
fn
new
(
resource_uri
:
&
str
,
title
:
&
str
,
head
:
&
str
,
body
:
&
str
)
->
Self
{
pub
fn
new
(
resource_uri
:
&
str
,
title
:
String
,
head
:
String
,
body
:
String
)
->
Self
{
let
widget
=
gtk
::
Box
::
new
(
gtk
::
Orientation
::
Vertical
,
12
);
let
image_page
=
Self
{
widget
,
resource_uri
:
resource_uri
.to_string
(),
title
:
title
.to_string
()
,
head
:
head
.to_string
()
,
body
:
body
.to_string
()
,
title
,
head
,
body
,
};
image_page
.init
();
...
...
src/widgets/pages/welcome.rs
View file @
efa5daac
use
gettextrs
::
gettext
;
use
gtk
::
prelude
::
*
;
pub
struct
WelcomePageWidget
{
...
...
@@ -24,12 +25,12 @@ impl WelcomePageWidget {
logo
.set_pixel_size
(
196
);
self
.widget
.add
(
&
logo
);
let
title
=
gtk
::
Label
::
new
(
Some
(
"Welcome to GNOME 3.34"
));
let
title
=
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"Welcome to GNOME 3.34"
)
));
title
.set_margin_top
(
36
);
title
.get_style_context
()
.add_class
(
"large-title"
);
self
.widget
.add
(
&
title
);
let
text
=
gtk
::
Label
::
new
(
Some
(
"Hi there! If you are new to GNOME, you can take the tour to learn some essential features."
));
let
text
=
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"Hi there! If you are new to GNOME, you can take the tour to learn some essential features."
)
));
text
.get_style_context
()
.add_class
(
"body"
);
text
.set_margin_top
(
12
);
self
.widget
.add
(
&
text
);
...
...
@@ -39,14 +40,14 @@ impl WelcomePageWidget {
actions_container
.set_margin_top
(
36
);
let
start_tour_btn
=
gtk
::
Button
::
new
();
start_tour_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
"Take the Tour"
)));
start_tour_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"Take the Tour"
)
)));
start_tour_btn
.get_style_context
()
.add_class
(
"suggested-action"
);
start_tour_btn
.set_property_height_request
(
40
);
start_tour_btn
.set_property_width_request
(
180
);
start_tour_btn
.set_action_name
(
Some
(
"app.start-tour"
));
let
skip_tour_btn
=
gtk
::
Button
::
new
();
skip_tour_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
"No Thanks"
)));
skip_tour_btn
.add
(
&
gtk
::
Label
::
new
(
Some
(
&
gettext
(
"No Thanks"
)
)));
skip_tour_btn
.set_property_height_request
(
40
);
skip_tour_btn
.set_property_width_request
(
180
);
skip_tour_btn
.set_action_name
(
Some
(
"app.skip-tour"
));
...
...
src/widgets/window.rs
View file @
efa5daac
use
gettextrs
::
gettext
;
use
gtk
::
prelude
::
*
;
use
super
::
headerbar
::
HeaderBar
;
...
...
@@ -90,43 +91,43 @@ impl Window {
self
.paginator
.add_page
(
Box
::
new
(
ImagePageWidget
::
new
(
"/org/gnome/Tour/activities.svg"
,
"Activities Overview"
,
"Open Activities to start apps"
,
"You can also view open windows, search and use workspaces."
,
gettext
(
"Activities Overview"
)
,
gettext
(
"Open Activities to start apps"
)
,
gettext
(
"You can also view open windows, search and use workspaces."
)
,
)));
self
.paginator
.add_page
(
Box
::
new
(
ImagePageWidget
::
new
(
"/org/gnome/Tour/search.svg"
,
"Search"
,
"In the Activities Overview, just start typing to search"
,
"Search can be used to launch apps, find settings, do calculations and much more."
,
gettext
(
"Search"
)
,
gettext
(
"In the Activities Overview, just start typing to search"
)
,
gettext
(
"Search can be used to launch apps, find settings, do calculations and much more."
)
,
)));
self
.paginator
.add_page
(
Box
::
new
(
ImagePageWidget
::
new
(
"/org/gnome/Tour/calendar.svg"
,
"Date & Time"
,
"Click the time to see your now and next"
,
"This includes notifications, media controls, calendar events, the weather and world clocks."
,
gettext
(
"Date & Time"
)
,
gettext
(
"Click the time to see your now and next"
)
,
gettext
(
"This includes notifications, media controls, calendar events, the weather and world clocks."
)
,
)));
self
.paginator
.add_page
(
Box
::
new
(
ImagePageWidget
::
new
(
"/org/gnome/Tour/status-menu.svg"
,
"System Menu"
,
"View system information and settings"
,
"Get an overview of the system status and quickly change settings."
,
gettext
(
"System Menu"
)
,
gettext
(
"View system information and settings"
)
,
gettext
(
"Get an overview of the system status and quickly change settings."
)
,
)));
self
.paginator
.add_page
(
Box
::
new
(
ImagePageWidget
::
new
(
"/org/gnome/Tour/software.svg"
,
"Software"
,
"Find and install apps"
,
"The Software app makese it easy to find and install all the apps you need."
,
gettext
(
"Software"
)
,
gettext
(
"Find and install apps"
)
,
gettext
(
"The Software app makese it easy to find and install all the apps you need."
)
,
)));
self
.paginator
.add_page
(
Box
::
new
(
ImagePageWidget
::
new
(
"/org/gnome/Tour/help.svg"
,
"Learn More"
,
"That's it! To learn more, see the Help"
,
"The help app contains information, tips and tricks."
,
gettext
(
"Learn More"
)
,
gettext
(
"That's it! To learn more, see the Help"
)
,
gettext
(
"The help app contains information, tips and tricks."
)
,
)));
self
.container
.add_named
(
&
self
.paginator.widget
,
"pages"
);
...
...
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