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
024b77e7
Commit
024b77e7
authored
Jan 29, 2020
by
Bilal Elmoussaoui
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'bilelmoussaoui/design-review'
parents
4524b06d
d508815f
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
89 additions
and
103 deletions
+89
-103
README.md
README.md
+15
-2
meson_post_install.py
build-aux/meson_post_install.py
+0
-2
meson.build
data/meson.build
+0
-22
org.gnome.Tour.gschema.xml.in
data/org.gnome.Tour.gschema.xml.in
+0
-30
org.gnome.Tour.metainfo.xml.in.in
data/org.gnome.Tour.metainfo.xml.in.in
+8
-9
gnome-tour.doap
gnome-tour.doap
+1
-1
meson.build
meson.build
+0
-1
meson_options.txt
meson_options.txt
+21
-0
POTFILES.in
po/POTFILES.in
+3
-5
config.rs.in
src/config.rs.in
+3
-0
meson.build
src/meson.build
+3
-0
headerbar.rs
src/widgets/headerbar.rs
+5
-4
image.rs
src/widgets/pages/image.rs
+4
-4
welcome.rs
src/widgets/pages/welcome.rs
+7
-5
window.rs
src/widgets/window.rs
+19
-18
No files found.
README.md
View file @
024b77e7
# GNOME Greeter & Tour
\ No newline at end of file
# GNOME Greeter & Tour
#### Note for distributions:
You can customize the distribution name, version and the displayed icon using the config options
```
-Ddistro_name=Fedora -Ddistro_version=3.32 -Ddistro_icon_name=fedora-logo
```
build-aux/meson_post_install.py
View file @
024b77e7
...
...
@@ -8,7 +8,5 @@ if not environ.get('DESTDIR', ''):
DATA_DIR
=
path
.
join
(
PREFIX
,
'share'
)
print
(
'Updating icon cache...'
)
call
([
'gtk-update-icon-cache'
,
'-qtf'
,
path
.
join
(
DATA_DIR
,
'icons/hicolor'
)])
print
(
"Compiling new schemas..."
)
call
([
"glib-compile-schemas"
,
path
.
join
(
DATA_DIR
,
'glib-2.0/schemas'
)])
print
(
"Updating desktop database..."
)
call
([
"update-desktop-database"
,
path
.
join
(
DATA_DIR
,
'applications'
)])
data/meson.build
View file @
024b77e7
...
...
@@ -50,28 +50,6 @@ if appstream_util.found()
)
endif
# GSchema
gschema_conf = configuration_data()
gschema_conf.set('app-id', application_id)
gschema_conf.set('gettext-package', gettext_package)
configure_file(
input: '@0@.gschema.xml.in'.format(base_id),
output: '@0@.gschema.xml'.format(application_id),
configuration: gschema_conf,
install: true,
install_dir: datadir / 'glib-2.0' / 'schemas'
)
# Validata GSchema
if glib_compile_schemas.found()
test(
'validate-gschema', glib_compile_schemas,
args: [
'--strict', '--dry-run', meson.current_source_dir()
]
)
endif
# Resources
resources = gnome.compile_resources(
'resources',
...
...
data/org.gnome.Tour.gschema.xml.in
deleted
100644 → 0
View file @
4524b06d
<?xml version="1.0" encoding="utf-8"?>
<schemalist>
<schema
path=
"/org/gnome/Tour/"
id=
"@app-id@"
gettext-domain=
"@gettext-package@"
>
<key
name=
"window-width"
type=
"i"
>
<default>
-1
</default>
<summary>
Default window width
</summary>
<description>
Default window width
</description>
</key>
<key
name=
"window-height"
type=
"i"
>
<default>
-1
</default>
<summary>
Default window height
</summary>
<description>
Default window height
</description>
</key>
<key
name=
"window-x"
type=
"i"
>
<default>
-1
</default>
<summary>
Default window x position
</summary>
<description>
Default window x position
</description>
</key>
<key
name=
"window-y"
type=
"i"
>
<default>
-1
</default>
<summary>
Default window y position
</summary>
<description>
Default window y position
</description>
</key>
<key
name=
"is-maximized"
type=
"b"
>
<default>
false
</default>
<summary>
Default window maximized behaviour
</summary>
<description></description>
</key>
</schema>
</schemalist>
data/org.gnome.Tour.metainfo.xml.in.in
View file @
024b77e7
<?xml version="1.0" encoding="UTF-8"?>
<!-- Bilal Elmoussaoui 20
19
<bilal.elmoussaoui@gnome.org> -->
<!-- Bilal Elmoussaoui 20
20
<bilal.elmoussaoui@gnome.org> -->
<component
type=
"desktop-application"
>
<id>
@app-id@
</id>
<metadata_license>
CC0
</metadata_license>
<project_license>
GPL-3.0+
</project_license>
<name>
GNOME Tour
</name>
<summary>
A GTK + Rust application template
.
</summary>
<summary>
GNOME Tour and Greeter
.
</summary>
<description>
<p>
A
boilerplate template for GTK + Rust. It uses Meson as a build system and has flatpak support by default
.
</p>
<p>
A
guided tour and greeter for GNOME
.
</p>
</description>
<screenshots>
<screenshot
type=
"default"
>
<image>
https://gitlab.gnome.org/
bilelmoussaoui/gtk-rust-template
/raw/master/data/resources/screenshots/screenshot1.png
</image>
<image>
https://gitlab.gnome.org/
GNOME/gnome-tour
/raw/master/data/resources/screenshots/screenshot1.png
</image>
<caption>
Main Window
</caption>
</screenshot>
</screenshots>
<url
type=
"homepage"
>
https://gitlab.gnome.org/
bilelmoussaoui/gtk-rust-template
</url>
<url
type=
"bugtracker"
>
https://gitlab.gnome.org/
bilelmoussaoui/gtk-rust-template
/issues
</url>
<url
type=
"donation"
>
http
s://liberapay.com/bielmoussaoui
</url>
<url
type=
"homepage"
>
https://gitlab.gnome.org/
GNOME/gnome-tour
</url>
<url
type=
"bugtracker"
>
https://gitlab.gnome.org/
GNOME/gnome-tour
/issues
</url>
<url
type=
"donation"
>
http
://www.gnome.org/friends/
</url>
<content_rating
type=
"oars-1.0"
/>
<releases>
<release
version=
"0.0.1"
date=
"2019-07-11"
/>
...
...
@@ -32,7 +31,7 @@
<kudo>
HiDpiIcon
</kudo>
</kudos>
<project_group>
GNOME
</project_group>
<developer_name>
Bilal Elmoussaoui
</developer_name>
<developer_name>
The GNOME Project
</developer_name>
<update_contact>
bilal.elmoussaoui@gnome.org
</update_contact>
<translation
type=
"gettext"
>
@gettext-package@
</translation>
<launchable
type=
"desktop-id"
>
@app-id@.desktop
</launchable>
...
...
gnome-tour.doap
View file @
024b77e7
...
...
@@ -9,7 +9,7 @@
<shortdesc
xml:lang=
"en"
>
GNOME Tour and Greeter
</shortdesc>
<bug-database
rdf:resource=
"https://gitlab.gnome.org/
World/design/contrast
"
/>
<bug-database
rdf:resource=
"https://gitlab.gnome.org/
GNOME/gnome-tour
"
/>
<category
rdf:resource=
"http://api.gnome.org/doap-extensions#apps"
/>
<programming-language>
Rust
</programming-language>
<maintainer>
...
...
meson.build
View file @
024b77e7
...
...
@@ -16,7 +16,6 @@ dependency('gtk4', version: '>= 3.96.0')
glib_compile_resources = find_program('glib-compile-resources', required: true)
glib_compile_schemas = find_program('glib-compile-schemas', required: true)
desktop_file_validate = find_program('desktop-file-validate', required: false)
appstream_util = find_program('appstream-util', required: false)
cargo = find_program('cargo', required: false)
...
...
meson_options.txt
View file @
024b77e7
...
...
@@ -8,3 +8,24 @@ option (
value: 'default',
description: 'The build profile for GNOME Tour. One of "default" or "development".'
)
option (
'distro_name',
type: 'string',
value: 'GNOME',
description: 'Distro name, used for branding.'
)
option (
'distro_icon_name',
type: 'string',
value: 'start-here-symbolic',
description: 'Distro icon name, used for branding.'
)
option (
'distro_version',
type: 'string',
value: '3.36',
description: 'Distro version, used for branding.'
)
po/POTFILES.in
View file @
024b77e7
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/config.rs.in
View file @
024b77e7
...
...
@@ -5,3 +5,6 @@ pub static NAME_SUFFIX: &'static str = @NAME_SUFFIX@;
pub static VERSION: &'static str = @VERSION@;
pub static GETTEXT_PACKAGE: &'static str = @GETTEXT_PACKAGE@;
pub static LOCALEDIR: &'static str = @LOCALEDIR@;
pub static DISTRO_NAME: &'static str = @DISTRO_NAME@;
pub static DISTRO_VERSION: &'static str = @DISTRO_VERSION@;
pub static DISTRO_ICON_NAME: &'static str = @DISTRO_ICON_NAME@;
src/meson.build
View file @
024b77e7
...
...
@@ -6,6 +6,9 @@ global_conf.set_quoted('NAME_SUFFIX', name_suffix)
global_conf.set_quoted('VERSION', version + version_suffix)
global_conf.set_quoted('GETTEXT_PACKAGE', gettext_package)
global_conf.set_quoted('LOCALEDIR', localedir)
global_conf.set_quoted('DISTRO_NAME', get_option('distro_name'))
global_conf.set_quoted('DISTRO_VERSION', get_option('distro_version'))
global_conf.set_quoted('DISTRO_ICON_NAME', get_option('distro_icon_name'))
config = configure_file(
input: 'config.rs.in',
output: 'config.rs',
...
...
src/widgets/headerbar.rs
View file @
024b77e7
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 @
024b77e7
...
...
@@ -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 @
024b77e7
use
crate
::
config
;
use
gettextrs
::
gettext
;
use
gtk
::
prelude
::
*
;
pub
struct
WelcomePageWidget
{
...
...
@@ -20,16 +22,16 @@ impl WelcomePageWidget {
self
.widget
.set_margin_top
(
24
);
self
.widget
.set_margin_bottom
(
24
);
let
logo
=
gtk
::
Image
::
new_from_icon_name
(
Some
(
"start-here-symbolic"
));
let
logo
=
gtk
::
Image
::
new_from_icon_name
(
Some
(
config
::
DISTRO_ICON_NAME
));
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
(
format!
(
"Welcome to {} {}"
,
config
::
DISTRO_NAME
,
config
::
DISTRO_VERSION
))
));
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 +41,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 @
024b77e7
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