[gnome-tour] remove unneeded handle
- From: Bilal Elmoussaoui <bilelmoussaoui src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tour] remove unneeded handle
- Date: Tue, 14 Jul 2020 01:52:25 +0000 (UTC)
commit c6d42cedad509231735d6ca824f2d62435a3ac6b
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Tue Jul 14 01:30:10 2020 +0200
remove unneeded handle
src/widgets/pages/welcome.rs | 8 ++------
src/widgets/window.rs | 4 +++-
2 files changed, 5 insertions(+), 7 deletions(-)
---
diff --git a/src/widgets/pages/welcome.rs b/src/widgets/pages/welcome.rs
index 76529d7..b3a2185 100644
--- a/src/widgets/pages/welcome.rs
+++ b/src/widgets/pages/welcome.rs
@@ -4,14 +4,12 @@ use libhandy::prelude::HeaderBarExt;
pub struct WelcomePageWidget {
pub widget: gtk::Box,
- handle: libhandy::WindowHandle,
}
impl WelcomePageWidget {
pub fn new() -> Self {
let widget = gtk::Box::new(gtk::Orientation::Vertical, 0);
- let handle = libhandy::WindowHandle::new();
- let welcome_page = Self { widget, handle };
+ let welcome_page = Self { widget };
welcome_page.init();
welcome_page
@@ -72,9 +70,7 @@ impl WelcomePageWidget {
headerbar.set_show_close_button(true);
headerbar.set_title(Some(&gettext("Welcome Tour")));
- self.handle.add(&headerbar);
-
- self.widget.add(&self.handle);
+ self.widget.add(&headerbar);
self.widget.add(&container);
}
}
diff --git a/src/widgets/window.rs b/src/widgets/window.rs
index 8efbe7f..31f0df3 100644
--- a/src/widgets/window.rs
+++ b/src/widgets/window.rs
@@ -48,6 +48,8 @@ impl Window {
self.widget.set_default_size(920, 640);
self.deck.set_transition_type(libhandy::DeckTransitionType::Slide);
self.deck.set_transition_duration(300);
+ self.deck.set_can_swipe_back(true);
+ self.deck.set_can_swipe_forward(true);
// Devel Profile
if PROFILE == "Devel" {
@@ -56,7 +58,7 @@ impl Window {
self.deck.add(&self.welcome_page.widget);
- self.paginator.borrow().add_page(Box::new(ImagePageWidget::new(
+ self.paginator.borrow_mut().add_page(Box::new(ImagePageWidget::new(
"/org/gnome/Tour/activities.svg",
gettext("Activities Overview"),
gettext("Open Activities to start apps"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]